@decocms/parity 0.35.5 → 0.35.7
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/cli.js +121 -82
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -84796,7 +84796,8 @@ function withoutAccepted(checks) {
|
|
|
84796
84796
|
const issues = c.issues.filter((i) => !i.accepted);
|
|
84797
84797
|
if (issues.length === c.issues.length)
|
|
84798
84798
|
return c;
|
|
84799
|
-
|
|
84799
|
+
const status = issues.length === 0 ? "pass" : c.status === "fail" && issues.every((i) => i.inconclusive) ? "warn" : c.status;
|
|
84800
|
+
return { ...c, issues, status };
|
|
84800
84801
|
});
|
|
84801
84802
|
}
|
|
84802
84803
|
function formatAcceptedSeverities(by) {
|
|
@@ -86827,24 +86828,30 @@ function countBy(arr, pick) {
|
|
|
86827
86828
|
|
|
86828
86829
|
// src/report/html-template.ts
|
|
86829
86830
|
var REPORT_CSS = `
|
|
86831
|
+
/* Palette follows the deco site family (decocms.com/migrations, the plugin tour): forest + lime
|
|
86832
|
+
on warm paper in light, a warm near-black in dark. --on-accent is the text color on an
|
|
86833
|
+
--accent-action fill: lime in dark needs dark text, forest in light needs white. */
|
|
86830
86834
|
:root[data-theme="dark"], :root {
|
|
86831
|
-
--surface-base: #
|
|
86832
|
-
--surface-elevated: #
|
|
86833
|
-
--surface-overlay: #
|
|
86834
|
-
--surface-sidebar: #
|
|
86835
|
-
--border-default: #
|
|
86836
|
-
--border-strong: #
|
|
86837
|
-
--text-primary: #
|
|
86838
|
-
--text-secondary: #
|
|
86839
|
-
--text-muted: #
|
|
86840
|
-
--accent-action: #
|
|
86841
|
-
--accent
|
|
86842
|
-
--accent-
|
|
86843
|
-
--
|
|
86844
|
-
--
|
|
86845
|
-
--
|
|
86846
|
-
--state-
|
|
86847
|
-
--
|
|
86835
|
+
--surface-base: #12110f;
|
|
86836
|
+
--surface-elevated: #1b1a17;
|
|
86837
|
+
--surface-overlay: #25231f;
|
|
86838
|
+
--surface-sidebar: #161512;
|
|
86839
|
+
--border-default: #2e2b26;
|
|
86840
|
+
--border-strong: #3d3a33;
|
|
86841
|
+
--text-primary: #ecebe6;
|
|
86842
|
+
--text-secondary: #c9c5bd;
|
|
86843
|
+
--text-muted: #8f8a80;
|
|
86844
|
+
--accent-action: #d0ec1a;
|
|
86845
|
+
--on-accent: #07401a;
|
|
86846
|
+
--accent-tint: rgba(208,236,26,0.10);
|
|
86847
|
+
--accent-ink: #d0ec1a;
|
|
86848
|
+
--accent-prod: #5aa9f0;
|
|
86849
|
+
--accent-cand: #c08cff;
|
|
86850
|
+
--state-good: #8fd14f;
|
|
86851
|
+
--state-warn: #f0b613;
|
|
86852
|
+
--state-bad: #ff6b5e;
|
|
86853
|
+
--state-info: #5aa9f0;
|
|
86854
|
+
--shadow-card: 0 1px 2px rgba(0,0,0,0.4), 0 8px 24px rgba(0,0,0,0.18);
|
|
86848
86855
|
/* legacy tokens (mapped for backwards compat) */
|
|
86849
86856
|
--bg: var(--surface-base);
|
|
86850
86857
|
--bg-card: var(--surface-elevated);
|
|
@@ -86862,27 +86869,31 @@ var REPORT_CSS = `
|
|
|
86862
86869
|
--low: var(--text-muted);
|
|
86863
86870
|
}
|
|
86864
86871
|
:root[data-theme="light"] {
|
|
86865
|
-
--surface-base: #
|
|
86872
|
+
--surface-base: #fafaf8;
|
|
86866
86873
|
--surface-elevated: #ffffff;
|
|
86867
|
-
--surface-overlay: #
|
|
86874
|
+
--surface-overlay: #f3f1ee;
|
|
86868
86875
|
--surface-sidebar: #ffffff;
|
|
86869
|
-
--border-default: #
|
|
86870
|
-
--border-strong: #
|
|
86871
|
-
--text-primary: #
|
|
86872
|
-
--text-secondary: #
|
|
86873
|
-
--text-muted: #
|
|
86874
|
-
--accent-action: #
|
|
86875
|
-
--accent
|
|
86876
|
-
--accent-
|
|
86877
|
-
--
|
|
86878
|
-
--
|
|
86879
|
-
--
|
|
86880
|
-
--
|
|
86876
|
+
--border-default: #e7e4df;
|
|
86877
|
+
--border-strong: #d2cec7;
|
|
86878
|
+
--text-primary: #1d1a17;
|
|
86879
|
+
--text-secondary: #4a4540;
|
|
86880
|
+
--text-muted: #77716b;
|
|
86881
|
+
--accent-action: #07401a;
|
|
86882
|
+
--on-accent: #ffffff;
|
|
86883
|
+
--accent-tint: #f1f8cf;
|
|
86884
|
+
--accent-ink: #07401a;
|
|
86885
|
+
--accent-prod: #1c6fb8;
|
|
86886
|
+
--accent-cand: #7c3aed;
|
|
86887
|
+
--state-good: #3f7d00;
|
|
86888
|
+
--state-warn: #a66b00;
|
|
86889
|
+
--state-bad: #c4281c;
|
|
86890
|
+
--state-info: #1c6fb8;
|
|
86891
|
+
--shadow-card: 0 1px 2px rgba(29,26,23,0.05), 0 6px 18px rgba(29,26,23,0.05);
|
|
86881
86892
|
}
|
|
86882
86893
|
* { box-sizing: border-box; }
|
|
86883
86894
|
html, body { margin: 0; padding: 0; min-height: 100vh; }
|
|
86884
86895
|
body {
|
|
86885
|
-
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
|
|
86896
|
+
font-family: Switzer, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
|
|
86886
86897
|
background: var(--surface-base);
|
|
86887
86898
|
color: var(--text-primary);
|
|
86888
86899
|
line-height: 1.55;
|
|
@@ -86982,11 +86993,12 @@ var REPORT_CSS = `
|
|
|
86982
86993
|
}
|
|
86983
86994
|
.nav-item:hover { background: var(--surface-overlay); color: var(--text-primary); }
|
|
86984
86995
|
.nav-item.active {
|
|
86985
|
-
background: var(--
|
|
86986
|
-
color: var(--
|
|
86987
|
-
|
|
86996
|
+
background: var(--accent-tint);
|
|
86997
|
+
color: var(--accent-ink);
|
|
86998
|
+
font-weight: 600;
|
|
86988
86999
|
}
|
|
86989
|
-
|
|
87000
|
+
/* Emoji glyphs render differently per OS and fight the palette; the labels carry the meaning. */
|
|
87001
|
+
.nav-item .icon { display: none; }
|
|
86990
87002
|
.nav-item .label { flex: 1; }
|
|
86991
87003
|
.nav-item .count {
|
|
86992
87004
|
background: var(--surface-base);
|
|
@@ -86997,7 +87009,7 @@ var REPORT_CSS = `
|
|
|
86997
87009
|
border-radius: 10px;
|
|
86998
87010
|
font-variant-numeric: tabular-nums;
|
|
86999
87011
|
}
|
|
87000
|
-
.nav-item.active .count { background: var(--accent-action); border-color: var(--accent-action); color:
|
|
87012
|
+
.nav-item.active .count { background: var(--accent-action); border-color: var(--accent-action); color: var(--on-accent); }
|
|
87001
87013
|
.sidebar-footer {
|
|
87002
87014
|
padding: 16px 20px;
|
|
87003
87015
|
border-top: 1px solid var(--border-default);
|
|
@@ -87052,7 +87064,7 @@ var REPORT_CSS = `
|
|
|
87052
87064
|
.health-score::after {
|
|
87053
87065
|
content: "";
|
|
87054
87066
|
position: absolute;
|
|
87055
|
-
inset:
|
|
87067
|
+
inset: 10px;
|
|
87056
87068
|
border-radius: 50%;
|
|
87057
87069
|
background: var(--surface-elevated);
|
|
87058
87070
|
z-index: 1;
|
|
@@ -87061,7 +87073,7 @@ var REPORT_CSS = `
|
|
|
87061
87073
|
position: relative; z-index: 2;
|
|
87062
87074
|
}
|
|
87063
87075
|
.health-score .score-num {
|
|
87064
|
-
font-size: 46px; font-weight:
|
|
87076
|
+
font-size: 46px; font-weight: 600; letter-spacing: -0.03em; line-height: 1;
|
|
87065
87077
|
color: var(--text-primary);
|
|
87066
87078
|
}
|
|
87067
87079
|
.health-score .score-num small {
|
|
@@ -87077,7 +87089,7 @@ var REPORT_CSS = `
|
|
|
87077
87089
|
}
|
|
87078
87090
|
.dash-hero-info { display: flex; flex-direction: column; gap: 8px; }
|
|
87079
87091
|
.dash-hero-info .verdict-text {
|
|
87080
|
-
font-size:
|
|
87092
|
+
font-size: 24px; font-weight: 600; letter-spacing: -0.02em;
|
|
87081
87093
|
}
|
|
87082
87094
|
.dash-hero-info .verdict-text.pass { color: var(--state-good); }
|
|
87083
87095
|
.dash-hero-info .verdict-text.warn { color: var(--state-warn); }
|
|
@@ -87099,8 +87111,8 @@ var REPORT_CSS = `
|
|
|
87099
87111
|
.tile {
|
|
87100
87112
|
background: var(--surface-elevated);
|
|
87101
87113
|
border: 1px solid var(--border-default);
|
|
87102
|
-
border-radius:
|
|
87103
|
-
padding:
|
|
87114
|
+
border-radius: 16px;
|
|
87115
|
+
padding: 18px;
|
|
87104
87116
|
box-shadow: var(--shadow-card);
|
|
87105
87117
|
cursor: pointer;
|
|
87106
87118
|
transition: transform 0.15s, border-color 0.15s;
|
|
@@ -87108,15 +87120,18 @@ var REPORT_CSS = `
|
|
|
87108
87120
|
color: inherit;
|
|
87109
87121
|
display: block;
|
|
87110
87122
|
}
|
|
87111
|
-
.tile:hover { transform: translateY(-2px); border-color: var(--
|
|
87112
|
-
.tile .tile-icon {
|
|
87113
|
-
.tile .tile-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.
|
|
87114
|
-
.tile .tile-
|
|
87115
|
-
.tile .tile-
|
|
87116
|
-
.tile.
|
|
87117
|
-
.tile.state-
|
|
87118
|
-
.tile.state-
|
|
87119
|
-
.tile.state-
|
|
87123
|
+
.tile:hover { transform: translateY(-2px); border-color: var(--border-strong); text-decoration: none; }
|
|
87124
|
+
.tile .tile-icon { display: none; }
|
|
87125
|
+
.tile .tile-label { display: flex; align-items: center; gap: 7px; font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
|
|
87126
|
+
.tile .tile-label::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--tile-state, var(--text-muted)); }
|
|
87127
|
+
.tile .tile-value { font-size: 30px; font-weight: 600; letter-spacing: -0.02em; margin-top: 10px; line-height: 1.1; }
|
|
87128
|
+
.tile .tile-meta { font-size: 12px; color: var(--text-muted); margin-top: 6px; }
|
|
87129
|
+
.tile.state-pass { --tile-state: var(--state-good); }
|
|
87130
|
+
.tile.state-warn { --tile-state: var(--state-warn); }
|
|
87131
|
+
.tile.state-fail { --tile-state: var(--state-bad); }
|
|
87132
|
+
.tile.state-info { --tile-state: var(--state-info); }
|
|
87133
|
+
.module-scores .module-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: var(--surface-elevated); border: 1px solid var(--border-default); font-size: 12px; color: var(--text-secondary); }
|
|
87134
|
+
.module-scores .module-chip strong { font-weight: 600; color: var(--text-primary); }
|
|
87120
87135
|
|
|
87121
87136
|
/* Cards */
|
|
87122
87137
|
.card {
|
|
@@ -87201,7 +87216,7 @@ var REPORT_CSS = `
|
|
|
87201
87216
|
.tag.sev-medium { background: rgba(242,201,76,0.15); color: #f2c94c; }
|
|
87202
87217
|
.tag.sev-low { background: rgba(138,147,166,0.15); color: var(--text-muted); }
|
|
87203
87218
|
.tag.tag-mono { font-family: "SF Mono", Menlo, monospace; text-transform: none; }
|
|
87204
|
-
.tag.tag-page { background:
|
|
87219
|
+
.tag.tag-page { background: color-mix(in srgb, var(--state-info) 14%, transparent); color: var(--state-info); }
|
|
87205
87220
|
.issue h3 { margin: 0; font-size: 14px; font-weight: 600; line-height: 1.4; }
|
|
87206
87221
|
.issue-section { margin-top: 10px; border-top: 1px solid var(--border-default); padding-top: 8px; }
|
|
87207
87222
|
.issue-section summary { cursor: pointer; display: flex; align-items: center; justify-content: space-between; list-style: none; padding: 4px 0; }
|
|
@@ -87261,7 +87276,7 @@ var REPORT_CSS = `
|
|
|
87261
87276
|
/* Side-by-side iframes */
|
|
87262
87277
|
.sbs-toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
|
|
87263
87278
|
.sbs-toolbar button { background: var(--surface-overlay); color: var(--text-primary); border: 1px solid var(--border-default); padding: 6px 14px; border-radius: 6px; cursor: pointer; font-size: 13px; }
|
|
87264
|
-
.sbs-toolbar button.active { background: var(--accent-action); color:
|
|
87279
|
+
.sbs-toolbar button.active { background: var(--accent-action); color: var(--on-accent); border-color: var(--accent-action); }
|
|
87265
87280
|
.sbs-toolbar button:hover { border-color: var(--accent-action); }
|
|
87266
87281
|
/* Inferred URL pair — captured on only one side. Issue #77. */
|
|
87267
87282
|
.sbs-toolbar button.sbs-btn-inferred { opacity: 0.7; border-style: dashed; }
|
|
@@ -87269,7 +87284,7 @@ var REPORT_CSS = `
|
|
|
87269
87284
|
display: inline-block;
|
|
87270
87285
|
margin-left: 4px;
|
|
87271
87286
|
background: var(--state-warn);
|
|
87272
|
-
color:
|
|
87287
|
+
color: var(--surface-base);
|
|
87273
87288
|
font-size: 10px;
|
|
87274
87289
|
font-weight: 700;
|
|
87275
87290
|
padding: 0 6px;
|
|
@@ -87288,7 +87303,7 @@ var REPORT_CSS = `
|
|
|
87288
87303
|
|
|
87289
87304
|
/* LLM Prompt panel */
|
|
87290
87305
|
.prompt-toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
|
|
87291
|
-
.prompt-toolbar button { background: var(--accent-action); color:
|
|
87306
|
+
.prompt-toolbar button { background: var(--accent-action); color: var(--on-accent); border: none; padding: 8px 16px; border-radius: 6px; cursor: pointer; font-size: 13px; font-weight: 600; }
|
|
87292
87307
|
.prompt-toolbar button:hover { opacity: 0.9; }
|
|
87293
87308
|
.prompt-toolbar button.secondary { background: var(--surface-overlay); color: var(--text-primary); border: 1px solid var(--border-default); }
|
|
87294
87309
|
.prompt-toolbar .feedback { font-size: 12px; color: var(--state-good); margin-left: 8px; opacity: 0; transition: opacity 0.2s; }
|
|
@@ -87320,7 +87335,7 @@ var REPORT_CSS = `
|
|
|
87320
87335
|
.url-cell a { color: var(--accent-action); text-decoration: none; }
|
|
87321
87336
|
.url-cell a:hover { text-decoration: underline; }
|
|
87322
87337
|
.net-cat { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 10px; text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; background: var(--surface-overlay); color: var(--text-muted); }
|
|
87323
|
-
.net-cat.cat-document { background:
|
|
87338
|
+
.net-cat.cat-document { background: color-mix(in srgb, var(--state-info) 14%, transparent); color: var(--state-info); }
|
|
87324
87339
|
.net-cat.cat-static-asset { background: rgba(46,194,126,0.15); color: var(--state-good); }
|
|
87325
87340
|
.net-cat.cat-image { background: rgba(245,166,35,0.15); color: var(--state-warn); }
|
|
87326
87341
|
.net-cat.cat-font { background: rgba(184,110,255,0.15); color: var(--accent-cand); }
|
|
@@ -87442,10 +87457,10 @@ var REPORT_CSS = `
|
|
|
87442
87457
|
color: var(--text-muted);
|
|
87443
87458
|
border-color: rgba(138, 147, 166, 0.3);
|
|
87444
87459
|
}
|
|
87445
|
-
.vd-badge.sev-critical { background: var(--critical); color:
|
|
87446
|
-
.vd-badge.sev-high { background: var(--high); color:
|
|
87460
|
+
.vd-badge.sev-critical { background: var(--critical); color: var(--surface-base); border-color: var(--critical); }
|
|
87461
|
+
.vd-badge.sev-high { background: var(--high); color: var(--surface-base); border-color: var(--high); }
|
|
87447
87462
|
.vd-badge.sev-medium { background: var(--medium); color: #1a1a1a; border-color: var(--medium); }
|
|
87448
|
-
.vd-badge.sev-low { background: var(--low); color:
|
|
87463
|
+
.vd-badge.sev-low { background: var(--low); color: var(--surface-base); border-color: var(--low); }
|
|
87449
87464
|
|
|
87450
87465
|
.vd-list {
|
|
87451
87466
|
display: flex;
|
|
@@ -88228,14 +88243,9 @@ var REPORT_JS = `
|
|
|
88228
88243
|
var btn = document.getElementById('theme-toggle');
|
|
88229
88244
|
if (btn) btn.textContent = next === 'dark' ? '☀ Light' : '\uD83C\uDF19 Dark';
|
|
88230
88245
|
}
|
|
88231
|
-
|
|
88232
|
-
|
|
88233
|
-
|
|
88234
|
-
document.documentElement.setAttribute('data-theme', saved);
|
|
88235
|
-
var btn0 = document.getElementById('theme-toggle');
|
|
88236
|
-
if (btn0) btn0.textContent = saved === 'dark' ? '☀ Light' : '\uD83C\uDF19 Dark';
|
|
88237
|
-
}
|
|
88238
|
-
} catch (e) {}
|
|
88246
|
+
// The theme itself is set in <head> (THEME_BOOT) so there is no flash; here only the label.
|
|
88247
|
+
var btn0 = document.getElementById('theme-toggle');
|
|
88248
|
+
if (btn0) btn0.textContent = document.documentElement.getAttribute('data-theme') === 'light' ? '\uD83C\uDF19 Dark' : '☀ Light';
|
|
88239
88249
|
var tBtn = document.getElementById('theme-toggle');
|
|
88240
88250
|
if (tBtn) tBtn.addEventListener('click', toggleTheme);
|
|
88241
88251
|
|
|
@@ -88516,6 +88526,7 @@ var REPORT_JS = `
|
|
|
88516
88526
|
}
|
|
88517
88527
|
})();
|
|
88518
88528
|
`.trim();
|
|
88529
|
+
var THEME_BOOT = `try{var t=localStorage.getItem('parity-theme');if(t!=='light'&&t!=='dark')t=matchMedia('(prefers-color-scheme: light)').matches?'light':'dark';document.documentElement.setAttribute('data-theme',t)}catch(e){}`;
|
|
88519
88530
|
|
|
88520
88531
|
// src/report/issue-html.ts
|
|
88521
88532
|
import { relative } from "node:path";
|
|
@@ -98094,12 +98105,12 @@ function renderModuleScores(run) {
|
|
|
98094
98105
|
return "";
|
|
98095
98106
|
const chips = run.moduleVerdicts.map((mv) => {
|
|
98096
98107
|
const color = mv.status === "pass" ? "var(--state-good)" : mv.status === "warn" ? "var(--state-warn)" : "var(--state-bad)";
|
|
98097
|
-
return `<span
|
|
98108
|
+
return `<span class="module-chip" title="${escapeHtml(mv.checksRun)} check(s) · ${escapeHtml(mv.pagesAnalyzed)} page(s) analyzed">
|
|
98098
98109
|
<strong>${escapeHtml(mv.module)}</strong>
|
|
98099
98110
|
<span style="color:${color};font-variant-numeric:tabular-nums">${mv.score}</span>
|
|
98100
98111
|
</span>`;
|
|
98101
98112
|
}).join("");
|
|
98102
|
-
return `<div class="module-scores" style="display:flex;flex-wrap:wrap;gap:8px;margin
|
|
98113
|
+
return `<div class="module-scores" style="display:flex;flex-wrap:wrap;gap:8px;margin:8px 0 12px">${chips}</div>`;
|
|
98103
98114
|
}
|
|
98104
98115
|
function buildTiles(run) {
|
|
98105
98116
|
const tiles = [];
|
|
@@ -99335,6 +99346,8 @@ function renderHtmlReport(run, runDir) {
|
|
|
99335
99346
|
<meta charset="utf-8"/>
|
|
99336
99347
|
<title>parity — ${escapeHtml(run.id)}</title>
|
|
99337
99348
|
<meta name="viewport" content="width=device-width,initial-scale=1"/>
|
|
99349
|
+
<script>${THEME_BOOT}</script>
|
|
99350
|
+
<link rel="stylesheet" href="https://api.fontshare.com/v2/css?f[]=switzer@400,500,600,700&display=swap"/>
|
|
99338
99351
|
<style>${REPORT_CSS}</style>
|
|
99339
99352
|
</head>
|
|
99340
99353
|
<body>
|
|
@@ -114773,17 +114786,41 @@ function mcpEndpoint(url) {
|
|
|
114773
114786
|
const trimmed = url.replace(/\/+$/, "");
|
|
114774
114787
|
return /\/mcp(\/|$)/.test(trimmed) ? trimmed : `${trimmed}/mcp/self`;
|
|
114775
114788
|
}
|
|
114776
|
-
|
|
114777
|
-
|
|
114789
|
+
var KIND_LABEL = {
|
|
114790
|
+
home: "Home",
|
|
114791
|
+
plp: "Listagem",
|
|
114792
|
+
pdp: "Produto",
|
|
114793
|
+
search: "Busca",
|
|
114794
|
+
institutional: "Institucional",
|
|
114795
|
+
blog: "Blog",
|
|
114796
|
+
account: "Minha conta",
|
|
114797
|
+
checkout: "Checkout"
|
|
114798
|
+
};
|
|
114799
|
+
function cardTitle(card) {
|
|
114800
|
+
const label = KIND_LABEL[card.kind] ?? card.kind;
|
|
114801
|
+
if (!card.path.startsWith("/"))
|
|
114802
|
+
return `${label} (página de amostra)`;
|
|
114803
|
+
return card.path === "/" ? label : `${label} · ${card.path}`;
|
|
114778
114804
|
}
|
|
114779
114805
|
var PARITY_COMMENT_PREFIX = "[parity]";
|
|
114806
|
+
var LANE_TEXT = {
|
|
114807
|
+
triage: "Em triagem: a captura ainda não ligou componentes a esta página.",
|
|
114808
|
+
backlog: "Na fila: falta construir os componentes abaixo.",
|
|
114809
|
+
building: "Em construção.",
|
|
114810
|
+
review: "Em revisão: PR aberto, aguardando os gates.",
|
|
114811
|
+
done: "Concluída: componentes construídos e comparação aprovada."
|
|
114812
|
+
};
|
|
114780
114813
|
function cardDescription(card) {
|
|
114781
|
-
const
|
|
114782
|
-
|
|
114783
|
-
|
|
114784
|
-
|
|
114785
|
-
|
|
114814
|
+
const where = card.path.startsWith("/") ? `\`${card.path}\`` : "página de amostra da captura";
|
|
114815
|
+
const lines = [
|
|
114816
|
+
`Migrar **${KIND_LABEL[card.kind] ?? card.kind}** (${where}) para o site novo.`,
|
|
114817
|
+
"",
|
|
114818
|
+
`**Status:** ${LANE_TEXT[card.column] ?? card.column}`
|
|
114819
|
+
];
|
|
114820
|
+
if (card.blockers.length) {
|
|
114821
|
+
lines.push("", "### O que falta", ...card.blockers.map((b) => `- [ ] ${b}`));
|
|
114786
114822
|
}
|
|
114823
|
+
lines.push("", "### Pronto quando", "- todos os componentes da página estão construídos", "- `parity heatmap` da página não acusa diferença de pixel (mobile e desktop)");
|
|
114787
114824
|
return lines.join(`
|
|
114788
114825
|
`);
|
|
114789
114826
|
}
|
|
@@ -114853,11 +114890,13 @@ var callTool2 = async (cfg, name, args) => {
|
|
|
114853
114890
|
};
|
|
114854
114891
|
async function syncBoardToStudio(board, cfg, opts = {}, call = callTool2) {
|
|
114855
114892
|
const existing = await call(cfg, "TASK_BOARD_ITEM_LIST", {});
|
|
114856
|
-
const
|
|
114857
|
-
const
|
|
114893
|
+
const inScope = (i) => cfg.project ? i.virtualMcpId === cfg.project : opts.repo ? i.repo === opts.repo : true;
|
|
114894
|
+
const scoped = (existing.items ?? []).filter(inScope);
|
|
114895
|
+
const byTitle = new Map(scoped.map((i) => [i.title, i]));
|
|
114896
|
+
const byId = new Map(scoped.map((i) => [i.id, i]));
|
|
114858
114897
|
const result = { created: 0, updated: 0, skipped: 0, ids: {} };
|
|
114859
|
-
const upsert = async (title, description, status, knownId) => {
|
|
114860
|
-
const found = (knownId ? byId.get(knownId) : undefined) ?? byTitle.get(title);
|
|
114898
|
+
const upsert = async (title, description, status, knownId, legacyTitle) => {
|
|
114899
|
+
const found = (knownId ? byId.get(knownId) : undefined) ?? byTitle.get(title) ?? (legacyTitle ? byTitle.get(legacyTitle) : undefined);
|
|
114861
114900
|
if (found) {
|
|
114862
114901
|
await call(cfg, "TASK_BOARD_ITEM_UPDATE", { id: found.id, title, status, description });
|
|
114863
114902
|
result.updated += 1;
|
|
@@ -114880,7 +114919,7 @@ async function syncBoardToStudio(board, cfg, opts = {}, call = callTool2) {
|
|
|
114880
114919
|
result.skipped += 1;
|
|
114881
114920
|
continue;
|
|
114882
114921
|
}
|
|
114883
|
-
const id = await upsert(cardTitle(card
|
|
114922
|
+
const id = await upsert(cardTitle(card), cardDescription(card), status, card.boardItemId, card.path);
|
|
114884
114923
|
if (id)
|
|
114885
114924
|
result.ids[card.path] = id;
|
|
114886
114925
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@decocms/parity",
|
|
3
|
-
"version": "0.35.
|
|
3
|
+
"version": "0.35.7",
|
|
4
4
|
"description": "E2E parity validator for site migrations. Compares prod vs cand and reports UI, functional, SEO, visual, and Web Vitals deltas with an LLM-ranked HTML report.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|