@decocms/parity 0.28.0 → 0.28.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/CHANGELOG.md +11 -0
- package/dist/cli.js +59 -59
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,17 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/).
|
|
7
7
|
|
|
8
|
+
## [0.28.1] — 2026-08-24
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
* **`PARITY_STUDIO_URL` accepts a full MCP endpoint.** Studio deployments are
|
|
13
|
+
org-scoped (`https://studio.decocms.com/api/<org>/mcp/self`), and the client
|
|
14
|
+
appended `/mcp/self` to whatever was set — hitting the root path instead, which
|
|
15
|
+
404s on a real deployment. It now uses the value as-is when it already points at
|
|
16
|
+
an `/mcp/` endpoint and only appends for a bare host. Note that on an org-scoped
|
|
17
|
+
URL the **organization comes from the URL**, not only from the token.
|
|
18
|
+
|
|
8
19
|
## [0.28.0] — 2026-08-24
|
|
9
20
|
|
|
10
21
|
The Studio board stops being a one-way report: the client can now see the fixes
|
package/dist/cli.js
CHANGED
|
@@ -45797,7 +45797,7 @@ async function validateAddToCart(page, ctx, cartCountBefore, beforeUrl) {
|
|
|
45797
45797
|
// src/engine/lighthouse.ts
|
|
45798
45798
|
import { spawn } from "node:child_process";
|
|
45799
45799
|
import { mkdirSync as mkdirSync5, readFileSync as readFileSync5 } from "node:fs";
|
|
45800
|
-
import { join as join7 } from "node:path";
|
|
45800
|
+
import { join as join7, resolve as resolve2 } from "node:path";
|
|
45801
45801
|
var AGENT_A11Y_AUDIT_IDS = [
|
|
45802
45802
|
"button-name",
|
|
45803
45803
|
"link-name",
|
|
@@ -45886,7 +45886,7 @@ async function measureLighthouseOnce(url, opts, attempt) {
|
|
|
45886
45886
|
const formFactor = opts.formFactor ?? "mobile";
|
|
45887
45887
|
mkdirSync5(opts.outDir, { recursive: true });
|
|
45888
45888
|
const outPath = join7(opts.outDir, `${opts.id}-a${attempt}.json`);
|
|
45889
|
-
const runTemp =
|
|
45889
|
+
const runTemp = resolve2(opts.outDir, `.tmp-${opts.id}-a${attempt}`);
|
|
45890
45890
|
mkdirSync5(runTemp, { recursive: true });
|
|
45891
45891
|
const args = [
|
|
45892
45892
|
"--yes",
|
|
@@ -45907,7 +45907,7 @@ async function measureLighthouseOnce(url, opts, attempt) {
|
|
|
45907
45907
|
"--quiet",
|
|
45908
45908
|
"--max-wait-for-load=90000"
|
|
45909
45909
|
];
|
|
45910
|
-
const { code, stderr } = await new Promise((
|
|
45910
|
+
const { code, stderr } = await new Promise((resolve3) => {
|
|
45911
45911
|
const proc = spawn("npx", args, {
|
|
45912
45912
|
shell: true,
|
|
45913
45913
|
stdio: ["ignore", "ignore", "pipe"],
|
|
@@ -45917,8 +45917,8 @@ async function measureLighthouseOnce(url, opts, attempt) {
|
|
|
45917
45917
|
proc.stderr.on("data", (chunk) => {
|
|
45918
45918
|
stderrBuf += chunk.toString();
|
|
45919
45919
|
});
|
|
45920
|
-
proc.on("close", (exitCode) =>
|
|
45921
|
-
proc.on("error", (err) =>
|
|
45920
|
+
proc.on("close", (exitCode) => resolve3({ code: exitCode ?? 1, stderr: stderrBuf }));
|
|
45921
|
+
proc.on("error", (err) => resolve3({ code: 1, stderr: err.message }));
|
|
45922
45922
|
});
|
|
45923
45923
|
let report;
|
|
45924
45924
|
try {
|
|
@@ -46873,11 +46873,9 @@ async function runSideBenchmark(opts) {
|
|
|
46873
46873
|
id: `${opts.side}-${opts.viewport}-${id}`,
|
|
46874
46874
|
formFactor: ff
|
|
46875
46875
|
});
|
|
46876
|
-
const
|
|
46877
|
-
|
|
46878
|
-
|
|
46879
|
-
lh("pdp", targets.product)
|
|
46880
|
-
]);
|
|
46876
|
+
const home = await lh("home", opts.base);
|
|
46877
|
+
const plp = await lh("plp", targets.category);
|
|
46878
|
+
const pdp = await lh("pdp", targets.product);
|
|
46881
46879
|
vitals = { home, plp, pdp };
|
|
46882
46880
|
}
|
|
46883
46881
|
return {
|
|
@@ -47129,11 +47127,9 @@ async function runSideBenchmarkContent(opts) {
|
|
|
47129
47127
|
id: `${opts.side}-${opts.viewport}-${id}`,
|
|
47130
47128
|
formFactor: ff
|
|
47131
47129
|
});
|
|
47132
|
-
const
|
|
47133
|
-
|
|
47134
|
-
|
|
47135
|
-
lh("page2", new URL(opts.contentPaths.pageB, opts.base).toString())
|
|
47136
|
-
]);
|
|
47130
|
+
const home = await lh("home", opts.base);
|
|
47131
|
+
const plp = await lh("page1", new URL(opts.contentPaths.pageA, opts.base).toString());
|
|
47132
|
+
const pdp = await lh("page2", new URL(opts.contentPaths.pageB, opts.base).toString());
|
|
47137
47133
|
vitals = { home, plp, pdp };
|
|
47138
47134
|
}
|
|
47139
47135
|
return {
|
|
@@ -58687,10 +58683,10 @@ async function runFlow(flow, ctx) {
|
|
|
58687
58683
|
});
|
|
58688
58684
|
let timer;
|
|
58689
58685
|
let cleanup = Promise.resolve();
|
|
58690
|
-
const timeoutPromise = new Promise((
|
|
58686
|
+
const timeoutPromise = new Promise((resolve3) => {
|
|
58691
58687
|
timer = setTimeout(() => {
|
|
58692
58688
|
const pages = ctx.ctx.pages();
|
|
58693
|
-
|
|
58689
|
+
resolve3(finalize(flow, ctx, [], [
|
|
58694
58690
|
{
|
|
58695
58691
|
step: 0,
|
|
58696
58692
|
name: "flow-timeout",
|
|
@@ -58739,7 +58735,7 @@ var PROBE_TIMEOUT_MS = 2000;
|
|
|
58739
58735
|
function withTimeout(p, capMs, fallback) {
|
|
58740
58736
|
return Promise.race([
|
|
58741
58737
|
p.catch(() => fallback),
|
|
58742
|
-
new Promise((
|
|
58738
|
+
new Promise((resolve3) => setTimeout(() => resolve3(fallback), capMs))
|
|
58743
58739
|
]);
|
|
58744
58740
|
}
|
|
58745
58741
|
function selectorKeysOf(selectors) {
|
|
@@ -59421,7 +59417,7 @@ ${JSON.stringify(checks.map((c) => ({ name: c.name, status: c.status, summary: c
|
|
|
59421
59417
|
|
|
59422
59418
|
// src/commands/extract.ts
|
|
59423
59419
|
import { mkdirSync as mkdirSync13 } from "node:fs";
|
|
59424
|
-
import { resolve as
|
|
59420
|
+
import { resolve as resolve4 } from "node:path";
|
|
59425
59421
|
import chalk12 from "chalk";
|
|
59426
59422
|
|
|
59427
59423
|
// src/llm/section-understanding.ts
|
|
@@ -60244,7 +60240,7 @@ function capLinks(links, max) {
|
|
|
60244
60240
|
|
|
60245
60241
|
// src/commands/section.ts
|
|
60246
60242
|
import { mkdirSync as mkdirSync12 } from "node:fs";
|
|
60247
|
-
import { resolve as
|
|
60243
|
+
import { resolve as resolve3 } from "node:path";
|
|
60248
60244
|
import chalk11 from "chalk";
|
|
60249
60245
|
import * as diff from "diff";
|
|
60250
60246
|
import prettier from "prettier";
|
|
@@ -60634,10 +60630,10 @@ async function sectionCommand(opts) {
|
|
|
60634
60630
|
const hash2 = hashSelector(opts.selector);
|
|
60635
60631
|
const filePrefix = `section-${hash2}-${viewport}`;
|
|
60636
60632
|
const screenshotPaths = {
|
|
60637
|
-
prod:
|
|
60638
|
-
cand:
|
|
60633
|
+
prod: resolve3(opts.outDir, `${filePrefix}-prod.png`),
|
|
60634
|
+
cand: resolve3(opts.outDir, `${filePrefix}-cand.png`)
|
|
60639
60635
|
};
|
|
60640
|
-
const heatmapPath =
|
|
60636
|
+
const heatmapPath = resolve3(opts.outDir, `${filePrefix}-heatmap.png`);
|
|
60641
60637
|
const browser = await launchBrowser({ headless: true });
|
|
60642
60638
|
try {
|
|
60643
60639
|
const [prodSide, candSide] = await Promise.all([
|
|
@@ -60734,7 +60730,7 @@ async function gatherSide(browser, opts) {
|
|
|
60734
60730
|
stabilizeCarousels(page).catch(() => {
|
|
60735
60731
|
return;
|
|
60736
60732
|
}),
|
|
60737
|
-
new Promise((
|
|
60733
|
+
new Promise((resolve4) => setTimeout(resolve4, 3000))
|
|
60738
60734
|
]);
|
|
60739
60735
|
if (opts.wantScreenshot) {
|
|
60740
60736
|
const scrollBudget = 30000;
|
|
@@ -60742,13 +60738,13 @@ async function gatherSide(browser, opts) {
|
|
|
60742
60738
|
scrollFullPage(page, scrollBudget).catch(() => {
|
|
60743
60739
|
return;
|
|
60744
60740
|
}),
|
|
60745
|
-
new Promise((
|
|
60741
|
+
new Promise((resolve4) => setTimeout(resolve4, scrollBudget + 2000))
|
|
60746
60742
|
]);
|
|
60747
60743
|
await Promise.race([
|
|
60748
60744
|
waitForSkeletonsToResolve(page, 5000).catch(() => {
|
|
60749
60745
|
return;
|
|
60750
60746
|
}),
|
|
60751
|
-
new Promise((
|
|
60747
|
+
new Promise((resolve4) => setTimeout(resolve4, 5000))
|
|
60752
60748
|
]);
|
|
60753
60749
|
}
|
|
60754
60750
|
const artifacts = await captureSectionArtifacts(page, {
|
|
@@ -61104,7 +61100,7 @@ async function extractCommand(opts) {
|
|
|
61104
61100
|
const host = safeHost4(opts.url);
|
|
61105
61101
|
const timestamp = new Date().toISOString();
|
|
61106
61102
|
const runDirTimestamp = timestamp.replace(/[:.]/g, "-");
|
|
61107
|
-
const runDir =
|
|
61103
|
+
const runDir = resolve4(opts.outDir, host, runDirTimestamp);
|
|
61108
61104
|
mkdirSync13(runDir, { recursive: true });
|
|
61109
61105
|
const browser = await launchBrowser({ headless: true });
|
|
61110
61106
|
try {
|
|
@@ -61151,7 +61147,7 @@ async function extractCommand(opts) {
|
|
|
61151
61147
|
for (const component of detected) {
|
|
61152
61148
|
globalIndex++;
|
|
61153
61149
|
const dirName = componentDirName(component.role, globalIndex);
|
|
61154
|
-
const componentDir =
|
|
61150
|
+
const componentDir = resolve4(runDir, "components", dirName);
|
|
61155
61151
|
const extracted = await extractComponent(page, component, {
|
|
61156
61152
|
outDir: componentDir,
|
|
61157
61153
|
index: globalIndex,
|
|
@@ -62188,7 +62184,7 @@ function listCommand(output) {
|
|
|
62188
62184
|
|
|
62189
62185
|
// src/commands/migrate.ts
|
|
62190
62186
|
import { existsSync as existsSync15, mkdirSync as mkdirSync16, readFileSync as readFileSync20, writeFileSync as writeFileSync24 } from "node:fs";
|
|
62191
|
-
import { resolve as
|
|
62187
|
+
import { resolve as resolve5 } from "node:path";
|
|
62192
62188
|
import chalk17 from "chalk";
|
|
62193
62189
|
import open from "open";
|
|
62194
62190
|
|
|
@@ -64702,13 +64698,13 @@ async function migrateCommand(opts) {
|
|
|
64702
64698
|
console.log(chalk17.dim(` source: ${source.label} — ${sourceInventory.components.length} component(s) from code`));
|
|
64703
64699
|
}
|
|
64704
64700
|
const host = safeHost6(opts.url);
|
|
64705
|
-
const runDir =
|
|
64701
|
+
const runDir = resolve5(opts.outDir, host);
|
|
64706
64702
|
mkdirSync16(runDir, { recursive: true });
|
|
64707
64703
|
const browser = await launchBrowser({ headless: true });
|
|
64708
64704
|
try {
|
|
64709
|
-
const themePath =
|
|
64710
|
-
const assetsPath =
|
|
64711
|
-
const blocksPath =
|
|
64705
|
+
const themePath = resolve5(runDir, "theme.json");
|
|
64706
|
+
const assetsPath = resolve5(runDir, "assets.json");
|
|
64707
|
+
const blocksPath = resolve5(runDir, "blocks.json");
|
|
64712
64708
|
let theme;
|
|
64713
64709
|
let platform;
|
|
64714
64710
|
let stack = null;
|
|
@@ -64726,7 +64722,7 @@ async function migrateCommand(opts) {
|
|
|
64726
64722
|
console.log(chalk17.dim(" phase 1 theme+assets: cached"));
|
|
64727
64723
|
} else {
|
|
64728
64724
|
console.log(chalk17.dim(` phase 1 theme+assets: scraping (${viewports.join(", ")})…`));
|
|
64729
|
-
mkdirSync16(
|
|
64725
|
+
mkdirSync16(resolve5(runDir, "screenshots"), { recursive: true });
|
|
64730
64726
|
const samples = [];
|
|
64731
64727
|
screenshots = [];
|
|
64732
64728
|
let platformSeen = null;
|
|
@@ -64752,7 +64748,7 @@ async function migrateCommand(opts) {
|
|
|
64752
64748
|
sleep2(5000)
|
|
64753
64749
|
]);
|
|
64754
64750
|
samples.push(await scrapeThemeSamples(page));
|
|
64755
|
-
const shot =
|
|
64751
|
+
const shot = resolve5(runDir, "screenshots", `${vp}.png`);
|
|
64756
64752
|
await page.screenshot({ path: shot, fullPage: true, animations: "disabled", timeout: 15000 }).then(() => screenshots.push({ viewport: vp, path: `screenshots/${vp}.png` })).catch(() => {
|
|
64757
64753
|
return;
|
|
64758
64754
|
});
|
|
@@ -64766,7 +64762,7 @@ async function migrateCommand(opts) {
|
|
|
64766
64762
|
const fetchBytes = async (url) => await browserFetchBytes(page, url) ?? await nodeFetchBytes(url);
|
|
64767
64763
|
assetsResolved = await downloadSiteAssets(rawAssets, runDir, fetchBytes);
|
|
64768
64764
|
if (rawAssets.logo?.type === "svg" || rawAssets.logo && !assetsResolved.logo) {
|
|
64769
|
-
const logoPng =
|
|
64765
|
+
const logoPng = resolve5(runDir, "assets", "logo.png");
|
|
64770
64766
|
const ok = await page.locator("[data-parity-logo]").first().screenshot({ path: logoPng, timeout: 8000 }).then(() => true).catch(() => false);
|
|
64771
64767
|
if (ok) {
|
|
64772
64768
|
assetsResolved.logo = "assets/logo.png";
|
|
@@ -64791,7 +64787,7 @@ async function migrateCommand(opts) {
|
|
|
64791
64787
|
writeFileSync24(assetsPath, `${JSON.stringify({ platform, stack, assets, screenshots }, null, 2)}
|
|
64792
64788
|
`, "utf8");
|
|
64793
64789
|
}
|
|
64794
|
-
const sitemapPath =
|
|
64790
|
+
const sitemapPath = resolve5(runDir, "sitemap.json");
|
|
64795
64791
|
let resolvedPages;
|
|
64796
64792
|
if (!opts.refresh && existsSync15(sitemapPath)) {
|
|
64797
64793
|
resolvedPages = readJson(sitemapPath).pages;
|
|
@@ -64834,7 +64830,7 @@ async function migrateCommand(opts) {
|
|
|
64834
64830
|
console.error(chalk17.red("nenhuma página resolvida a partir de --pages"));
|
|
64835
64831
|
return 1;
|
|
64836
64832
|
}
|
|
64837
|
-
const capturePath =
|
|
64833
|
+
const capturePath = resolve5(runDir, "capture.json");
|
|
64838
64834
|
let pages;
|
|
64839
64835
|
let components;
|
|
64840
64836
|
if (!opts.refresh && existsSync15(capturePath)) {
|
|
@@ -64860,7 +64856,7 @@ async function migrateCommand(opts) {
|
|
|
64860
64856
|
writeFileSync24(blocksPath, `${JSON.stringify(vtexBlocks, null, 2)}
|
|
64861
64857
|
`, "utf8");
|
|
64862
64858
|
if (Object.keys(contentMap).length)
|
|
64863
|
-
writeFileSync24(
|
|
64859
|
+
writeFileSync24(resolve5(runDir, "content-assets.json"), `${JSON.stringify(contentMap, null, 2)}
|
|
64864
64860
|
`, "utf8");
|
|
64865
64861
|
const bundle = {
|
|
64866
64862
|
url: opts.url,
|
|
@@ -64897,17 +64893,17 @@ async function migrateCommand(opts) {
|
|
|
64897
64893
|
if (format === "md" || format === "both") {
|
|
64898
64894
|
await markdownExporter2.export(bundle, runDir);
|
|
64899
64895
|
await htmlExporter.export(bundle, runDir);
|
|
64900
|
-
writeFileSync24(
|
|
64896
|
+
writeFileSync24(resolve5(runDir, "MIGRATION_PROMPT.md"), buildMigrationPrompt(bundle, playbook, {
|
|
64901
64897
|
playbook: source.playbook,
|
|
64902
64898
|
notes: sourceInventory.notes
|
|
64903
64899
|
}), "utf8");
|
|
64904
64900
|
}
|
|
64905
64901
|
const targetTheme = opts.target ? getTargetTheme(opts.target) : null;
|
|
64906
64902
|
if (targetTheme) {
|
|
64907
|
-
writeFileSync24(
|
|
64903
|
+
writeFileSync24(resolve5(runDir, targetTheme.filename), targetTheme.build(theme), "utf8");
|
|
64908
64904
|
}
|
|
64909
64905
|
if (bundle.vtex) {
|
|
64910
|
-
writeFileSync24(
|
|
64906
|
+
writeFileSync24(resolve5(runDir, "component-map.json"), `${JSON.stringify(bundle.vtex.map, null, 2)}
|
|
64911
64907
|
`, "utf8");
|
|
64912
64908
|
}
|
|
64913
64909
|
if (opts.json) {
|
|
@@ -64916,7 +64912,7 @@ async function migrateCommand(opts) {
|
|
|
64916
64912
|
}
|
|
64917
64913
|
printResults4(runDir, bundle);
|
|
64918
64914
|
if (opts.open && format !== "json") {
|
|
64919
|
-
await open(
|
|
64915
|
+
await open(resolve5(runDir, "report.html")).catch(() => {
|
|
64920
64916
|
return;
|
|
64921
64917
|
});
|
|
64922
64918
|
}
|
|
@@ -64971,7 +64967,7 @@ async function capturePages(browser, viewport, resolvedPages, theme, cfg) {
|
|
|
64971
64967
|
if (global)
|
|
64972
64968
|
seenGlobalRoles.add(component.role);
|
|
64973
64969
|
const idx = components.length + 1;
|
|
64974
|
-
const componentDir =
|
|
64970
|
+
const componentDir = resolve5(cfg.runDir, "components", componentDirName(component.role, idx));
|
|
64975
64971
|
const extracted = await extractComponent(page, component, {
|
|
64976
64972
|
outDir: componentDir,
|
|
64977
64973
|
index: idx,
|
|
@@ -65248,7 +65244,11 @@ function studioConfigFromEnv(env = process.env) {
|
|
|
65248
65244
|
const token = env.PARITY_STUDIO_TOKEN;
|
|
65249
65245
|
if (!url || !token)
|
|
65250
65246
|
return null;
|
|
65251
|
-
return { url: url
|
|
65247
|
+
return { url: mcpEndpoint(url), token };
|
|
65248
|
+
}
|
|
65249
|
+
function mcpEndpoint(url) {
|
|
65250
|
+
const trimmed = url.replace(/\/+$/, "");
|
|
65251
|
+
return /\/mcp(\/|$)/.test(trimmed) ? trimmed : `${trimmed}/mcp/self`;
|
|
65252
65252
|
}
|
|
65253
65253
|
function cardTitle(path) {
|
|
65254
65254
|
return path;
|
|
@@ -65277,7 +65277,7 @@ function parseRpcBody(body) {
|
|
|
65277
65277
|
return JSON.parse(last2);
|
|
65278
65278
|
}
|
|
65279
65279
|
var callTool2 = async (cfg, name, args) => {
|
|
65280
|
-
const res = await fetch(
|
|
65280
|
+
const res = await fetch(cfg.url, {
|
|
65281
65281
|
method: "POST",
|
|
65282
65282
|
headers: {
|
|
65283
65283
|
"content-type": "application/json",
|
|
@@ -66267,7 +66267,7 @@ import chalk19 from "chalk";
|
|
|
66267
66267
|
// src/server/proxy-server.ts
|
|
66268
66268
|
import { existsSync as existsSync16, readFileSync as readFileSync22, statSync } from "node:fs";
|
|
66269
66269
|
import { createServer } from "node:http";
|
|
66270
|
-
import { extname, join as join28, normalize as normalize3, resolve as
|
|
66270
|
+
import { extname, join as join28, normalize as normalize3, resolve as resolve6, sep } from "node:path";
|
|
66271
66271
|
var MIME3 = {
|
|
66272
66272
|
".html": "text/html; charset=utf-8",
|
|
66273
66273
|
".css": "text/css; charset=utf-8",
|
|
@@ -66303,7 +66303,7 @@ var STRIPPED_REQUEST_HEADERS = new Set([
|
|
|
66303
66303
|
"origin"
|
|
66304
66304
|
]);
|
|
66305
66305
|
async function startProxyServer(runDir, opts = {}) {
|
|
66306
|
-
const absRunDir =
|
|
66306
|
+
const absRunDir = resolve6(runDir);
|
|
66307
66307
|
if (!existsSync16(absRunDir)) {
|
|
66308
66308
|
throw new Error(`Run directory not found: ${runDir}`);
|
|
66309
66309
|
}
|
|
@@ -66315,9 +66315,9 @@ async function startProxyServer(runDir, opts = {}) {
|
|
|
66315
66315
|
} catch {}
|
|
66316
66316
|
});
|
|
66317
66317
|
});
|
|
66318
|
-
await new Promise((
|
|
66318
|
+
await new Promise((resolve7, reject) => {
|
|
66319
66319
|
server.once("error", reject);
|
|
66320
|
-
server.listen(opts.port ?? 0, opts.host ?? "127.0.0.1", () =>
|
|
66320
|
+
server.listen(opts.port ?? 0, opts.host ?? "127.0.0.1", () => resolve7());
|
|
66321
66321
|
});
|
|
66322
66322
|
const addr = server.address();
|
|
66323
66323
|
const port = typeof addr === "object" && addr ? addr.port : 0;
|
|
@@ -66325,13 +66325,13 @@ async function startProxyServer(runDir, opts = {}) {
|
|
|
66325
66325
|
return {
|
|
66326
66326
|
port,
|
|
66327
66327
|
url: `http://${host}:${port}/`,
|
|
66328
|
-
close: () => new Promise((
|
|
66328
|
+
close: () => new Promise((resolve7) => {
|
|
66329
66329
|
try {
|
|
66330
66330
|
server.closeAllConnections?.();
|
|
66331
66331
|
server.closeIdleConnections?.();
|
|
66332
66332
|
} catch {}
|
|
66333
|
-
server.close(() =>
|
|
66334
|
-
setTimeout(() =>
|
|
66333
|
+
server.close(() => resolve7());
|
|
66334
|
+
setTimeout(() => resolve7(), 1000);
|
|
66335
66335
|
})
|
|
66336
66336
|
};
|
|
66337
66337
|
}
|
|
@@ -66377,7 +66377,7 @@ function serveReportHtml(res, runDir) {
|
|
|
66377
66377
|
}
|
|
66378
66378
|
function serveStatic(res, runDir, path) {
|
|
66379
66379
|
const safePath3 = normalize3(path).replace(/^[/\\]+/, "");
|
|
66380
|
-
const filePath =
|
|
66380
|
+
const filePath = resolve6(runDir, safePath3);
|
|
66381
66381
|
if (!filePath.startsWith(runDir + sep) && filePath !== runDir) {
|
|
66382
66382
|
res.statusCode = 403;
|
|
66383
66383
|
res.end("forbidden");
|
|
@@ -66906,7 +66906,7 @@ async function runCommand(rawOpts) {
|
|
|
66906
66906
|
b.close().catch(() => {
|
|
66907
66907
|
return;
|
|
66908
66908
|
}),
|
|
66909
|
-
new Promise((
|
|
66909
|
+
new Promise((resolve7) => setTimeout(resolve7, capMs))
|
|
66910
66910
|
]);
|
|
66911
66911
|
};
|
|
66912
66912
|
const shutdown = async (reason) => {
|
|
@@ -67182,8 +67182,8 @@ ${formatTimingsSummary(partialTimings, buildFlowBreakdown(allFlowCaptures))}
|
|
|
67182
67182
|
noNetworkIdle: targetIsDevServer,
|
|
67183
67183
|
runs: vitalsRuns
|
|
67184
67184
|
}),
|
|
67185
|
-
new Promise((
|
|
67186
|
-
const t = setTimeout(() =>
|
|
67185
|
+
new Promise((resolve7) => {
|
|
67186
|
+
const t = setTimeout(() => resolve7(null), PER_TASK_WALLCLOCK_MS);
|
|
67187
67187
|
t.unref?.();
|
|
67188
67188
|
})
|
|
67189
67189
|
]);
|
|
@@ -69060,14 +69060,14 @@ function printSummary7(vitals, cache, scores, opportunities, agentic) {
|
|
|
69060
69060
|
|
|
69061
69061
|
// src/util/version.ts
|
|
69062
69062
|
import { readFileSync as readFileSync27 } from "node:fs";
|
|
69063
|
-
import { dirname as dirname5, resolve as
|
|
69063
|
+
import { dirname as dirname5, resolve as resolve7 } from "node:path";
|
|
69064
69064
|
import { fileURLToPath } from "node:url";
|
|
69065
69065
|
function getPackageVersion() {
|
|
69066
69066
|
try {
|
|
69067
69067
|
const here = dirname5(fileURLToPath(import.meta.url));
|
|
69068
69068
|
for (const up of ["..", "../..", "../../.."]) {
|
|
69069
69069
|
try {
|
|
69070
|
-
const pkgPath =
|
|
69070
|
+
const pkgPath = resolve7(here, up, "package.json");
|
|
69071
69071
|
const raw = readFileSync27(pkgPath, "utf8");
|
|
69072
69072
|
const parsed = JSON.parse(raw);
|
|
69073
69073
|
if (parsed.name === "@decocms/parity" && typeof parsed.version === "string") {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@decocms/parity",
|
|
3
|
-
"version": "0.28.
|
|
3
|
+
"version": "0.28.2",
|
|
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",
|