synthesisui 0.16.284 → 0.16.285
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/commands/add.js +26 -7
- package/dist/commands/sync.js +27 -2
- package/dist/install-marks.js +1 -1
- package/package.json +1 -1
package/dist/commands/add.js
CHANGED
|
@@ -490,20 +490,39 @@ export async function add(slug, opts) {
|
|
|
490
490
|
? nextFontSnippet(families, payload.slug, appDir)
|
|
491
491
|
: null;
|
|
492
492
|
if (nextFonts) {
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
493
|
+
/**
|
|
494
|
+
* UM `fonts.ts` POR APP, e não só no primeiro - lacuna do próprio conserto de 22/08.
|
|
495
|
+
*
|
|
496
|
+
* Aquele conserto ensinou o `add` a ENCONTRAR os apps de um monorepo e a NOMEAR todos eles, e
|
|
497
|
+
* depois escrevia em um só. Metade da fiação entregue é a metade que engana: o cliente lê que
|
|
498
|
+
* dois apps foram encontrados, vê o arquivo aparecer, e descobre que o segundo ficou sem quando
|
|
499
|
+
* a tipografia dele não carrega.
|
|
500
|
+
*
|
|
501
|
+
* Cada app tem o seu, porque `next/font` é por app: o `layout.tsx` de cada um importa do próprio
|
|
502
|
+
* `fonts.ts`. Um arquivo compartilhado atravessaria a fronteira do workspace.
|
|
503
|
+
*/
|
|
504
|
+
const wroteIn = [];
|
|
505
|
+
for (const dir of appDirs.length > 0 ? appDirs : [appDir]) {
|
|
506
|
+
const fontsPath = join(projectRoot, ...dir.split("/"), "fonts.ts");
|
|
507
|
+
/** Arquivo dele que já existe nunca é reescrito - o setup impresso diz o que ele deve exportar. */
|
|
508
|
+
if (await exists(fontsPath))
|
|
509
|
+
continue;
|
|
510
|
+
if (!(await exists(join(projectRoot, ...dir.split("/")))))
|
|
511
|
+
continue;
|
|
512
|
+
const snippet = nextFontSnippet(families, payload.slug, dir);
|
|
513
|
+
if (!snippet)
|
|
514
|
+
continue;
|
|
497
515
|
const header = [
|
|
498
516
|
`// Self-hosted type for the "${payload.slug}" design system (via next/font -`,
|
|
499
517
|
`// preloaded, no font flash). Generated by \`synthesisui add\`; edit freely.`,
|
|
500
518
|
];
|
|
501
|
-
await writeFile(fontsPath, `${[...header, ...
|
|
502
|
-
|
|
519
|
+
await writeFile(fontsPath, `${[...header, ...snippet.fontsFile.slice(1)].join("\n")}\n`, "utf8");
|
|
520
|
+
wroteIn.push(`${dir}/fonts.ts`);
|
|
503
521
|
}
|
|
522
|
+
const wroteFonts = wroteIn.length > 0;
|
|
504
523
|
console.log("");
|
|
505
524
|
if (wroteFonts) {
|
|
506
|
-
console.log(line(`3. ✓ wrote ${
|
|
525
|
+
console.log(line(`3. ✓ wrote ${wroteIn.join(", ")} - self-hosted type via next/font (preloaded, no font flash).`));
|
|
507
526
|
console.log(line(" Finish the wiring with two small edits:"));
|
|
508
527
|
}
|
|
509
528
|
else {
|
package/dist/commands/sync.js
CHANGED
|
@@ -150,7 +150,24 @@ export async function sync(opts) {
|
|
|
150
150
|
const requests = await readRequests(root);
|
|
151
151
|
/** O que ele declarou sobre as formas dele - ver `declared-forms.ts`. */
|
|
152
152
|
const forms = await readDeclaredForms(root);
|
|
153
|
-
|
|
153
|
+
/**
|
|
154
|
+
* O REGISTRO ESTAR VAZIO NÃO É MOTIVO PARA NÃO ENVIAR NADA - e era, e isso custou uma promessa.
|
|
155
|
+
*
|
|
156
|
+
* O QUE O CLIENTE PERDIA. O estado do repositório - em que versão ele está, com qual CLI - viaja no
|
|
157
|
+
* MESMO pacote que o registro de checagens. Este `return` acontecia antes do envio, e ele dispara
|
|
158
|
+
* exatamente no estado de quem acabou de instalar: o hook nunca rodou, então não há evento nenhum.
|
|
159
|
+
*
|
|
160
|
+
* Resultado medido em 22/08: `repo_state` nulo em 25 dos 26 sistemas em produção. A tela nunca
|
|
161
|
+
* conseguiu dizer *"você está na v1 e existe a v2"*, para ninguém, desde que a coluna existe.
|
|
162
|
+
*
|
|
163
|
+
* A ROTA JÁ ESTAVA PRONTA, e é isso que faz disto meia jornada e não uma feature faltando:
|
|
164
|
+
* `api/ledger` grava o estado antes dos eventos e diz por quê - *"gravá-lo não depende de haver
|
|
165
|
+
* evento nenhum"*. Os dois lados concordavam; o cliente é que voltava antes de falar.
|
|
166
|
+
*
|
|
167
|
+
* A frase continua sendo dita - ela é verdade e é útil. O que muda é que ela para de ser uma saída.
|
|
168
|
+
*/
|
|
169
|
+
const emptyLedger = events.length === 0 && requests.length === 0;
|
|
170
|
+
if (emptyLedger && !repo && forms.length === 0) {
|
|
154
171
|
console.log(section("Sync"));
|
|
155
172
|
console.log(body("Nothing recorded yet. The record fills as the hook checks writes and doctor runs."));
|
|
156
173
|
return;
|
|
@@ -209,7 +226,15 @@ export async function sync(opts) {
|
|
|
209
226
|
*/
|
|
210
227
|
const gained = await inherit(root, out.inheritedForms ?? []);
|
|
211
228
|
console.log(section("Sync"));
|
|
212
|
-
|
|
229
|
+
/**
|
|
230
|
+
* "0 CHECKS SENT" NÃO É O QUE ACONTECEU quando o registro está vazio e o estado do repo foi.
|
|
231
|
+
*
|
|
232
|
+
* A frase antiga contava eventos; num repositório recém-instalado ela leria "0 checks sent, 0 new"
|
|
233
|
+
* e esconderia a única coisa que realmente subiu. Quem lê "0" conclui que o comando não fez nada.
|
|
234
|
+
*/
|
|
235
|
+
console.log(body(emptyLedger
|
|
236
|
+
? `No checks recorded here yet - the record fills as the hook checks writes and doctor runs.${repo ? " This repo's installed version was sent, so the platform can tell you when a newer one exists." : ""}`
|
|
237
|
+
: `${out.eventsReceived} checks sent, ${out.eventsNew} new. ${out.requestsNow} open request${out.requestsNow === 1 ? "" : "s"}.`));
|
|
213
238
|
if (gained > 0) {
|
|
214
239
|
console.log("");
|
|
215
240
|
console.log(body(`${gained} form${gained === 1 ? "" : "s"} your team already taught the pipeline now apply here too - the next measurement reads them without you declaring anything.`));
|
package/dist/install-marks.js
CHANGED
|
@@ -128,7 +128,7 @@
|
|
|
128
128
|
* é sempre o bump deste PR - nunca o número que o `package.json` já carrega, porque alguém pode
|
|
129
129
|
* publicar no meio.
|
|
130
130
|
*/
|
|
131
|
-
export const MATERIALISER_SINCE = "0.16.
|
|
131
|
+
export const MATERIALISER_SINCE = "0.16.285";
|
|
132
132
|
/**
|
|
133
133
|
* A ÚLTIMA VERSÃO EM QUE O QUE O HOOK RODA MUDOU.
|
|
134
134
|
*
|
package/package.json
CHANGED