synthesisui 0.16.278 → 0.16.280
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/sync.js +21 -1
- package/dist/index.js +15 -10
- package/package.json +1 -1
package/dist/commands/sync.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { existsSync } from "node:fs";
|
|
1
2
|
import { readdir, readFile, writeFile } from "node:fs/promises";
|
|
2
3
|
import { join, resolve } from "node:path";
|
|
3
4
|
import { isOlderCli } from "../cli-version.js";
|
|
@@ -98,7 +99,26 @@ export async function sync(opts) {
|
|
|
98
99
|
}
|
|
99
100
|
if (!slug) {
|
|
100
101
|
console.log(section("Sync"));
|
|
101
|
-
|
|
102
|
+
/**
|
|
103
|
+
* UM BECO SEM SAÍDA CUSTA UMA SESSÃO - e este custou uma, medido em 22/08.
|
|
104
|
+
*
|
|
105
|
+
* A frase dizia só que não havia sistema instalado. Ela é verdadeira e não diz o que fazer, e o
|
|
106
|
+
* dono rodou o comando em dois repositórios diferentes tentando descobrir - nos dois havia um
|
|
107
|
+
* `census.json`, que é o que faz alguém concluir que o sistema está ali.
|
|
108
|
+
*
|
|
109
|
+
* A DISTINÇÃO QUE ELA PRECISAVA FAZER: um repositório que rodou `import` tem censo e NÃO tem
|
|
110
|
+
* sistema instalado. Ele criou o sistema na plataforma e nunca o trouxe de volta - e o `sync` é
|
|
111
|
+
* um canal de mão dupla, então ele precisa do `.lock` para saber qual slug este repositório
|
|
112
|
+
* alimenta.
|
|
113
|
+
*
|
|
114
|
+
* Com o censo em mão a frase pode nomear o próximo comando em vez de descrever o estado.
|
|
115
|
+
*/
|
|
116
|
+
const measured = existsSync(join(root, "_synthesisui", "census.json"));
|
|
117
|
+
console.log(body(measured
|
|
118
|
+
? "This repo has a census but no installed system, so there is nowhere to send it. `import` created the system on the platform; bringing it back is what tells sync which one this repo feeds:"
|
|
119
|
+
: "No installed system here, so there is nowhere to sync to. Install one first:"));
|
|
120
|
+
console.log(body(paint.blue(" npx synthesisui@latest add <slug>")));
|
|
121
|
+
console.log(body(paint.faint(" npx synthesisui@latest list --mine # the slugs you own")));
|
|
102
122
|
return;
|
|
103
123
|
}
|
|
104
124
|
/**
|
package/dist/index.js
CHANGED
|
@@ -44,8 +44,8 @@ Usage - deterministic, FREE:
|
|
|
44
44
|
synthesisui list [options] list the published design systems
|
|
45
45
|
synthesisui list --mine your own systems, with their group
|
|
46
46
|
synthesisui add <slug> [options] materialize a DS into _synthesisui/ds/<slug>/
|
|
47
|
-
synthesisui bp <slug> [options] the same command, short for blueprint
|
|
48
47
|
synthesisui component <slug> <name> bring one EXISTING component in as YOUR <Pascal>.tsx
|
|
48
|
+
synthesisui bp <slug> <name> the same command, short for blueprint
|
|
49
49
|
synthesisui template <slug> <name> materialize a whole page from a DS template
|
|
50
50
|
(--as landing-home names the output - multi-page safe)
|
|
51
51
|
synthesisui upgrade <slug> update an installed DS + regenerate your components + migration brief
|
|
@@ -349,15 +349,6 @@ async function main() {
|
|
|
349
349
|
*/
|
|
350
350
|
await list({ registry, mine: flags.mine === true });
|
|
351
351
|
break;
|
|
352
|
-
/**
|
|
353
|
-
* `bp` É O MESMO COMANDO QUE `add`, e o apelido existe porque `blueprint` é o nome público do
|
|
354
|
-
* que a plataforma produz.
|
|
355
|
-
*
|
|
356
|
-
* Apelido e não substituição: `add` está escrito em toda mensagem que o CLI já imprimiu, em
|
|
357
|
-
* todo GUIDE.md já materializado e na cabeça de quem usa. Trocá-lo faria um comando que a pessoa
|
|
358
|
-
* digitou ontem parar de existir hoje.
|
|
359
|
-
*/
|
|
360
|
-
case "bp":
|
|
361
352
|
case "add": {
|
|
362
353
|
const slug = args[0];
|
|
363
354
|
if (!slug) {
|
|
@@ -463,6 +454,20 @@ async function main() {
|
|
|
463
454
|
});
|
|
464
455
|
break;
|
|
465
456
|
}
|
|
457
|
+
/**
|
|
458
|
+
* `bp` É O MESMO COMANDO QUE `component`, e é AQUI que ele pertence.
|
|
459
|
+
*
|
|
460
|
+
* O apelido nasceu em 22/08 pendurado no `add`, e estava errado: `add` instala o SISTEMA
|
|
461
|
+
* inteiro - tokens, receitas, GUIDE - e `blueprint` é um COMPONENTE. A tela do Studio lista
|
|
462
|
+
* `componentNames + blockNames` sob a frase "No blueprints yet", e a ferramenta MCP
|
|
463
|
+
* `add_blueprint` materializa exatamente um.
|
|
464
|
+
*
|
|
465
|
+
* O custo do erro apareceu na primeira vez que alguém leu: o dono viu
|
|
466
|
+
* `npx synthesisui bp codelevel-ui` e entendeu "gerar um componente novo", que é o que a
|
|
467
|
+
* palavra promete - e o comando instalava o sistema. Um apelido que promete outra coisa é pior
|
|
468
|
+
* que apelido nenhum.
|
|
469
|
+
*/
|
|
470
|
+
case "bp":
|
|
466
471
|
case "component": {
|
|
467
472
|
const slug = args[0];
|
|
468
473
|
const name = args[1];
|
package/package.json
CHANGED