@specatlas/core 0.1.0 → 0.1.2
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/index.js +14 -14
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -821,7 +821,7 @@ function checkTrace(input) {
|
|
|
821
821
|
}
|
|
822
822
|
}
|
|
823
823
|
for (const sc of deltaScenarios) {
|
|
824
|
-
if (!coversExpanded.has(sc)) {
|
|
824
|
+
if (taskById.size > 0 && !coversExpanded.has(sc)) {
|
|
825
825
|
findings.push(
|
|
826
826
|
diag("TRACE-002", "error", `El escenario ${sc} no est\xE1 cubierto por ninguna tarea`, {
|
|
827
827
|
path: change.tasks?.path ?? change.delta?.path,
|
|
@@ -3073,7 +3073,7 @@ async function generatePresentation(opts) {
|
|
|
3073
3073
|
language,
|
|
3074
3074
|
labels,
|
|
3075
3075
|
title: change.meta?.title ?? change.slug,
|
|
3076
|
-
domain: change.meta?.domain ?? "\
|
|
3076
|
+
domain: change.meta?.domain ?? "\u2014",
|
|
3077
3077
|
lane: change.meta?.lane ?? config.lanes.default,
|
|
3078
3078
|
project: config.project.name,
|
|
3079
3079
|
version: change.delta.sectionsFound.length,
|
|
@@ -3100,7 +3100,7 @@ async function copyMockups(root, change, destDir) {
|
|
|
3100
3100
|
for (const screen of manifest.screens) {
|
|
3101
3101
|
const src = path12.join(dir, screen.file);
|
|
3102
3102
|
if (!await exists(src)) {
|
|
3103
|
-
diagnostics.push(diag("ATLAS-PRESENT-002", "warning", `El mockup ${screen.file} no existe y no se incluir\
|
|
3103
|
+
diagnostics.push(diag("ATLAS-PRESENT-002", "warning", `El mockup ${screen.file} no existe y no se incluir\xE1`, { path: src }));
|
|
3104
3104
|
continue;
|
|
3105
3105
|
}
|
|
3106
3106
|
await copyFile(src, path12.join(destDir, screen.file));
|
|
@@ -3151,15 +3151,15 @@ function labelsFor(language) {
|
|
|
3151
3151
|
return {
|
|
3152
3152
|
kicker: "Propuesta",
|
|
3153
3153
|
summary: "Resumen de negocio",
|
|
3154
|
-
criteria: "Criterios de aceptaci\
|
|
3154
|
+
criteria: "Criterios de aceptaci\xF3n",
|
|
3155
3155
|
requirements: "Requisitos y escenarios",
|
|
3156
3156
|
mockups: "Mockups",
|
|
3157
|
-
approve: "Aprobaci\
|
|
3157
|
+
approve: "Aprobaci\xF3n",
|
|
3158
3158
|
approveText: "Esta propuesta se aprueba firmando la spec (hash + autor). Cualquier cambio posterior invalida la firma.",
|
|
3159
3159
|
command: "Comando",
|
|
3160
3160
|
hash: "Hash",
|
|
3161
3161
|
generated: "Generado",
|
|
3162
|
-
noProposal: "La propuesta est\
|
|
3162
|
+
noProposal: "La propuesta est\xE1 vac\xEDa.",
|
|
3163
3163
|
added: "agregado",
|
|
3164
3164
|
modified: "modificado",
|
|
3165
3165
|
scenario: "Escenario",
|
|
@@ -3214,13 +3214,13 @@ footer { color: var(--muted); font-size: 13px; text-align:center; }
|
|
|
3214
3214
|
function page(input) {
|
|
3215
3215
|
const l = input.labels;
|
|
3216
3216
|
const reqHtml = input.requirements.map(({ req, kind }) => {
|
|
3217
|
-
const rules = req.rules.map((r) => `<li><code>${esc(r.id)}</code> \
|
|
3217
|
+
const rules = req.rules.map((r) => `<li><code>${esc(r.id)}</code> \u2014 ${inline(r.text)}</li>`).join("");
|
|
3218
3218
|
const scenarios = req.scenarios.map((s) => {
|
|
3219
3219
|
const when = s.when.map((w) => `<div class="when">CUANDO ${inline(w)}</div>`).join("");
|
|
3220
3220
|
const then = s.then.map((t) => `<div class="then">ENTONCES ${inline(t)}</div>`).join("");
|
|
3221
|
-
return `<div class="scenario"><h4>${esc(s.id)} \
|
|
3221
|
+
return `<div class="scenario"><h4>${esc(s.id)} \u2014 ${esc(s.title)}</h4>${when}${then}</div>`;
|
|
3222
3222
|
}).join("");
|
|
3223
|
-
return `<div class="req"><h3>${esc(req.id)} \
|
|
3223
|
+
return `<div class="req"><h3>${esc(req.id)} \u2014 ${esc(req.title)}<span class="badge">${kind === "added" ? l.added : l.modified}</span></h3><p>${inline(req.prose)}</p>${rules ? `<ul class="rules">${rules}</ul>` : ""}${scenarios}</div>`;
|
|
3224
3224
|
}).join("");
|
|
3225
3225
|
const criteriaRows = input.requirements.flatMap(({ req }) => req.scenarios).map((s) => {
|
|
3226
3226
|
const status = input.evidence.get(s.id);
|
|
@@ -3229,7 +3229,7 @@ function page(input) {
|
|
|
3229
3229
|
return `<tr><td><code>${esc(s.id)}</code></td><td>${esc(s.title)}</td><td><span class="pill ${cls}">${esc(label)}</span></td></tr>`;
|
|
3230
3230
|
}).join("");
|
|
3231
3231
|
const mockupHtml = input.mockups.length === 0 ? `<p><em>${l.noMockups}</em></p>` : `<div class="mockups">${input.mockups.map(
|
|
3232
|
-
(m) => `<div class="mockup ${m.platform === "mobile" ? "phone" : ""}"><header>${esc(m.title)} \
|
|
3232
|
+
(m) => `<div class="mockup ${m.platform === "mobile" ? "phone" : ""}"><header>${esc(m.title)} \u2014 ${esc(m.file)}</header><iframe src="${esc(m.file)}" loading="lazy" title="${esc(m.title)}"></iframe></div>`
|
|
3233
3233
|
).join("")}</div>`;
|
|
3234
3234
|
const shotsHtml = input.screenshots.length === 0 ? "" : `<h3>${l.screenshots}</h3><div class="grid-shots">${input.screenshots.map((s) => `<img src="${esc(s)}" alt="${esc(s)}" loading="lazy">`).join("")}</div>`;
|
|
3235
3235
|
return `<!doctype html>
|
|
@@ -3237,15 +3237,15 @@ function page(input) {
|
|
|
3237
3237
|
<head>
|
|
3238
3238
|
<meta charset="utf-8">
|
|
3239
3239
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
3240
|
-
<title>${esc(l.kicker)} \
|
|
3240
|
+
<title>${esc(l.kicker)} \u2014 ${esc(input.title)}</title>
|
|
3241
3241
|
<style>${CSS}</style>
|
|
3242
3242
|
</head>
|
|
3243
3243
|
<body>
|
|
3244
3244
|
<div class="wrap">
|
|
3245
3245
|
<header class="hero">
|
|
3246
|
-
<p class="kicker">${esc(l.kicker)} \
|
|
3246
|
+
<p class="kicker">${esc(l.kicker)} \xB7 ${esc(input.domain)} \xB7 ${esc(input.lane)}</p>
|
|
3247
3247
|
<h1>${esc(input.title)}</h1>
|
|
3248
|
-
<p class="meta">${esc(input.project)} \
|
|
3248
|
+
<p class="meta">${esc(input.project)} \xB7 ${esc(l.hash)} ${esc(shortHash(input.hash))} \xB7 ${esc(l.generated)} ${esc(input.generatedAt)}</p>
|
|
3249
3249
|
</header>
|
|
3250
3250
|
|
|
3251
3251
|
<section>
|
|
@@ -3275,7 +3275,7 @@ function page(input) {
|
|
|
3275
3275
|
<p>${esc(l.command)}: <code>${esc(input.approveHint)}</code></p>
|
|
3276
3276
|
</section>
|
|
3277
3277
|
|
|
3278
|
-
<footer>SpecAtlas \
|
|
3278
|
+
<footer>SpecAtlas \xB7 ${esc(input.project)} \xB7 ${esc(input.generatedAt)}</footer>
|
|
3279
3279
|
</div>
|
|
3280
3280
|
</body>
|
|
3281
3281
|
</html>
|