synthesisui 0.16.459 → 0.16.460
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 +7 -1
- package/dist/commands/align.js +1 -1
- package/dist/commands/init.js +1 -0
- package/dist/commands/mcp.js +7 -1
- package/dist/commands/sync.js +30 -0
- package/dist/index.js +1 -0
- package/package.json +1 -1
package/dist/commands/add.js
CHANGED
|
@@ -344,6 +344,8 @@ export async function add(slug, opts) {
|
|
|
344
344
|
version: payload.version,
|
|
345
345
|
registry: base,
|
|
346
346
|
...(opts.cli ? { cli: opts.cli } : {}),
|
|
347
|
+
/** O que o `sync` aprendeu sobre a leitura não se perde no próximo `connect` (27/09). */
|
|
348
|
+
...(prev?.reading === "none" ? { reading: "none" } : {}),
|
|
347
349
|
/** Ver `RegistryPayload.compiler`: é o que faz um conserto de CSS chegar a um install. */
|
|
348
350
|
...(payload.compiler != null ? { compiler: payload.compiler } : {}),
|
|
349
351
|
...(payload.rulesStamp ? { rules: payload.rulesStamp } : {}),
|
|
@@ -601,7 +603,11 @@ export async function add(slug, opts) {
|
|
|
601
603
|
* Entao a linha diz o FATO que ela tem - a classe dele continua significando o que
|
|
602
604
|
* significa - e nomeia os primeiros, para quem quiser discordar de qualquer um.
|
|
603
605
|
*/
|
|
604
|
-
|
|
606
|
+
/**
|
|
607
|
+
* Com ZERO, a frase falava de decisões que um projeto novo não tem - rodada 1 do refinamento,
|
|
608
|
+
* 27/09: "0 Tailwind utilities now point at your own decisions", num Next recém-criado.
|
|
609
|
+
*/
|
|
610
|
+
` ${aligned.kept > 0 ? `${aligned.kept} Tailwind utilit${aligned.kept === 1 ? "y" : "ies"} now point at your own decisions` : "Your code declares no Tailwind names of its own yet"}${aligned.own.length > 0 ? `; ${aligned.own.length} more name${aligned.own.length === 1 ? "s a utility" : " utilities"} only this system has (${aligned.own.slice(0, 3).join(", ")}${aligned.own.length > 3 ? ", …" : ""}), so they are declared here` : ""}${aligned.dropped.length > 0 ? `; ${aligned.dropped.length} were left as ${aligned.dropped.length === 1 ? "it is" : "they are"} (${aligned.dropped.slice(0, 3).join(", ")}${aligned.dropped.length > 3 ? ", …" : ""}) - your classes keep meaning what they mean today` : ""}.`));
|
|
605
611
|
}
|
|
606
612
|
/**
|
|
607
613
|
* O CICLO RECUSADO É DITO, e não engolido - senão o cliente lê um número menor sem saber por quê.
|
package/dist/commands/align.js
CHANGED
|
@@ -210,7 +210,7 @@ opts = {}) {
|
|
|
210
210
|
* sistema de 36).
|
|
211
211
|
*/
|
|
212
212
|
const scope = await measuredScope(root, lock.slug);
|
|
213
|
-
if (!scope.system && scope.usage.length === 0)
|
|
213
|
+
if (!scope.system && scope.usage.length === 0 && lock.reading !== "none")
|
|
214
214
|
out.push({
|
|
215
215
|
says: `"${lock.slug}" does not record where it was measured, so a re-measure would read this whole repo instead of the folder the system came from. Sync asks once and remembers the answer.`,
|
|
216
216
|
/**
|
package/dist/commands/init.js
CHANGED
package/dist/commands/mcp.js
CHANGED
|
@@ -1891,8 +1891,14 @@ cli) {
|
|
|
1891
1891
|
carried: [],
|
|
1892
1892
|
groups: [],
|
|
1893
1893
|
omitted: [],
|
|
1894
|
+
/**
|
|
1895
|
+
* 404 é "nada gravado para este sistema", e dizer o número fazia o leigo achar que algo tinha
|
|
1896
|
+
* quebrado num projeto que acabou de nascer (rodada 1 do refinamento, 27/09).
|
|
1897
|
+
*/
|
|
1894
1898
|
because: res
|
|
1895
|
-
?
|
|
1899
|
+
? res.status === 404
|
|
1900
|
+
? "nothing has been decided for this system yet"
|
|
1901
|
+
: `the platform answered ${res.status}`
|
|
1896
1902
|
: "the platform could not be reached",
|
|
1897
1903
|
};
|
|
1898
1904
|
if (!res?.ok)
|
package/dist/commands/sync.js
CHANGED
|
@@ -349,6 +349,20 @@ export async function remeasure(args) {
|
|
|
349
349
|
const head = await fetch(`${base}/api/registry/ds/${slug}/reading`, {
|
|
350
350
|
headers: { Authorization: `Bearer ${token}` },
|
|
351
351
|
}).catch(() => null);
|
|
352
|
+
/**
|
|
353
|
+
* 404 É UMA RESPOSTA, NÃO UMA FALHA - rodada 1 do refinamento, 27/09.
|
|
354
|
+
*
|
|
355
|
+
* A plataforma não tem leitura de um sistema que ninguém importou de um repositório - o da galeria,
|
|
356
|
+
* ou um nascido nela. O leigo, com o Oscilla da galeria num Next novo, ouvia "The registry answered 404
|
|
357
|
+
* for this system's reading" e ficava com um aviso de "fora de alinhamento" que nada fazia sumir. Agora
|
|
358
|
+
* a frase diz que é o esperado, e o `.lock` guarda isso, para o `align` não pedir de novo.
|
|
359
|
+
*/
|
|
360
|
+
if (head?.status === 404) {
|
|
361
|
+
await markNoReading(root, slug);
|
|
362
|
+
console.log(section("Sync"));
|
|
363
|
+
console.log(body(`"${slug}" was not read from a repository - it comes from the gallery or was built on the platform - so there is nothing here to re-measure. That is expected, and this repo will stop asking.`));
|
|
364
|
+
return null;
|
|
365
|
+
}
|
|
352
366
|
if (!head?.ok) {
|
|
353
367
|
console.log(section("Sync"));
|
|
354
368
|
console.log(body(head
|
|
@@ -993,3 +1007,19 @@ async function askForScope(root) {
|
|
|
993
1007
|
export async function installedSlug(root) {
|
|
994
1008
|
return (await installedSlugs(root))[0] ?? null;
|
|
995
1009
|
}
|
|
1010
|
+
/** Anota no `.lock` que a plataforma não tem leitura deste sistema - ver o 404 em `remeasure`. */
|
|
1011
|
+
async function markNoReading(root, slug) {
|
|
1012
|
+
const path = join(root, "_synthesisui", "ds", slug, ".lock");
|
|
1013
|
+
const raw = await readFile(path, "utf8").catch(() => "");
|
|
1014
|
+
if (!raw)
|
|
1015
|
+
return;
|
|
1016
|
+
try {
|
|
1017
|
+
const lock = JSON.parse(raw);
|
|
1018
|
+
if (lock.reading === "none")
|
|
1019
|
+
return;
|
|
1020
|
+
await writeFile(path, `${JSON.stringify({ ...lock, reading: "none" }, null, 2)}\n`, "utf8");
|
|
1021
|
+
}
|
|
1022
|
+
catch {
|
|
1023
|
+
/** Um `.lock` ilegível não é deste passo consertar. */
|
|
1024
|
+
}
|
|
1025
|
+
}
|
package/dist/index.js
CHANGED
package/package.json
CHANGED