@decocms/parity 0.33.13 → 0.33.15
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 +9 -2
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -56703,7 +56703,7 @@ function stableStringify(value) {
|
|
|
56703
56703
|
class NoLoaderProbesError extends Error {
|
|
56704
56704
|
topLevelKeys;
|
|
56705
56705
|
constructor(topLevelKeys) {
|
|
56706
|
-
super(
|
|
56706
|
+
super(`no loader references found in blocks.gen.json — top-level keys were: ${topLevelKeys.slice(0, 12).join(", ") || "(none)"}. Check that --dir points at a deco site root and that .deco/blocks.gen.json is generated.`);
|
|
56707
56707
|
this.topLevelKeys = topLevelKeys;
|
|
56708
56708
|
this.name = "NoLoaderProbesError";
|
|
56709
56709
|
}
|
|
@@ -65030,8 +65030,9 @@ function themeLink(target) {
|
|
|
65030
65030
|
|
|
65031
65031
|
// src/migrate/sources/classify.ts
|
|
65032
65032
|
var has2 = (re, text) => re.test(text);
|
|
65033
|
+
var ISLAND_BUNDLE = /\bisland-[a-z0-9_.-]+\.js\b/i;
|
|
65033
65034
|
function isDeco(html) {
|
|
65034
|
-
return /deco\.cx|__DECO\b|data-deco\b/i.test(html) || /__FRSH|_frsh/.test(html) || html.includes("/live/invoke");
|
|
65035
|
+
return /deco\.cx|__DECO\b|data-deco\b/i.test(html) || /__FRSH|_frsh/.test(html) || ISLAND_BUNDLE.test(html) || html.includes("/live/invoke");
|
|
65035
65036
|
}
|
|
65036
65037
|
function detectHtmx(html) {
|
|
65037
65038
|
return /\bhx-(get|post|target|swap|trigger)\b/i.test(html) || /htmx(\.org|\.min)?\b/i.test(html);
|
|
@@ -65065,6 +65066,8 @@ function classifyLiveStack(html, cookies = "") {
|
|
|
65065
65066
|
evidence.push("deco.cx");
|
|
65066
65067
|
if (/__FRSH|_frsh/.test(html))
|
|
65067
65068
|
evidence.push("fresh-runtime");
|
|
65069
|
+
if (ISLAND_BUNDLE.test(html))
|
|
65070
|
+
evidence.push("island-*.js");
|
|
65068
65071
|
if (html.includes("/live/invoke"))
|
|
65069
65072
|
evidence.push("/live/invoke");
|
|
65070
65073
|
const htmx = detectHtmx(html);
|
|
@@ -66265,6 +66268,10 @@ async function migrateCommand(opts) {
|
|
|
66265
66268
|
const cookieNames = await ctx.cookies().then((cs) => cs.map((c) => c.name).join("; ")).catch(() => "");
|
|
66266
66269
|
stack = classifyLiveStack(pageHtml, cookieNames);
|
|
66267
66270
|
console.log(chalk19.dim(` stack: ${describeStack(stack)}`));
|
|
66271
|
+
if (!opts.source && stack.frontend !== "unknown") {
|
|
66272
|
+
console.warn(chalk19.red(` ! live-only capture, but the live HTML is ${stack.frontend} (${stack.evidence.join(", ")}) — a source repo exists.
|
|
66273
|
+
Re-run with --source <repo> for structural porting (real class strings, not measured pixels).`));
|
|
66274
|
+
}
|
|
66268
66275
|
const rawAssets = await collectSiteAssets(page);
|
|
66269
66276
|
const fetchBytes = async (url) => await browserFetchBytes(page, url) ?? await nodeFetchBytes(url);
|
|
66270
66277
|
assetsResolved = await downloadSiteAssets(rawAssets, runDir, fetchBytes);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@decocms/parity",
|
|
3
|
-
"version": "0.33.
|
|
3
|
+
"version": "0.33.15",
|
|
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",
|