@semacode/cli 2.0.0 → 2.1.0

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.
Files changed (103) hide show
  1. package/LICENSE +39 -39
  2. package/README.md +125 -121
  3. package/dist/agentEntryPoints.js +499 -499
  4. package/dist/doctorCommand.js +28 -0
  5. package/dist/geracaoCore.js +97 -1
  6. package/dist/iaPrompts.d.ts +1 -1
  7. package/dist/iaPrompts.js +307 -307
  8. package/dist/index.part01.js +4 -3
  9. package/dist/index.part02.js +21 -21
  10. package/dist/index.part04.js +96 -96
  11. package/dist/index.part06.js +1 -1
  12. package/dist/index.part07.js +35 -24
  13. package/dist/init/templates.part01.js +393 -393
  14. package/dist/init/templates.part02.js +189 -189
  15. package/dist/initTemplatesBackend.js +73 -73
  16. package/dist/initTemplatesBase.js +81 -81
  17. package/dist/initTemplatesFlutter.js +137 -137
  18. package/dist/initTemplatesRuntime.js +350 -350
  19. package/dist/initTemplatesWeb.js +309 -309
  20. package/dist/nativeToolchains.d.ts +15 -0
  21. package/dist/nativeToolchains.js +132 -0
  22. package/dist/projetoConfig.js +7 -1
  23. package/dist/projetoResolucao.js +21 -6
  24. package/dist/sync/index.js +35 -35
  25. package/docs/README.md +25 -25
  26. package/docs/ai-onboarding.md +62 -62
  27. package/docs/ai-workflow.md +1 -1
  28. package/docs/auth.md +26 -26
  29. package/docs/cli.md +79 -72
  30. package/docs/commands.md +1 -1
  31. package/docs/database.md +15 -15
  32. package/docs/deploy.md +41 -36
  33. package/docs/documentation.md +39 -39
  34. package/docs/env.md +16 -16
  35. package/docs/frontend.md +41 -41
  36. package/docs/getting-started.md +57 -57
  37. package/docs/i18n.md +15 -15
  38. package/docs/profiles.md +45 -43
  39. package/docs/repositories.md +43 -43
  40. package/docs/rollback.md +31 -31
  41. package/docs/security.md +32 -32
  42. package/docs/support.md +8 -8
  43. package/docs/syntax.md +1 -1
  44. package/docs/testing.md +35 -28
  45. package/docs/vocabulary.md +29 -29
  46. package/exemplos/agendamento.sema +1 -1
  47. package/exemplos/assinatura.sema +1 -1
  48. package/exemplos/auditoria.sema +1 -1
  49. package/exemplos/autenticacao.sema +1 -1
  50. package/exemplos/author_obra_comum.sema +1 -1
  51. package/exemplos/author_tema_sensivel.sema +1 -1
  52. package/exemplos/automacao.sema +1 -1
  53. package/exemplos/cadastro_usuario.sema +1 -1
  54. package/exemplos/calculadora.sema +1 -1
  55. package/exemplos/crud_simples.sema +1 -1
  56. package/exemplos/estoque.sema +1 -1
  57. package/exemplos/exportacao.sema +1 -1
  58. package/exemplos/fila.sema +1 -1
  59. package/exemplos/integracao_externa.sema +1 -1
  60. package/exemplos/multi_tenant.sema +1 -1
  61. package/exemplos/notificacao.sema +1 -1
  62. package/exemplos/operacao_estrategia.sema +132 -132
  63. package/exemplos/operacao_estrategia_discovery.sema +220 -220
  64. package/exemplos/operacao_estrategia_fluxo.sema +114 -114
  65. package/exemplos/operacao_estrategia_gates.sema +106 -106
  66. package/exemplos/operacao_estrategia_quarentena.sema +133 -133
  67. package/exemplos/operacao_estrategia_rollout.sema +124 -124
  68. package/exemplos/pagamento.sema +1 -1
  69. package/exemplos/pagamento_dominio.sema +1 -1
  70. package/exemplos/pedido.sema +1 -1
  71. package/exemplos/permissao.sema +1 -1
  72. package/exemplos/persistencia_vendor_first.sema +1 -1
  73. package/exemplos/profile_conversas.sema +165 -165
  74. package/exemplos/profile_game.sema +1 -1
  75. package/exemplos/profile_legal.sema +1 -1
  76. package/exemplos/profile_ops.sema +1 -1
  77. package/exemplos/profile_research.sema +1 -1
  78. package/exemplos/profile_software.sema +1 -1
  79. package/exemplos/profile_workflow_n8n.sema +1 -1
  80. package/exemplos/relatorio.sema +1 -1
  81. package/exemplos/replica_analitica_erp.sema +1 -1
  82. package/exemplos/testes_embutidos.sema +1 -1
  83. package/exemplos/tratamento_erro.sema +1 -1
  84. package/exemplos/upload_arquivo.sema +1 -1
  85. package/exemplos/webhook.sema +1 -1
  86. package/node_modules/@sema/gerador-cpp/dist/index.d.ts +3 -0
  87. package/node_modules/@sema/gerador-cpp/dist/index.js +859 -0
  88. package/node_modules/@sema/gerador-cpp/dist/index.js.map +1 -0
  89. package/node_modules/@sema/gerador-cpp/package.json +7 -0
  90. package/node_modules/@sema/gerador-css/dist/index.part01.js +10 -10
  91. package/node_modules/@sema/gerador-css/dist/index.part02.js +460 -460
  92. package/node_modules/@sema/gerador-dotnet/dist/index.d.ts +3 -0
  93. package/node_modules/@sema/gerador-dotnet/dist/index.js +828 -0
  94. package/node_modules/@sema/gerador-dotnet/dist/index.js.map +1 -0
  95. package/node_modules/@sema/gerador-dotnet/package.json +7 -0
  96. package/node_modules/@sema/gerador-html/dist/index.js +17 -17
  97. package/node_modules/@sema/gerador-lua/dist/index.js +5 -5
  98. package/node_modules/@sema/gerador-php/dist/index.js +113 -113
  99. package/node_modules/@sema/gerador-python/dist/index.part02.js +3 -3
  100. package/node_modules/@sema/gerador-typescript/dist/index.part02.js +11 -11
  101. package/node_modules/@sema/nucleo/dist/diagnosticos/melhorador.js +42 -42
  102. package/node_modules/@sema/padroes/dist/index.d.ts +1 -1
  103. package/package.json +5 -1
@@ -8,122 +8,122 @@ export function arquivosInitTemplatesWeb(template, arquivosBase) {
8
8
  arquivos = [
9
9
  {
10
10
  caminhoRelativo: "sema.config.json",
11
- conteudo: `{
12
- "origens": ["./contratos"],
13
- "saida": "./generated",
14
- "alvos": ["typescript"],
15
- "alvoPadrao": "typescript",
16
- "estruturaSaida": "modulos",
17
- "framework": "base",
18
- "modoEstrito": true,
19
- "diretoriosCodigo": ["./src"],
20
- "fontesLegado": ["nextjs-consumer", "typescript"],
21
- "diretoriosSaidaPorAlvo": {
22
- "typescript": "./generated/typescript"
23
- },
24
- "convencoesGeracaoPorProjeto": "base"
25
- }
11
+ conteudo: `{
12
+ "origens": ["./contratos"],
13
+ "saida": "./generated",
14
+ "alvos": ["typescript"],
15
+ "alvoPadrao": "typescript",
16
+ "estruturaSaida": "modulos",
17
+ "framework": "base",
18
+ "modoEstrito": true,
19
+ "diretoriosCodigo": ["./src"],
20
+ "fontesLegado": ["nextjs-consumer", "typescript"],
21
+ "diretoriosSaidaPorAlvo": {
22
+ "typescript": "./generated/typescript"
23
+ },
24
+ "convencoesGeracaoPorProjeto": "base"
25
+ }
26
26
  `,
27
27
  },
28
28
  {
29
29
  caminhoRelativo: "contratos/showroom_consumer.sema",
30
- conteudo: `module showroom.consumer {
31
- task fetch_showroom_ranking {
32
- input {
33
- }
34
- output {
35
- ranking: Json
36
- }
37
- impl {
38
- ts: src.lib.sema_consumer_bridge.semaFetchShowroomRanking
39
- }
40
- vinculos {
41
- arquivo: "src/lib/sema_consumer_bridge.ts"
42
- simbolo: src.lib.sema_consumer_bridge.semaFetchShowroomRanking
43
- superficie: "/ranking"
44
- arquivo: "src/app/ranking/page.tsx"
45
- arquivo: "src/app/ranking/loading.tsx"
46
- arquivo: "src/app/ranking/error.tsx"
47
- }
48
- guarantees {
49
- ranking existe
50
- }
51
- }
52
- }
30
+ conteudo: `module showroom.consumer {
31
+ task fetch_showroom_ranking {
32
+ input {
33
+ }
34
+ output {
35
+ ranking: Json
36
+ }
37
+ impl {
38
+ ts: src.lib.sema_consumer_bridge.semaFetchShowroomRanking
39
+ }
40
+ vinculos {
41
+ arquivo: "src/lib/sema_consumer_bridge.ts"
42
+ simbolo: src.lib.sema_consumer_bridge.semaFetchShowroomRanking
43
+ superficie: "/ranking"
44
+ arquivo: "src/app/ranking/page.tsx"
45
+ arquivo: "src/app/ranking/loading.tsx"
46
+ arquivo: "src/app/ranking/error.tsx"
47
+ }
48
+ guarantees {
49
+ ranking existe
50
+ }
51
+ }
52
+ }
53
53
  `,
54
54
  },
55
55
  {
56
56
  caminhoRelativo: "src/lib/sema_consumer_bridge.ts",
57
- conteudo: `export async function semaFetchShowroomRanking() {
58
- return {
59
- ranking: [
60
- { clube: "Tigres do Norte", pontos: 33 },
61
- { clube: "Porto Azul", pontos: 31 },
62
- { clube: "Galo de Ouro", pontos: 28 },
63
- ],
64
- };
65
- }
57
+ conteudo: `export async function semaFetchShowroomRanking() {
58
+ return {
59
+ ranking: [
60
+ { clube: "Tigres do Norte", pontos: 33 },
61
+ { clube: "Porto Azul", pontos: 31 },
62
+ { clube: "Galo de Ouro", pontos: 28 },
63
+ ],
64
+ };
65
+ }
66
66
  `,
67
67
  },
68
68
  {
69
69
  caminhoRelativo: "src/app/ranking/page.tsx",
70
- conteudo: `import { semaFetchShowroomRanking } from "../../lib/sema_consumer_bridge";
71
-
72
- export default async function RankingPage() {
73
- const { ranking } = await semaFetchShowroomRanking();
74
-
75
- return (
76
- <main>
77
- <h1>Ranking showroom</h1>
78
- <ul>
79
- {ranking.map((item) => (
80
- <li key={item.clube}>
81
- {item.clube} - {item.pontos} pts
82
- </li>
83
- ))}
84
- </ul>
85
- </main>
86
- );
87
- }
70
+ conteudo: `import { semaFetchShowroomRanking } from "../../lib/sema_consumer_bridge";
71
+
72
+ export default async function RankingPage() {
73
+ const { ranking } = await semaFetchShowroomRanking();
74
+
75
+ return (
76
+ <main>
77
+ <h1>Ranking showroom</h1>
78
+ <ul>
79
+ {ranking.map((item) => (
80
+ <li key={item.clube}>
81
+ {item.clube} - {item.pontos} pts
82
+ </li>
83
+ ))}
84
+ </ul>
85
+ </main>
86
+ );
87
+ }
88
88
  `,
89
89
  },
90
90
  {
91
91
  caminhoRelativo: "src/app/ranking/loading.tsx",
92
- conteudo: `export default function Loading() {
93
- return <p>Carregando ranking...</p>;
94
- }
92
+ conteudo: `export default function Loading() {
93
+ return <p>Carregando ranking...</p>;
94
+ }
95
95
  `,
96
96
  },
97
97
  {
98
98
  caminhoRelativo: "src/app/ranking/error.tsx",
99
- conteudo: `"use client";
100
-
101
- export default function Error({
102
- error,
103
- reset,
104
- }: {
105
- error: Error;
106
- reset: () => void;
107
- }) {
108
- return (
109
- <main>
110
- <h1>Falha ao carregar ranking</h1>
111
- <p>{error.message}</p>
112
- <button type="button" onClick={reset}>Tentar novamente</button>
113
- </main>
114
- );
115
- }
99
+ conteudo: `"use client";
100
+
101
+ export default function Error({
102
+ error,
103
+ reset,
104
+ }: {
105
+ error: Error;
106
+ reset: () => void;
107
+ }) {
108
+ return (
109
+ <main>
110
+ <h1>Falha ao carregar ranking</h1>
111
+ <p>{error.message}</p>
112
+ <button type="button" onClick={reset}>Tentar novamente</button>
113
+ </main>
114
+ );
115
+ }
116
116
  `,
117
117
  },
118
118
  {
119
119
  caminhoRelativo: "README.md",
120
- conteudo: `# Starter Next.js Consumer + Sema
121
-
122
- - Contratos em \`contratos/\`
123
- - Bridge consumer canonico em \`src/lib/sema_consumer_bridge.ts\`
124
- - Superficies App Router em \`src/app/\`
125
- - O slice oficial desta fase e \`consumer bridge + App Router surfaces\`
126
- - \`drift\` valida \`impl\`, \`vinculos\`, bridge e superficies, sem prometer visual drift
120
+ conteudo: `# Starter Next.js Consumer + Sema
121
+
122
+ - Contratos em \`contratos/\`
123
+ - Bridge consumer canonico em \`src/lib/sema_consumer_bridge.ts\`
124
+ - Superficies App Router em \`src/app/\`
125
+ - O slice oficial desta fase e \`consumer bridge + App Router surfaces\`
126
+ - \`drift\` valida \`impl\`, \`vinculos\`, bridge e superficies, sem prometer visual drift
127
127
  `,
128
128
  },
129
129
  ];
@@ -132,135 +132,135 @@ export function arquivosInitTemplatesWeb(template, arquivosBase) {
132
132
  arquivos = [
133
133
  {
134
134
  caminhoRelativo: "sema.config.json",
135
- conteudo: `{
136
- "origens": ["./contratos"],
137
- "saida": "./generated",
138
- "alvos": ["typescript"],
139
- "alvoPadrao": "typescript",
140
- "estruturaSaida": "modulos",
141
- "framework": "base",
142
- "modoEstrito": true,
143
- "diretoriosCodigo": ["./src"],
144
- "fontesLegado": ["react-vite-consumer", "typescript"],
145
- "diretoriosSaidaPorAlvo": {
146
- "typescript": "./generated/typescript"
147
- },
148
- "convencoesGeracaoPorProjeto": "base"
149
- }
135
+ conteudo: `{
136
+ "origens": ["./contratos"],
137
+ "saida": "./generated",
138
+ "alvos": ["typescript"],
139
+ "alvoPadrao": "typescript",
140
+ "estruturaSaida": "modulos",
141
+ "framework": "base",
142
+ "modoEstrito": true,
143
+ "diretoriosCodigo": ["./src"],
144
+ "fontesLegado": ["react-vite-consumer", "typescript"],
145
+ "diretoriosSaidaPorAlvo": {
146
+ "typescript": "./generated/typescript"
147
+ },
148
+ "convencoesGeracaoPorProjeto": "base"
149
+ }
150
150
  `,
151
151
  },
152
152
  {
153
153
  caminhoRelativo: "contratos/showroom_consumer.sema",
154
- conteudo: `module showroom.consumer {
155
- task fetch_showroom_ranking {
156
- input {
157
- }
158
- output {
159
- ranking: Json
160
- }
161
- impl {
162
- ts: src.lib.sema_consumer_bridge.semaFetchShowroomRanking
163
- }
164
- vinculos {
165
- arquivo: "src/lib/sema_consumer_bridge.ts"
166
- simbolo: src.lib.sema_consumer_bridge.semaFetchShowroomRanking
167
- superficie: "/ranking"
168
- arquivo: "src/router.tsx"
169
- arquivo: "src/pages/ranking.tsx"
170
- }
171
- guarantees {
172
- ranking existe
173
- }
174
- }
175
- }
154
+ conteudo: `module showroom.consumer {
155
+ task fetch_showroom_ranking {
156
+ input {
157
+ }
158
+ output {
159
+ ranking: Json
160
+ }
161
+ impl {
162
+ ts: src.lib.sema_consumer_bridge.semaFetchShowroomRanking
163
+ }
164
+ vinculos {
165
+ arquivo: "src/lib/sema_consumer_bridge.ts"
166
+ simbolo: src.lib.sema_consumer_bridge.semaFetchShowroomRanking
167
+ superficie: "/ranking"
168
+ arquivo: "src/router.tsx"
169
+ arquivo: "src/pages/ranking.tsx"
170
+ }
171
+ guarantees {
172
+ ranking existe
173
+ }
174
+ }
175
+ }
176
176
  `,
177
177
  },
178
178
  {
179
179
  caminhoRelativo: "src/lib/sema_consumer_bridge.ts",
180
- conteudo: `export async function semaFetchShowroomRanking() {
181
- return {
182
- ranking: [
183
- { clube: "Tigres do Norte", pontos: 33 },
184
- { clube: "Porto Azul", pontos: 31 },
185
- { clube: "Galo de Ouro", pontos: 28 },
186
- ],
187
- };
188
- }
180
+ conteudo: `export async function semaFetchShowroomRanking() {
181
+ return {
182
+ ranking: [
183
+ { clube: "Tigres do Norte", pontos: 33 },
184
+ { clube: "Porto Azul", pontos: 31 },
185
+ { clube: "Galo de Ouro", pontos: 28 },
186
+ ],
187
+ };
188
+ }
189
189
  `,
190
190
  },
191
191
  {
192
192
  caminhoRelativo: "src/pages/ranking.tsx",
193
- conteudo: `import { useEffect, useState } from "react";
194
- import { semaFetchShowroomRanking } from "../lib/sema_consumer_bridge";
195
-
196
- export function RankingPage() {
197
- const [ranking, setRanking] = useState<Array<{ clube: string; pontos: number }>>([]);
198
-
199
- useEffect(() => {
200
- void semaFetchShowroomRanking().then((payload) => setRanking(payload.ranking ?? []));
201
- }, []);
202
-
203
- return (
204
- <main>
205
- <h1>Ranking showroom</h1>
206
- <ul>
207
- {ranking.map((item) => (
208
- <li key={item.clube}>
209
- {item.clube} - {item.pontos} pts
210
- </li>
211
- ))}
212
- </ul>
213
- </main>
214
- );
215
- }
193
+ conteudo: `import { useEffect, useState } from "react";
194
+ import { semaFetchShowroomRanking } from "../lib/sema_consumer_bridge";
195
+
196
+ export function RankingPage() {
197
+ const [ranking, setRanking] = useState<Array<{ clube: string; pontos: number }>>([]);
198
+
199
+ useEffect(() => {
200
+ void semaFetchShowroomRanking().then((payload) => setRanking(payload.ranking ?? []));
201
+ }, []);
202
+
203
+ return (
204
+ <main>
205
+ <h1>Ranking showroom</h1>
206
+ <ul>
207
+ {ranking.map((item) => (
208
+ <li key={item.clube}>
209
+ {item.clube} - {item.pontos} pts
210
+ </li>
211
+ ))}
212
+ </ul>
213
+ </main>
214
+ );
215
+ }
216
216
  `,
217
217
  },
218
218
  {
219
219
  caminhoRelativo: "src/router.tsx",
220
- conteudo: `import { createBrowserRouter } from "react-router-dom";
221
- import { RankingPage } from "./pages/ranking";
222
-
223
- export const appRouter = createBrowserRouter([
224
- {
225
- path: "/ranking",
226
- Component: RankingPage,
227
- },
228
- ]);
220
+ conteudo: `import { createBrowserRouter } from "react-router-dom";
221
+ import { RankingPage } from "./pages/ranking";
222
+
223
+ export const appRouter = createBrowserRouter([
224
+ {
225
+ path: "/ranking",
226
+ Component: RankingPage,
227
+ },
228
+ ]);
229
229
  `,
230
230
  },
231
231
  {
232
232
  caminhoRelativo: "src/App.tsx",
233
- conteudo: `import { RouterProvider } from "react-router-dom";
234
- import { appRouter } from "./router";
235
-
236
- export default function App() {
237
- return <RouterProvider router={appRouter} />;
238
- }
233
+ conteudo: `import { RouterProvider } from "react-router-dom";
234
+ import { appRouter } from "./router";
235
+
236
+ export default function App() {
237
+ return <RouterProvider router={appRouter} />;
238
+ }
239
239
  `,
240
240
  },
241
241
  {
242
242
  caminhoRelativo: "src/main.tsx",
243
- conteudo: `import React from "react";
244
- import ReactDOM from "react-dom/client";
245
- import App from "./App";
246
-
247
- ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(
248
- <React.StrictMode>
249
- <App />
250
- </React.StrictMode>,
251
- );
243
+ conteudo: `import React from "react";
244
+ import ReactDOM from "react-dom/client";
245
+ import App from "./App";
246
+
247
+ ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(
248
+ <React.StrictMode>
249
+ <App />
250
+ </React.StrictMode>,
251
+ );
252
252
  `,
253
253
  },
254
254
  {
255
255
  caminhoRelativo: "README.md",
256
- conteudo: `# Starter React Vite Consumer + Sema
257
-
258
- - Contratos em \`contratos/\`
259
- - Bridge consumer canonico em \`src/lib/sema_consumer_bridge.ts\`
260
- - Rotas explicitas em \`src/router.tsx\`
261
- - Superficies consumer em \`src/pages/\`
262
- - O slice oficial desta fase e \`consumer bridge + react-router surfaces\`
263
- - \`drift\` valida \`impl\`, \`vinculos\`, bridge e superficies, sem prometer visual drift
256
+ conteudo: `# Starter React Vite Consumer + Sema
257
+
258
+ - Contratos em \`contratos/\`
259
+ - Bridge consumer canonico em \`src/lib/sema_consumer_bridge.ts\`
260
+ - Rotas explicitas em \`src/router.tsx\`
261
+ - Superficies consumer em \`src/pages/\`
262
+ - O slice oficial desta fase e \`consumer bridge + react-router surfaces\`
263
+ - \`drift\` valida \`impl\`, \`vinculos\`, bridge e superficies, sem prometer visual drift
264
264
  `,
265
265
  },
266
266
  ];
@@ -269,154 +269,154 @@ export function arquivosInitTemplatesWeb(template, arquivosBase) {
269
269
  arquivos = [
270
270
  {
271
271
  caminhoRelativo: "sema.config.json",
272
- conteudo: `{
273
- "origens": ["./contratos"],
274
- "saida": "./generated",
275
- "alvos": ["typescript"],
276
- "alvoPadrao": "typescript",
277
- "estruturaSaida": "modulos",
278
- "framework": "base",
279
- "modoEstrito": true,
280
- "diretoriosCodigo": ["./src"],
281
- "fontesLegado": ["angular-consumer", "typescript"],
282
- "diretoriosSaidaPorAlvo": {
283
- "typescript": "./generated/typescript"
284
- },
285
- "convencoesGeracaoPorProjeto": "base"
286
- }
272
+ conteudo: `{
273
+ "origens": ["./contratos"],
274
+ "saida": "./generated",
275
+ "alvos": ["typescript"],
276
+ "alvoPadrao": "typescript",
277
+ "estruturaSaida": "modulos",
278
+ "framework": "base",
279
+ "modoEstrito": true,
280
+ "diretoriosCodigo": ["./src"],
281
+ "fontesLegado": ["angular-consumer", "typescript"],
282
+ "diretoriosSaidaPorAlvo": {
283
+ "typescript": "./generated/typescript"
284
+ },
285
+ "convencoesGeracaoPorProjeto": "base"
286
+ }
287
287
  `,
288
288
  },
289
289
  {
290
290
  caminhoRelativo: "contratos/showroom_consumer.sema",
291
- conteudo: `module showroom.consumer {
292
- task fetch_showroom_ranking {
293
- input {
294
- }
295
- output {
296
- ranking: Json
297
- }
298
- impl {
299
- ts: src.app.sema_consumer_bridge.semaFetchShowroomRanking
300
- }
301
- vinculos {
302
- arquivo: "src/app/sema_consumer_bridge.ts"
303
- simbolo: src.app.sema_consumer_bridge.semaFetchShowroomRanking
304
- superficie: "/ranking"
305
- arquivo: "src/app/app.routes.ts"
306
- arquivo: "src/app/features/ranking/ranking.routes.ts"
307
- arquivo: "src/app/features/ranking/ranking-page.component.ts"
308
- }
309
- guarantees {
310
- ranking existe
311
- }
312
- }
313
- }
291
+ conteudo: `module showroom.consumer {
292
+ task fetch_showroom_ranking {
293
+ input {
294
+ }
295
+ output {
296
+ ranking: Json
297
+ }
298
+ impl {
299
+ ts: src.app.sema_consumer_bridge.semaFetchShowroomRanking
300
+ }
301
+ vinculos {
302
+ arquivo: "src/app/sema_consumer_bridge.ts"
303
+ simbolo: src.app.sema_consumer_bridge.semaFetchShowroomRanking
304
+ superficie: "/ranking"
305
+ arquivo: "src/app/app.routes.ts"
306
+ arquivo: "src/app/features/ranking/ranking.routes.ts"
307
+ arquivo: "src/app/features/ranking/ranking-page.component.ts"
308
+ }
309
+ guarantees {
310
+ ranking existe
311
+ }
312
+ }
313
+ }
314
314
  `,
315
315
  },
316
316
  {
317
317
  caminhoRelativo: "src/app/sema_consumer_bridge.ts",
318
- conteudo: `export async function semaFetchShowroomRanking() {
319
- return {
320
- ranking: [
321
- { clube: "Tigres do Norte", pontos: 33 },
322
- { clube: "Porto Azul", pontos: 31 },
323
- { clube: "Galo de Ouro", pontos: 28 },
324
- ],
325
- };
326
- }
318
+ conteudo: `export async function semaFetchShowroomRanking() {
319
+ return {
320
+ ranking: [
321
+ { clube: "Tigres do Norte", pontos: 33 },
322
+ { clube: "Porto Azul", pontos: 31 },
323
+ { clube: "Galo de Ouro", pontos: 28 },
324
+ ],
325
+ };
326
+ }
327
327
  `,
328
328
  },
329
329
  {
330
330
  caminhoRelativo: "src/app/app.routes.ts",
331
- conteudo: `import { Routes } from "@angular/router";
332
-
333
- export const routes: Routes = [
334
- {
335
- path: "ranking",
336
- loadChildren: () => import("./features/ranking/ranking.routes").then((m) => m.RANKING_ROUTES),
337
- },
338
- ];
331
+ conteudo: `import { Routes } from "@angular/router";
332
+
333
+ export const routes: Routes = [
334
+ {
335
+ path: "ranking",
336
+ loadChildren: () => import("./features/ranking/ranking.routes").then((m) => m.RANKING_ROUTES),
337
+ },
338
+ ];
339
339
  `,
340
340
  },
341
341
  {
342
342
  caminhoRelativo: "src/app/features/ranking/ranking.routes.ts",
343
- conteudo: `import { Routes } from "@angular/router";
344
-
345
- export const RANKING_ROUTES: Routes = [
346
- {
347
- path: "",
348
- loadComponent: () => import("./ranking-page.component").then((m) => m.RankingPageComponent),
349
- },
350
- ];
343
+ conteudo: `import { Routes } from "@angular/router";
344
+
345
+ export const RANKING_ROUTES: Routes = [
346
+ {
347
+ path: "",
348
+ loadComponent: () => import("./ranking-page.component").then((m) => m.RankingPageComponent),
349
+ },
350
+ ];
351
351
  `,
352
352
  },
353
353
  {
354
354
  caminhoRelativo: "src/app/features/ranking/ranking-page.component.ts",
355
- conteudo: `import { Component, OnInit } from "@angular/core";
356
- import { CommonModule } from "@angular/common";
357
- import { semaFetchShowroomRanking } from "../../sema_consumer_bridge";
358
-
359
- @Component({
360
- selector: "app-ranking-page",
361
- standalone: true,
362
- imports: [CommonModule],
363
- template: \`
364
- <main>
365
- <h1>Ranking showroom</h1>
366
- <ul>
367
- <li *ngFor="let item of ranking">
368
- {{ item.clube }} - {{ item.pontos }} pts
369
- </li>
370
- </ul>
371
- </main>
372
- \`,
373
- })
374
- export class RankingPageComponent implements OnInit {
375
- ranking: Array<{ clube: string; pontos: number }> = [];
376
-
377
- async ngOnInit() {
378
- const payload = await semaFetchShowroomRanking();
379
- this.ranking = payload.ranking ?? [];
380
- }
381
- }
355
+ conteudo: `import { Component, OnInit } from "@angular/core";
356
+ import { CommonModule } from "@angular/common";
357
+ import { semaFetchShowroomRanking } from "../../sema_consumer_bridge";
358
+
359
+ @Component({
360
+ selector: "app-ranking-page",
361
+ standalone: true,
362
+ imports: [CommonModule],
363
+ template: \`
364
+ <main>
365
+ <h1>Ranking showroom</h1>
366
+ <ul>
367
+ <li *ngFor="let item of ranking">
368
+ {{ item.clube }} - {{ item.pontos }} pts
369
+ </li>
370
+ </ul>
371
+ </main>
372
+ \`,
373
+ })
374
+ export class RankingPageComponent implements OnInit {
375
+ ranking: Array<{ clube: string; pontos: number }> = [];
376
+
377
+ async ngOnInit() {
378
+ const payload = await semaFetchShowroomRanking();
379
+ this.ranking = payload.ranking ?? [];
380
+ }
381
+ }
382
382
  `,
383
383
  },
384
384
  {
385
385
  caminhoRelativo: "src/app/app.component.ts",
386
- conteudo: `import { Component } from "@angular/core";
387
- import { RouterOutlet } from "@angular/router";
388
-
389
- @Component({
390
- selector: "app-root",
391
- standalone: true,
392
- imports: [RouterOutlet],
393
- template: "<router-outlet />",
394
- })
395
- export class AppComponent {}
386
+ conteudo: `import { Component } from "@angular/core";
387
+ import { RouterOutlet } from "@angular/router";
388
+
389
+ @Component({
390
+ selector: "app-root",
391
+ standalone: true,
392
+ imports: [RouterOutlet],
393
+ template: "<router-outlet />",
394
+ })
395
+ export class AppComponent {}
396
396
  `,
397
397
  },
398
398
  {
399
399
  caminhoRelativo: "src/main.ts",
400
- conteudo: `import { bootstrapApplication } from "@angular/platform-browser";
401
- import { provideRouter } from "@angular/router";
402
- import { AppComponent } from "./app/app.component";
403
- import { routes } from "./app/app.routes";
404
-
405
- void bootstrapApplication(AppComponent, {
406
- providers: [provideRouter(routes)],
407
- });
400
+ conteudo: `import { bootstrapApplication } from "@angular/platform-browser";
401
+ import { provideRouter } from "@angular/router";
402
+ import { AppComponent } from "./app/app.component";
403
+ import { routes } from "./app/app.routes";
404
+
405
+ void bootstrapApplication(AppComponent, {
406
+ providers: [provideRouter(routes)],
407
+ });
408
408
  `,
409
409
  },
410
410
  {
411
411
  caminhoRelativo: "README.md",
412
- conteudo: `# Starter Angular Consumer + Sema
413
-
414
- - Contratos em \`contratos/\`
415
- - Bridge consumer canonico em \`src/app/sema_consumer_bridge.ts\`
416
- - Rotas lazy em \`src/app/app.routes.ts\`
417
- - Feature folders em \`src/app/features/\`
418
- - O slice oficial desta fase e \`consumer bridge + route config surfaces\`
419
- - \`drift\` valida \`impl\`, \`vinculos\`, bridge e superficies, sem prometer visual drift
412
+ conteudo: `# Starter Angular Consumer + Sema
413
+
414
+ - Contratos em \`contratos/\`
415
+ - Bridge consumer canonico em \`src/app/sema_consumer_bridge.ts\`
416
+ - Rotas lazy em \`src/app/app.routes.ts\`
417
+ - Feature folders em \`src/app/features/\`
418
+ - O slice oficial desta fase e \`consumer bridge + route config surfaces\`
419
+ - \`drift\` valida \`impl\`, \`vinculos\`, bridge e superficies, sem prometer visual drift
420
420
  `,
421
421
  },
422
422
  ];