@wix/agent-skills 1.33.1 → 1.35.0
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/README.md +3 -0
- package/package.json +1 -1
- package/skills/wix-export/SKILL.md +83 -0
- package/skills/wix-harmony-editor/.publish-manifest.json +8 -0
- package/skills/wix-harmony-editor/COPY-SITE.md +494 -0
- package/skills/wix-harmony-editor/SKILL.md +317 -0
- package/skills/wix-harmony-editor/scripts/copy/build-description.mjs +249 -0
- package/skills/wix-harmony-editor/scripts/copy/check-description.mjs +225 -0
- package/skills/wix-harmony-editor/scripts/copy/check-mirror.mjs +89 -0
- package/skills/wix-harmony-editor/scripts/copy/compare-preview.mjs +76 -0
- package/skills/wix-harmony-editor/scripts/copy/deploy-description.mjs +212 -0
- package/skills/wix-harmony-editor/scripts/copy/desc-hash.mjs +44 -0
- package/skills/wix-harmony-editor/scripts/copy/editor-run.mjs +45 -0
- package/skills/wix-harmony-editor/scripts/copy/export-page.mjs +53 -0
- package/skills/wix-harmony-editor/scripts/copy/find-interactions.mjs +76 -0
- package/skills/wix-harmony-editor/scripts/copy/hide-scrollbars.mjs +16 -0
- package/skills/wix-harmony-editor/scripts/copy/import-media.mjs +150 -0
- package/skills/wix-harmony-editor/scripts/copy/link-url.mjs +27 -0
- package/skills/wix-harmony-editor/scripts/copy/lint-api.mjs +56 -0
- package/skills/wix-harmony-editor/scripts/copy/measure-source.mjs +211 -0
- package/skills/wix-harmony-editor/scripts/copy/merge-mirrors.mjs +29 -0
- package/skills/wix-harmony-editor/scripts/copy/mirror-site.mjs +92 -0
- package/skills/wix-harmony-editor/scripts/copy/mobile-stage.mjs +56 -0
- package/skills/wix-harmony-editor/scripts/copy/preview-widths.mjs +73 -0
- package/skills/wix-harmony-editor/scripts/copy/render-plate.mjs +67 -0
- package/skills/wix-harmony-editor/scripts/copy/serve-mirror.mjs +102 -0
- package/skills/wix-harmony-editor/scripts/copy/snapshot-capabilities.mjs +40 -0
- package/skills/wix-harmony-editor/scripts/copy/split-sections.mjs +191 -0
- package/skills/wix-harmony-editor/scripts/copy/upload-media-manager.mjs +61 -0
- package/skills/wix-harmony-editor/scripts/launch.sh +359 -0
- package/skills/wix-headless/SKILL.md +7 -2
- package/skills/wix-headless/references/CAPABILITIES.md +6 -1
- package/skills/wix-headless/references/DISCOVERY.md +2 -1
- package/skills/wix-headless/references/SDK_HANDOFF.md +6 -1
- package/skills/wix-headless/references/SEED.md +3 -2
- package/skills/wix-headless/references/SETUP.md +1 -0
- package/skills/wix-headless/references/inline-recipes/experience-donations.md +102 -0
- package/skills/wix-headless/references/inline-recipes/how-to-code-donations.md +146 -0
- package/skills/wix-headless/references/inline-recipes/setup-donations.md +15 -0
- package/skills/wix-headless/references/managed/CREATE.md +1 -1
- package/skills/wix-headless-kit/SKILL.md +110 -21
- package/skills/wix-headless-kit/guides/api-run.md +15 -13
- package/skills/wix-headless-kit/guides/existing-site.md +31 -0
- package/skills/wix-headless-kit/guides/migration.md +49 -17
- package/skills/wix-headless-kit/install/agents-md.mjs +1 -1
- package/skills/wix-headless-kit/install/context.mjs +61 -6
- package/skills/wix-headless-kit/install/pins.json +1 -1
- package/skills/wix-headless-kit/install/setup.mjs +107 -12
- package/skills/wix-headless-replatform/.publish-manifest.json +8 -0
- package/skills/wix-headless-replatform/SKILL.md +116 -0
- package/skills/wix-headless-replatform/agents/openai.yaml +6 -0
- package/skills/wix-headless-replatform/references/control-and-visual-fidelity-contract.md +43 -0
- package/skills/wix-headless-replatform/references/extraction-schema.md +187 -0
- package/skills/wix-headless-replatform/references/interaction-runtime-contract.md +137 -0
- package/skills/wix-headless-replatform/references/layout-blueprint-contract.md +41 -0
- package/skills/wix-headless-replatform/references/output-contract.md +93 -0
- package/skills/wix-headless-replatform/references/post-build-gap-contract.md +125 -0
- package/skills/wix-headless-replatform/references/qa-checklist.md +83 -0
- package/skills/wix-headless-replatform/references/safety.md +19 -0
- package/skills/wix-headless-replatform/references/ui-normalization-contract.md +70 -0
- package/skills/wix-headless-replatform/references/workflow.md +157 -0
- package/skills/wix-headless-replatform/registry/README.md +20 -0
- package/skills/wix-headless-replatform/registry/approvals/button/shadcn-default-ac60ef5.json +28 -0
- package/skills/wix-headless-replatform/registry/items/button/shadcn-default-ac60ef5/button.tsx +54 -0
- package/skills/wix-headless-replatform/registry/items/button/shadcn-default-ac60ef5/capabilities.json +60 -0
- package/skills/wix-headless-replatform/registry/items/button/shadcn-default-ac60ef5/contract.md +48 -0
- package/skills/wix-headless-replatform/registry/licenses/shadcn-ui-ac60ef5-MIT.txt +21 -0
- package/skills/wix-headless-replatform/registry/registry.json +36 -0
- package/skills/wix-headless-replatform/resources/rp-facelift/SKILL.md +32 -0
- package/skills/wix-headless-replatform/resources/rp-project-context/SKILL.md +62 -0
- package/skills/wix-headless-replatform/resources/rp-qa-gap-loop/SKILL.md +64 -0
- package/skills/wix-headless-replatform/resources/rp-source-evidence/SKILL.md +42 -0
- package/skills/wix-headless-replatform/resources/rp-ui-implementation/SKILL.md +73 -0
- package/skills/wix-headless-replatform/schemas/build-plan.schema.json +10 -0
- package/skills/wix-headless-replatform/schemas/candidate.schema.json +19 -0
- package/skills/wix-headless-replatform/schemas/common.schema.json +33 -0
- package/skills/wix-headless-replatform/schemas/decision-patch.schema.json +10 -0
- package/skills/wix-headless-replatform/schemas/decision-request.schema.json +10 -0
- package/skills/wix-headless-replatform/schemas/extraction-gap.schema.json +28 -0
- package/skills/wix-headless-replatform/schemas/extraction-manifest.schema.json +34 -0
- package/skills/wix-headless-replatform/schemas/final-report.schema.json +10 -0
- package/skills/wix-headless-replatform/schemas/foundation.schema.json +11 -0
- package/skills/wix-headless-replatform/schemas/metadata.schema.json +11 -0
- package/skills/wix-headless-replatform/schemas/observation-packet.schema.json +17 -0
- package/skills/wix-headless-replatform/schemas/page-capture.schema.json +11 -0
- package/skills/wix-headless-replatform/schemas/page-resolution.schema.json +33 -0
- package/skills/wix-headless-replatform/schemas/shared-chrome.schema.json +11 -0
- package/skills/wix-headless-replatform/schemas/unit.schema.json +40 -0
- package/skills/wix-headless-replatform/scripts/assemble-extraction.mjs +844 -0
- package/skills/wix-headless-replatform/scripts/benchmark-extraction.mjs +163 -0
- package/skills/wix-headless-replatform/scripts/browser-extraction-preflight.mjs +42 -0
- package/skills/wix-headless-replatform/scripts/build-extracted-homepage.mjs +228 -0
- package/skills/wix-headless-replatform/scripts/clear-wix-starter.mjs +87 -0
- package/skills/wix-headless-replatform/scripts/create-wix-project.mjs +505 -0
- package/skills/wix-headless-replatform/scripts/discover-urls.mjs +142 -0
- package/skills/wix-headless-replatform/scripts/extract-assets.mjs +140 -0
- package/skills/wix-headless-replatform/scripts/extract-design-system.mjs +637 -0
- package/skills/wix-headless-replatform/scripts/extract-interactions.mjs +1903 -0
- package/skills/wix-headless-replatform/scripts/extract-page.mjs +2461 -0
- package/skills/wix-headless-replatform/scripts/extract-seo.mjs +25 -0
- package/skills/wix-headless-replatform/scripts/extract-tokens.mjs +63 -0
- package/skills/wix-headless-replatform/scripts/finalize-extraction-report.mjs +126 -0
- package/skills/wix-headless-replatform/scripts/finalize-gap-review.mjs +180 -0
- package/skills/wix-headless-replatform/scripts/finalize-gap-review.test.mjs +98 -0
- package/skills/wix-headless-replatform/scripts/finalize-migration-website.mjs +103 -0
- package/skills/wix-headless-replatform/scripts/generate-control-state-contract.mjs +176 -0
- package/skills/wix-headless-replatform/scripts/generate-design-md.mjs +261 -0
- package/skills/wix-headless-replatform/scripts/generate-extraction-validators.mjs +25 -0
- package/skills/wix-headless-replatform/scripts/generate-invoice-download-backend.mjs +342 -0
- package/skills/wix-headless-replatform/scripts/generate-layout-blueprint.mjs +140 -0
- package/skills/wix-headless-replatform/scripts/generate-repeater-cms.mjs +22 -0
- package/skills/wix-headless-replatform/scripts/generate-route-plan.mjs +143 -0
- package/skills/wix-headless-replatform/scripts/generate-scene-contract.mjs +288 -0
- package/skills/wix-headless-replatform/scripts/generate-ui-normalization.mjs +266 -0
- package/skills/wix-headless-replatform/scripts/generate-visual-assets.mjs +111 -0
- package/skills/wix-headless-replatform/scripts/lib/browser-tooling.mjs +570 -0
- package/skills/wix-headless-replatform/scripts/lib/common.mjs +329 -0
- package/skills/wix-headless-replatform/scripts/lib/component-capabilities.mjs +121 -0
- package/skills/wix-headless-replatform/scripts/lib/component-registry.mjs +282 -0
- package/skills/wix-headless-replatform/scripts/lib/content-boundary.mjs +61 -0
- package/skills/wix-headless-replatform/scripts/lib/extraction-contract.mjs +374 -0
- package/skills/wix-headless-replatform/scripts/lib/extraction-detectors.mjs +243 -0
- package/skills/wix-headless-replatform/scripts/lib/extraction-validators.generated.mjs +1139 -0
- package/skills/wix-headless-replatform/scripts/lib/font-contract.mjs +326 -0
- package/skills/wix-headless-replatform/scripts/lib/frontend-automation-state.mjs +184 -0
- package/skills/wix-headless-replatform/scripts/lib/gap-analysis.mjs +396 -0
- package/skills/wix-headless-replatform/scripts/lib/html-extract.mjs +168 -0
- package/skills/wix-headless-replatform/scripts/lib/interaction-bootstrap.mjs +10 -0
- package/skills/wix-headless-replatform/scripts/lib/interaction-runtime.mjs +194 -0
- package/skills/wix-headless-replatform/scripts/lib/interaction-timeline.mjs +348 -0
- package/skills/wix-headless-replatform/scripts/lib/layout-blueprint/classifiers.mjs +141 -0
- package/skills/wix-headless-replatform/scripts/lib/layout-blueprint/geometry.mjs +43 -0
- package/skills/wix-headless-replatform/scripts/lib/layout-blueprint/vocabulary.mjs +18 -0
- package/skills/wix-headless-replatform/scripts/lib/ui-normalization.css +64 -0
- package/skills/wix-headless-replatform/scripts/optimize-svg.mjs +31 -0
- package/skills/wix-headless-replatform/scripts/post-build-gap.mjs +358 -0
- package/skills/wix-headless-replatform/scripts/provision-repeater-cms.mjs +25 -0
- package/skills/wix-headless-replatform/scripts/record-gap-decision.mjs +39 -0
- package/skills/wix-headless-replatform/scripts/replay-extraction.mjs +107 -0
- package/skills/wix-headless-replatform/scripts/resolve-home-page.mjs +96 -0
- package/skills/wix-headless-replatform/scripts/site-clone.mjs +658 -0
- package/skills/wix-headless-replatform/scripts/validate-font-contract.mjs +29 -0
- package/skills/wix-headless-replatform/scripts/verify-interactions.mjs +669 -0
- package/skills/wix-headless-replatform/scripts/visual-qa.mjs +370 -0
- package/skills/wix-headless-templates/donations/INSTRUCTIONS.md +37 -24
- package/skills/wix-headless-templates/donations/app/components/donations/DonateForm.tsx +49 -23
- package/skills/wix-headless-templates/donations/app/components/donations/DonationReceipt.tsx +6 -5
- package/skills/wix-headless-templates/donations/app/components/donations/GoalProgress.tsx +5 -5
- package/skills/wix-headless-templates/donations/app/wix/donations/campaigns.ts +4 -4
- package/skills/wix-headless-templates/donations/app/wix/donations/donate.ts +7 -3
- package/skills/wix-headless-templates/donations/app/wix/donations/donation-store.ts +2 -2
- package/skills/wix-headless-templates/donations/app/wix/donations/donations-core.ts +12 -9
- package/skills/wix-headless-templates/donations/project/src/components/donations/DonateForm.tsx +49 -23
- package/skills/wix-headless-templates/donations/project/src/components/donations/DonationReceipt.tsx +6 -5
- package/skills/wix-headless-templates/donations/project/src/components/donations/GoalProgress.tsx +5 -5
- package/skills/wix-headless-templates/donations/project/src/wix/donations/campaigns.ts +4 -4
- package/skills/wix-headless-templates/donations/project/src/wix/donations/donate.ts +7 -3
- package/skills/wix-headless-templates/donations/project/src/wix/donations/donation-store.ts +2 -2
- package/skills/wix-headless-templates/donations/project/src/wix/donations/donations-core.ts +12 -9
- package/skills/wix-headless-templates/donations/rest/campaigns.ts +4 -4
- package/skills/wix-headless-templates/donations/rest/donate.ts +7 -3
- package/skills/wix-headless-templates/donations/seed/SEED.md +12 -7
- package/skills/wix-headless-templates/donations/tests/donation-contract.test.mjs +71 -0
- package/skills/wix-headless-templates/donations/tests/donation-form.test.cjs +137 -0
- package/skills/wix-headless-templates/restaurants/INSTRUCTIONS.md +28 -14
- package/skills/wix-headless-templates/restaurants/app/components/restaurants/OrderCartDrawer.tsx +87 -5
- package/skills/wix-headless-templates/restaurants/app/hooks/restaurants/useOrderCart.ts +9 -1
- package/skills/wix-headless-templates/restaurants/app/wix/restaurants/order-store.ts +33 -4
- package/skills/wix-headless-templates/restaurants/app/wix/restaurants/ordering-core.ts +100 -5
- package/skills/wix-headless-templates/restaurants/app/wix/restaurants/ordering.ts +101 -15
- package/skills/wix-headless-templates/restaurants/app/wix/restaurants/types.ts +35 -1
- package/skills/wix-headless-templates/restaurants/project/src/components/restaurants/OrderCartDrawer.tsx +87 -5
- package/skills/wix-headless-templates/restaurants/project/src/hooks/restaurants/useOrderCart.ts +9 -1
- package/skills/wix-headless-templates/restaurants/project/src/wix/restaurants/order-store.ts +33 -4
- package/skills/wix-headless-templates/restaurants/project/src/wix/restaurants/ordering-core.ts +100 -5
- package/skills/wix-headless-templates/restaurants/project/src/wix/restaurants/ordering.ts +101 -15
- package/skills/wix-headless-templates/restaurants/project/src/wix/restaurants/types.ts +35 -1
- package/skills/wix-headless-templates/restaurants/rest/ordering.ts +91 -14
- package/skills/wix-import/SKILL.md +90 -0
- package/skills/wix-manage/SKILL.md +14 -4
- package/skills/wix-manage/references/blog/how-to-create-blog-posts.md +2 -0
- package/skills/wix-manage/references/dashboard-navigation/dashboard-navigation.md +2 -1
- package/skills/wix-manage/references/dashboard-navigation/routes.json +249 -0
- package/skills/wix-manage/references/donations/create-and-update-donation-campaigns.md +139 -0
- package/skills/wix-manage/references/events/events-dashboard-navigation.md +81 -0
- package/skills/wix-manage/references/seo/manage-content-plan.md +207 -222
- package/skills/wix-manage/references/sites/manage-oauth-apps.md +1 -0
- package/skills/wix-manage/references/sites/upload-static-site.md +128 -8
- package/skills/wix-readme/SKILL.md +166 -0
- package/skills/wix-replatform/.publish-manifest.json +5 -5
- package/skills/wix-replatform/CLI.md +162 -0
- package/skills/wix-replatform/README.md +52 -0
- package/skills/wix-replatform/SKILL.md +229 -684
- package/skills/wix-replatform/console/account.css +1 -0
- package/skills/wix-replatform/console/app.css +1 -0
- package/skills/wix-replatform/console/app.js +117 -0
- package/skills/wix-replatform/console/index.html +4 -0
- package/skills/wix-replatform/console/json.css +11 -0
- package/skills/wix-replatform/lib/agent-adapters/index.js +71 -0
- package/skills/wix-replatform/lib/app-page-routing.js +75 -0
- package/skills/wix-replatform/lib/artifact-freshness.js +11 -1
- package/skills/wix-replatform/lib/blocked-data-requests.js +427 -0
- package/skills/wix-replatform/lib/census-reconciliation.js +426 -0
- package/skills/wix-replatform/lib/completion-report.js +1393 -13
- package/skills/wix-replatform/lib/config-env.js +85 -11
- package/skills/wix-replatform/lib/confirmed-pictures.js +212 -0
- package/skills/wix-replatform/lib/dependency-readiness.js +423 -0
- package/skills/wix-replatform/lib/dependency-recovery.js +21 -0
- package/skills/wix-replatform/lib/destination-choice.js +163 -0
- package/skills/wix-replatform/lib/destination-handoff.js +62 -0
- package/skills/wix-replatform/lib/destination-http.js +81 -0
- package/skills/wix-replatform/lib/destination-route.js +98 -0
- package/skills/wix-replatform/lib/destination.js +919 -0
- package/skills/wix-replatform/lib/discovered-census.js +231 -0
- package/skills/wix-replatform/lib/discovered-set-status.js +255 -0
- package/skills/wix-replatform/lib/document-url-guard.js +203 -0
- package/skills/wix-replatform/lib/entity-qa-attestation.js +339 -0
- package/skills/wix-replatform/lib/entity-verification.js +18 -0
- package/skills/wix-replatform/lib/execution-capability.js +120 -0
- package/skills/wix-replatform/lib/execution-log.js +170 -0
- package/skills/wix-replatform/lib/execution-manifest.js +20 -2
- package/skills/wix-replatform/lib/execution-state.js +22 -0
- package/skills/wix-replatform/lib/expectations-ledger.js +96 -0
- package/skills/wix-replatform/lib/generated-plugin-handoff.js +140 -0
- package/skills/wix-replatform/lib/import-readiness-contract.js +23 -0
- package/skills/wix-replatform/lib/import-recovery.js +800 -6
- package/skills/wix-replatform/lib/imported-redirect-targets.js +608 -0
- package/skills/wix-replatform/lib/internal-link-reconciliation.js +166 -0
- package/skills/wix-replatform/lib/link-audit.js +173 -0
- package/skills/wix-replatform/lib/link-census.js +194 -0
- package/skills/wix-replatform/lib/link-plan.js +148 -0
- package/skills/wix-replatform/lib/link-verification.js +274 -0
- package/skills/wix-replatform/lib/link-write-journal.js +42 -0
- package/skills/wix-replatform/lib/local-state.js +869 -30
- package/skills/wix-replatform/lib/member-completion.js +658 -0
- package/skills/wix-replatform/lib/member-crosswalk.js +69 -0
- package/skills/wix-replatform/lib/member-outcome-registry.js +265 -0
- package/skills/wix-replatform/lib/migration-completion.js +311 -0
- package/skills/wix-replatform/lib/operator-identity.js +47 -0
- package/skills/wix-replatform/lib/orchestration-decisions.js +248 -0
- package/skills/wix-replatform/lib/orchestration-preflight.js +401 -19
- package/skills/wix-replatform/lib/orchestration-router.js +608 -32
- package/skills/wix-replatform/lib/orchestration-state.js +188 -12
- package/skills/wix-replatform/lib/order-reference-readiness.js +30 -0
- package/skills/wix-replatform/lib/payments-outcome-registry.js +200 -0
- package/skills/wix-replatform/lib/plugin-cms-fallback.js +618 -0
- package/skills/wix-replatform/lib/preservation-approval-stamp.js +54 -0
- package/skills/wix-replatform/lib/product-media-deferral.js +96 -0
- package/skills/wix-replatform/lib/progress-log.js +19 -3
- package/skills/wix-replatform/lib/read-back-approval.js +184 -0
- package/skills/wix-replatform/lib/read-back-comparison.js +136 -0
- package/skills/wix-replatform/lib/read-back-contract.js +243 -0
- package/skills/wix-replatform/lib/read-back-extract.js +118 -0
- package/skills/wix-replatform/lib/read-back-gate.js +734 -0
- package/skills/wix-replatform/lib/read-back-reads.js +94 -0
- package/skills/wix-replatform/lib/read-back-state.js +107 -0
- package/skills/wix-replatform/lib/read-back-summary.js +81 -0
- package/skills/wix-replatform/lib/rerun-conflicts.js +334 -0
- package/skills/wix-replatform/lib/run-controller.js +401 -0
- package/skills/wix-replatform/lib/seo-outcome-registry.js +45 -0
- package/skills/wix-replatform/lib/setup-verification.js +148 -0
- package/skills/wix-replatform/lib/source-access.js +231 -0
- package/skills/wix-replatform/lib/source-coverage.js +1130 -0
- package/skills/wix-replatform/lib/source-secrets.js +277 -0
- package/skills/wix-replatform/lib/structured-link-patch.js +59 -0
- package/skills/wix-replatform/lib/task-state.js +110 -0
- package/skills/wix-replatform/lib/url-preservation-report.js +319 -0
- package/skills/wix-replatform/lib/url-preservation-state.js +349 -1
- package/skills/wix-replatform/lib/url-redirect-plan.js +728 -0
- package/skills/wix-replatform/lib/url-verification.js +315 -0
- package/skills/wix-replatform/lib/user-action-effects.js +42 -0
- package/skills/wix-replatform/lib/user-actions.js +264 -0
- package/skills/wix-replatform/lib/website-handoff.js +1220 -0
- package/skills/wix-replatform/lib/wix-client-callers.js +54 -0
- package/skills/wix-replatform/lib/wix-dashboard-url.js +35 -0
- package/skills/wix-replatform/lib/write-verification-state.js +92 -0
- package/skills/wix-replatform/lib/write-verification.js +274 -0
- package/skills/wix-replatform/resources/rp-destination/SKILL.md +137 -0
- package/skills/wix-replatform/resources/rp-discovery/SKILL.md +189 -16
- package/skills/wix-replatform/resources/rp-discovery/scripts/promote-source-coverage.js +47 -0
- package/skills/wix-replatform/resources/rp-execute-import/SKILL.md +869 -29
- package/skills/wix-replatform/resources/rp-execute-import/scripts/shipping-estimate-audit.js +70 -0
- package/skills/wix-replatform/resources/rp-execute-setup/SKILL.md +195 -29
- package/skills/wix-replatform/resources/rp-execute-setup/scripts/execute-setup.js +442 -0
- package/skills/wix-replatform/resources/rp-execution-policy/SKILL.md +112 -0
- package/skills/wix-replatform/resources/rp-execution-policy/lib/coupon-currency-plan-report.js +143 -0
- package/skills/wix-replatform/resources/rp-execution-policy/lib/payments-report.js +244 -0
- package/skills/wix-replatform/resources/rp-import-codegen/SKILL.md +2082 -38
- package/skills/wix-replatform/resources/rp-mapper/SKILL.md +528 -11
- package/skills/wix-replatform/resources/rp-mapper/lib/structure-bridge-planning.js +303 -0
- package/skills/wix-replatform/resources/rp-mapper/scripts/coverage-reconcile.js +88 -0
- package/skills/wix-replatform/resources/rp-mapper/wix-business-solutions-taxonomy.md +6 -5
- package/skills/wix-replatform/resources/rp-preflight/SKILL.md +40 -0
- package/skills/wix-replatform/resources/rp-project-intake/SKILL.md +55 -0
- package/skills/wix-replatform/resources/rp-quick-runtime/SKILL.md +60 -0
- package/skills/wix-replatform/resources/rp-quick-runtime/lib/import-progress.js +89 -0
- package/skills/wix-replatform/resources/rp-quick-runtime/lib/limit-recovery.js +36 -0
- package/skills/wix-replatform/resources/rp-quick-shopify/SKILL.md +123 -0
- package/skills/wix-replatform/resources/rp-quick-shopify/quick-mode.json +124 -0
- package/skills/wix-replatform/resources/rp-quick-shopify/scripts/quick-mode.js +522 -0
- package/skills/wix-replatform/resources/rp-quick-woocommerce/SKILL.md +56 -0
- package/skills/wix-replatform/resources/rp-quick-woocommerce/quick-mode.json +91 -0
- package/skills/wix-replatform/resources/rp-quick-woocommerce/scripts/quick-mode.js +255 -0
- package/skills/wix-replatform/resources/rp-setup-discovery/SKILL.md +80 -10
- package/skills/wix-replatform/resources/rp-setup-discovery/scripts/quick-setup-plan.js +44 -0
- package/skills/wix-replatform/resources/rp-source-csv/SKILL.md +3 -0
- package/skills/wix-replatform/resources/rp-source-csv/lib/csv-fileset.js +0 -0
- package/skills/wix-replatform/resources/rp-source-csv/scripts/csv-discovery.js +21 -1
- package/skills/wix-replatform/resources/rp-source-inputs/SKILL.md +66 -0
- package/skills/wix-replatform/resources/rp-source-sfcc/SKILL.md +153 -0
- package/skills/wix-replatform/resources/rp-source-shopify/SKILL.md +394 -0
- package/skills/wix-replatform/resources/rp-source-shopify/lib/discovery-reads.js +200 -0
- package/skills/wix-replatform/resources/rp-source-shopify/lib/import-findings.js +34 -0
- package/skills/wix-replatform/resources/rp-source-shopify/lib/shopify-bulk-sqlite-worker.js +44 -0
- package/skills/wix-replatform/resources/rp-source-shopify/lib/shopify-bulk.js +1470 -0
- package/skills/wix-replatform/resources/rp-source-shopify/lib/shopify-cli.js +446 -0
- package/skills/wix-replatform/resources/rp-source-shopify/lib/shopify-gift-cards.js +474 -0
- package/skills/wix-replatform/resources/rp-source-shopify/lib/shopify-protected-fields.js +879 -0
- package/skills/wix-replatform/resources/rp-source-shopify/lib/shopify-session.js +426 -0
- package/skills/wix-replatform/resources/rp-source-shopify/queries/articles.graphql +24 -0
- package/skills/wix-replatform/resources/rp-source-shopify/queries/blogs.graphql +18 -0
- package/skills/wix-replatform/resources/rp-source-shopify/queries/collections.graphql +40 -0
- package/skills/wix-replatform/resources/rp-source-shopify/queries/customers.graphql +76 -0
- package/skills/wix-replatform/resources/rp-source-shopify/queries/delivery-profiles.graphql +51 -0
- package/skills/wix-replatform/resources/rp-source-shopify/queries/discounts.graphql +35 -0
- package/skills/wix-replatform/resources/rp-source-shopify/queries/files.graphql +20 -0
- package/skills/wix-replatform/resources/rp-source-shopify/queries/gift-cards.graphql +18 -0
- package/skills/wix-replatform/resources/rp-source-shopify/queries/inventory.graphql +31 -0
- package/skills/wix-replatform/resources/rp-source-shopify/queries/locations.graphql +21 -0
- package/skills/wix-replatform/resources/rp-source-shopify/queries/menus.graphql +21 -0
- package/skills/wix-replatform/resources/rp-source-shopify/queries/metaobjects.graphql +30 -0
- package/skills/wix-replatform/resources/rp-source-shopify/queries/orders-core.graphql +150 -0
- package/skills/wix-replatform/resources/rp-source-shopify/queries/orders-fulfillments.graphql +36 -0
- package/skills/wix-replatform/resources/rp-source-shopify/queries/orders-refunds.graphql +48 -0
- package/skills/wix-replatform/resources/rp-source-shopify/queries/pages.graphql +20 -0
- package/skills/wix-replatform/resources/rp-source-shopify/queries/probe-customers-address.graphql +8 -0
- package/skills/wix-replatform/resources/rp-source-shopify/queries/probe-customers-email.graphql +6 -0
- package/skills/wix-replatform/resources/rp-source-shopify/queries/probe-customers-name.graphql +8 -0
- package/skills/wix-replatform/resources/rp-source-shopify/queries/probe-customers-phone.graphql +8 -0
- package/skills/wix-replatform/resources/rp-source-shopify/queries/probe-orders-address.graphql +12 -0
- package/skills/wix-replatform/resources/rp-source-shopify/queries/probe-orders-email.graphql +6 -0
- package/skills/wix-replatform/resources/rp-source-shopify/queries/probe-orders-name.graphql +13 -0
- package/skills/wix-replatform/resources/rp-source-shopify/queries/probe-orders-phone.graphql +13 -0
- package/skills/wix-replatform/resources/rp-source-shopify/queries/products.graphql +73 -0
- package/skills/wix-replatform/resources/rp-source-shopify/queries/url-redirects.graphql +13 -0
- package/skills/wix-replatform/resources/rp-source-shopify/scripts/shopify-discovery.js +693 -0
- package/skills/wix-replatform/resources/rp-source-shopify/scripts/shopify-extract.js +283 -0
- package/skills/wix-replatform/resources/rp-source-shopify/scripts/shopify-gift-card-remedy.js +191 -0
- package/skills/wix-replatform/resources/rp-source-shopify/scripts/shopify-session-check.js +115 -0
- package/skills/wix-replatform/resources/rp-source-shopify/source-schema.example.json +201 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/PLUGIN-READ-PLANS.md +146 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/SKILL.md +736 -22
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/blocked-data-handlers.js +73 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/checkout-field-csv-parser.js +115 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/checkout-field-csv-parser.test-fixture.js +91 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/coupon-discovery.js +440 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/currency-gate.js +125 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/gateway-source-keys.js +252 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/gateway-source-keys.json +183 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/gateway-summary.mjs +333 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/invoice-discovery.js +426 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/plugin-disposition.js +400 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/plugin-entity-read-plan.js +633 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/plugin-knowledge.js +1127 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/refund-corroboration.js +194 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/refund-corroboration.json +100 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/sampled-ids-batch.js +157 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/secret-value-guard.js +234 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/store-currency.js +101 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/structure-bridge-reader.js +755 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/wix-wp-plugin-v2-client.js +1074 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/wix-wp-plugin-v2-client.test-fixture.js +149 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/woo-inventory.js +25 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/wp-http.js +204 -9
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/wp-image-url.js +186 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/wp-plugin-detect.js +1422 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/wp-redirect-sources.js +343 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/wp-route-classifier.js +262 -26
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/yoast-product-seo-evidence.js +272 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/README.md +373 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/advanced-custom-fields.json +101 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/back-in-stock-notifier-for-woocommerce.json +81 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/capabilities-pending-decision.json +128 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/cms-fallback-eligible.json +18 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/contact-form-7.json +104 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/facebook-for-woocommerce.json +44 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/fingerprint-aliases.json +49 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/free-gifts-for-woocommerce.json +94 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/index.json +863 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/mailpoet.json +52 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/membership-for-woocommerce.json +161 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/mwb-bookings-for-woocommerce.json +180 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/no-migration-needed.json +286 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/pricing-deals-for-woocommerce.json +79 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/product-extras-for-woocommerce.json +120 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/pw-woocommerce-gift-cards.json +128 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/requires-development.json +88 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/seo-by-rank-math.json +80 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/seriously-simple-podcasting.json +46 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/strong-testimonials.json +55 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/subscriptions-for-woocommerce.json +99 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/tablepress.json +55 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/the-events-calendar.json +160 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/ti-woocommerce-wishlist.json +81 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/woo-checkout-field-editor-pro.json +60 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/woo-discount-rules.json +74 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/woo-product-bundle.json +75 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/woocommerce-gift-cards.json +60 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/woocommerce-other-payment-gateway.json +44 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/woocommerce-pdf-invoices-packing-slips.json +57 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/woocommerce-product-addon.json +141 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/woocommerce-progressive-discounts.json +54 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/wordpress-seo.json +158 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/wpc-composite-products.json +97 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/plugins/wpforms-lite.json +86 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/scripts/capture-store-settings.js +90 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/scripts/plugin-knowledge-validate.js +51 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/scripts/plugin-knowledge.js +103 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/scripts/wp-discovery.js +1668 -33
- package/skills/wix-replatform/resources/rp-source-wordpress/scripts/wp-plugin-inventory.js +273 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/secret-value-patterns.v1.json +11 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/sub-parts.json +13 -0
- package/skills/wix-replatform/resources/rp-target-wix/SKILL.md +446 -32
- package/skills/wix-replatform/resources/rp-target-wix/app-page-routing-capabilities.json +36 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/README.md +38 -2
- package/skills/wix-replatform/resources/rp-target-wix/domains/SERVICE-PLUGINS.md +322 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/blog/docs-survey.json +70 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/blog/domain.json +19 -9
- package/skills/wix-replatform/resources/rp-target-wix/domains/blog/entities/category.json +42 -8
- package/skills/wix-replatform/resources/rp-target-wix/domains/blog/entities/comment.json +54 -8
- package/skills/wix-replatform/resources/rp-target-wix/domains/blog/entities/post.json +66 -10
- package/skills/wix-replatform/resources/rp-target-wix/domains/blog/entities/tag.json +38 -7
- package/skills/wix-replatform/resources/rp-target-wix/domains/bookings/docs-survey.json +332 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/bookings/domain.json +75 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/bookings/entities/booking.json +181 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/bookings/entities/service-add-on.json +130 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/bookings/entities/service.json +180 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/cms/docs-survey.json +161 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/cms/domain.json +15 -4
- package/skills/wix-replatform/resources/rp-target-wix/domains/cms/entities/collection.json +39 -7
- package/skills/wix-replatform/resources/rp-target-wix/domains/cms/entities/data-item.json +47 -8
- package/skills/wix-replatform/resources/rp-target-wix/domains/cms/entities/reference.json +7 -1
- package/skills/wix-replatform/resources/rp-target-wix/domains/crm/docs-survey.json +204 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/crm/domain.json +17 -4
- package/skills/wix-replatform/resources/rp-target-wix/domains/crm/entities/contact.json +159 -15
- package/skills/wix-replatform/resources/rp-target-wix/domains/crm/entities/email-subscription.json +80 -12
- package/skills/wix-replatform/resources/rp-target-wix/domains/crm/entities/label.json +48 -8
- package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/docs-survey.json +306 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/domain.json +30 -7
- package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/entities/delivery-profile.json +171 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/entities/discount-rule.json +182 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/entities/order-applied-discount.json +129 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/entities/order-invoice-document.json +192 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/entities/order-line-item-options.json +123 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/entities/order-line-item.json +60 -12
- package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/entities/order-merchant-note.json +112 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/entities/order-payment.json +191 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/entities/order-refund.json +140 -13
- package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/entities/order.json +383 -18
- package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/entities/pickup-location.json +122 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/entities/shipping-option.json +98 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/entities/wishlist-item.json +86 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/events/docs-survey.json +128 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/events/domain.json +38 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/events/entities/category.json +73 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/events/entities/event.json +107 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/events/entities/registration-form.json +89 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/events/entities/rsvp.json +118 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/events/entities/ticket-definition.json +93 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/forms/docs-survey.json +86 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/forms/domain.json +56 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/forms/entities/form-submission.json +121 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/forms/entities/form.json +134 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/gift-cards/docs-survey.json +41 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/gift-cards/domain.json +50 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/gift-cards/entities/gift-card-product.json +87 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/gift-cards/entities/gift-card.json +130 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/index.json +914 -24
- package/skills/wix-replatform/resources/rp-target-wix/domains/media/docs-survey.json +41 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/media/domain.json +14 -4
- package/skills/wix-replatform/resources/rp-target-wix/domains/media/entities/media-file.json +45 -8
- package/skills/wix-replatform/resources/rp-target-wix/domains/media/entities/media-folder.json +41 -7
- package/skills/wix-replatform/resources/rp-target-wix/domains/members/docs-survey.json +119 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/members/domain.json +13 -3
- package/skills/wix-replatform/resources/rp-target-wix/domains/members/entities/badge.json +41 -7
- package/skills/wix-replatform/resources/rp-target-wix/domains/members/entities/custom-field.json +82 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/members/entities/member-about.json +77 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/members/entities/member.json +165 -13
- package/skills/wix-replatform/resources/rp-target-wix/domains/pricing-plans/docs-survey.json +41 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/pricing-plans/domain.json +46 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/pricing-plans/entities/plan-order.json +137 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/pricing-plans/entities/plan.json +133 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/sales-channels/docs-survey.json +7 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/sales-channels/domain.json +36 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/sales-channels/entities/amazon-shop-connect.json +71 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/sales-channels/entities/ebay-shop-connect.json +67 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/sales-channels/entities/google-youtube-connect.json +72 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/sales-channels/entities/meta-catalog-connect.json +74 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/sales-channels/entities/pinterest-catalog-connect.json +69 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/sales-channels/entities/tiktok-catalog-connect.json +61 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/schema.json +28 -1
- package/skills/wix-replatform/resources/rp-target-wix/domains/seo/docs-survey.json +109 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/seo/domain.json +73 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/seo/entities/item-seo-tags.json +148 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/seo/entities/seo-pattern.json +91 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/seo/entities/site-seo-tags.json +79 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/site/docs-survey.json +32 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/site/domain.json +49 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/site/entities/business-contact.json +103 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/stores/docs-survey.json +203 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/stores/domain.json +27 -10
- package/skills/wix-replatform/resources/rp-target-wix/domains/stores/entities/back-in-stock-request.json +119 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/stores/entities/brand.json +111 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/stores/entities/category.json +52 -8
- package/skills/wix-replatform/resources/rp-target-wix/domains/stores/entities/coupon.json +214 -10
- package/skills/wix-replatform/resources/rp-target-wix/domains/stores/entities/inventory-item.json +93 -13
- package/skills/wix-replatform/resources/rp-target-wix/domains/stores/entities/product-customization.json +111 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/stores/entities/product-tag.json +52 -10
- package/skills/wix-replatform/resources/rp-target-wix/domains/stores/entities/product.json +145 -14
- package/skills/wix-replatform/resources/rp-target-wix/domains/stores/entities/promotion.json +84 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/stores/entities/review.json +178 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/stores/entities/subscription-product.json +87 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/tax/docs-survey.json +106 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/tax/domain.json +64 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/tax/entities/manual-tax-mapping.json +119 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/tax/entities/tax-group.json +94 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/tax/entities/tax-region.json +113 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/tax/entities/tax-settings.json +65 -0
- package/skills/wix-replatform/resources/rp-target-wix/lib/blog-author-attribution.js +165 -0
- package/skills/wix-replatform/resources/rp-target-wix/lib/blog-post-build-client.js +60 -0
- package/skills/wix-replatform/resources/rp-target-wix/lib/blog-post-build-duplicates.js +201 -0
- package/skills/wix-replatform/resources/rp-target-wix/lib/blog-post-build-ledger.js +306 -0
- package/skills/wix-replatform/resources/rp-target-wix/lib/blog-post-build-report.js +229 -0
- package/skills/wix-replatform/resources/rp-target-wix/lib/blog-post-build-stage.js +55 -0
- package/skills/wix-replatform/resources/rp-target-wix/lib/blog-post-build.js +715 -0
- package/skills/wix-replatform/resources/rp-target-wix/lib/blog-post-media.js +567 -0
- package/skills/wix-replatform/resources/rp-target-wix/lib/bulk-results.js +73 -0
- package/skills/wix-replatform/resources/rp-target-wix/lib/contact-extended-fields.js +194 -0
- package/skills/wix-replatform/resources/rp-target-wix/lib/contact-import.js +133 -0
- package/skills/wix-replatform/resources/rp-target-wix/lib/contract-ledger.js +13 -4
- package/skills/wix-replatform/resources/rp-target-wix/lib/coupon-redemption-drift.js +491 -0
- package/skills/wix-replatform/resources/rp-target-wix/lib/customer-member.js +104 -0
- package/skills/wix-replatform/resources/rp-target-wix/lib/data-extension-schema.js +673 -0
- package/skills/wix-replatform/resources/rp-target-wix/lib/domain-knowledge.js +453 -2
- package/skills/wix-replatform/resources/rp-target-wix/lib/gift-card-balance-reconciliation.js +119 -0
- package/skills/wix-replatform/resources/rp-target-wix/lib/gift-card-build.js +566 -0
- package/skills/wix-replatform/resources/rp-target-wix/lib/gift-card-redemption-build.js +249 -0
- package/skills/wix-replatform/resources/rp-target-wix/lib/order-applied-discount-build.js +63 -0
- package/skills/wix-replatform/resources/rp-target-wix/lib/order-buyer.js +187 -0
- package/skills/wix-replatform/resources/rp-target-wix/lib/order-channel-build.js +64 -0
- package/skills/wix-replatform/resources/rp-target-wix/lib/order-history.js +1027 -0
- package/skills/wix-replatform/resources/rp-target-wix/lib/order-invoice-contract.js +90 -0
- package/skills/wix-replatform/resources/rp-target-wix/lib/order-payment-mapping.js +420 -0
- package/skills/wix-replatform/resources/rp-target-wix/lib/pricing-plan-definition.js +177 -0
- package/skills/wix-replatform/resources/rp-target-wix/lib/product-import.js +151 -0
- package/skills/wix-replatform/resources/rp-target-wix/lib/product-seo.js +723 -0
- package/skills/wix-replatform/resources/rp-target-wix/lib/seo-redirects.js +353 -0
- package/skills/wix-replatform/resources/rp-target-wix/lib/shipping-build.js +1437 -0
- package/skills/wix-replatform/resources/rp-target-wix/lib/shipping-option-stage.js +354 -0
- package/skills/wix-replatform/resources/rp-target-wix/lib/store-config-build.js +134 -0
- package/skills/wix-replatform/resources/rp-target-wix/lib/stores-category-attach.js +221 -0
- package/skills/wix-replatform/resources/rp-target-wix/lib/stores-inventory.js +248 -0
- package/skills/wix-replatform/resources/rp-target-wix/lib/stores-verification.js +86 -3
- package/skills/wix-replatform/resources/rp-target-wix/lib/tax-build.js +231 -0
- package/skills/wix-replatform/resources/rp-target-wix/lib/url-mapper-transport.js +28 -0
- package/skills/wix-replatform/resources/rp-target-wix/lib/value-utils.js +14 -0
- package/skills/wix-replatform/resources/rp-target-wix/lib/variant-correlation.js +34 -0
- package/skills/wix-replatform/resources/rp-target-wix/lib/wix-build.js +166 -15
- package/skills/wix-replatform/resources/rp-target-wix/lib/wix-target-spec.js +19 -2
- package/skills/wix-replatform/resources/rp-target-wix/lib/wix-writers.js +4079 -257
- package/skills/wix-replatform/resources/rp-target-wix/lib/write-verification.js +3 -0
- package/skills/wix-replatform/resources/rp-target-wix/scripts/docs-survey-sync.js +150 -0
- package/skills/wix-replatform/resources/rp-target-wix/scripts/domain-knowledge-validate.js +40 -2
- package/skills/wix-replatform/resources/rp-target-wix/scripts/verify-stores.js +6 -1
- package/skills/wix-replatform/resources/rp-telemetry/SKILL.md +148 -8
- package/skills/wix-replatform/resources/rp-telemetry/lib/bi-sink.js +83 -15
- package/skills/wix-replatform/resources/rp-telemetry/lib/telemetry-recorder.js +1119 -215
- package/skills/wix-replatform/resources/rp-telemetry/lib/transcript-digest.js +318 -0
- package/skills/wix-replatform/resources/rp-telemetry/scripts/meter-from-audit.js +2 -2
- package/skills/wix-replatform/resources/rp-telemetry/scripts/rp-telemetry.js +106 -4
- package/skills/wix-replatform/resources/rp-website-continuation/SKILL.md +94 -0
- package/skills/wix-replatform/scripts/census-reconciliation.js +25 -0
- package/skills/wix-replatform/scripts/cms-fallback.js +89 -0
- package/skills/wix-replatform/scripts/discovered-census.js +26 -0
- package/skills/wix-replatform/scripts/discovered-set-status.js +33 -0
- package/skills/wix-replatform/scripts/entity-qa-attestation.js +130 -0
- package/skills/wix-replatform/scripts/execution-health-check.js +415 -0
- package/skills/wix-replatform/scripts/execution-manifest-validate.js +1 -1
- package/skills/wix-replatform/scripts/execution-state-prepare.js +1 -1
- package/skills/wix-replatform/scripts/expectations-ledger.js +44 -0
- package/skills/wix-replatform/scripts/import-contract-verify.js +183 -0
- package/skills/wix-replatform/scripts/internal-link-audit.js +90 -0
- package/skills/wix-replatform/scripts/item-seo-tags-verify.js +205 -0
- package/skills/wix-replatform/scripts/migration-completion.js +76 -0
- package/skills/wix-replatform/scripts/orchestration-preflight.js +21 -2
- package/skills/wix-replatform/scripts/orchestration-route.js +32 -1
- package/skills/wix-replatform/scripts/orchestration-state.js +146 -10
- package/skills/wix-replatform/scripts/read-back-gate.js +175 -0
- package/skills/wix-replatform/scripts/replatform-console.js +146 -0
- package/skills/wix-replatform/scripts/replatform.js +436 -0
- package/skills/wix-replatform/scripts/source-secrets.js +77 -0
- package/skills/wix-replatform/scripts/url-redirects.js +286 -0
- package/skills/wix-replatform/scripts/user-action.js +58 -0
- package/skills/wix-replatform/scripts/website-handoff-generate.js +64 -0
- package/skills/wix-replatform/scripts/wix-dashboard-url.js +54 -0
- package/skills/wix-replatform/scripts/wix-destination.js +143 -0
- package/skills/wix-replatform/scripts/wix-headless-scaffold.js +762 -0
- package/skills/wix-vibe-headless/SKILL.md +7 -3
- package/skills/wix-vibe-headless/install/deploy.cjs +61 -34
- package/skills/wix-vibe-headless/platforms/base44.md +1 -0
- package/skills/wix-vibe-headless/references/donations/INSTRUCTIONS.md +88 -0
- package/skills/wix-vibe-headless/references/donations/app/rest/wix-donations.js +112 -0
- package/skills/wix-vibe-headless/references/donations/seed/SEED.md +11 -0
- package/skills/wix-vibe-headless/references/donations/tests/donations.test.mjs +258 -0
- package/skills/wix-vibe-headless/references/restaurants/INSTRUCTIONS.md +5 -2
- package/skills/wix-vibe-headless/references/restaurants/app/context/OrderCartContext.jsx +4 -1
- package/skills/wix-vibe-headless/references/restaurants/app/rest/wix-restaurants-ordering.js +67 -3
- package/skills/wix-vibe-headless/references/shared/app/rest/wix-client.js +4 -3
- package/skills/wix-replatform/resources/rp-target-wix/SPEC-product-reviews-and-blog-authorship.md +0 -330
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
const fs = require('node:fs');
|
|
3
|
+
const path = require('node:path');
|
|
4
|
+
const CALLERS = Object.freeze([
|
|
5
|
+
'skills/wix-replatform/lib/execution-capability.js',
|
|
6
|
+
'skills/wix-replatform/lib/dependency-readiness.js',
|
|
7
|
+
'skills/wix-replatform/resources/rp-execute-setup/scripts/execute-setup.js',
|
|
8
|
+
'skills/wix-replatform/resources/rp-execute-import/scripts/shipping-estimate-audit.js',
|
|
9
|
+
'skills/wix-replatform/resources/rp-quick-woocommerce/scripts/quick-mode.js',
|
|
10
|
+
'skills/wix-replatform/resources/rp-quick-shopify/scripts/quick-mode.js',
|
|
11
|
+
'skills/wix-replatform/resources/rp-target-wix/lib/wix-writers.js',
|
|
12
|
+
'skills/wix-replatform/resources/rp-target-wix/scripts/verify-stores.js',
|
|
13
|
+
'skills/wix-replatform/scripts/item-seo-tags-verify.js',
|
|
14
|
+
'skills/wix-replatform/scripts/url-redirects.js',
|
|
15
|
+
'tests/target-wix/probe-plain-description-media.js',
|
|
16
|
+
'tests/target-wix/coupon-plan-live-sentinel.js',
|
|
17
|
+
'tests/target-wix/payments-live-sentinel.js',
|
|
18
|
+
'tests/target-wix/order-history-live-sentinel.js',
|
|
19
|
+
'tests/target-wix/contract-test.js',
|
|
20
|
+
'tests/target-wix/write-outcome-classification-test.js',
|
|
21
|
+
'tests/target-wix/order-history-composite-test.js',
|
|
22
|
+
'tests/target-wix/read-back-transport-test.js',
|
|
23
|
+
'tests/orchestration/read-back-gate-test.js',
|
|
24
|
+
'tests/orchestration/dependency-readiness-test.js',
|
|
25
|
+
'tests/orchestration/dependency-review-regressions-test.js',
|
|
26
|
+
'tests/orchestration/dependency-readiness-scaling-test.js',
|
|
27
|
+
'tests/orchestration/dependency-readiness-matrix-test.js',
|
|
28
|
+
'tests/orchestration/setup-reference-gate-test.js',
|
|
29
|
+
'tests/orchestration/dependency-readiness-cost-test.js',
|
|
30
|
+
'tests/orchestration/dependency-cutover-test.js',
|
|
31
|
+
'tests/orchestration/dependency-consent-test.js',
|
|
32
|
+
'tests/orchestration/execution-capability-test.js',
|
|
33
|
+
]);
|
|
34
|
+
const PROBES = new Set(CALLERS.filter(file => /(?:verify-stores|item-seo-tags-verify|live-sentinel|probe-plain-description-media|contract-test|execution-capability-test|dependency-readiness-matrix-test|write-outcome-classification-test|order-history-composite-test|read-back-transport-test|read-back-gate-test)/.test(file)));
|
|
35
|
+
function scanWixClientCallers(root) {
|
|
36
|
+
const found = [], errors = [];
|
|
37
|
+
function walk(dir) {
|
|
38
|
+
if (!fs.existsSync(dir)) return;
|
|
39
|
+
for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
|
|
40
|
+
const file = path.join(dir, entry.name);
|
|
41
|
+
if (entry.isDirectory()) walk(file);
|
|
42
|
+
else if (/\.[cm]?js$/.test(file)) {
|
|
43
|
+
const text = fs.readFileSync(file, 'utf8').replace(/\/\*[\s\S]*?\*\/|^\s*\/\/.*$/gm, ''), relative = path.relative(root, file).split(path.sep).join('/');
|
|
44
|
+
if (/\b(?:createWixClient|startSetupRun|bindSetupStep|startImportRun|bindTask|startQuickRun|bindQuickEntity|bindQuickSetup|startDevProbe)\s*\(/.test(text)) {
|
|
45
|
+
found.push(relative); if (!CALLERS.includes(relative)) errors.push(`wix_client_caller_unlisted:${relative}`);
|
|
46
|
+
if (/\bstartDevProbe\s*\(/.test(text) && !PROBES.has(relative) && !relative.endsWith('/execution-capability.js')) errors.push(`dev_probe_caller_unlisted:${relative}`);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
walk(path.join(root, 'skills')); walk(path.join(root, 'tests'));
|
|
52
|
+
return { ok: !errors.length, errors, callers: found.sort() };
|
|
53
|
+
}
|
|
54
|
+
module.exports = { CALLERS, scanWixClientCallers };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const DASHBOARD_BASE_URL = 'https://manage.wix.com/dashboard';
|
|
4
|
+
|
|
5
|
+
function normalizeMetaSiteId(metaSiteId) {
|
|
6
|
+
const normalized = String(metaSiteId || '').trim();
|
|
7
|
+
if (!normalized) {
|
|
8
|
+
throw new Error('metaSiteId is required to build a Wix dashboard URL');
|
|
9
|
+
}
|
|
10
|
+
if (/[/?#\s]/.test(normalized)) {
|
|
11
|
+
throw new Error('metaSiteId must be a bare id, not a URL or path');
|
|
12
|
+
}
|
|
13
|
+
return normalized;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function buildWixDashboardUrl(metaSiteId, options = {}) {
|
|
17
|
+
const id = normalizeMetaSiteId(metaSiteId);
|
|
18
|
+
const path = options.path ? String(options.path).trim().replace(/^\/+/, '') : '';
|
|
19
|
+
const suffix = path ? `/${encodeURIComponent(path).replace(/%2F/g, '/')}` : '';
|
|
20
|
+
return `${DASHBOARD_BASE_URL}/${encodeURIComponent(id)}${suffix}`;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function buildWixDashboardLink(metaSiteId) {
|
|
24
|
+
return {
|
|
25
|
+
metaSiteId: normalizeMetaSiteId(metaSiteId),
|
|
26
|
+
dashboardUrl: buildWixDashboardUrl(metaSiteId),
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
module.exports = {
|
|
31
|
+
DASHBOARD_BASE_URL,
|
|
32
|
+
buildWixDashboardLink,
|
|
33
|
+
buildWixDashboardUrl,
|
|
34
|
+
normalizeMetaSiteId,
|
|
35
|
+
};
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
const fs = require('node:fs/promises');
|
|
3
|
+
const path = require('node:path');
|
|
4
|
+
const crypto = require('node:crypto');
|
|
5
|
+
const local = require('./local-state');
|
|
6
|
+
const verification = require('./write-verification');
|
|
7
|
+
const file = projectDir => path.join(projectDir, 'state', 'write-verification.json');
|
|
8
|
+
const journalDir = projectDir => path.join(projectDir, 'state', 'write-verification-journal');
|
|
9
|
+
async function load(projectDir, siteId) {
|
|
10
|
+
let state;
|
|
11
|
+
try { state = JSON.parse(await fs.readFile(file(projectDir), 'utf8')); }
|
|
12
|
+
catch (e) { if (e.code !== 'ENOENT') throw e; state = { schemaVersion: 1, siteId, sequence: 0, rows: {} }; }
|
|
13
|
+
if (state.schemaVersion !== 1 || state.siteId !== siteId || !state.rows || Array.isArray(state.rows)) throw new Error('Invalid or wrong-site write verification state');
|
|
14
|
+
state.sequence ||= 0;
|
|
15
|
+
let names;
|
|
16
|
+
try { names = await fs.readdir(journalDir(projectDir)); } catch (e) { if (e.code !== 'ENOENT') throw e; names = []; }
|
|
17
|
+
for (const name of names.filter(n => n.endsWith('.json')).sort()) {
|
|
18
|
+
const delta = JSON.parse(await fs.readFile(path.join(journalDir(projectDir), name), 'utf8'));
|
|
19
|
+
if (delta.siteId !== siteId || !Number.isSafeInteger(delta.sequence) || !delta.rows) throw new Error('Invalid verification checkpoint');
|
|
20
|
+
if (delta.sequence > state.sequence) { Object.assign(state.rows, delta.rows); state.sequence = delta.sequence; }
|
|
21
|
+
}
|
|
22
|
+
return state;
|
|
23
|
+
}
|
|
24
|
+
async function atomicJson(dest, value) {
|
|
25
|
+
const tmp = `${dest}.${crypto.randomUUID()}.tmp`;
|
|
26
|
+
await fs.mkdir(path.dirname(dest), { recursive: true });
|
|
27
|
+
try { await fs.writeFile(tmp, JSON.stringify(value) + '\n', { mode: 0o600 }); await fs.rename(tmp, dest); }
|
|
28
|
+
finally { await fs.rm(tmp, { force: true }); }
|
|
29
|
+
}
|
|
30
|
+
// Each checkpoint writes only changed rows. A crash before rename leaves no visible
|
|
31
|
+
// partial transaction; a crash after it is replayed before any retry can write.
|
|
32
|
+
async function checkpoint(projectDir, state, rows) {
|
|
33
|
+
if (!rows.length) return;
|
|
34
|
+
const sequence = (state.sequence || 0) + 1;
|
|
35
|
+
await atomicJson(path.join(journalDir(projectDir), `${String(sequence).padStart(16, '0')}.json`),
|
|
36
|
+
{ siteId: state.siteId, sequence, rows: Object.fromEntries(rows.map(r => [r.sourceKey, state.rows[r.sourceKey]])) });
|
|
37
|
+
state.sequence = sequence;
|
|
38
|
+
}
|
|
39
|
+
async function persist(projectDir, state) {
|
|
40
|
+
await atomicJson(file(projectDir), state);
|
|
41
|
+
// Snapshot includes the sequence. Old journals are harmless if cleanup is interrupted.
|
|
42
|
+
let names;
|
|
43
|
+
try { names = await fs.readdir(journalDir(projectDir)); } catch (e) { if (e.code !== 'ENOENT') throw e; return; }
|
|
44
|
+
for (const name of names) if (/^\d+\.json$/.test(name) && Number(name.slice(0, -5)) <= state.sequence) await fs.rm(path.join(journalDir(projectDir), name), { force: true });
|
|
45
|
+
}
|
|
46
|
+
function reference(receipt) {
|
|
47
|
+
return { storage: 'write-verification', schemaVersion: 1, siteId: receipt.siteId, sourceKey: receipt.sourceKey,
|
|
48
|
+
targetId: receipt.targetId, kind: receipt.kind, receiptDigest: verification.digest(receipt) };
|
|
49
|
+
}
|
|
50
|
+
async function validateReference(projectDir, row) {
|
|
51
|
+
const ref = row.verification;
|
|
52
|
+
if (ref?.storage !== 'write-verification') return verification.validReceipt(ref, { sourceKey: row.sourceStableKey, targetId: row.targetId });
|
|
53
|
+
const state = await load(projectDir, ref.siteId);
|
|
54
|
+
const candidate = state.rows[row.sourceStableKey];
|
|
55
|
+
if (candidate?.identityConflict) return false;
|
|
56
|
+
const receipt = [candidate?.receipt, candidate?.lastVerifiedReceipt].find(r => r && ref.receiptDigest === verification.digest(r));
|
|
57
|
+
return Boolean(receipt) && ref.receiptDigest === verification.digest(receipt) && verification.validReceipt(receipt,
|
|
58
|
+
{ siteId: ref.siteId, sourceKey: row.sourceStableKey, targetId: row.targetId, kind: ref.kind });
|
|
59
|
+
}
|
|
60
|
+
function publication(row, receipt, { baseline = null, confirmedCreate = false, sourceVersion, sourceVersionField, sourceHash, sourceHashDefinition } = {}) {
|
|
61
|
+
if (!verification.validReceipt(receipt, { sourceKey: row.sourceStableKey, targetId: row.targetId })) throw new Error('Cannot publish an unverified mapping');
|
|
62
|
+
// A read-only reconciliation must preserve the last confirmed write's version pair.
|
|
63
|
+
// In particular, never pair a refreshed source version with a newer read-only revision.
|
|
64
|
+
let published = { ...(baseline || {}), ...row, verification: reference(receipt) };
|
|
65
|
+
if (confirmedCreate && !baseline) {
|
|
66
|
+
const next = local.nextCrosswalkBaseline({ existingRow: published, outcome: 'created',
|
|
67
|
+
sourceVersion, sourceVersionField, sourceHash, sourceHashDefinition, targetRevision: receipt.actual?.revision });
|
|
68
|
+
if (next.advanced) published = next.row;
|
|
69
|
+
}
|
|
70
|
+
return published;
|
|
71
|
+
}
|
|
72
|
+
async function publishMany(projectDir, entries, revoke = []) {
|
|
73
|
+
const rows = entries.map(({ row, receipt, options }) => publication(row, receipt, options));
|
|
74
|
+
await local.updateCrosswalkRows(projectDir, rows, { remove: revoke });
|
|
75
|
+
}
|
|
76
|
+
async function publish(projectDir, row, receipt, options) {
|
|
77
|
+
await publishMany(projectDir, [{ row, receipt, options }]);
|
|
78
|
+
}
|
|
79
|
+
function report(rows, siteId) {
|
|
80
|
+
const targetIds = new Set();
|
|
81
|
+
const checked = rows.map(row => {
|
|
82
|
+
const valid = verification.validReceipt(row.receipt, { siteId, sourceKey: row.sourceKey, targetId: row.targetId });
|
|
83
|
+
const duplicate = valid && targetIds.has(row.targetId);
|
|
84
|
+
if (valid) targetIds.add(row.targetId);
|
|
85
|
+
return { ...row, verified: valid && !duplicate };
|
|
86
|
+
});
|
|
87
|
+
// All participants in a collision fail, not only the last one.
|
|
88
|
+
for (const row of checked) if (checked.filter(r => r.targetId && r.targetId === row.targetId).length > 1) row.verified = false;
|
|
89
|
+
return { siteId, intended: rows.length, rows: checked, verified: checked.filter(r => r.verified).length,
|
|
90
|
+
status: !rows.length ? 'no-data' : checked.every(r => r.verified) ? 'complete' : 'partial' };
|
|
91
|
+
}
|
|
92
|
+
module.exports = { load, checkpoint, persist, publish, publishMany, report, validateReference };
|
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
const { isDeepStrictEqual } = require('node:util');
|
|
3
|
+
const crypto = require('node:crypto');
|
|
4
|
+
const { contactId, opaqueId } = require('./entity-verification');
|
|
5
|
+
const { normalizedDescriptionText } = require('../resources/rp-target-wix/lib/wix-build.js');
|
|
6
|
+
const email = value => typeof value === 'string' ? value.trim().toLowerCase() : value;
|
|
7
|
+
// Mirrors the same named+numeric HTML-entity decode every source adapter already needs for its
|
|
8
|
+
// own "plain text fields are HTML-entity-encoded but never DOM-parsed" trap (e.g.
|
|
9
|
+
// rp-import-codegen's product-transform.js decodeEntities): a source HTML body commonly carries
|
|
10
|
+
// numeric/hex entities (LIVE-VERIFIED: WooCommerce ships an en dash as `–`) that Wix's own
|
|
11
|
+
// server-side HTML->Ricos conversion decodes into the real character on read-back. Comparing
|
|
12
|
+
// visible text without first decoding the SENT side's entities the same way would see every such
|
|
13
|
+
// entity as a permanent mismatch, which is exactly the false failure this comparator exists to
|
|
14
|
+
// avoid. Kept local (not required from a project's transform code) because write-verification.js
|
|
15
|
+
// must not depend on any per-project generated file.
|
|
16
|
+
// Live-diagnosed gap (2026-09-28): a 6-entry map covered only the XML-reserved five plus nbsp.
|
|
17
|
+
// WordPress's own `wptexturize` (which runs on every post/product description by default)
|
|
18
|
+
// rewrites plain typography into exactly these named entities -- straight quotes into curly
|
|
19
|
+
// ones, `--`/`---` into en/em dashes, `...` into an ellipsis -- so real WooCommerce/WordPress
|
|
20
|
+
// content routinely contains `—`, `…`, `’`, `©`, and similar even when the
|
|
21
|
+
// author never typed a literal entity. Any of these left undecoded on the "expected" (sent) side
|
|
22
|
+
// while Wix's Ricos round-trip decodes them on the "actual" (read-back) side produced exactly the
|
|
23
|
+
// false verification mismatch this comparator was built to eliminate, just for a different name
|
|
24
|
+
// than the numeric-entity case it already handled. Extended to the common WordPress/WooCommerce
|
|
25
|
+
// typographic and symbol set, not just the XML-reserved five -- still a static table, not the
|
|
26
|
+
// full HTML5 named-character-reference list, because this file has no external dependency and a
|
|
27
|
+
// generated description is human-authored prose, not arbitrary markup.
|
|
28
|
+
const NAMED_HTML_ENTITIES = {
|
|
29
|
+
amp: '&', lt: '<', gt: '>', quot: '"', apos: "'", nbsp: ' ',
|
|
30
|
+
// wptexturize's own typographic substitutions
|
|
31
|
+
mdash: '—', ndash: '–', hellip: '…',
|
|
32
|
+
lsquo: '‘', rsquo: '’', ldquo: '“', rdquo: '”',
|
|
33
|
+
sbquo: '‚', bdquo: '„', laquo: '«', raquo: '»',
|
|
34
|
+
// Common symbols that show up in product/blog copy
|
|
35
|
+
copy: '©', reg: '®', trade: '™', deg: '°',
|
|
36
|
+
plusmn: '±', times: '×', divide: '÷', middot: '·',
|
|
37
|
+
sect: '§', para: '¶', bull: '•', dagger: '†',
|
|
38
|
+
Dagger: '‡', permil: '‰', prime: '′', Prime: '″',
|
|
39
|
+
euro: '€', pound: '£', yen: '¥', cent: '¢', curren: '¤',
|
|
40
|
+
// BUG FIX: still no Latin-1 accented-letter entities -- common in
|
|
41
|
+
// WooCommerce/WordPress content authored or copy-pasted via older tools/CMSes. The full HTML4
|
|
42
|
+
// Latin-1-Supplement letter block, both cases (both are real, distinct named references).
|
|
43
|
+
agrave: 'à', aacute: 'á', acirc: 'â', atilde: 'ã', auml: 'ä', aring: 'å', aelig: 'æ', ccedil: 'ç',
|
|
44
|
+
egrave: 'è', eacute: 'é', ecirc: 'ê', euml: 'ë',
|
|
45
|
+
igrave: 'ì', iacute: 'í', icirc: 'î', iuml: 'ï',
|
|
46
|
+
eth: 'ð', ntilde: 'ñ',
|
|
47
|
+
ograve: 'ò', oacute: 'ó', ocirc: 'ô', otilde: 'õ', ouml: 'ö', oslash: 'ø',
|
|
48
|
+
ugrave: 'ù', uacute: 'ú', ucirc: 'û', uuml: 'ü',
|
|
49
|
+
yacute: 'ý', thorn: 'þ', yuml: 'ÿ', szlig: 'ß',
|
|
50
|
+
Agrave: 'À', Aacute: 'Á', Acirc: 'Â', Atilde: 'Ã', Auml: 'Ä', Aring: 'Å', AElig: 'Æ', Ccedil: 'Ç',
|
|
51
|
+
Egrave: 'È', Eacute: 'É', Ecirc: 'Ê', Euml: 'Ë',
|
|
52
|
+
Igrave: 'Ì', Iacute: 'Í', Icirc: 'Î', Iuml: 'Ï',
|
|
53
|
+
ETH: 'Ð', Ntilde: 'Ñ',
|
|
54
|
+
Ograve: 'Ò', Oacute: 'Ó', Ocirc: 'Ô', Otilde: 'Õ', Ouml: 'Ö', Oslash: 'Ø',
|
|
55
|
+
Ugrave: 'Ù', Uacute: 'Ú', Ucirc: 'Û', Uuml: 'Ü',
|
|
56
|
+
Yacute: 'Ý', THORN: 'Þ',
|
|
57
|
+
};
|
|
58
|
+
function decodeHtmlEntities(value) {
|
|
59
|
+
// BUG FIX: the numeric-hex branch's prefix was a literal lowercase `x`
|
|
60
|
+
// (`#x?`), with no `i` flag on the regex -- so an uppercase `—` matched neither
|
|
61
|
+
// alternative (the hex-prefix alternative requires the literal "x", and "X" is not itself a
|
|
62
|
+
// valid hex digit once the optional "x" fails to consume it) and was left completely
|
|
63
|
+
// undecoded, even though the handler below already anticipates `entity[1] === 'X'`. Widened to
|
|
64
|
+
// `#[xX]?` so both cases of the hex prefix match; the named-entity branch (`[a-zA-Z]+`) is
|
|
65
|
+
// deliberately left case-sensitive, since HTML named references are themselves case-sensitive
|
|
66
|
+
// (`&` is a valid reference, `&` is not) and NAMED_HTML_ENTITIES is keyed accordingly.
|
|
67
|
+
return String(value == null ? '' : value).replace(/&(#[xX]?[0-9a-fA-F]+|[a-zA-Z]+);/g, (match, entity) => {
|
|
68
|
+
if (entity[0] === '#') {
|
|
69
|
+
const code = entity[1] === 'x' || entity[1] === 'X' ? parseInt(entity.slice(2), 16) : parseInt(entity.slice(1), 10);
|
|
70
|
+
return Number.isFinite(code) ? String.fromCodePoint(code) : match;
|
|
71
|
+
}
|
|
72
|
+
return Object.prototype.hasOwnProperty.call(NAMED_HTML_ENTITIES, entity) ? NAMED_HTML_ENTITIES[entity] : match;
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
// BUG FIX: this used to strip ALL whitespace (`.replace(/\s+/g, '')`)
|
|
76
|
+
// on top of normalizedDescriptionText's own collapse-to-single-space -- which destroys the very
|
|
77
|
+
// word boundaries a re-serialization difference needs to be judged against. "Fresh Roasted Coffee
|
|
78
|
+
// Beans" (correct) and "FreshRoasted CoffeeBeans" (a genuine lost word boundary) both collapsed to
|
|
79
|
+
// the identical "FreshRoastedCoffeeBeans" once every space vanished, so a real word-merge/split
|
|
80
|
+
// corruption verified as a pass. normalizedDescriptionText already collapses every run of
|
|
81
|
+
// whitespace (including tag-boundary spaces introduced by stripping markup) to exactly one space
|
|
82
|
+
// and trims the ends -- since decodeHtmlEntities+normalizedDescriptionText run identically on both
|
|
83
|
+
// the sent and read-back sides, that single-space normalization is already symmetric and already
|
|
84
|
+
// tolerates markup/entity re-serialization; no further whitespace removal is needed or safe.
|
|
85
|
+
// Inline elements do not separate words when rendered ("<span>Brand</span><span>Acme</span>"
|
|
86
|
+
// displays "BrandAcme", and Stores V3 reads it back that way, LIVE-VERIFIED 2026-10-15), so they
|
|
87
|
+
// are removed without a space; every other tag still separates words.
|
|
88
|
+
const INLINE_TAG = /<\/?(?:a|abbr|b|bdi|bdo|cite|code|data|dfn|em|font|i|kbd|mark|q|s|samp|small|span|strong|sub|sup|time|u|var)\b[^>]*>/gi;
|
|
89
|
+
const visibleDescriptionText = html => normalizedDescriptionText(decodeHtmlEntities(String(html == null ? '' : html).replace(INLINE_TAG, '')));
|
|
90
|
+
// LIVE-VERIFIED (2026-10-15): the stored Ricos description keeps every <br> as
|
|
91
|
+
// a "\n" text node, but the plainDescription read-back serializes a <br> run either as one
|
|
92
|
+
// space ("here<br />and" -> "here and", 2026-09-27) or as nothing, trimming the whitespace beside
|
|
93
|
+
// it ("Tools! <br><br>Next" -> "Tools!Next"). At a <br> position, accept exactly those two
|
|
94
|
+
// outcomes; every other character and every other whitespace must still match.
|
|
95
|
+
const BREAK_MARK = '\uE000';
|
|
96
|
+
const BREAK_RUN = /(?:\s| )*(?:<br\b[^>]*>(?:\s| )*)+/gi;
|
|
97
|
+
const escapeRegExp = value => value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
98
|
+
function descriptionTextMatches(expectedHtml, actualHtml) {
|
|
99
|
+
const wantsText = visibleDescriptionText(expectedHtml);
|
|
100
|
+
const actualText = visibleDescriptionText(actualHtml);
|
|
101
|
+
if (wantsText === '') return false;
|
|
102
|
+
if (wantsText === actualText) return true;
|
|
103
|
+
const segments = visibleDescriptionText(String(expectedHtml).replace(BREAK_RUN, ` ${BREAK_MARK} `)).split(new RegExp(`\\s*${BREAK_MARK}\\s*`));
|
|
104
|
+
if (segments.length < 2) return false;
|
|
105
|
+
return new RegExp(`^${segments.map(escapeRegExp).join(' ?')}$`).test(actualText);
|
|
106
|
+
}
|
|
107
|
+
const digest = value => crypto.createHash('sha256').update(JSON.stringify(value)).digest('hex');
|
|
108
|
+
const own = (o, k) => o != null && Object.prototype.hasOwnProperty.call(o, k);
|
|
109
|
+
|
|
110
|
+
// Expected fields come from the source projection. Extra server fields do not satisfy
|
|
111
|
+
// missing fields, and null/empty/false/zero remain distinct. No heuristic normalization.
|
|
112
|
+
function assertProjection(value, path = 'expected') {
|
|
113
|
+
if (value === undefined) throw new Error(`Undefined verification value at ${path}; omit the key or supply an explicit JSON value`);
|
|
114
|
+
if (value && typeof value === 'object') {
|
|
115
|
+
if (Array.isArray(value)) for (let i = 0; i < value.length; i++) assertProjection(value[i], `${path}[${i}]`);
|
|
116
|
+
else for (const [key, child] of Object.entries(value)) assertProjection(child, `${path}.${key}`);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
function compareProjection(expected, actual, { kind = '', path = '' } = {}) {
|
|
120
|
+
assertProjection(expected);
|
|
121
|
+
const checks = [];
|
|
122
|
+
function compare(e, a, p, present) {
|
|
123
|
+
if (kind === 'contact' && p === 'email.email') {
|
|
124
|
+
checks.push({ path: p, matches: present && email(e) === email(a) });
|
|
125
|
+
} else if (p === 'plainDescription' && typeof e === 'string') {
|
|
126
|
+
// LIVE-VERIFIED (2026-09-27): Stores V3's Get Product does not
|
|
127
|
+
// echo plainDescription -- it converts the HTML to a Ricos document server-side and reads
|
|
128
|
+
// back a RE-SERIALIZATION of that document, not the sent bytes (e.g. a source <strong>
|
|
129
|
+
// becomes <span style="font-weight: 700">, and HTML entities get decoded). That is Wix's
|
|
130
|
+
// own conversion, unavoidable and benign, so this leaf compares VISIBLE TEXT -- the same
|
|
131
|
+
// extractor wix-build.js's composeProductDescription uses to decide whether a description
|
|
132
|
+
// is real content -- never markup. A genuinely different or lost description still fails:
|
|
133
|
+
// this tolerates re-serialization, not a text change, and never passes on empty text.
|
|
134
|
+
checks.push({ path: p, matches: present && typeof a === 'string' && descriptionTextMatches(e, a) });
|
|
135
|
+
} else if (/(^|\.)amount$/.test(p) && typeof e === 'string' && /^-?\d+(\.\d+)?$/.test(e.trim())) {
|
|
136
|
+
// LIVE-VERIFIED (2026-10-15): Stores V3 normalizes decimal strings on
|
|
137
|
+
// read-back -- a sent price "65.00" comes back "65", "21.20" comes back "21.2". The money
|
|
138
|
+
// value is identical, so an amount leaf compares numerically; a different amount (or a
|
|
139
|
+
// missing / non-numeric one) still fails.
|
|
140
|
+
checks.push({ path: p, matches: present && typeof a === 'string' && /^-?\d+(\.\d+)?$/.test(a.trim()) && Number(e) === Number(a) });
|
|
141
|
+
} else if (Array.isArray(e) && /(^|\.)media\.itemsInfo\.items$/.test(p)) {
|
|
142
|
+
// LIVE-VERIFIED (2026-09-27): every product image is rehosted
|
|
143
|
+
// to Wix's own CDN (static.wixstatic.com) under a server-minted id/url the instant it
|
|
144
|
+
// ingests -- expected, unavoidable platform behavior, not data loss. The url this
|
|
145
|
+
// comparator sent will therefore never appear in the read-back, so identity here is never
|
|
146
|
+
// the url (or a filename derived from it): it is the item COUNT, plus -- for whichever
|
|
147
|
+
// items the writer's own record shows we asked to carry alt text -- that altText survives
|
|
148
|
+
// the rehost verbatim (LIVE-VERIFIED: Wix echoes it back exactly, both on the item itself
|
|
149
|
+
// and nested under item.image). A missing/extra image, or a changed altText, still fails.
|
|
150
|
+
//
|
|
151
|
+
// KNOWN LIMITATION: this cannot detect two
|
|
152
|
+
// images swapped between slots, or an entirely wrong image landing in a slot, when neither
|
|
153
|
+
// altText nor displayName was set on the sent side -- common for sources with no alt text.
|
|
154
|
+
// `buildMedia` (wix-build.js) sends only `{url, altText, displayName}` per item; the sent
|
|
155
|
+
// `url` is the ONLY other candidate per-item identity and it is exactly the field this
|
|
156
|
+
// comment already establishes never survives the rehost, so nothing else is available to
|
|
157
|
+
// compare here without new information from Wix's API. This check also assumes rehosted
|
|
158
|
+
// items keep the SENT order (`a[i]` correlates to `e[i]` throughout this block) -- that
|
|
159
|
+
// assumption is undocumented and has not been independently live-verified either; if Wix's
|
|
160
|
+
// rehost does not preserve order, the existing altText/displayName checks below could
|
|
161
|
+
// already be comparing against the wrong item, not just this count check.
|
|
162
|
+
checks.push({ path: p, matches: Array.isArray(a) && e.length === a.length });
|
|
163
|
+
e.forEach((item, i) => {
|
|
164
|
+
const child = Array.isArray(a) ? a[i] : undefined;
|
|
165
|
+
const alt = item && typeof item === 'object' ? item.altText : undefined;
|
|
166
|
+
if (typeof alt === 'string' && alt.trim() !== '') {
|
|
167
|
+
// `??` only falls through on null/undefined -- an actual side that carries altText as
|
|
168
|
+
// an EMPTY STRING (the rehost keeping the field but losing its value) must still count
|
|
169
|
+
// as "did not survive", the same as a missing field entirely. `||` falls through on any
|
|
170
|
+
// falsy value, which is what "only check the field when non-empty" means everywhere else
|
|
171
|
+
// in this comparator (see isBlank-style checks in wix-build.js).
|
|
172
|
+
const actualAlt = child?.altText || child?.image?.altText;
|
|
173
|
+
checks.push({ path: `${p}[${i}].altText`, matches: Boolean(child) && actualAlt === alt });
|
|
174
|
+
}
|
|
175
|
+
// wix-build.js's buildMedia writes displayName on every media item it constructs whenever
|
|
176
|
+
// the source record has one (domains/stores/entities/product.json: displayName "must not
|
|
177
|
+
// be flattened away"). Only check it when the writer's own record shows we asked to carry
|
|
178
|
+
// it -- the same "only check what we actually asked for" pattern altText uses above -- so
|
|
179
|
+
// a product with no displayName at all is never penalized for it being absent.
|
|
180
|
+
const displayName = item && typeof item === 'object' ? item.displayName : undefined;
|
|
181
|
+
if (typeof displayName === 'string' && displayName.trim() !== '') {
|
|
182
|
+
const actualDisplayName = child?.displayName || child?.image?.displayName;
|
|
183
|
+
checks.push({ path: `${p}[${i}].displayName`, matches: Boolean(child) && actualDisplayName === displayName });
|
|
184
|
+
}
|
|
185
|
+
});
|
|
186
|
+
} else if (Array.isArray(e)) {
|
|
187
|
+
checks.push({ path: p, matches: Array.isArray(a) && e.length === a.length });
|
|
188
|
+
e.forEach((v, i) => compare(v, a?.[i], `${p}[${i}]`, Array.isArray(a) && i < a.length));
|
|
189
|
+
} else if (e && typeof e === 'object') {
|
|
190
|
+
if (!Object.keys(e).length) checks.push({ path: p, matches: present && isDeepStrictEqual(e, a) });
|
|
191
|
+
else for (const [k, v] of Object.entries(e)) compare(v, a?.[k], p ? `${p}.${k}` : k, own(a, k));
|
|
192
|
+
} else checks.push({ path: p, matches: present && isDeepStrictEqual(e, a) });
|
|
193
|
+
}
|
|
194
|
+
compare(expected, actual, path, actual !== undefined);
|
|
195
|
+
return { verified: checks.length > 0 && checks.every(c => c.matches), checks };
|
|
196
|
+
}
|
|
197
|
+
function contactIdentity(expected, actual, id) {
|
|
198
|
+
const checks = [{ path: 'id', matches: contactId(id) && actual?.id === id && !actual?._dryRunPlaceholder }];
|
|
199
|
+
const hasExternal = typeof expected?.externalId === 'string' && expected.externalId.trim() !== '';
|
|
200
|
+
const hasEmail = typeof expected?.email?.email === 'string' && email(expected.email.email) !== '';
|
|
201
|
+
checks.push({ path: 'source-identity', matches: hasExternal || hasEmail });
|
|
202
|
+
if (hasExternal) checks.push({ path: 'externalId', matches: actual?.externalId === expected.externalId });
|
|
203
|
+
if (hasEmail) checks.push({ path: 'email.email', matches: email(actual?.email?.email) === email(expected.email.email) });
|
|
204
|
+
return { verified: checks.every(c => c.matches), checks };
|
|
205
|
+
}
|
|
206
|
+
function verifyContact(expected, actual, id) {
|
|
207
|
+
const identity = contactIdentity(expected, actual, id);
|
|
208
|
+
const values = compareProjection(expected, actual, { kind: 'contact' });
|
|
209
|
+
return { verified: identity.verified && values.verified, checks: [...identity.checks, ...values.checks] };
|
|
210
|
+
}
|
|
211
|
+
function subscriptionExpected(product) {
|
|
212
|
+
const value = product?.subscriptionDetails;
|
|
213
|
+
const entries = value?.subscriptions;
|
|
214
|
+
if (!Array.isArray(entries) || !entries.length || entries.some(s => !s?.title) || new Set(entries.map(s => s.title)).size !== entries.length) {
|
|
215
|
+
throw new Error('Subscription verification requires nonempty, uniquely titled subscriptions');
|
|
216
|
+
}
|
|
217
|
+
if (typeof value.allowOneTimePurchases !== 'boolean' || entries.some(s =>
|
|
218
|
+
!['title', 'description', 'frequency', 'interval', 'autoRenewal'].every(k => own(s, k)))) {
|
|
219
|
+
throw new Error('Subscription verification requires the complete expected field projection');
|
|
220
|
+
}
|
|
221
|
+
return JSON.parse(JSON.stringify(value));
|
|
222
|
+
}
|
|
223
|
+
function verifySubscriptionEvidence(evidence) {
|
|
224
|
+
try {
|
|
225
|
+
if (!evidence || evidence.dryRun || !opaqueId(evidence.targetId)) throw new Error('Invalid evidence');
|
|
226
|
+
const expected = subscriptionExpected({ subscriptionDetails: evidence.expected });
|
|
227
|
+
const actual = evidence.actual;
|
|
228
|
+
const entries = actual?.subscriptionDetails?.subscriptions;
|
|
229
|
+
const checks = [{ path: 'product.id', matches: actual?.id === evidence.targetId && !actual?._dryRunPlaceholder },
|
|
230
|
+
{ path: 'subscriptionDetails.subscriptions.length', matches: Array.isArray(entries) && entries.length === expected.subscriptions.length },
|
|
231
|
+
{ path: 'subscriptionDetails.allowOneTimePurchases', matches: actual?.subscriptionDetails?.allowOneTimePurchases === expected.allowOneTimePurchases }];
|
|
232
|
+
for (const wanted of expected.subscriptions) {
|
|
233
|
+
const matches = (entries || []).filter(s => s?.title === wanted.title);
|
|
234
|
+
const entry = matches.length === 1 ? matches[0] : undefined;
|
|
235
|
+
checks.push({ path: `subscriptions:${wanted.title}.id`, matches: matches.length === 1 && opaqueId(entry?.id) });
|
|
236
|
+
checks.push(...compareProjection(wanted, entry, { path: `subscriptions:${wanted.title}` }).checks);
|
|
237
|
+
}
|
|
238
|
+
return { verified: checks.every(c => c.matches), checks };
|
|
239
|
+
} catch { return { verified: false, checks: [{ path: 'evidence', matches: false }] }; }
|
|
240
|
+
}
|
|
241
|
+
function verifyProduct(expected, actual, id, { marker, variants = [] } = {}) {
|
|
242
|
+
const checks = [{ path: 'id', matches: opaqueId(id) && actual?.id === id && !actual?._dryRunPlaceholder }];
|
|
243
|
+
// Marker must have been selected from the source, not filled from the returned entity.
|
|
244
|
+
checks.push({ path: 'source-marker', matches: Boolean(marker?.path) && marker.value !== undefined && marker.value !== '' });
|
|
245
|
+
if (marker?.path) {
|
|
246
|
+
const value = marker.path.split('.').reduce((v, k) => v?.[k], actual);
|
|
247
|
+
checks.push({ path: marker.path, matches: isDeepStrictEqual(marker.value, value) });
|
|
248
|
+
}
|
|
249
|
+
checks.push(...compareProjection(expected, actual).checks);
|
|
250
|
+
const targetVariants = actual?.variantsInfo?.variants;
|
|
251
|
+
const seen = new Set();
|
|
252
|
+
for (const v of variants) {
|
|
253
|
+
const matches = (targetVariants || []).filter(t => t?.id === v.variantId);
|
|
254
|
+
checks.push({ path: `variant:${v.variantId}`, matches: opaqueId(v.variantId) && !seen.has(v.variantId) && matches.length === 1 });
|
|
255
|
+
seen.add(v.variantId);
|
|
256
|
+
checks.push(...compareProjection(v.expected, matches[0]).checks);
|
|
257
|
+
}
|
|
258
|
+
return { verified: checks.every(c => c.matches), checks };
|
|
259
|
+
}
|
|
260
|
+
const CONTRACT_DIGEST = digest({ version: 1, contact: 'source-key/externalId+email/exact-values', product: 'source-marker/variant-id/exact-values' });
|
|
261
|
+
function receipt({ siteId, sourceKey, kind, expected, targetId, actual, marker, variants, operation, attempts = 1, dryRun = false }) {
|
|
262
|
+
const comparison = kind === 'contact' ? verifyContact(expected, actual, targetId) : verifyProduct(expected, actual, targetId, { marker, variants });
|
|
263
|
+
return { schemaVersion: 1, siteId, sourceKey, kind, targetId, expected, actual, marker, variants, operation, attempts, dryRun,
|
|
264
|
+
payloadDigest: digest({ expected, marker, variants }), contractDigest: CONTRACT_DIGEST,
|
|
265
|
+
...comparison, verified: !dryRun && Boolean(siteId && sourceKey && operation) && comparison.verified };
|
|
266
|
+
}
|
|
267
|
+
function validReceipt(r, context = {}) {
|
|
268
|
+
if (!r || r.schemaVersion !== 1 || !['contact', 'product'].includes(r.kind) || !r.verified || r.dryRun || r.contractDigest !== CONTRACT_DIGEST) return false;
|
|
269
|
+
if (!r.expected || r.payloadDigest !== digest({ expected: r.expected, marker: r.marker, variants: r.variants })) return false;
|
|
270
|
+
for (const key of ['siteId', 'sourceKey', 'targetId', 'payloadDigest', 'kind']) if (context[key] !== undefined && r[key] !== context[key]) return false;
|
|
271
|
+
try { return receipt(r).verified; } catch { return false; }
|
|
272
|
+
}
|
|
273
|
+
module.exports = { assertProjection, email, digest, compareProjection, contactIdentity, verifyContact, subscriptionExpected,
|
|
274
|
+
verifySubscriptionEvidence, verifyProduct, receipt, validReceipt, CONTRACT_DIGEST };
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: rp-destination
|
|
3
|
+
description: Resolves, adopts, or creates the one destination site (Headless, Wix Studio or Wix Harmony) for a migration.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# rp-destination
|
|
7
|
+
|
|
8
|
+
Use only when no authoritative destination is available or the destination contract
|
|
9
|
+
conflicts.
|
|
10
|
+
|
|
11
|
+
Precedence is the creation receipt `orchestration/destination.json`, then a non-empty
|
|
12
|
+
`config/wix.env` site id (an existing or legacy destination: adopt it, never ask for a type),
|
|
13
|
+
then one new site of the operator's explicitly chosen type. A conflict is a hard stop;
|
|
14
|
+
never retarget on a guess.
|
|
15
|
+
|
|
16
|
+
## New site: run the coordinator
|
|
17
|
+
|
|
18
|
+
For a new site, run the deterministic coordinator; do not compose creation requests yourself:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
node <skill>/scripts/wix-destination.js ensure --project-dir <projectDir>
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
It prints a JSON outcome and never prints credentials:
|
|
25
|
+
|
|
26
|
+
- `awaiting_site_type` — no `targetSiteType` is recorded. It raised the one required
|
|
27
|
+
site-type request (`headless`, `studio`, `harmony_store`, `harmony_bookings`,
|
|
28
|
+
`harmony_other`, or `harmony` = "not sure, start blank"). In chat, ask that combined
|
|
29
|
+
question once; in one-click, group it with the other missing intake; in `replatform`
|
|
30
|
+
runs, end the turn — the request is the question. Record a chat answer with
|
|
31
|
+
`orchestration-state.js decide --key targetSiteType --value <type> [--business-type
|
|
32
|
+
store|bookings|other]`; a Harmony answer without a business type records `unknown`. Never
|
|
33
|
+
ask a separate business-type question, never answer for the operator, and never turn a
|
|
34
|
+
generic "Editor" answer into Studio or Harmony. There is no default type, including in
|
|
35
|
+
one-click and backend-only runs.
|
|
36
|
+
- `awaiting_editor_website_decision` — `management_and_website` with Studio/Harmony: the
|
|
37
|
+
request explains that RePlatform has no automatic Editor website migration. The operator
|
|
38
|
+
chooses backend only (scope becomes `management`) or a separate Editor website handoff.
|
|
39
|
+
- `awaiting_account_confirmation` — before the first Studio/Harmony create, the request
|
|
40
|
+
names the account the Wix CLI is logged into and the site name. Relay it; never answer it
|
|
41
|
+
for the operator. `confirm_account` binds that account; `switched_account` shows the
|
|
42
|
+
account again after a login change. A login that differs from the confirmed account is
|
|
43
|
+
never used for a create.
|
|
44
|
+
- `verified` / `created` / `existing_destination` — report the dashboard URL (and, for an
|
|
45
|
+
Editor site, the verified editor URL) and return to the router.
|
|
46
|
+
- `failed_before_create`, `ambiguous`, `awaiting_recovery`, `blocked` — a durable recovery
|
|
47
|
+
request is pending (named by `recoveryRequestId`). Relay it; never retry around it.
|
|
48
|
+
|
|
49
|
+
When the run context already establishes the business type for a Harmony site, write it
|
|
50
|
+
before running the coordinator so the request collapses Harmony to one choice:
|
|
51
|
+
`orchestration/destination-brief.json` with `businessType` (`store`, `bookings`, `other`) and
|
|
52
|
+
`businessTypeEvidenceRef` (where the evidence came from). The type is context for the run; it
|
|
53
|
+
does not change how the site is created. Never invent details.
|
|
54
|
+
|
|
55
|
+
What the coordinator does:
|
|
56
|
+
|
|
57
|
+
- Holds `orchestration/destination.lock`, rechecks the receipt and `config/wix.env`, and
|
|
58
|
+
writes an attempt marker before any create. Studio and Harmony use their blank templates
|
|
59
|
+
through `POST /msm/v1/meta-site/create-from-template` with the Wix CLI account login.
|
|
60
|
+
Harmony's AI site generation runs on a private Wix service with no stability promise, so it
|
|
61
|
+
is not used for any business type. Headless delegates once to
|
|
62
|
+
`wix-headless-scaffold.js` (below).
|
|
63
|
+
- Saves the returned metasite id in the receipt, checks that the response's owner is the
|
|
64
|
+
confirmed login, then writes `WIX_SITE_ID` to `config/wix.env` (never over a different
|
|
65
|
+
value), mints a site-scoped Wix CLI credential, and verifies the editor (`WIX_STUDIO` /
|
|
66
|
+
`ODEDITOR`) and that the site is unpublished (published-URLs readback). Only a fresh
|
|
67
|
+
`unpublished` readback lets import continue: every rerun on a `verified` site repeats the
|
|
68
|
+
readback, and the router sends setup/import back here (`destination_publication_recheck`)
|
|
69
|
+
when the last readback is more than 10 minutes old.
|
|
70
|
+
- A Headless receipt is resumed, never re-delegated: a confirmed site is adopted, and any
|
|
71
|
+
`WIX_SCAFFOLD_STATUS` marker stays the wrapper's recovery.
|
|
72
|
+
- Never repeats a create whose outcome is unknown, never publishes,
|
|
73
|
+
unpublishes or deletes a site, and never falls back to another editor or to Headless.
|
|
74
|
+
|
|
75
|
+
Recovery requests and what each answer does (each answer triggers one bounded step):
|
|
76
|
+
|
|
77
|
+
| Request | Choice | Effect |
|
|
78
|
+
| --- | --- | --- |
|
|
79
|
+
| Pre-create rejection (access, site limit, template, name) | `retry_create` | one new creation attempt after the prerequisite is fixed |
|
|
80
|
+
| Uncertain creation (**Requires Import Operator**) | text: the metasite id, or `none-created: <evidence>` | adopt and verify that site, or one new attempt only with recorded evidence that nothing was created |
|
|
81
|
+
| Response owner missing or not the confirmed login (**Requires Import Operator**) | text: `owner-verified: <evidence>` | editor and publication verification of the kept site; any other reply asks again |
|
|
82
|
+
| Editor not verified | `recheck` | one new editor + publication readback; no create |
|
|
83
|
+
| Publication `unknown` | `recheck` | one new readback; the answer itself proves nothing |
|
|
84
|
+
| Publication `published` | `recheck_after_unpublish` | one new readback after a person unpublished the site in Wix |
|
|
85
|
+
|
|
86
|
+
Import Operator prompt for an uncertain creation, editor mismatch or a
|
|
87
|
+
`published`/`unknown` readback: "In the original migration workspace, reconcile the
|
|
88
|
+
destination creation attempt against the intended account, preserve the returned metasite ID,
|
|
89
|
+
rerun editor verification and the published-URLs
|
|
90
|
+
readback, and resume only after recording the resolved receipt. Do not create a replacement
|
|
91
|
+
site, and do not publish or unpublish it without an explicit human publication decision."
|
|
92
|
+
|
|
93
|
+
An Editor site is not a website build: never scaffold Headless frontend files for it, and
|
|
94
|
+
never hand it to `wix-headless-replatform`. Its website and publication stay outstanding for
|
|
95
|
+
the site owner/designer and the Cutover Operator (completion-report `operatorActions`).
|
|
96
|
+
|
|
97
|
+
## Headless
|
|
98
|
+
|
|
99
|
+
For Headless creation, the coordinator runs the wrapper once; the wrapper confirms the Wix
|
|
100
|
+
CLI is logged into the intended account, scaffolds inside the active migration project, and
|
|
101
|
+
persists the metasite id. Always scaffold with
|
|
102
|
+
`--site-template blank`, whatever the delivery mode or whether the migration carries a
|
|
103
|
+
catalog — Catalog V3 is guaranteed at provisioning regardless of template, so there is no longer a reason to start
|
|
104
|
+
from a non-blank template. Let `wix-headless-replatform` supply the actual page content;
|
|
105
|
+
do not skip this module just because there is no backend work. Do not create probe, test,
|
|
106
|
+
replacement, or second sites without the explicit recovery authority in the existing
|
|
107
|
+
destination contract.
|
|
108
|
+
|
|
109
|
+
Scaffolding (`wix-headless-scaffold.js`) publishes the site as part of creation — this is
|
|
110
|
+
the Wix CLI's own default; never add `--no-publish` back. A `management`-only migration's
|
|
111
|
+
entire deliverable is this published site running its unmodified template: "no
|
|
112
|
+
customer-facing website is built" means left un-customized, not left unpublished.
|
|
113
|
+
|
|
114
|
+
The script also patches the generated `astro.config.mjs`/`package.json` right after a
|
|
115
|
+
destination is confirmed, once, so a `website`-mode project's local dev server works
|
|
116
|
+
without manual fixes, on any client running it from a Wix Remote Machine: a Vite
|
|
117
|
+
`allowedHosts` wildcard + `host: true` (the remote machine's dynamic preview hostname and
|
|
118
|
+
its 127.0.0.1-only default otherwise break a local preview with a host-block or a 504),
|
|
119
|
+
and `predev`/`prebuild`/`prerelease` hooks that re-run `wix env pull` (the frontend's
|
|
120
|
+
`.env.local` — `WIX_CLIENT_ID` and friends — is gitignored and is wiped whenever the
|
|
121
|
+
remote machine restarts, so it must be re-derived, not assumed to persist). The Vite patch
|
|
122
|
+
is conservative: it skips (logging why) rather than touch a config shape it doesn't
|
|
123
|
+
recognize, so a template that already sets these deliberately wins. The hooks patch instead
|
|
124
|
+
composes `wix env pull` in front of whatever a hook already runs — idempotently, never
|
|
125
|
+
duplicated on a re-run — since an existing hook is almost always doing something unrelated
|
|
126
|
+
(e.g. codegen) and skipping it outright would silently leave that project without a working
|
|
127
|
+
preview.
|
|
128
|
+
|
|
129
|
+
After resolution, report the deterministic dashboard URL and return to the router. Source
|
|
130
|
+
credentials are never requested until this destination exists.
|
|
131
|
+
|
|
132
|
+
## Output
|
|
133
|
+
|
|
134
|
+
`config/wix.env`'s `WIX_SITE_ID` persisted, `orchestration/destination.json` for a new site
|
|
135
|
+
(choice, creation method, attempt, metasite id, verified editor and publication readback),
|
|
136
|
+
and the reported dashboard URL — or a durable request in `orchestration/user-actions/` that
|
|
137
|
+
names what is missing. This is what a dispatched run must produce.
|