@wix/agent-skills 1.15.1 → 1.16.1
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 -7
- package/package.json +1 -1
- package/skills/wix-app/SKILL.md +4 -1
- package/skills/wix-app/references/APP_TOOLS.md +134 -0
- package/skills/wix-app/references/CUSTOM_ELEMENT_WIDGET.md +1 -1
- package/skills/wix-app/references/DASHBOARD_PAGE.md +0 -10
- package/skills/wix-app/references/DATA_COLLECTION.md +1 -1
- package/skills/wix-app/references/EDITOR_REACT_COMPONENT.md +42 -8
- package/skills/wix-app/references/SERVICE_PLUGIN.md +12 -10
- package/skills/wix-app/references/app-tools/TOOLS.md +75 -0
- package/skills/wix-app/references/dashboard-page/DASHBOARD_API.md +2 -2
- package/skills/wix-app/references/editor-react-component/A11Y-REVIEW-REFERENCE.md +172 -0
- package/skills/wix-app/references/editor-react-component/A11Y-REVIEW.md +143 -0
- package/skills/wix-app/references/editor-react-component/ANIMATED-COMPONENTS.md +23 -2
- package/skills/wix-app/references/editor-react-component/BRANDED-COMPONENTS.md +29 -0
- package/skills/wix-app/references/editor-react-component/COMPONENT-API.md +1 -1
- package/skills/wix-app/references/editor-react-component/COMPONENT-CONFIGURATION.md +60 -0
- package/skills/wix-app/references/editor-react-component/CSS-GUIDELINES.md +27 -2
- package/skills/wix-app/references/editor-react-component/DESIGN-STATES.md +5 -3
- package/skills/wix-app/references/editor-react-component/DIRECTIONALITY.md +24 -7
- package/skills/wix-app/references/editor-react-component/PARTS.md +15 -2
- package/skills/wix-app/references/editor-react-component/REACT-GUIDELINES.md +2 -3
- package/skills/wix-app/references/editor-react-component/SITE-CONTEXT-HOOKS.md +187 -0
- package/skills/wix-app/references/service-plugin/BOOKINGS-STAFF-SORTING.md +13 -9
- package/skills/wix-app/references/service-plugin/DISCOUNT-TRIGGERS.md +4 -0
- package/skills/wix-app/references/service-plugin/GIFT-CARDS.md +4 -0
- package/skills/wix-app/references/service-plugin/PAYMENT-SETTINGS.md +3 -1
- package/skills/wix-app/references/service-plugin/SHIPPING-RATES.md +4 -0
- package/skills/wix-app/references/service-plugin/TOOLS_PROVIDER.md +54 -0
- package/skills/wix-app/references/stores/QUERY.md +32 -0
- package/skills/wix-app/scripts/scan-a11y-code.cjs +777 -0
- package/skills/wix-app/scripts/scan-a11y-eslint.cjs +201 -0
- package/skills/wix-docs/SKILL.md +35 -3
- package/skills/wix-headless/SKILL.md +3 -1
- package/skills/wix-headless/references/CAPABILITIES.md +16 -3
- package/skills/wix-headless/references/CONTENT.md +36 -0
- package/skills/wix-headless/references/DESIGN.md +54 -0
- package/skills/wix-headless/references/DISCOVERY.md +24 -0
- package/skills/wix-headless/references/IMAGE_GENERATION.md +10 -0
- package/skills/wix-headless/references/SDK_HANDOFF.md +1 -1
- package/skills/wix-headless/references/SEED.md +1 -1
- package/skills/wix-headless/references/inline-recipes/how-to-code-a-store.md +3 -2
- package/skills/wix-headless/references/inline-recipes/how-to-code-forms.md +560 -102
- package/skills/wix-headless/references/inline-recipes/setup-forms.md +210 -143
- package/skills/wix-headless/references/inline-recipes/setup-online-store.md +32 -23
- package/skills/wix-headless/references/managed/CONNECT.md +1 -1
- package/skills/wix-headless/references/managed/CREATE.md +14 -0
- package/skills/wix-headless/references/managed/DEPLOYMENT.md +25 -0
- package/skills/wix-manage/SKILL.md +130 -7
- package/skills/wix-manage/references/accessibility/scan-site-accessibility.md +98 -0
- package/skills/wix-manage/references/analytics/analytics-dashboard-navigation.md +40 -0
- package/skills/wix-manage/references/app-installation/app-installation-dashboard-navigation.md +28 -0
- package/skills/wix-manage/references/blog/blog-dashboard-navigation.md +56 -0
- package/skills/wix-manage/references/blog/how-to-create-blog-posts.md +31 -6
- package/skills/wix-manage/references/bookings/booking-service-policy-setup.md +3 -1
- package/skills/wix-manage/references/bookings/bookings-dashboard-navigation.md +63 -0
- package/skills/wix-manage/references/bookings/diagnose-availability-issues.md +10 -1
- package/skills/wix-manage/references/cms/cms-dashboard-navigation.md +44 -0
- package/skills/wix-manage/references/cms/cms-data-items-crud.md +31 -3
- package/skills/wix-manage/references/cms/cms-publishing-flow.md +287 -0
- package/skills/wix-manage/references/cms/cms-schema-management.md +27 -1
- package/skills/wix-manage/references/contacts/contacts-dashboard-navigation.md +46 -0
- package/skills/wix-manage/references/contacts/create-a-contact.md +82 -0
- package/skills/wix-manage/references/contacts/update-a-contact.md +119 -0
- package/skills/wix-manage/references/dashboard-navigation/dashboard-navigation.md +82 -0
- package/skills/wix-manage/references/dashboard-navigation/routes.json +1733 -0
- package/skills/wix-manage/references/domains/domains-dashboard-navigation.md +32 -0
- package/skills/wix-manage/references/ecommerce/ecom-pricing.md +4 -4
- package/skills/wix-manage/references/ecommerce/ecom-shipping.md +1 -1
- package/skills/wix-manage/references/ecommerce/gift-cards/ecom-gift-cards-goal-sell-gift-cards.md +338 -0
- package/skills/wix-manage/references/ecommerce/pricing-promotions/ecom-pricing-create-discount-rule.md +42 -78
- package/skills/wix-manage/references/ecommerce/pricing-promotions/ecom-pricing-flow-bundle-and-save.md +1 -1
- package/skills/wix-manage/references/ecommerce/pricing-promotions/ecom-pricing-flow-stock-mover.md +1 -1
- package/skills/wix-manage/references/ecommerce/pricing-promotions/ecom-pricing-flow-upsell-boost.md +1 -1
- package/skills/wix-manage/references/ecommerce/recommend-ecommerce-strategy.md +90 -92
- package/skills/wix-manage/references/events/create-wix-event.md +176 -0
- package/skills/wix-manage/references/events/manage-wix-events.md +174 -0
- package/skills/wix-manage/references/forms/forms-dashboard-navigation.md +44 -0
- package/skills/wix-manage/references/get-paid/get-paid-dashboard-navigation.md +52 -0
- package/skills/wix-manage/references/google-ads/billing-and-payment.md +80 -0
- package/skills/wix-manage/references/google-ads/create-performance-max-campaign.md +212 -0
- package/skills/wix-manage/references/google-ads/get-campaign-suggestions.md +110 -0
- package/skills/wix-manage/references/google-ads/google-ads-dashboard-navigation.md +25 -0
- package/skills/wix-manage/references/google-ads/install-and-create-account.md +155 -0
- package/skills/wix-manage/references/google-ads/manage-campaign-lifecycle.md +63 -0
- package/skills/wix-manage/references/google-ads/query-campaign-analytics.md +155 -0
- package/skills/wix-manage/references/marketing/marketing-dashboard-navigation.md +52 -0
- package/skills/wix-manage/references/pricing-plans/create-and-update-pricing-plans.md +99 -1
- package/skills/wix-manage/references/pricing-plans/pricing-plans-dashboard-navigation.md +45 -0
- package/skills/wix-manage/references/restaurants/restaurants-dashboard-navigation.md +68 -0
- package/skills/wix-manage/references/restaurants/wix-restaurants-setup.md +94 -125
- package/skills/wix-manage/references/site-properties/change-payment-currency-site-properties.md +48 -9
- package/skills/wix-manage/references/site-properties/site-properties-dashboard-navigation.md +31 -0
- package/skills/wix-manage/references/sites/create-headless-site.md +52 -0
- package/skills/wix-manage/references/sites/create-site-from-template.md +2 -25
- package/skills/wix-manage/references/sites/site-import.md +217 -192
- package/skills/wix-manage/references/sites/sites-dashboard-navigation.md +29 -0
- package/skills/wix-manage/references/stores/add-store-pages-to-site.md +17 -1
- package/skills/wix-manage/references/stores/find-products-query-and-search-catalog-v3.md +26 -8
- package/skills/wix-manage/references/stores/stores-dashboard-navigation.md +65 -0
- package/skills/wix-manage/references/stores/update-product-with-options.md +39 -7
- package/skills/wix-replatform/.publish-manifest.json +8 -0
- package/skills/wix-replatform/SKILL.md +693 -0
- package/skills/wix-replatform/lib/artifact-freshness.js +215 -0
- package/skills/wix-replatform/lib/completion-report.js +200 -0
- package/skills/wix-replatform/lib/config-env.js +59 -0
- package/skills/wix-replatform/lib/execution-manifest.js +185 -0
- package/skills/wix-replatform/lib/execution-state.js +173 -0
- package/skills/wix-replatform/lib/import-recovery.js +313 -0
- package/skills/wix-replatform/lib/local-state.js +642 -0
- package/skills/wix-replatform/lib/orchestration-preflight.js +143 -0
- package/skills/wix-replatform/lib/orchestration-router.js +122 -0
- package/skills/wix-replatform/lib/orchestration-state.js +455 -0
- package/skills/wix-replatform/lib/progress-log.js +224 -0
- package/skills/wix-replatform/lib/progress-log.sh +140 -0
- package/skills/wix-replatform/lib/url-preservation-state.js +391 -0
- package/skills/wix-replatform/resources/rp-discovery/SKILL.md +184 -0
- package/skills/wix-replatform/resources/rp-execute-import/SKILL.md +529 -0
- package/skills/wix-replatform/resources/rp-execute-setup/SKILL.md +316 -0
- package/skills/wix-replatform/resources/rp-execute-setup/scripts/mint-token.sh +64 -0
- package/skills/wix-replatform/resources/rp-import-codegen/SKILL.md +1114 -0
- package/skills/wix-replatform/resources/rp-mapper/SKILL.md +430 -0
- package/skills/wix-replatform/resources/rp-mapper/lib/mapping-resolve.js +217 -0
- package/skills/wix-replatform/resources/rp-mapper/scripts/resolve-mapping.js +148 -0
- package/skills/wix-replatform/resources/rp-mapper/wix-business-solutions-taxonomy.md +378 -0
- package/skills/wix-replatform/resources/rp-setup-discovery/SKILL.md +183 -0
- package/skills/wix-replatform/resources/rp-source-csv/SKILL.md +478 -0
- package/skills/wix-replatform/resources/rp-source-csv/lib/canonical-record.js +136 -0
- package/skills/wix-replatform/resources/rp-source-csv/lib/csv-fileset.js +0 -0
- package/skills/wix-replatform/resources/rp-source-csv/lib/csv-fingerprint.js +310 -0
- package/skills/wix-replatform/resources/rp-source-csv/lib/csv-layout.js +1081 -0
- package/skills/wix-replatform/resources/rp-source-csv/lib/csv-parse.js +618 -0
- package/skills/wix-replatform/resources/rp-source-csv/scripts/csv-discovery.js +949 -0
- package/skills/wix-replatform/resources/rp-source-csv/source-schema.example.json +196 -0
- package/skills/wix-replatform/resources/rp-source-csv/vendors/bigcommerce.json +66 -0
- package/skills/wix-replatform/resources/rp-source-csv/vendors/magento.json +60 -0
- package/skills/wix-replatform/resources/rp-source-csv/vendors/shopify.json +95 -0
- package/skills/wix-replatform/resources/rp-source-csv/vendors/woocommerce.json +82 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/SKILL.md +256 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/wp-http.js +249 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/lib/wp-route-classifier.js +444 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/scripts/wp-discovery.js +774 -0
- package/skills/wix-replatform/resources/rp-source-wordpress/source-schema.example.json +71 -0
- package/skills/wix-replatform/resources/rp-target-wix/SKILL.md +632 -0
- package/skills/wix-replatform/resources/rp-target-wix/SPEC-product-reviews-and-blog-authorship.md +330 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/README.md +21 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/blog/domain.json +19 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/blog/entities/category.json +37 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/blog/entities/comment.json +37 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/blog/entities/post.json +39 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/blog/entities/tag.json +35 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/cms/domain.json +14 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/cms/entities/collection.json +35 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/cms/entities/data-item.json +36 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/cms/entities/reference.json +35 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/crm/domain.json +14 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/crm/entities/contact.json +131 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/crm/entities/email-subscription.json +37 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/crm/entities/label.json +37 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/domain.json +21 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/entities/order-line-item.json +37 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/entities/order-refund.json +37 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/ecom/entities/order.json +97 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/index.json +528 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/media/domain.json +14 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/media/entities/media-file.json +38 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/media/entities/media-folder.json +37 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/members/domain.json +13 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/members/entities/badge.json +37 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/members/entities/member.json +53 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/schema.json +84 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/stores/domain.json +25 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/stores/entities/category.json +37 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/stores/entities/coupon.json +37 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/stores/entities/inventory-item.json +38 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/stores/entities/product-tag.json +37 -0
- package/skills/wix-replatform/resources/rp-target-wix/domains/stores/entities/product.json +90 -0
- package/skills/wix-replatform/resources/rp-target-wix/lib/audit-summary.js +64 -0
- package/skills/wix-replatform/resources/rp-target-wix/lib/contract-ledger.js +141 -0
- package/skills/wix-replatform/resources/rp-target-wix/lib/domain-knowledge.js +384 -0
- package/skills/wix-replatform/resources/rp-target-wix/lib/ndjson.js +260 -0
- package/skills/wix-replatform/resources/rp-target-wix/lib/stores-verification.js +238 -0
- package/skills/wix-replatform/resources/rp-target-wix/lib/wix-build.js +237 -0
- package/skills/wix-replatform/resources/rp-target-wix/lib/wix-target-spec.js +238 -0
- package/skills/wix-replatform/resources/rp-target-wix/lib/wix-writers.js +2219 -0
- package/skills/wix-replatform/resources/rp-target-wix/scripts/domain-knowledge-validate.js +31 -0
- package/skills/wix-replatform/resources/rp-target-wix/scripts/domain-knowledge.js +100 -0
- package/skills/wix-replatform/resources/rp-target-wix/scripts/verify-stores.js +107 -0
- package/skills/wix-replatform/resources/rp-telemetry/SKILL.md +344 -0
- package/skills/wix-replatform/resources/rp-telemetry/lib/bi-sink.js +250 -0
- package/skills/wix-replatform/resources/rp-telemetry/lib/telemetry-recorder.js +1927 -0
- package/skills/wix-replatform/resources/rp-telemetry/scripts/meter-from-audit.js +83 -0
- package/skills/wix-replatform/resources/rp-telemetry/scripts/rp-telemetry.js +141 -0
- package/skills/wix-replatform/scripts/artifact-freshness.js +76 -0
- package/skills/wix-replatform/scripts/execution-manifest-validate.js +43 -0
- package/skills/wix-replatform/scripts/execution-state-prepare.js +128 -0
- package/skills/wix-replatform/scripts/orchestration-preflight.js +48 -0
- package/skills/wix-replatform/scripts/orchestration-route.js +46 -0
- package/skills/wix-replatform/scripts/orchestration-state.js +245 -0
- package/skills/wix-vibe-headless/SKILL.md +49 -25
- package/skills/wix-vibe-headless/install/deploy.cjs +156 -0
- package/skills/wix-vibe-headless/install/pin-agents-md.cjs +34 -0
- package/skills/wix-vibe-headless/platforms/README.md +8 -4
- package/skills/wix-vibe-headless/platforms/base44.md +111 -101
- package/skills/wix-vibe-headless/platforms/generic.md +99 -64
- package/skills/wix-vibe-headless/references/blog/INSTRUCTIONS.md +226 -119
- package/skills/wix-vibe-headless/references/blog/app/components/PostCard.jsx +43 -0
- package/skills/wix-vibe-headless/references/blog/app/components/PostChips.jsx +25 -0
- package/skills/wix-vibe-headless/references/blog/app/components/PostGrid.jsx +15 -0
- package/skills/wix-vibe-headless/references/blog/app/context/TaxonomyContext.jsx +35 -0
- package/skills/wix-vibe-headless/references/blog/app/hooks/usePostDetail.js +38 -0
- package/skills/wix-vibe-headless/references/blog/app/pages/Blog.jsx +40 -0
- package/skills/wix-vibe-headless/references/blog/app/pages/CategoryPage.jsx +54 -0
- package/skills/wix-vibe-headless/references/blog/app/pages/PostDetail.jsx +65 -0
- package/skills/wix-vibe-headless/references/blog/app/pages/TagPage.jsx +50 -0
- package/skills/wix-vibe-headless/references/blog/seed/SEED.md +103 -0
- package/skills/wix-vibe-headless/references/blog/seed/seed-blog.js +270 -0
- package/skills/wix-vibe-headless/references/bookings/INSTRUCTIONS.md +256 -149
- package/skills/wix-vibe-headless/references/bookings/app/components/BookingForm.jsx +65 -0
- package/skills/wix-vibe-headless/references/bookings/app/components/ServiceCard.jsx +47 -0
- package/skills/wix-vibe-headless/references/bookings/app/components/ServiceGrid.jsx +13 -0
- package/skills/wix-vibe-headless/references/bookings/app/components/SlotPicker.jsx +126 -0
- package/skills/wix-vibe-headless/references/bookings/app/hooks/useServiceDetail.js +108 -0
- package/skills/wix-vibe-headless/references/bookings/app/hooks/useServices.js +58 -0
- package/skills/wix-vibe-headless/references/bookings/app/lib/serviceFacts.js +95 -0
- package/skills/wix-vibe-headless/references/bookings/app/pages/ServiceDetail.jsx +94 -0
- package/skills/wix-vibe-headless/references/bookings/app/pages/Services.jsx +89 -0
- package/skills/wix-vibe-headless/references/bookings/{wix-bookings-checkout.js → app/rest/wix-bookings-checkout.js} +1 -1
- package/skills/wix-vibe-headless/references/bookings/{wix-bookings-services.js → app/rest/wix-bookings-services.js} +87 -11
- package/skills/wix-vibe-headless/references/bookings/seed/SEED.md +117 -0
- package/skills/wix-vibe-headless/references/bookings/seed/seed-bookings.js +333 -0
- package/skills/wix-vibe-headless/references/cms/INSTRUCTIONS.md +168 -147
- package/skills/wix-vibe-headless/references/cms/app/collection.config.js +31 -0
- package/skills/wix-vibe-headless/references/cms/app/lib/wixImage.js +18 -0
- package/skills/wix-vibe-headless/references/cms/{wix-cms.js → app/rest/wix-cms.js} +47 -2
- package/skills/wix-vibe-headless/references/cms/seed/SEED.md +145 -0
- package/skills/wix-vibe-headless/references/events/INSTRUCTIONS.md +223 -131
- package/skills/wix-vibe-headless/references/events/app/components/CategoryFilter.jsx +23 -0
- package/skills/wix-vibe-headless/references/events/app/components/EventCard.jsx +43 -0
- package/skills/wix-vibe-headless/references/events/app/components/EventGrid.jsx +13 -0
- package/skills/wix-vibe-headless/references/events/app/components/EventRegistration.jsx +29 -0
- package/skills/wix-vibe-headless/references/events/app/components/RsvpForm.jsx +57 -0
- package/skills/wix-vibe-headless/references/events/app/components/TicketPicker.jsx +78 -0
- package/skills/wix-vibe-headless/references/events/app/hooks/useEventDetail.js +27 -0
- package/skills/wix-vibe-headless/references/events/app/hooks/useEventsList.js +54 -0
- package/skills/wix-vibe-headless/references/events/app/hooks/useRsvpForm.js +40 -0
- package/skills/wix-vibe-headless/references/events/app/hooks/useTicketing.js +81 -0
- package/skills/wix-vibe-headless/references/events/app/pages/EventDetail.jsx +48 -0
- package/skills/wix-vibe-headless/references/events/app/pages/Events.jsx +36 -0
- package/skills/wix-vibe-headless/references/events/{wix-events-browse.js → app/rest/wix-events-browse.js} +1 -1
- package/skills/wix-vibe-headless/references/events/seed/SEED.md +107 -0
- package/skills/wix-vibe-headless/references/events/seed/seed-events.js +251 -0
- package/skills/wix-vibe-headless/references/members/INSTRUCTIONS.md +272 -188
- package/skills/wix-vibe-headless/references/members/app/components/LoginForm.jsx +101 -0
- package/skills/wix-vibe-headless/references/members/app/components/MemberMenu.jsx +33 -0
- package/skills/wix-vibe-headless/references/members/app/components/RequireAuth.jsx +21 -0
- package/skills/wix-vibe-headless/references/members/app/components/SocialButtons.jsx +29 -0
- package/skills/wix-vibe-headless/references/members/app/context/MemberContext.jsx +54 -0
- package/skills/wix-vibe-headless/references/members/app/hooks/useLoginForm.js +77 -0
- package/skills/wix-vibe-headless/references/members/app/pages/Account.jsx +36 -0
- package/skills/wix-vibe-headless/references/members/app/pages/Callback.jsx +32 -0
- package/skills/wix-vibe-headless/references/members/app/pages/Login.jsx +35 -0
- package/skills/wix-vibe-headless/references/members/{wix-members-auth.js → app/rest/wix-members-auth.js} +6 -3
- package/skills/wix-vibe-headless/references/members/install/Register.jsx +22 -0
- package/skills/wix-vibe-headless/references/members/seed/SEED.md +22 -0
- package/skills/wix-vibe-headless/references/portfolio/INSTRUCTIONS.md +229 -104
- package/skills/wix-vibe-headless/references/portfolio/app/components/CollectionCard.jsx +31 -0
- package/skills/wix-vibe-headless/references/portfolio/app/components/CollectionGrid.jsx +15 -0
- package/skills/wix-vibe-headless/references/portfolio/app/components/ProjectCard.jsx +39 -0
- package/skills/wix-vibe-headless/references/portfolio/app/components/ProjectGrid.jsx +15 -0
- package/skills/wix-vibe-headless/references/portfolio/app/components/ProjectMedia.jsx +29 -0
- package/skills/wix-vibe-headless/references/portfolio/app/hooks/useCollectionProjects.js +35 -0
- package/skills/wix-vibe-headless/references/portfolio/app/hooks/usePortfolioGallery.js +27 -0
- package/skills/wix-vibe-headless/references/portfolio/app/hooks/useProjectDetail.js +25 -0
- package/skills/wix-vibe-headless/references/portfolio/app/pages/CollectionPage.jsx +39 -0
- package/skills/wix-vibe-headless/references/portfolio/app/pages/Portfolio.jsx +27 -0
- package/skills/wix-vibe-headless/references/portfolio/app/pages/ProjectDetail.jsx +60 -0
- package/skills/wix-vibe-headless/references/portfolio/seed/SEED.md +94 -0
- package/skills/wix-vibe-headless/references/portfolio/seed/seed-portfolio.js +236 -0
- package/skills/wix-vibe-headless/references/pricing-plans/INSTRUCTIONS.md +236 -117
- package/skills/wix-vibe-headless/references/pricing-plans/app/components/OrderCard.jsx +35 -0
- package/skills/wix-vibe-headless/references/pricing-plans/app/components/PlanCard.jsx +48 -0
- package/skills/wix-vibe-headless/references/pricing-plans/app/components/PlanGrid.jsx +16 -0
- package/skills/wix-vibe-headless/references/pricing-plans/app/components/PlanPrice.jsx +35 -0
- package/skills/wix-vibe-headless/references/pricing-plans/app/hooks/useMyPlans.js +25 -0
- package/skills/wix-vibe-headless/references/pricing-plans/app/hooks/usePlanDetail.js +28 -0
- package/skills/wix-vibe-headless/references/pricing-plans/app/hooks/usePlans.js +30 -0
- package/skills/wix-vibe-headless/references/pricing-plans/app/pages/MyPlans.jsx +30 -0
- package/skills/wix-vibe-headless/references/pricing-plans/app/pages/PlanDetail.jsx +53 -0
- package/skills/wix-vibe-headless/references/pricing-plans/app/pages/Plans.jsx +28 -0
- package/skills/wix-vibe-headless/references/pricing-plans/seed/SEED.md +86 -0
- package/skills/wix-vibe-headless/references/pricing-plans/seed/seed-pricing-plans.js +251 -0
- package/skills/wix-vibe-headless/references/restaurants/INSTRUCTIONS.md +244 -124
- package/skills/wix-vibe-headless/references/restaurants/app/components/ItemDialog.jsx +81 -0
- package/skills/wix-vibe-headless/references/restaurants/app/components/MenuItemCard.jsx +71 -0
- package/skills/wix-vibe-headless/references/restaurants/app/components/MenuList.jsx +43 -0
- package/skills/wix-vibe-headless/references/restaurants/app/components/OrderCartButton.jsx +21 -0
- package/skills/wix-vibe-headless/references/restaurants/app/components/OrderCartDrawer.jsx +60 -0
- package/skills/wix-vibe-headless/references/restaurants/app/context/OrderCartContext.jsx +63 -0
- package/skills/wix-vibe-headless/references/restaurants/app/hooks/useItemOrder.js +32 -0
- package/skills/wix-vibe-headless/references/restaurants/app/hooks/useReservation.js +73 -0
- package/skills/wix-vibe-headless/references/restaurants/app/pages/Menu.jsx +28 -0
- package/skills/wix-vibe-headless/references/restaurants/app/pages/Reservations.jsx +102 -0
- package/skills/wix-vibe-headless/references/restaurants/seed/SEED.md +180 -0
- package/skills/wix-vibe-headless/references/restaurants/seed/seed-restaurants.js +452 -0
- package/skills/wix-vibe-headless/references/shared/app/components/WixManageBanner.jsx +56 -0
- package/skills/wix-vibe-headless/references/shared/{wix-client.js → app/rest/wix-client.js} +6 -8
- package/skills/wix-vibe-headless/references/shared/app/rest/wix-config.js +8 -0
- package/skills/wix-vibe-headless/references/storefront/INSTRUCTIONS.md +259 -157
- package/skills/wix-vibe-headless/references/storefront/app/components/CartButton.jsx +20 -0
- package/skills/wix-vibe-headless/references/storefront/app/components/CartDrawer.jsx +150 -0
- package/skills/wix-vibe-headless/references/storefront/app/components/ProductCard.jsx +167 -0
- package/skills/wix-vibe-headless/references/storefront/app/components/ProductGallery.jsx +51 -0
- package/skills/wix-vibe-headless/references/storefront/app/components/ProductGrid.jsx +54 -0
- package/skills/wix-vibe-headless/references/storefront/app/components/VariantPicker.jsx +119 -0
- package/skills/wix-vibe-headless/references/storefront/app/context/CartContext.jsx +71 -0
- package/skills/wix-vibe-headless/references/storefront/app/hooks/useProductDetail.js +109 -0
- package/skills/wix-vibe-headless/references/storefront/app/hooks/useShop.js +98 -0
- package/skills/wix-vibe-headless/references/storefront/app/lib/storeImage.js +27 -0
- package/skills/wix-vibe-headless/references/storefront/app/pages/ProductDetail.jsx +139 -0
- package/skills/wix-vibe-headless/references/storefront/app/pages/Shop.jsx +75 -0
- package/skills/wix-vibe-headless/references/storefront/{wix-store-cart.js → app/rest/wix-store-cart.js} +1 -1
- package/skills/wix-vibe-headless/references/storefront/{wix-store-catalog.js → app/rest/wix-store-catalog.js} +20 -1
- package/skills/wix-vibe-headless/references/storefront/seed/SEED.md +111 -0
- package/skills/wix-vibe-headless/references/storefront/seed/seed-store.js +338 -0
- /package/skills/wix-vibe-headless/references/blog/{wix-blog.js → app/rest/wix-blog.js} +0 -0
- /package/skills/wix-vibe-headless/references/events/{wix-events-registration.js → app/rest/wix-events-registration.js} +0 -0
- /package/skills/wix-vibe-headless/references/portfolio/{wix-portfolio.js → app/rest/wix-portfolio.js} +0 -0
- /package/skills/wix-vibe-headless/references/pricing-plans/{wix-pricing-plans.js → app/rest/wix-pricing-plans.js} +0 -0
- /package/skills/wix-vibe-headless/references/restaurants/{wix-restaurants-menu.js → app/rest/wix-restaurants-menu.js} +0 -0
- /package/skills/wix-vibe-headless/references/restaurants/{wix-restaurants-ordering.js → app/rest/wix-restaurants-ordering.js} +0 -0
- /package/skills/wix-vibe-headless/references/restaurants/{wix-restaurants-reservations.js → app/rest/wix-restaurants-reservations.js} +0 -0
|
@@ -0,0 +1,430 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: rp-mapper
|
|
3
|
+
description: >-
|
|
4
|
+
Maps discovered source entities and fields to Wix targets and documents lossiness. Use
|
|
5
|
+
when creating machine-readable mapping artifacts and review markdown after discovery.
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# rp-mapper
|
|
9
|
+
|
|
10
|
+
Create a mapping plan from the discovered source schema into Wix entities and Wix data structures.
|
|
11
|
+
|
|
12
|
+
## Purpose
|
|
13
|
+
|
|
14
|
+
This skill translates source entities and fields into Wix targets. It should define what each source record becomes in Wix, how fields transform, and where custom schemas or extended fields are required.
|
|
15
|
+
|
|
16
|
+
## Required inputs
|
|
17
|
+
|
|
18
|
+
- `migrations/<project>/source-schema.json`
|
|
19
|
+
- `migrations/<project>/source-profile.md` when available
|
|
20
|
+
- `migrations/<project>/orchestration/checkpoints.json`
|
|
21
|
+
- `migrations/<project>/orchestration/decisions.json`
|
|
22
|
+
- any existing Wix target-model constraints supplied by the user
|
|
23
|
+
|
|
24
|
+
Read **only** these canonical artifacts by default. Do not ingest the raw discovery dump
|
|
25
|
+
(`migrations/<project>/data/...`) wholesale — it is platform-specific and large. Instead, when an
|
|
26
|
+
entity's mapping is ambiguous, follow that entity's `rawFile` pointer in `source-schema.json` to open
|
|
27
|
+
just that one raw file for verification. Skip entities whose `inUse` is `false` (advertised by the
|
|
28
|
+
source but holding no records).
|
|
29
|
+
|
|
30
|
+
### Adapter-supplied hints in `sourceMeta`
|
|
31
|
+
|
|
32
|
+
A source adapter may pre-fill part of the mapping when it recognizes the source format. Two
|
|
33
|
+
`sourceMeta` keys carry that, and both are optional — a schema without them maps exactly as
|
|
34
|
+
before:
|
|
35
|
+
|
|
36
|
+
- **`sourceMeta.mappingHints[]`** (`{ column, wixTarget, matchedAlias }`) — an **advisory**
|
|
37
|
+
pre-fill, e.g. from a recognized vendor's CSV profile. Seed the corresponding
|
|
38
|
+
`fieldMappings[]` entries from it so the user reviews and corrects instead of authoring from
|
|
39
|
+
scratch, and record `decisionProvenance: source_platform_rule`. It is never authoritative:
|
|
40
|
+
the source's own field list still governs, and every hint still passes through the mapping
|
|
41
|
+
review checkpoint.
|
|
42
|
+
- **`sourceMeta.drift.unmappedColumns[]`** — real source columns the adapter's profile did not
|
|
43
|
+
recognize. Each one must be explicitly mapped or explicitly recorded as skipped; leaving
|
|
44
|
+
them unaddressed is how a stale profile turns into silently dropped data.
|
|
45
|
+
|
|
46
|
+
In addition to the project artifacts above, consult the relevant bundled adapter resource
|
|
47
|
+
when the mapping depends on platform behavior that should not be guessed:
|
|
48
|
+
|
|
49
|
+
- source-side read/entity semantics from `replatform/resources/rp-source-<platform>/SKILL.md`
|
|
50
|
+
- Wix target constraints and domain behavior from `replatform/resources/rp-target-wix/SKILL.md`
|
|
51
|
+
- Wix target entity suitability from
|
|
52
|
+
`replatform/resources/rp-target-wix/scripts/domain-knowledge.js`
|
|
53
|
+
|
|
54
|
+
Treat those adapter resources as the authoritative home for platform knowledge. Do not
|
|
55
|
+
copy source/Wix behavioral rules into the mapping plan as if they originated there; cite
|
|
56
|
+
and apply them there.
|
|
57
|
+
|
|
58
|
+
## Deterministic first — resolve before you reason
|
|
59
|
+
|
|
60
|
+
**Do not author field mappings by hand when a vendor overlay already knows them.** Run the
|
|
61
|
+
deterministic resolver first and let it do the mechanical join; your judgement is needed only for
|
|
62
|
+
what it cannot decide.
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
node scripts/resolve-mapping.js --fileset <migrations-root>/<project>/data/csv-discovery/fileset.json \
|
|
66
|
+
--out <migrations-root>/<project>/mapping
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
It joins three inputs that are all already data — the header set discovery actually observed, the
|
|
70
|
+
vendor overlay's `columnMap`, and `rp-target-wix`'s `lib/wix-target-spec.js` — and writes
|
|
71
|
+
`mapping/mapping-resolution.json` plus `mapping/mapping-residue.json`. Exit code `2` means blocked:
|
|
72
|
+
a required Wix input is unfilled, or an overlay names a canonical field that does not exist.
|
|
73
|
+
|
|
74
|
+
What it decides, so you don't:
|
|
75
|
+
|
|
76
|
+
- **which column feeds which canonical field**, and via which alias (recorded for review)
|
|
77
|
+
- **which columns nothing claims** → `residue.unmappedColumns`
|
|
78
|
+
- **which mapped columns have no Wix home**, with the declared reason → `residue.unsupportedTargets`
|
|
79
|
+
- **which required Wix inputs nothing feeds** → `residue.unfilledRequired` (a blocker)
|
|
80
|
+
- **which overlay entries reference an absent column** → `overlayDrift` (the profile is stale)
|
|
81
|
+
- **which entities arrive by derivation** rather than by a column → `derivedEntities`, including
|
|
82
|
+
`requiresFaithfulnessLedgerEntry` when the source taxonomy is hierarchical
|
|
83
|
+
|
|
84
|
+
**Your job is `residue`, and only `residue`.** Each entry needs an explicit decision — map it to a
|
|
85
|
+
canonical field, or record it as intentionally skipped with a reason. Leaving an entry undecided is
|
|
86
|
+
how a stale overlay turns into silently dropped data.
|
|
87
|
+
|
|
88
|
+
Two rules keep this honest:
|
|
89
|
+
|
|
90
|
+
- **The header row read at discovery time is authoritative, not the overlay.** An overlay can only
|
|
91
|
+
claim columns that actually exist; a column it does not know is surfaced, never dropped.
|
|
92
|
+
- **When you resolve a residue entry that the overlay *should* have known, fix the overlay** —
|
|
93
|
+
`rp-source-csv/vendors/<vendor>.json` plus a header fixture in `tests/fixtures/csv/headers/`. That
|
|
94
|
+
is a data edit with no skill-logic change, and it means the next run resolves it deterministically
|
|
95
|
+
instead of asking a model again. A mapping decision made twice is a missing overlay entry.
|
|
96
|
+
|
|
97
|
+
### Do not regenerate the payload builder
|
|
98
|
+
|
|
99
|
+
`rp-target-wix/lib/wix-build.js` turns a canonical record into a Wix Stores V3 create body
|
|
100
|
+
deterministically, and `lib/wix-target-spec.js` declares every field, constant and trap it relies
|
|
101
|
+
on. This layer is **vendor-independent** — Shopify, WooCommerce, Magento and BigCommerce all
|
|
102
|
+
converge on it — so codegen must **vendor and call it**, exactly as the reader vendors `csv-parse.js`.
|
|
103
|
+
Do not emit a per-project `to-wix.js` re-deriving money objects, slug sanitization, choice-by-name
|
|
104
|
+
variant references, or the empty `physicalProperties` trap. Those are settled, tested, and
|
|
105
|
+
regression-locked against 220 payloads from two live-verified imports
|
|
106
|
+
(`tests/mapping/wix-build-oracle-test.js`).
|
|
107
|
+
|
|
108
|
+
The spec also settles the one price decision that recurs on every vendor: see
|
|
109
|
+
`STORES_V3_TARGET.priceResolution`. A (regular, sale) pair is **resolved** into Wix's
|
|
110
|
+
`actualPrice`/`compareAtPrice`, not mapped field-for-field — getting it backwards silently
|
|
111
|
+
overcharges every discounted product.
|
|
112
|
+
|
|
113
|
+
## Workflow
|
|
114
|
+
|
|
115
|
+
1. Read the source discovery artifacts.
|
|
116
|
+
2. **Run the deterministic resolver** (above) and read its residue.
|
|
117
|
+
3. Identify the target Wix entities for each source entity using the domain knowledge
|
|
118
|
+
reader first. Start from `sourceMeta.candidateTargetRefs[]` when discovery supplied it;
|
|
119
|
+
otherwise run `domain-knowledge.js resolve-source`; use semantic reasoning only when no
|
|
120
|
+
candidate exists and record `unverified` confidence.
|
|
121
|
+
4. Decide the resolver residue only, then define any remaining transformations and defaults.
|
|
122
|
+
5. Mark gaps where native Wix entities are insufficient — the resolver's `unsupportedTargets`
|
|
123
|
+
already names them with reasons; carry those into the faithfulness ledger rather than restating.
|
|
124
|
+
6. Identify requirements for custom collections, extended fields, references, media handling, and rich content normalization.
|
|
125
|
+
7. Save the mapping plan.
|
|
126
|
+
8. Write a concise user-review summary after the plan is complete.
|
|
127
|
+
9. Pause for a mapping review checkpoint before downstream setup/codegen work begins.
|
|
128
|
+
|
|
129
|
+
## Artifacts to create or update
|
|
130
|
+
|
|
131
|
+
- `migrations/<project>/mapping/run.json`
|
|
132
|
+
- `migrations/<project>/mapping/mapping-plan.json`
|
|
133
|
+
- `migrations/<project>/mapping/entity-decisions/<entity>.json`
|
|
134
|
+
- `migrations/<project>/mapping/llm-handoff.json`
|
|
135
|
+
- `migrations/<project>/mapping/review/mapping-gaps.json`
|
|
136
|
+
- `migrations/<project>/mapping/review/mapping-plan.md`
|
|
137
|
+
- `migrations/<project>/mapping/review/mapping-summary.md`
|
|
138
|
+
- `migrations/<project>/orchestration/checkpoints.json`
|
|
139
|
+
- `migrations/<project>/orchestration/approvals.json`
|
|
140
|
+
|
|
141
|
+
## Minimum contents of the mapping plan
|
|
142
|
+
|
|
143
|
+
Include for each source entity:
|
|
144
|
+
|
|
145
|
+
- source semantics in this project, especially when the entity name is generic
|
|
146
|
+
(`comment`, `item`, `entry`, `record`, `media`, `user`, etc.). State what the entity
|
|
147
|
+
actually contains here, based on the discovered data, not just the route name.
|
|
148
|
+
- target Wix entity or collection
|
|
149
|
+
- selected `targetRef`, `targetDomain`, `targetEntity`, `targetClassification`,
|
|
150
|
+
`importReliability`, `preferredWrite`, and `knowledgeEvidence` when the decision uses a
|
|
151
|
+
bundled domain entity record
|
|
152
|
+
- primary key and deduplication strategy
|
|
153
|
+
- field mapping table
|
|
154
|
+
- transformation rules
|
|
155
|
+
- validation rules
|
|
156
|
+
- URL preservation policy for public routed entities
|
|
157
|
+
- unresolved questions
|
|
158
|
+
- setup implications for Wix-side configuration
|
|
159
|
+
- media policy when the entity carries media: whether only referenced media is in scope,
|
|
160
|
+
whether the target accepts external URLs directly, and whether media must exist in Wix
|
|
161
|
+
before create/update
|
|
162
|
+
- `safeModeReplacements[]` when safe mode is enabled, listing every mapped email or phone
|
|
163
|
+
field that enters an outbound Wix payload. Write the same array in both
|
|
164
|
+
`mapping/mapping-plan.json` for the entity decision and
|
|
165
|
+
`mapping/entity-decisions/<entity>.json`.
|
|
166
|
+
- a human-visible safe-mode note in the review markdown whenever any entity has
|
|
167
|
+
`safeModeReplacements[]`, so email/phone replacement coverage is visible without opening
|
|
168
|
+
the JSON artifacts
|
|
169
|
+
|
|
170
|
+
When a source entity is generic or overloaded, the mapping plan must name the concrete
|
|
171
|
+
subtypes or usage contexts it observed. Examples:
|
|
172
|
+
|
|
173
|
+
- `comment`: blog post comments, product reviews, page comments
|
|
174
|
+
- `item`: order line items, catalog items, CMS rows
|
|
175
|
+
- `media`: blog hero images, product gallery assets, downloadable files
|
|
176
|
+
|
|
177
|
+
Do not leave a generic entity label unexplained if the discovered data shows multiple
|
|
178
|
+
real-world meanings.
|
|
179
|
+
|
|
180
|
+
## Safe-mode contact replacement metadata
|
|
181
|
+
|
|
182
|
+
Safe mode is enabled by default through `config/wix.env` unless the user explicitly sets
|
|
183
|
+
`SAFE_MODE=false` before mapping. When enabled, mapping artifacts must emit semantic
|
|
184
|
+
contact-channel metadata so generated imports can replace outbound email and phone values
|
|
185
|
+
through deterministic shared writer code.
|
|
186
|
+
|
|
187
|
+
For every mapped entity, mark fields for safe-mode replacement when source evidence,
|
|
188
|
+
target-Wix domain knowledge, target field semantics, user-directed mappings, CMS/custom
|
|
189
|
+
fields, extended fields, form submissions, metadata, or plugin fields indicate an email or
|
|
190
|
+
phone contact channel.
|
|
191
|
+
|
|
192
|
+
Each `safeModeReplacements[]` entry must include:
|
|
193
|
+
|
|
194
|
+
```json
|
|
195
|
+
{
|
|
196
|
+
"kind": "email",
|
|
197
|
+
"sourcePath": "billing.email",
|
|
198
|
+
"targetPath": "billingInfo.email",
|
|
199
|
+
"required": true,
|
|
200
|
+
"reason": "source and target are email fields"
|
|
201
|
+
}
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
`targetPath` is relative to the Wix-shaped object or request body defined by the mapping
|
|
205
|
+
decision. Use the shared safe-mode path grammar: object fields (`billingInfo.email`,
|
|
206
|
+
`contact.email.email`) and array wildcards (`lineItems[].buyerInfo.email`,
|
|
207
|
+
`contact.additionalEmails[].email`). When the same source value is copied to multiple
|
|
208
|
+
Wix fields, list each target path.
|
|
209
|
+
|
|
210
|
+
Load target-side hints from selected `rp-target-wix` entity records'
|
|
211
|
+
`safeModeContactFields[]` and merge them with source-side evidence and user mapping
|
|
212
|
+
decisions. If `SAFE_MODE=false` before mapping, do not require this metadata for execution.
|
|
213
|
+
|
|
214
|
+
This metadata must be surfaced in **both** machine and human mapping artifacts:
|
|
215
|
+
|
|
216
|
+
- write `safeModeReplacements[]` into `mapping/mapping-plan.json`
|
|
217
|
+
- write the same `safeModeReplacements[]` into `mapping/entity-decisions/<entity>.json`
|
|
218
|
+
- render a per-entity safe-mode line in `mapping/review/mapping-plan.md`
|
|
219
|
+
- when any replacements exist, include a short `Safe mode replacements` section in
|
|
220
|
+
`mapping/review/mapping-summary.md` listing the affected entities and the mapped
|
|
221
|
+
email/phone paths
|
|
222
|
+
|
|
223
|
+
Do not leave safe-mode contact replacement coverage implicit in field tables or only in
|
|
224
|
+
JSON. A reviewer should be able to confirm from the review markdown which outbound
|
|
225
|
+
email/phone fields will be replaced in safe mode.
|
|
226
|
+
|
|
227
|
+
## Identity and deduplication rules
|
|
228
|
+
|
|
229
|
+
Be explicit about the difference between a **source ID** and a **Wix target ID**.
|
|
230
|
+
|
|
231
|
+
- Preserve the **source ID** in the migration artifacts, generated code, local crosswalk
|
|
232
|
+
state, and any optional CMS mirror collections needed for site-local traceability.
|
|
233
|
+
- Do **not** assume native Wix entity IDs can be client-assigned or preserved. For most
|
|
234
|
+
Wix APIs, the target ID is server-assigned.
|
|
235
|
+
- When a target is a native Wix entity whose ID cannot be controlled by the client,
|
|
236
|
+
the mapping plan must define a **local crosswalk strategy**:
|
|
237
|
+
`crosswalkAuthority: "local"`, a per-entity `crosswalkStrategy`, and a
|
|
238
|
+
`reconciliationStrategy` used for dedupe, resume, and relationship resolution.
|
|
239
|
+
- CMS `ImportCrosswalk` is optional. Use `cmsMirror: "none" | "download" | "upload" |
|
|
240
|
+
"download-and-upload"` to request it explicitly. It is a copy/seed adapter for
|
|
241
|
+
existing-site or handoff reference flows, not the required resume authority.
|
|
242
|
+
- Only say an ID is "preserved" when the destination actually has a client-controlled
|
|
243
|
+
field that stores the source ID. Otherwise say the source ID is **tracked** or
|
|
244
|
+
**crosswalked**.
|
|
245
|
+
|
|
246
|
+
## URL preservation policy
|
|
247
|
+
|
|
248
|
+
For every in-scope source entity that appears on the public website, include an explicit
|
|
249
|
+
`urlPolicy` in `mapping/mapping-plan.json` and the relevant
|
|
250
|
+
`mapping/entity-decisions/<entity>.json` artifact.
|
|
251
|
+
|
|
252
|
+
Minimum `urlPolicy` fields:
|
|
253
|
+
|
|
254
|
+
- `public`: `true` for public routed entities; `false` for entities intentionally outside
|
|
255
|
+
URL preservation.
|
|
256
|
+
- `sourceBasePath`: the observed source base path, such as `/shop/products`; use `null`
|
|
257
|
+
only when the source URL cannot be derived and record that risk.
|
|
258
|
+
- `sourceSlugField`: source field holding the slug, when present.
|
|
259
|
+
- `sourceUrlField`: source field holding the full/permalink URL, when present.
|
|
260
|
+
- `targetBasePath`: known Wix destination base path, or `null` when website-builder route
|
|
261
|
+
selection is deferred.
|
|
262
|
+
- `targetSlugField`: planned target slug field, when applicable.
|
|
263
|
+
- `preserveBasePath`: whether the future website-builder phase should try to preserve the
|
|
264
|
+
source base path.
|
|
265
|
+
- `preserveSlug`: whether generated code should preserve the source slug unless target
|
|
266
|
+
validation or collision handling forces a change.
|
|
267
|
+
- `redirectMode`: `record-if-different`, `manual-review`, or `none`.
|
|
268
|
+
|
|
269
|
+
If the same source entity type has multiple public route shapes, record each observed
|
|
270
|
+
route class separately instead of guessing one base path. Slugs are identity and SEO data,
|
|
271
|
+
but slug preservation alone is not URL preservation; route/base-path intent must be
|
|
272
|
+
captured as data for the future website-builder phase.
|
|
273
|
+
|
|
274
|
+
Mapping review artifacts must include a short `URL preservation` section listing:
|
|
275
|
+
|
|
276
|
+
- public entity types with source base paths
|
|
277
|
+
- whether base paths should be preserved
|
|
278
|
+
- entities whose target route is deferred to the website-builder phase
|
|
279
|
+
- known slug normalization, collision, route, or redirect risks
|
|
280
|
+
|
|
281
|
+
## Verifying Wix APIs
|
|
282
|
+
|
|
283
|
+
Confirm exact Wix entity/collection/field names before mapping a source field onto
|
|
284
|
+
them — never invent a Wix API or field name.
|
|
285
|
+
|
|
286
|
+
When the mapping depends on Wix runtime behavior rather than just field names, verify and
|
|
287
|
+
follow the relevant `rp-target-wix` contract as well. Examples include create ordering,
|
|
288
|
+
native tag handling, category assignment requirements, member prerequisites, and whether a
|
|
289
|
+
product/media field should be sent as an external URL for Wix-side ingestion.
|
|
290
|
+
|
|
291
|
+
For entity suitability, do not grep or paste whole domain files into the plan. Use:
|
|
292
|
+
|
|
293
|
+
```bash
|
|
294
|
+
node skills/replatform/resources/rp-target-wix/scripts/domain-knowledge.js summarize-entities --refs <domain/entity,...>
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
Load full entity records only for selected candidates that materially affect the current
|
|
298
|
+
project.
|
|
299
|
+
|
|
300
|
+
- Verify enum **values**, not just names: every `Field.type` you assign must be a real
|
|
301
|
+
member of the Create Data Collection `Type` enum. (Common trap: there is no `SLUG`
|
|
302
|
+
type — a slug maps to a `TEXT` field. Never assign a guessed enum value and flag it
|
|
303
|
+
`unverified`; resolve it or omit it.)
|
|
304
|
+
- If a Wix tool surface such as Wix MCP is available in the runtime, use it as a fast
|
|
305
|
+
verification aid for entity, field, enum, app, and setup names.
|
|
306
|
+
- If no Wix tool surface is available, rely on `rp-target-wix`'s verified contracts plus
|
|
307
|
+
published Wix REST/SDK documentation and conservative, known-good names. Mark anything
|
|
308
|
+
you could not verify directly as `unverified` in the mapping plan so it is surfaced
|
|
309
|
+
before execution.
|
|
310
|
+
|
|
311
|
+
## Runtime policy
|
|
312
|
+
|
|
313
|
+
Resolve ambiguous mappings using the documented default, record the decision and rationale
|
|
314
|
+
under the machine mapping artifacts and render them into `mapping/review/mapping-plan.md`,
|
|
315
|
+
and keep going. Known fidelity forks
|
|
316
|
+
(e.g. comments anonymize vs. skip) should already be answered by the submission intake;
|
|
317
|
+
apply those answers rather than re-asking. If a required input is truly missing, surface it
|
|
318
|
+
as a blocker rather than silently guessing.
|
|
319
|
+
|
|
320
|
+
If the source entity name is generic but the observed data disambiguates it, record that
|
|
321
|
+
disambiguation explicitly in the machine mapping artifacts and review plan. Do not force later stages to infer what
|
|
322
|
+
"comments", "items", or similarly broad labels meant in this specific migration.
|
|
323
|
+
|
|
324
|
+
## Faithfulness ledger (detect lossiness here, early)
|
|
325
|
+
|
|
326
|
+
The mapping stage is where lossiness and coverage gaps are *discovered*, so it is where
|
|
327
|
+
they must be *recorded* — not at execute time, which is too late to do anything but
|
|
328
|
+
report. Maintain a **faithfulness ledger** in `mapping/review/mapping-gaps.json` and render it
|
|
329
|
+
into `mapping/review/mapping-plan.md`, listing everything that
|
|
330
|
+
will not migrate cleanly, including:
|
|
331
|
+
|
|
332
|
+
- fields/relationships flattened or dropped (e.g. hierarchy → flat),
|
|
333
|
+
- entities skipped (e.g. gated PII),
|
|
334
|
+
- **targets with no verified Wix primitive** — if Wix has a native entity, record that
|
|
335
|
+
codegen must use an `unverified` native REST path and notify the RePlatform team about
|
|
336
|
+
the missing writer. Use CMS only when no suitable native Wix entity exists, or when the
|
|
337
|
+
native entity is rejected for fidelity/side-effect reasons.
|
|
338
|
+
|
|
339
|
+
**Mandatory trigger — hierarchical source taxonomy → flat Wix target.** When a source
|
|
340
|
+
entity carries `"hierarchical": true` (or any `parent` self-relation) in
|
|
341
|
+
`source-schema.json` and maps to a flat Wix target such as Blog categories, you **must**
|
|
342
|
+
write a faithfulness-ledger entry recording that the parent/child hierarchy is dropped on
|
|
343
|
+
import (the Wix Blog category target is flat — it has no parent/child relationship). This
|
|
344
|
+
is not optional discipline: the flag exists precisely so
|
|
345
|
+
the warning is data-driven. Do not map such a taxonomy without the ledger entry. (If
|
|
346
|
+
hierarchy must be preserved, the alternative is a CMS-collection taxonomy with a `parent`
|
|
347
|
+
reference field — note that trade-off in the ledger instead.)
|
|
348
|
+
|
|
349
|
+
This ledger is the source the execution-plan report draws from to surface "what we won't
|
|
350
|
+
do" to the user **before** consent (`rp-execute-import`). If it isn't recorded here, the
|
|
351
|
+
user can't be warned there.
|
|
352
|
+
|
|
353
|
+
Every selected entity whose domain knowledge includes `IMPORT_UNRELIABLE` must create a
|
|
354
|
+
`mapping/review/mapping-gaps.json` entry with the same fixed flag string, the selected
|
|
355
|
+
`targetRef`, a project-specific summary, and the chosen fallback or review action.
|
|
356
|
+
|
|
357
|
+
## Default media scope
|
|
358
|
+
|
|
359
|
+
Default to importing only media referenced by in-scope entities such as posts, products,
|
|
360
|
+
collections, categories, or CMS rows that are actually being migrated. Unattached
|
|
361
|
+
source-library media is out of scope by default unless the user explicitly asks for a
|
|
362
|
+
library/archive migration.
|
|
363
|
+
|
|
364
|
+
When an entity carries media, consult `rp-target-wix` for the target behavior:
|
|
365
|
+
|
|
366
|
+
- if the target accepts external URLs and ingests them in the background, prefer that
|
|
367
|
+
path
|
|
368
|
+
- otherwise require media import to Wix first, then attach the resulting Wix media id
|
|
369
|
+
|
|
370
|
+
## Mapping summary for user review
|
|
371
|
+
|
|
372
|
+
After `mapping/mapping-plan.json` is written, create
|
|
373
|
+
`migrations/<project>/mapping/review/mapping-summary.md` as a
|
|
374
|
+
short review artifact for the user. Its purpose is to make the mapping decision easy to
|
|
375
|
+
review without forcing the user through the full plan.
|
|
376
|
+
|
|
377
|
+
The summary should:
|
|
378
|
+
|
|
379
|
+
- explicitly say that full details live in `mapping/review/mapping-plan.md`
|
|
380
|
+
- list each in-scope source entity and its planned Wix target
|
|
381
|
+
- call out the main gaps, lossy transformations, skipped entities, and `unverified`
|
|
382
|
+
target paths from the faithfulness ledger
|
|
383
|
+
- summarize public URL preservation: source base paths, deferred target routes, and slug
|
|
384
|
+
or redirect risks that affect approval
|
|
385
|
+
- mention the biggest setup implications the user should know now (for example: required
|
|
386
|
+
Wix apps, required CMS collections, optional CMS crosswalk mirror, media reachability
|
|
387
|
+
caveat)
|
|
388
|
+
- when safe mode is enabled and any replacements exist, include a short summary of which
|
|
389
|
+
entities have outbound email/phone replacements and where they apply
|
|
390
|
+
- surface unresolved questions only when they materially affect whether the user should
|
|
391
|
+
approve the mapping
|
|
392
|
+
|
|
393
|
+
Keep it concise. The user should be able to decide "yes, this is the right migration
|
|
394
|
+
shape" from this file alone, then consult `mapping/review/mapping-plan.md` only when they want detail.
|
|
395
|
+
|
|
396
|
+
Recommended structure:
|
|
397
|
+
|
|
398
|
+
- one-sentence purpose / pointer to `mapping/review/mapping-plan.md`
|
|
399
|
+
- `Source -> Wix targets`
|
|
400
|
+
- `URL preservation`
|
|
401
|
+
- `Main gaps / lossiness`
|
|
402
|
+
- `Important setup implications`
|
|
403
|
+
- `Safe mode replacements` when applicable
|
|
404
|
+
- `Questions or risks to confirm`
|
|
405
|
+
|
|
406
|
+
Do not restate full field tables or detailed transformation rules here unless a specific
|
|
407
|
+
field-level issue is central to the approval decision.
|
|
408
|
+
|
|
409
|
+
## Mapping review checkpoint
|
|
410
|
+
|
|
411
|
+
Once both mapping artifacts exist, reset `orchestration/approvals.json` so
|
|
412
|
+
`mapping.status=pending`, then stop and ask the user to review
|
|
413
|
+
`migrations/<project>/mapping/review/mapping-summary.md`. The checkpoint should make clear:
|
|
414
|
+
|
|
415
|
+
- this is a semantic review of what will be migrated where
|
|
416
|
+
- the full technical detail remains in `mapping/review/mapping-plan.md`
|
|
417
|
+
- downstream setup discovery and code generation will wait for acceptance
|
|
418
|
+
|
|
419
|
+
Do not proceed to `rp-setup-discovery` or `rp-import-codegen` until the user accepts this
|
|
420
|
+
mapping review checkpoint, unless the user explicitly asks to continue provisionally.
|
|
421
|
+
|
|
422
|
+
## Guardrails
|
|
423
|
+
|
|
424
|
+
- Do not collapse multiple source concepts into one Wix field without documenting lossiness.
|
|
425
|
+
- Call out data that cannot be migrated faithfully — record it in the faithfulness ledger above.
|
|
426
|
+
- Do not describe a source entity only by a generic label when the observed data is more
|
|
427
|
+
specific; name the concrete subtype(s) present in the project.
|
|
428
|
+
- Keep business rules explicit so `rp-import-codegen` can implement them deterministically.
|
|
429
|
+
- Do not guess Wix field, enum, or app names when you cannot verify them. Mark them
|
|
430
|
+
`unverified` and surface the risk before execution.
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// rp-mapper — DETERMINISTIC mapping resolution.
|
|
4
|
+
//
|
|
5
|
+
// Joins three inputs that are all already data:
|
|
6
|
+
//
|
|
7
|
+
// discovered header set × vendor overlay columnMap × Wix target spec
|
|
8
|
+
//
|
|
9
|
+
// and answers, with no LLM involved:
|
|
10
|
+
//
|
|
11
|
+
// - which source columns map to which canonical field, and by which alias (auditable)
|
|
12
|
+
// - which source columns NOTHING claims -> `residue.unmappedColumns`
|
|
13
|
+
// - which mapped columns have no Wix home -> `residue.unsupportedTargets`
|
|
14
|
+
// - which REQUIRED Wix inputs nothing feeds -> `residue.unfilledRequired`
|
|
15
|
+
// - which overlay entries reference a column not present -> `overlayDrift`
|
|
16
|
+
//
|
|
17
|
+
// The agent's job collapses to the `residue` object. Everything else is computed, repeatable, and
|
|
18
|
+
// diffable between runs — which is the point: an identical export must not produce a differently
|
|
19
|
+
// worded mapping plan just because a model sampled differently.
|
|
20
|
+
//
|
|
21
|
+
// The overlay stays ADVISORY in the sense that matters: the authoritative column list is the header
|
|
22
|
+
// row read at discovery time. An overlay can only claim columns that actually exist, and a column
|
|
23
|
+
// the overlay does not know is surfaced, never dropped.
|
|
24
|
+
|
|
25
|
+
const path = require('path');
|
|
26
|
+
const fs = require('fs');
|
|
27
|
+
const { CANONICAL_FIELDS, TARGETS, validateCanonicalPath } = require('../../rp-target-wix/lib/wix-target-spec.js');
|
|
28
|
+
|
|
29
|
+
const VENDORS_DIR = path.join(__dirname, '..', '..', 'rp-source-csv', 'vendors');
|
|
30
|
+
|
|
31
|
+
// Column identity is the NORMALIZED name: lowercase, NFKC, punctuation and whitespace stripped.
|
|
32
|
+
// `Body (HTML)` -> `bodyhtml`, and `Option1 Name` === `Option 1 Name`. This absorbs vendor casing
|
|
33
|
+
// and punctuation churn without a code change.
|
|
34
|
+
function normalizeColumnName(name) {
|
|
35
|
+
return String(name == null ? '' : name)
|
|
36
|
+
.normalize('NFKC')
|
|
37
|
+
.toLowerCase()
|
|
38
|
+
.replace(/[^a-z0-9]+/g, '');
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function loadVendorOverlay(vendor) {
|
|
42
|
+
const file = path.join(VENDORS_DIR, `${vendor}.json`);
|
|
43
|
+
if (!fs.existsSync(file)) return null;
|
|
44
|
+
return JSON.parse(fs.readFileSync(file, 'utf8'));
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function listVendors() {
|
|
48
|
+
return fs
|
|
49
|
+
.readdirSync(VENDORS_DIR)
|
|
50
|
+
.filter((f) => f.endsWith('.json'))
|
|
51
|
+
.map((f) => f.replace(/\.json$/, ''));
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Resolve a mapping deterministically.
|
|
56
|
+
*
|
|
57
|
+
* @param {object} input
|
|
58
|
+
* @param {string[]} input.headers the header row AS READ at discovery time (authoritative)
|
|
59
|
+
* @param {string} input.vendor detected vendor, or 'custom' for no overlay
|
|
60
|
+
* @param {object} [input.overlay] pre-loaded overlay (tests inject; otherwise loaded by vendor)
|
|
61
|
+
* @param {string[]} [input.targets] which target entities to check coverage for
|
|
62
|
+
*/
|
|
63
|
+
function resolveMapping({ headers, vendor, overlay, targets = ['product', 'category'] }) {
|
|
64
|
+
const overlayDoc = overlay !== undefined ? overlay : loadVendorOverlay(vendor);
|
|
65
|
+
const headerByNormalized = new Map();
|
|
66
|
+
const duplicateColumns = [];
|
|
67
|
+
for (const header of headers || []) {
|
|
68
|
+
const key = normalizeColumnName(header);
|
|
69
|
+
if (!key) continue;
|
|
70
|
+
if (headerByNormalized.has(key)) duplicateColumns.push(header);
|
|
71
|
+
else headerByNormalized.set(key, header);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
const fieldMappings = [];
|
|
75
|
+
const claimedColumns = new Set();
|
|
76
|
+
const overlayDrift = [];
|
|
77
|
+
const canonicalErrors = [];
|
|
78
|
+
|
|
79
|
+
for (const entry of (overlayDoc && overlayDoc.columnMap) || []) {
|
|
80
|
+
if (!validateCanonicalPath(entry.wixTarget)) {
|
|
81
|
+
// A typo or an unmodelled concept in the overlay. Fail loudly at resolve time rather than
|
|
82
|
+
// silently producing a mapping that targets a field nothing can consume.
|
|
83
|
+
canonicalErrors.push({ wixTarget: entry.wixTarget, reason: 'not a known canonical field' });
|
|
84
|
+
continue;
|
|
85
|
+
}
|
|
86
|
+
// Aliases are ordered by preference; first present alias wins, and which one matched is
|
|
87
|
+
// recorded so a reviewer can see WHY a column was claimed.
|
|
88
|
+
let matched = null;
|
|
89
|
+
for (const alias of entry.aliases || []) {
|
|
90
|
+
const key = normalizeColumnName(alias);
|
|
91
|
+
if (headerByNormalized.has(key)) {
|
|
92
|
+
matched = { column: headerByNormalized.get(key), alias };
|
|
93
|
+
break;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
if (!matched) {
|
|
97
|
+
overlayDrift.push({ wixTarget: entry.wixTarget, aliasesTried: entry.aliases || [], reason: 'no alias present in header' });
|
|
98
|
+
continue;
|
|
99
|
+
}
|
|
100
|
+
claimedColumns.add(normalizeColumnName(matched.column));
|
|
101
|
+
const def = CANONICAL_FIELDS[entry.wixTarget];
|
|
102
|
+
fieldMappings.push({
|
|
103
|
+
sourceColumn: matched.column,
|
|
104
|
+
matchedAlias: matched.alias,
|
|
105
|
+
canonicalField: entry.wixTarget,
|
|
106
|
+
entity: def.entity,
|
|
107
|
+
kind: def.kind,
|
|
108
|
+
required: Boolean(def.required),
|
|
109
|
+
decisionProvenance: 'source_platform_rule',
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
// --- derived entities ----------------------------------------------------
|
|
114
|
+
// A `derived` entry synthesizes an entity from the DISTINCT VALUES of one column — this is how
|
|
115
|
+
// categories and tags arrive in every named vendor's export. Such an entity's name/path is fed
|
|
116
|
+
// by derivation, not by a column mapping, so crediting it here is what keeps `category.name`
|
|
117
|
+
// from being reported as an unfilled required field on a perfectly complete export.
|
|
118
|
+
const derivedEntities = [];
|
|
119
|
+
for (const entry of (overlayDoc && overlayDoc.derived) || []) {
|
|
120
|
+
const key = normalizeColumnName(entry.fromColumn);
|
|
121
|
+
const present = headerByNormalized.has(key);
|
|
122
|
+
if (present) claimedColumns.add(key);
|
|
123
|
+
derivedEntities.push({
|
|
124
|
+
entity: entry.entity,
|
|
125
|
+
fromColumn: present ? headerByNormalized.get(key) : entry.fromColumn,
|
|
126
|
+
present,
|
|
127
|
+
hierarchical: Boolean(entry.hierarchical),
|
|
128
|
+
linkPolicy: entry.linkPolicy || null,
|
|
129
|
+
// A hierarchical source taxonomy mapped to a flat target triggers rp-mapper's mandatory
|
|
130
|
+
// faithfulness-ledger entry; surfacing the flag here is what makes that data-driven.
|
|
131
|
+
requiresFaithfulnessLedgerEntry: Boolean(entry.hierarchical),
|
|
132
|
+
fills: present ? [`${entry.entity}.name`, `${entry.entity}.path`].filter(validateCanonicalPath) : [],
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
const derivedFilled = new Set(derivedEntities.flatMap((d) => d.fills));
|
|
136
|
+
|
|
137
|
+
// --- coverage against the Wix targets ------------------------------------
|
|
138
|
+
const unsupportedTargets = [];
|
|
139
|
+
const supportedByTarget = new Map();
|
|
140
|
+
for (const targetName of targets) {
|
|
141
|
+
const target = TARGETS[targetName];
|
|
142
|
+
if (!target) continue;
|
|
143
|
+
supportedByTarget.set(targetName, new Set(Object.keys(target.fields)));
|
|
144
|
+
}
|
|
145
|
+
for (const mapping of fieldMappings) {
|
|
146
|
+
const target = TARGETS[mapping.entity === 'variant' ? 'product' : mapping.entity];
|
|
147
|
+
if (!target) continue;
|
|
148
|
+
if (target.fields[mapping.canonicalField]) continue;
|
|
149
|
+
const reason = target.unsupported && target.unsupported[mapping.canonicalField];
|
|
150
|
+
unsupportedTargets.push({
|
|
151
|
+
sourceColumn: mapping.sourceColumn,
|
|
152
|
+
canonicalField: mapping.canonicalField,
|
|
153
|
+
reason: reason || 'no Wix target field is declared for this canonical field',
|
|
154
|
+
declared: Boolean(reason),
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
// Required canonical inputs that nothing feeds. These are hard blockers, not review items.
|
|
159
|
+
const mappedFields = new Set(fieldMappings.map((m) => m.canonicalField));
|
|
160
|
+
const unfilledRequired = Object.entries(CANONICAL_FIELDS)
|
|
161
|
+
.filter(([fieldPath, def]) => {
|
|
162
|
+
if (!def.required || mappedFields.has(fieldPath) || derivedFilled.has(fieldPath)) return false;
|
|
163
|
+
const target = TARGETS[def.entity === 'variant' ? 'product' : def.entity];
|
|
164
|
+
return Boolean(target && target.fields[fieldPath]);
|
|
165
|
+
})
|
|
166
|
+
.map(([fieldPath]) => fieldPath);
|
|
167
|
+
|
|
168
|
+
// Source columns nothing claimed. THIS is the agent's queue.
|
|
169
|
+
const unmappedColumns = [...headerByNormalized.entries()]
|
|
170
|
+
.filter(([key]) => !claimedColumns.has(key))
|
|
171
|
+
.map(([, original]) => original);
|
|
172
|
+
|
|
173
|
+
const totalColumns = headerByNormalized.size;
|
|
174
|
+
return {
|
|
175
|
+
vendor: vendor || 'custom',
|
|
176
|
+
overlayVersion: (overlayDoc && overlayDoc.profileVersion) || null,
|
|
177
|
+
overlayPresent: Boolean(overlayDoc),
|
|
178
|
+
fieldMappings,
|
|
179
|
+
coverage: {
|
|
180
|
+
totalColumns,
|
|
181
|
+
mappedColumns: claimedColumns.size,
|
|
182
|
+
unmappedColumns: unmappedColumns.length,
|
|
183
|
+
// The honest headline number: of the columns the overlay claimed, how many actually land in
|
|
184
|
+
// Wix. A column mapped to an unsupported canonical field is NOT coverage.
|
|
185
|
+
landingInWix: fieldMappings.length - unsupportedTargets.length,
|
|
186
|
+
ratio: totalColumns ? Number((claimedColumns.size / totalColumns).toFixed(4)) : 0,
|
|
187
|
+
},
|
|
188
|
+
derivedEntities,
|
|
189
|
+
residue: { unmappedColumns, unsupportedTargets, unfilledRequired },
|
|
190
|
+
overlayDrift,
|
|
191
|
+
canonicalErrors,
|
|
192
|
+
duplicateColumns,
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
// Applies a resolved mapping to one raw source row -> a flat canonical field bag.
|
|
197
|
+
// Deliberately NOT the whole record assembler: grouping rows into products, deriving categories
|
|
198
|
+
// from a column's values, and unit conversion are adapter concerns (rp-source-csv owns them).
|
|
199
|
+
// This is the field-level half, and it is the half that was being hand-written per project.
|
|
200
|
+
function applyMapping(row, resolved) {
|
|
201
|
+
const out = {};
|
|
202
|
+
for (const mapping of resolved.fieldMappings) {
|
|
203
|
+
const raw = row[mapping.sourceColumn];
|
|
204
|
+
if (raw === undefined) continue;
|
|
205
|
+
out[mapping.canonicalField] = raw;
|
|
206
|
+
}
|
|
207
|
+
return out;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
module.exports = {
|
|
211
|
+
normalizeColumnName,
|
|
212
|
+
loadVendorOverlay,
|
|
213
|
+
listVendors,
|
|
214
|
+
resolveMapping,
|
|
215
|
+
applyMapping,
|
|
216
|
+
VENDORS_DIR,
|
|
217
|
+
};
|