@decocms/parity 0.26.19 → 0.26.20

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 (2) hide show
  1. package/dist/cli.js +21 -19
  2. package/package.json +1 -2
package/dist/cli.js CHANGED
@@ -36865,16 +36865,12 @@ var init_claude_agent_sdk = __esm(() => {
36865
36865
  // src/llm/client.ts
36866
36866
  var exports_client = {};
36867
36867
  __export(exports_client, {
36868
- LLM_MODEL_ANTHROPIC: () => LLM_MODEL_ANTHROPIC,
36869
- LLM_MODEL_OPENROUTER: () => LLM_MODEL_OPENROUTER,
36870
36868
  callMessage: () => callMessage,
36871
36869
  callTool: () => callTool,
36872
36870
  disableLlm: () => disableLlm,
36873
- getLlmLanguage: () => getLlmLanguage,
36874
36871
  getProvider: () => getProvider,
36875
36872
  isLlmAvailable: () => isLlmAvailable,
36876
36873
  providerLabel: () => providerLabel,
36877
- providerName: () => providerName,
36878
36874
  resetLlmState: () => resetLlmState,
36879
36875
  setForcedProvider: () => setForcedProvider,
36880
36876
  setLlmLanguage: () => setLlmLanguage,
@@ -36927,16 +36923,9 @@ function providerLabel() {
36927
36923
  const models = snapshotResolved(p);
36928
36924
  return `${p} (selectors=${models["selector-discovery"]}, visual=${models["visual-diff"]}, fix=${models.explain})`;
36929
36925
  }
36930
- function providerName() {
36931
- const p = getProvider();
36932
- return p ?? "none";
36933
- }
36934
36926
  function setLlmLanguage(lang) {
36935
36927
  llmLanguage = lang;
36936
36928
  }
36937
- function getLlmLanguage() {
36938
- return llmLanguage;
36939
- }
36940
36929
  function withLanguage(userText) {
36941
36930
  if (llmLanguage === "pt") {
36942
36931
  return `${userText}
@@ -37268,12 +37257,10 @@ async function callOpenRouterMessage(params, model, timeoutMs) {
37268
37257
  clear();
37269
37258
  }
37270
37259
  }
37271
- var LLM_MODEL_ANTHROPIC, LLM_MODEL_OPENROUTER, forcedProvider = null, llmDisabled = false, llmLanguage = "en", MAX_CONCURRENT_LLM_CALLS = 3, activeLlmCalls = 0, llmQueue;
37260
+ var forcedProvider = null, llmDisabled = false, llmLanguage = "en", MAX_CONCURRENT_LLM_CALLS = 3, activeLlmCalls = 0, llmQueue;
37272
37261
  var init_client = __esm(() => {
37273
37262
  init_models();
37274
37263
  init_claude_agent_sdk();
37275
- LLM_MODEL_ANTHROPIC = PROVIDER_MODELS.anthropic.sonnet;
37276
- LLM_MODEL_OPENROUTER = PROVIDER_MODELS.openrouter.sonnet;
37277
37264
  llmQueue = [];
37278
37265
  });
37279
37266
 
@@ -37390,12 +37377,8 @@ var init_html_compact = __esm(() => {
37390
37377
  // src/llm/component-refine.ts
37391
37378
  var exports_component_refine = {};
37392
37379
  __export(exports_component_refine, {
37393
- isComponentRefineLlmAvailable: () => isComponentRefineLlmAvailable,
37394
37380
  refineComponentsWithLlm: () => refineComponentsWithLlm
37395
37381
  });
37396
- function isComponentRefineLlmAvailable() {
37397
- return isLlmAvailable();
37398
- }
37399
37382
  async function refineComponentsWithLlm(page, candidates) {
37400
37383
  if (candidates.length === 0)
37401
37384
  return null;
@@ -49197,7 +49180,6 @@ var SPA_NAVIGATION_STEP_LABELS = {
49197
49180
  "navigate-via-spa": "Navegar para outra categoria via SPA (client-side)",
49198
49181
  "verify-section-parity": "Verificar paridade de sections (SPA nav vs F5 do mesmo destino)"
49199
49182
  };
49200
- var SPA_NAVIGATION_CRITICAL_STEPS = new Set(["verify-section-parity"]);
49201
49183
 
49202
49184
  // src/checks/cart-interactions-flow.ts
49203
49185
  function cartInteractionsFlow(ctx) {
@@ -67955,6 +67937,21 @@ function bySeverity(a, b) {
67955
67937
  }
67956
67938
 
67957
67939
  // src/report/extract-section.ts
67940
+ var ALL_REPORT_SECTIONS = [
67941
+ "summary",
67942
+ "visualdiff",
67943
+ "seo",
67944
+ "sidebyside",
67945
+ "issues",
67946
+ "vitals",
67947
+ "cache",
67948
+ "checks",
67949
+ "prompt",
67950
+ "pages",
67951
+ "console",
67952
+ "network",
67953
+ "diff"
67954
+ ];
67958
67955
  function extractReportSection(input) {
67959
67956
  if (input.kind === "html")
67960
67957
  return extractHtmlSection(input.html, input.section);
@@ -68114,6 +68111,11 @@ async function reportCommand(runId, opts) {
68114
68111
  return 0;
68115
68112
  }
68116
68113
  if (opts.section) {
68114
+ if (!ALL_REPORT_SECTIONS.includes(opts.section)) {
68115
+ console.error(chalk23.red(`unknown section "${opts.section}"`));
68116
+ console.error(chalk23.gray(` valid: ${ALL_REPORT_SECTIONS.join(", ")}`));
68117
+ return 1;
68118
+ }
68117
68119
  if (opts.json) {
68118
68120
  try {
68119
68121
  const run = loadRun(opts.output, runId);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@decocms/parity",
3
- "version": "0.26.19",
3
+ "version": "0.26.20",
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",
@@ -78,7 +78,6 @@
78
78
  "devDependencies": {
79
79
  "@biomejs/biome": "^1.9.4",
80
80
  "cheerio": "^1.0.0",
81
- "@types/diff": "^8.0.0",
82
81
  "@types/node": "^22.10.0",
83
82
  "@types/pixelmatch": "^5.2.6",
84
83
  "@types/pngjs": "^6.0.5",