@decocms/parity 0.26.1 → 0.26.3
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 +78 -0
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -63049,6 +63049,83 @@ Each detected component → a FastStore section:
|
|
|
63049
63049
|
Use the suggested selectors (per component, mapped to known commerce keys) to
|
|
63050
63050
|
seed Playwright/Cypress smoke tests on the migrated store.`;
|
|
63051
63051
|
|
|
63052
|
+
// src/migrate/targets/faststore-next.ts
|
|
63053
|
+
var faststoreNext = `## Target: FastStore Next
|
|
63054
|
+
|
|
63055
|
+
Next.js App Router on \`@faststore/api\`/\`sdk\`/\`ui\` — no \`@faststore/cli\`/\`core\`,
|
|
63056
|
+
Deco CMS decofiles as the content source. This is a DIFFERENT target from
|
|
63057
|
+
\`faststore-v4\` (which scaffolds \`@faststore/cli\` + the VTEX Headless CMS) —
|
|
63058
|
+
don't mix their playbooks. Load \`skills/target-faststore-next/SKILL.md\` for
|
|
63059
|
+
the full picture; this is the condensed version.
|
|
63060
|
+
|
|
63061
|
+
### Bootstrap
|
|
63062
|
+
- Scaffold by copying \`deco-sites/faststore-next-template\` (clone, copy the
|
|
63063
|
+
tree, re-init git, set the new remote) — NOT the bare FastStore starter.
|
|
63064
|
+
It ships the platform layer (PLP pagination/ISR, gradual-cutover proxy,
|
|
63065
|
+
native Synerise+VTEX-fallback search, WebOps deploy accommodations) —
|
|
63066
|
+
reinventing any of those from scratch is exactly what the template exists
|
|
63067
|
+
to avoid.
|
|
63068
|
+
- \`bun dev\` — localhost:3000 · \`bun run build\` — prod build (runs \`generate\`
|
|
63069
|
+
first) · \`bun run generate:deco\` — after adding/changing a section,
|
|
63070
|
+
restart dev after.
|
|
63071
|
+
- Set \`discovery.config.js\`'s \`api.storeId\` (public, client-bundled — not a
|
|
63072
|
+
secret) to the source VTEX account (the \`*.vtexassets.com\` subdomain in
|
|
63073
|
+
\`blocks.json\`, or the account id from \`window.__RUNTIME__\` on a live
|
|
63074
|
+
vtex-io source).
|
|
63075
|
+
|
|
63076
|
+
### Styling — Tailwind v4, not SCSS
|
|
63077
|
+
No \`--fs-*\` token contract (that's the other target). A starter
|
|
63078
|
+
\`@theme\` block was generated in this snapshot from the extracted brand
|
|
63079
|
+
tokens — merge it into the template's own \`src/styles/tailwind.css\`
|
|
63080
|
+
\`@theme inline\` block rather than adding a second token layer. Token map
|
|
63081
|
+
used: primary/secondary/text/background colors, body/heading fonts, one
|
|
63082
|
+
mid-scale radius, first shadow, and the four nearest-canonical breakpoint
|
|
63083
|
+
tiers (phone/tablet/notebook/desktop) picked from the extracted breakpoint
|
|
63084
|
+
list.
|
|
63085
|
+
|
|
63086
|
+
### Icons
|
|
63087
|
+
Sprite-based (\`public/sprites-v2.svg\` + the template's \`Icon\` component,
|
|
63088
|
+
a typed union in \`icons.ts\`) — not Phosphor, not per-icon SVG files. Add
|
|
63089
|
+
missing icons to the sprite + the union type.
|
|
63090
|
+
|
|
63091
|
+
### Brand assets
|
|
63092
|
+
Logo/favicon downloaded to \`assets/\` in this snapshot — the template ships
|
|
63093
|
+
a generic placeholder at \`public/brand/logo-placeholder.svg\`; replace it
|
|
63094
|
+
and wire it into \`src/components/header/{Desktop,Mobile}Header.tsx\`.
|
|
63095
|
+
|
|
63096
|
+
### Where components go — this target's 3-point-invariant equivalent
|
|
63097
|
+
Every section needs all three or the CMS silently drops it:
|
|
63098
|
+
1. The component in \`src/components/sections/<Path>/<Name>.tsx\` — its typed
|
|
63099
|
+
\`Props\` export IS the CMS schema (no separate \`.jsonc\` to hand-write).
|
|
63100
|
+
2. The shim in \`src/sections/<Path>.tsx\` — thin re-export,
|
|
63101
|
+
\`export { default } from "src/components/sections/<Path>/<Name>"\`, plus
|
|
63102
|
+
convention exports (\`sync\`, \`layout\`, \`cache\`, …). The file's PATH is
|
|
63103
|
+
the Studio block key.
|
|
63104
|
+
3. \`bun run generate:deco\` to regenerate \`.deco/*.gen.*\`.
|
|
63105
|
+
Global vs page-scoped: \`layout = true\` sections (Header/Footer) resolve
|
|
63106
|
+
once and cache across navigations; everything else is page content.
|
|
63107
|
+
|
|
63108
|
+
### Editability gate (check every ported section)
|
|
63109
|
+
Does it read from its decofile, or did the port hardcode the captured
|
|
63110
|
+
content into JSX? Trivial/empty \`Props\` or literal strings >~25 chars in
|
|
63111
|
+
the component body means a merchant can't edit it in Studio — visually
|
|
63112
|
+
identical to prod, but a CMS regression \`parity\`'s screenshot/HTML diff
|
|
63113
|
+
cannot see.
|
|
63114
|
+
|
|
63115
|
+
### Rendering — decide this BEFORE porting the first section
|
|
63116
|
+
CMS data renders SSR; product/search data renders CSR when the site uses a
|
|
63117
|
+
third-party search provider (its requests are shopper-session-dependent and
|
|
63118
|
+
browser-only). This is an architecture decision made once, up front — do
|
|
63119
|
+
not let \`parity\` flag the resulting SSR/CSR delta as a regression against
|
|
63120
|
+
a source that server-rendered products.
|
|
63121
|
+
|
|
63122
|
+
### Deploy
|
|
63123
|
+
WebOps builds straight from \`discovery.config.js\` + \`package.json\`
|
|
63124
|
+
scripts — no CLI, no deploy workflow to create. Two accommodations that
|
|
63125
|
+
look wrong to a generic Node reviewer but are load-bearing: build-time
|
|
63126
|
+
tooling sits in \`dependencies\` (WebOps production installs skip
|
|
63127
|
+
\`devDependencies\`), and branch names can't contain a second \`/\`.`;
|
|
63128
|
+
|
|
63052
63129
|
// src/migrate/targets/tanstack-deco.ts
|
|
63053
63130
|
var tanstackDeco = `## Target: TanStack Start + Deco CMS
|
|
63054
63131
|
|
|
@@ -63089,6 +63166,7 @@ writing raw GraphQL/REST. Key hooks: \`useCart\`, \`useUser\`, \`useProduct\`.
|
|
|
63089
63166
|
var TARGETS = {
|
|
63090
63167
|
faststore,
|
|
63091
63168
|
"faststore-v4": faststore,
|
|
63169
|
+
"faststore-next": faststoreNext,
|
|
63092
63170
|
tanstack: tanstackDeco,
|
|
63093
63171
|
"tanstack-deco": tanstackDeco
|
|
63094
63172
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@decocms/parity",
|
|
3
|
-
"version": "0.26.
|
|
3
|
+
"version": "0.26.3",
|
|
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",
|