synthesisui 0.16.467 → 0.16.468
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/import.js +13 -2
- package/dist/doctor/architecture.js +30 -3
- package/dist/install-marks.js +6 -1
- package/package.json +1 -1
package/dist/commands/import.js
CHANGED
|
@@ -1488,8 +1488,19 @@ export async function takeCensus(root, opts) {
|
|
|
1488
1488
|
* `app/` and no `pages/`, so there is nothing to count and the count would be zero for
|
|
1489
1489
|
* everything. An app has them, and then the number means something.
|
|
1490
1490
|
*/
|
|
1491
|
-
const
|
|
1492
|
-
|
|
1491
|
+
const appScreens = new Set([...screensOf.values()].flatMap((at) => [...at].filter((s) => s.startsWith("app/") || s.startsWith("pages/"))));
|
|
1492
|
+
const hasScreens = appScreens.size > 0;
|
|
1493
|
+
/**
|
|
1494
|
+
* E MENOS TELAS DO QUE A LINHA TAMBÉM NÃO É TESTE - rodadas 6 a 10 do refinamento, 27/09.
|
|
1495
|
+
*
|
|
1496
|
+
* A pergunta da regra é "duas telas compartilham isto?", e num app de UMA tela ela não tem como ser
|
|
1497
|
+
* respondida: todo componente sai "composed on one screen only". Nos cinco estilos das rodadas
|
|
1498
|
+
* (Tailwind, variáveis CSS, CSS Modules, atômico, SCSS) o import tirou assim os componentes do
|
|
1499
|
+
* usuário, e o sistema nascia sem nenhum dele. É o mesmo raciocínio da biblioteca logo acima, do outro
|
|
1500
|
+
* lado: sem telas bastantes para comparar, não há compartilhamento para medir.
|
|
1501
|
+
*/
|
|
1502
|
+
const measurable = appScreens.size >= SCREENS_FOR_SYSTEM;
|
|
1503
|
+
if (hasScreens && measurable) {
|
|
1493
1504
|
const keep = [];
|
|
1494
1505
|
for (const d of defined) {
|
|
1495
1506
|
/**
|
|
@@ -18,6 +18,18 @@
|
|
|
18
18
|
* so this returns all of them and the person picks which one has PRIORITY. That word is
|
|
19
19
|
* theirs and it is the right one: the others are still true, they just do not decide.
|
|
20
20
|
*/
|
|
21
|
+
/**
|
|
22
|
+
* A PASTA DA FORMA `flat` - ela casa no lugar que TEM uma `components/`, e as peças moram DENTRO dela. Dizer
|
|
23
|
+
* "directly under `.`" num Next mandava o agente para a raiz (rodadas 6 a 10, 27/09). Quando o caminho já
|
|
24
|
+
* termina na pasta, ele é a resposta.
|
|
25
|
+
*/
|
|
26
|
+
function flatFolder(where, folder) {
|
|
27
|
+
if (!folder)
|
|
28
|
+
return where;
|
|
29
|
+
if (where === "." || where === "")
|
|
30
|
+
return folder;
|
|
31
|
+
return where === folder || where.endsWith(`/${folder}`) ? where : `${where}/${folder}`;
|
|
32
|
+
}
|
|
21
33
|
const SHAPES = [
|
|
22
34
|
{
|
|
23
35
|
kind: "atomic",
|
|
@@ -49,7 +61,7 @@ const SHAPES = [
|
|
|
49
61
|
{
|
|
50
62
|
kind: "flat",
|
|
51
63
|
needs: [["components"]],
|
|
52
|
-
describe: (
|
|
64
|
+
describe: (a, where) => `Every component sits directly under \`${flatFolder(where, a.evidence[0])}\`, one folder deep. It is the shape that stays legible longest while a system is small, and the one to revisit when the folder passes about forty names.`,
|
|
53
65
|
},
|
|
54
66
|
];
|
|
55
67
|
/**
|
|
@@ -203,7 +215,14 @@ function explains(other, shape) {
|
|
|
203
215
|
return other.kind === shape.kind || shape.kind === "flat";
|
|
204
216
|
return (pathKey(other.root) === pathKey(shape.root) &&
|
|
205
217
|
shape.kind === "flat" &&
|
|
206
|
-
other.kind !== "flat"
|
|
218
|
+
other.kind !== "flat" &&
|
|
219
|
+
/**
|
|
220
|
+
* `colocated` NÃO EXPLICA A PASTA COMPARTILHADA - rodadas 6 a 10 do refinamento, 27/09. Num Next, a
|
|
221
|
+
* raiz tem `app/` e `components/`, as duas formas casam ali, e a `flat` sumia: o import dizia "BESIDE
|
|
222
|
+
* THE ROUTE" nos cinco estilos, com os componentes todos em `components/`. `colocated` diz onde moram
|
|
223
|
+
* as rotas; `flat` diz onde moram as peças que elas compartilham.
|
|
224
|
+
*/
|
|
225
|
+
other.kind !== "colocated");
|
|
207
226
|
}
|
|
208
227
|
/**
|
|
209
228
|
* O CAMINHO COMPARÁVEL - a raiz do escopo é escrita `.` pela caminhada, e comparada com `""` ela é
|
|
@@ -395,7 +414,15 @@ entries, scope) {
|
|
|
395
414
|
const hasSrc = entries.some((e) => e.path === "src" ||
|
|
396
415
|
e.path.startsWith("src/") ||
|
|
397
416
|
(isRoot(e.path) && e.dirs.includes("src")));
|
|
398
|
-
|
|
417
|
+
/**
|
|
418
|
+
* O ESCOPO QUE JÁ É A PASTA DE COMPONENTES não ganha outra dentro dele - rodadas 6 e 8, 27/09: a
|
|
419
|
+
* sugestão saía `components/ui/components/{atoms, molecules, organisms}` e `components/components/…`, e o
|
|
420
|
+
* agente da rodada 8 chamou de "a slip in the tool".
|
|
421
|
+
*/
|
|
422
|
+
const insideComponents = /(^|\/)components(\/|$)/.test(base);
|
|
423
|
+
const trunk = insideComponents
|
|
424
|
+
? base
|
|
425
|
+
: `${base ? `${base}/` : ""}${hasSrc ? "src/components" : "components"}`;
|
|
399
426
|
const fresh = `${trunk}/{atoms, molecules, organisms}`;
|
|
400
427
|
/** Se a proposta é o que já existe, ela não é uma pasta nova - e oferecê-la seria repetir a opção 1. */
|
|
401
428
|
return found.some((a) => componentHome(a, scope) === fresh) ? null : fresh;
|
package/dist/install-marks.js
CHANGED
|
@@ -897,7 +897,12 @@ export const CHECKER_SINCE = "0.16.467";
|
|
|
897
897
|
* deveriam estar lá. Quem tem censo gravado precisa de um `sync` para a fila de trabalho dele ser a
|
|
898
898
|
* real; ver o livro-razão de `corpus.spec.ts`.
|
|
899
899
|
*/
|
|
900
|
-
|
|
900
|
+
/**
|
|
901
|
+
* 0.16.440 -> 0.16.468 em 27/09, e o passo 1 dá **SIM**: num app de uma tela só a regra de duas telas deixa
|
|
902
|
+
* de tirar os componentes dele - rodadas 6 a 10 do refinamento, nos cinco estilos o sistema nascia sem
|
|
903
|
+
* nenhum componente do usuário. Um censo lido antes guardou essa lista vazia, e só remedir a enche.
|
|
904
|
+
*/
|
|
905
|
+
export const READER_SINCE = "0.16.468";
|
|
901
906
|
/**
|
|
902
907
|
* O QUE ESTÁ INSTALADO AQUI FICOU PARA TRÁS - e as DUAS condições que fazem isso ser verdade.
|
|
903
908
|
*
|
package/package.json
CHANGED