@salesforce/b2c-dx-mcp 3.2.1 → 3.3.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/bin/run.js +5 -9
- package/content/guidance/b2c/b2c-hooks/references/ORDER-HOOK-LIFECYCLE.md +1 -1
- package/content/guidance/b2c/b2c-onboarding/SKILL.md +4 -4
- package/content/guidance/b2c/b2c-ordering/SKILL.md +2 -2
- package/content/guidance/b2c/b2c-querying-data/SKILL.md +2 -2
- package/content/guidance/b2c/b2c-scapi-admin/SKILL.md +3 -3
- package/content/guidance/b2c/b2c-scapi-admin/references/CLIENT-EXAMPLES.md +4 -4
- package/content/guidance/b2c/b2c-scapi-shopper/SKILL.md +6 -6
- package/content/guidance/b2c/b2c-scapi-shopper/references/CLIENT-EXAMPLES.md +8 -9
- package/content/guidance/b2c-cli/b2c-cip/SKILL.md +3 -3
- package/content/guidance/b2c-cli/b2c-cip/references/SALES_ANALYSIS.md +1 -1
- package/content/guidance/b2c-cli/b2c-config/SKILL.md +31 -21
- package/content/guidance/b2c-cli/b2c-content/SKILL.md +1 -1
- package/content/guidance/b2c-cli/b2c-debug/SKILL.md +1 -1
- package/content/guidance/b2c-cli/b2c-docs/SKILL.md +23 -2
- package/content/guidance/b2c-cli/b2c-ecdn/references/ADVANCED.md +1 -1
- package/content/guidance/b2c-cli/b2c-job/references/IMPORT.md +1 -1
- package/content/guidance/b2c-cli/b2c-metrics/SKILL.md +1 -1
- package/content/guidance/b2c-cli/b2c-mrt/SKILL.md +3 -3
- package/content/guidance/b2c-cli/b2c-scapi-custom/SKILL.md +1 -1
- package/content/guidance/b2c-cli/b2c-scapi-schemas/SKILL.md +1 -1
- package/content/guidance/b2c-cli/b2c-site-import-export/SKILL.md +1 -1
- package/content/guidance/b2c-cli/b2c-sites/SKILL.md +1 -1
- package/content/guidance/b2c-cli/b2c-slas/SKILL.md +1 -1
- package/content/guidance/b2c-ops/b2c-checkout-triage/SKILL.md +2 -2
- package/content/guidance/b2c-ops/b2c-job-health/SKILL.md +2 -2
- package/content/guidance/b2c-ops/b2c-order-failure-triage/SKILL.md +1 -1
- package/content/guidance/b2c-ops/b2c-order-failure-triage/references/order-evidence.md +2 -2
- package/content/guidance/b2c-ops/b2c-production-triage/SKILL.md +4 -4
- package/content/guidance/index.json +935 -258
- package/content/guidance/mcp/{cip → b2c-mcp-cip}/SKILL.md +10 -8
- package/content/guidance/mcp/{b2c-config → b2c-mcp-config}/SKILL.md +10 -9
- package/content/guidance/mcp/{debugger → b2c-mcp-debugger}/SKILL.md +9 -8
- package/content/guidance/mcp/{scapi → b2c-mcp-scapi}/SKILL.md +81 -10
- package/content/guidance/mcp/{server → b2c-mcp-server}/SKILL.md +49 -25
- package/content/guidance/storefront-next/sfnext-accessibility/SKILL.md +103 -0
- package/content/guidance/storefront-next/sfnext-accessibility/references/checklist.md +64 -0
- package/content/guidance/storefront-next/sfnext-analytics-consent/SKILL.md +91 -0
- package/content/guidance/storefront-next/sfnext-analytics-consent/references/CUSTOM-ADAPTER.md +49 -0
- package/content/guidance/storefront-next/sfnext-authentication/SKILL.md +86 -79
- package/content/guidance/storefront-next/sfnext-authentication/references/COOKIES.md +39 -0
- package/content/guidance/storefront-next/sfnext-authentication/references/LOGIN-FLOWS.md +59 -0
- package/content/guidance/storefront-next/sfnext-commerce-features/SKILL.md +67 -0
- package/content/guidance/storefront-next/sfnext-commerce-features/references/FEATURE-PREREQUISITES.md +37 -0
- package/content/guidance/storefront-next/sfnext-components/SKILL.md +98 -136
- package/content/guidance/storefront-next/sfnext-components/references/COMPONENT-AUTHORING.md +118 -0
- package/content/guidance/storefront-next/sfnext-components/references/SHAPE-TOKENS.md +51 -0
- package/content/guidance/storefront-next/sfnext-components/references/STORYBOOK.md +54 -0
- package/content/guidance/storefront-next/sfnext-components/references/TOKEN-SYSTEM.md +53 -0
- package/content/guidance/storefront-next/sfnext-components/references/TROUBLESHOOTING.md +19 -0
- package/content/guidance/storefront-next/sfnext-configuration/SKILL.md +116 -113
- package/content/guidance/storefront-next/sfnext-configuration/references/ENV-VARIABLES.md +55 -0
- package/content/guidance/storefront-next/sfnext-configuration/references/MULTI-SITE-URLS.md +137 -0
- package/content/guidance/storefront-next/sfnext-data-fetching/SKILL.md +100 -150
- package/content/guidance/storefront-next/sfnext-data-fetching/references/ACTIONS.md +53 -0
- package/content/guidance/storefront-next/sfnext-data-fetching/references/API-CLIENTS.md +34 -0
- package/content/guidance/storefront-next/sfnext-data-fetching/references/LOADERS.md +73 -0
- package/content/guidance/storefront-next/sfnext-data-fetching/references/SCAPI-FETCHER.md +23 -77
- package/content/guidance/storefront-next/sfnext-deployment/SKILL.md +83 -97
- package/content/guidance/storefront-next/sfnext-deployment/references/MRT-DEPLOYMENT.md +37 -68
- package/content/guidance/storefront-next/sfnext-extensions/SKILL.md +73 -97
- package/content/guidance/storefront-next/sfnext-extensions/references/ACTION-HOOKS.md +57 -0
- package/content/guidance/storefront-next/sfnext-extensions/references/BASE-AUDIT.md +47 -44
- package/content/guidance/storefront-next/sfnext-extensions/references/CLI-AND-INSTALL.md +58 -0
- package/content/guidance/storefront-next/sfnext-extensions/references/EXTENSION-EXAMPLES.md +49 -86
- package/content/guidance/storefront-next/sfnext-hybrid-storefronts/SKILL.md +59 -114
- package/content/guidance/storefront-next/sfnext-hybrid-storefronts/references/HYBRID-PROXY-CONFIG.md +53 -90
- package/content/guidance/storefront-next/sfnext-i18n/SKILL.md +96 -131
- package/content/guidance/storefront-next/sfnext-i18n/references/locale-config.md +35 -0
- package/content/guidance/storefront-next/sfnext-overview/SKILL.md +101 -0
- package/content/guidance/storefront-next/sfnext-page-designer/SKILL.md +152 -131
- package/content/guidance/storefront-next/sfnext-page-designer/references/BUSINESS-MANAGER.md +46 -0
- package/content/guidance/storefront-next/sfnext-page-designer/references/COMPONENT-REGISTRY.md +86 -53
- package/content/guidance/storefront-next/sfnext-page-designer/references/DECORATOR-PATTERNS.md +119 -131
- package/content/guidance/storefront-next/sfnext-page-designer/references/REVIEW-CHECKLIST.md +83 -0
- package/content/guidance/storefront-next/sfnext-page-designer/references/TROUBLESHOOTING.md +35 -0
- package/content/guidance/storefront-next/sfnext-performance/SKILL.md +75 -105
- package/content/guidance/storefront-next/sfnext-performance/references/PERFORMANCE-REVIEW-CHECKLIST.md +85 -0
- package/content/guidance/storefront-next/sfnext-performance/references/SUSPENSE-AND-STREAMING.md +58 -0
- package/content/guidance/storefront-next/sfnext-project-setup/SKILL.md +103 -116
- package/content/guidance/storefront-next/sfnext-project-setup/references/PROJECT-STRUCTURE.md +61 -99
- package/content/guidance/storefront-next/sfnext-project-setup/references/SCRIPTS.md +47 -0
- package/content/guidance/storefront-next/sfnext-project-setup/references/SFNEXT-CLI.md +63 -0
- package/content/guidance/storefront-next/sfnext-quality-gates/SKILL.md +70 -0
- package/content/guidance/storefront-next/sfnext-quality-gates/references/lint-and-budgets.md +39 -0
- package/content/guidance/storefront-next/sfnext-revalidation/SKILL.md +121 -0
- package/content/guidance/storefront-next/sfnext-revalidation/references/POLICIES-AND-TAGS.md +55 -0
- package/content/guidance/storefront-next/sfnext-routing/SKILL.md +86 -143
- package/content/guidance/storefront-next/sfnext-routing/references/ROUTE-CONVENTIONS.md +51 -51
- package/content/guidance/storefront-next/sfnext-routing/references/URLS-AND-SEO-ROUTES.md +22 -0
- package/content/guidance/storefront-next/sfnext-scapi/SKILL.md +126 -0
- package/content/guidance/storefront-next/sfnext-scapi/references/WORKED-EXAMPLE.md +39 -0
- package/content/guidance/storefront-next/sfnext-security/SKILL.md +129 -0
- package/content/guidance/storefront-next/sfnext-security/references/COOKIE-DOMAIN.md +39 -0
- package/content/guidance/storefront-next/sfnext-security/references/TURNSTILE.md +43 -0
- package/content/guidance/storefront-next/sfnext-seo/SKILL.md +95 -0
- package/content/guidance/storefront-next/sfnext-seo/references/MULTI-DOMAIN-BASE-PATH.md +17 -0
- package/content/guidance/storefront-next/sfnext-seo/references/SEO-ROUTES.md +31 -0
- package/content/guidance/storefront-next/sfnext-state-management/SKILL.md +80 -89
- package/content/guidance/storefront-next/sfnext-state-management/references/PATTERNS.md +45 -0
- package/content/guidance/storefront-next/sfnext-testing/SKILL.md +105 -138
- package/content/guidance/storefront-next/sfnext-testing/references/E2E.md +38 -0
- package/content/guidance/storefront-next/sfnext-testing/references/STORYBOOK-PATTERNS.md +73 -94
- package/content/guidance/storefront-next/sfnext-testing/references/UNIT-AND-ROUTE-TESTS.md +60 -0
- package/content/guidance/storefront-next/sfnext-theming/SKILL.md +104 -0
- package/content/guidance/storefront-next/sfnext-theming/references/REBRAND-CHECKLIST.md +29 -0
- package/dist/commands/mcp.d.ts +8 -2
- package/dist/commands/mcp.js +54 -20
- package/dist/guidance.d.ts +4 -1
- package/dist/guidance.js +23 -5
- package/dist/registry.d.ts +2 -1
- package/dist/registry.js +3 -3
- package/dist/server.d.ts +10 -0
- package/dist/server.js +21 -0
- package/dist/skill-references.js +5 -5
- package/dist/tools/cartridges/index.js +1 -0
- package/dist/tools/cip/index.js +6 -3
- package/dist/tools/diagnostics/debug-capture-at-breakpoint.js +1 -1
- package/dist/tools/diagnostics/debug-set-breakpoints.js +1 -1
- package/dist/tools/diagnostics/debug-start-session.js +1 -1
- package/dist/tools/scapi/index.d.ts +4 -1
- package/dist/tools/scapi/index.js +4 -2
- package/dist/tools/scapi/scapi-code.d.ts +2 -2
- package/dist/tools/scapi/scapi-code.js +17 -61
- package/dist/utils/types.d.ts +6 -0
- package/node_modules/@salesforce/b2c-agent-plugins/CHANGELOG.md +20 -0
- package/node_modules/@salesforce/b2c-agent-plugins/README.md +5 -0
- package/node_modules/@salesforce/b2c-agent-plugins/b2c/.codex-plugin/plugin.json +1 -1
- package/node_modules/@salesforce/b2c-agent-plugins/b2c/plugin.json +1 -1
- package/node_modules/@salesforce/b2c-agent-plugins/b2c/skills/b2c-hooks/references/ORDER-HOOK-LIFECYCLE.md +1 -1
- package/node_modules/@salesforce/b2c-agent-plugins/b2c/skills/b2c-onboarding/SKILL.md +4 -4
- package/node_modules/@salesforce/b2c-agent-plugins/b2c/skills/b2c-ordering/SKILL.md +2 -2
- package/node_modules/@salesforce/b2c-agent-plugins/b2c/skills/b2c-querying-data/SKILL.md +2 -2
- package/node_modules/@salesforce/b2c-agent-plugins/b2c/skills/b2c-scapi-admin/SKILL.md +3 -3
- package/node_modules/@salesforce/b2c-agent-plugins/b2c/skills/b2c-scapi-admin/references/CLIENT-EXAMPLES.md +4 -4
- package/node_modules/@salesforce/b2c-agent-plugins/b2c/skills/b2c-scapi-shopper/SKILL.md +6 -6
- package/node_modules/@salesforce/b2c-agent-plugins/b2c/skills/b2c-scapi-shopper/references/CLIENT-EXAMPLES.md +8 -9
- package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/.codex-plugin/plugin.json +1 -1
- package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/plugin.json +1 -1
- package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-cip/SKILL.md +3 -3
- package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-cip/references/SALES_ANALYSIS.md +1 -1
- package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-config/SKILL.md +31 -21
- package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-content/SKILL.md +1 -1
- package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-debug/SKILL.md +1 -1
- package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-docs/SKILL.md +23 -2
- package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-ecdn/references/ADVANCED.md +1 -1
- package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-job/references/IMPORT.md +1 -1
- package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-metrics/SKILL.md +1 -1
- package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-mrt/SKILL.md +3 -3
- package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-scapi-custom/SKILL.md +1 -1
- package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-scapi-schemas/SKILL.md +1 -1
- package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-site-import-export/SKILL.md +1 -1
- package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-sites/SKILL.md +1 -1
- package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-slas/SKILL.md +1 -1
- package/node_modules/@salesforce/b2c-agent-plugins/b2c-ops/.codex-plugin/plugin.json +1 -1
- package/node_modules/@salesforce/b2c-agent-plugins/b2c-ops/plugin.json +1 -1
- package/node_modules/@salesforce/b2c-agent-plugins/b2c-ops/skills/b2c-checkout-triage/SKILL.md +2 -2
- package/node_modules/@salesforce/b2c-agent-plugins/b2c-ops/skills/b2c-job-health/SKILL.md +2 -2
- package/node_modules/@salesforce/b2c-agent-plugins/b2c-ops/skills/b2c-order-failure-triage/SKILL.md +1 -1
- package/node_modules/@salesforce/b2c-agent-plugins/b2c-ops/skills/b2c-order-failure-triage/references/order-evidence.md +2 -2
- package/node_modules/@salesforce/b2c-agent-plugins/b2c-ops/skills/b2c-production-triage/SKILL.md +4 -4
- package/node_modules/@salesforce/b2c-agent-plugins/figma-to-sfnext-pagedesigner/README.md +4 -4
- package/node_modules/@salesforce/b2c-agent-plugins/figma-to-sfnext-pagedesigner/skills/figma-to-sfnext-pagedesigner/SKILL.md +76 -73
- package/node_modules/@salesforce/b2c-agent-plugins/figma-to-sfnext-pagedesigner/skills/figma-to-sfnext-pagedesigner/evals/trigger-evals.json +12 -10
- package/node_modules/@salesforce/b2c-agent-plugins/figma-to-sfnext-pagedesigner/skills/figma-to-sfnext-pagedesigner/references/PAGE-DESIGNER-SFN.md +49 -74
- package/node_modules/@salesforce/b2c-agent-plugins/package.json +1 -1
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/.codex-plugin/plugin.json +9 -6
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/README.md +43 -22
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/plugin.json +9 -6
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-accessibility/SKILL.md +103 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-accessibility/evals/trigger-evals.json +5 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-accessibility/references/checklist.md +64 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-analytics-consent/SKILL.md +91 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-analytics-consent/evals/trigger-evals.json +5 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-analytics-consent/references/CUSTOM-ADAPTER.md +49 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-authentication/SKILL.md +86 -79
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-authentication/evals/trigger-evals.json +5 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-authentication/references/COOKIES.md +39 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-authentication/references/LOGIN-FLOWS.md +59 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-commerce-features/SKILL.md +67 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-commerce-features/evals/trigger-evals.json +5 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-commerce-features/references/FEATURE-PREREQUISITES.md +37 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-components/SKILL.md +98 -136
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-components/evals/trigger-evals.json +5 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-components/references/COMPONENT-AUTHORING.md +118 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-components/references/SHAPE-TOKENS.md +51 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-components/references/STORYBOOK.md +54 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-components/references/TOKEN-SYSTEM.md +53 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-components/references/TROUBLESHOOTING.md +19 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-configuration/SKILL.md +116 -113
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-configuration/evals/trigger-evals.json +5 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-configuration/references/ENV-VARIABLES.md +55 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-configuration/references/MULTI-SITE-URLS.md +137 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-data-fetching/SKILL.md +100 -150
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-data-fetching/evals/trigger-evals.json +5 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-data-fetching/references/ACTIONS.md +53 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-data-fetching/references/API-CLIENTS.md +34 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-data-fetching/references/LOADERS.md +73 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-data-fetching/references/SCAPI-FETCHER.md +23 -77
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-deployment/SKILL.md +83 -97
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-deployment/evals/trigger-evals.json +5 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-deployment/references/MRT-DEPLOYMENT.md +37 -68
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-extensions/SKILL.md +73 -97
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-extensions/evals/trigger-evals.json +5 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-extensions/references/ACTION-HOOKS.md +57 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-extensions/references/BASE-AUDIT.md +47 -44
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-extensions/references/CLI-AND-INSTALL.md +58 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-extensions/references/EXTENSION-EXAMPLES.md +49 -86
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-hybrid-storefronts/SKILL.md +59 -114
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-hybrid-storefronts/evals/trigger-evals.json +5 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-hybrid-storefronts/references/HYBRID-PROXY-CONFIG.md +53 -90
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-i18n/SKILL.md +96 -131
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-i18n/evals/trigger-evals.json +5 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-i18n/references/locale-config.md +35 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-overview/SKILL.md +101 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-overview/evals/trigger-evals.json +5 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-page-designer/SKILL.md +152 -131
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-page-designer/evals/trigger-evals.json +5 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-page-designer/references/BUSINESS-MANAGER.md +46 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-page-designer/references/COMPONENT-REGISTRY.md +86 -53
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-page-designer/references/DECORATOR-PATTERNS.md +119 -131
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-page-designer/references/REVIEW-CHECKLIST.md +83 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-page-designer/references/TROUBLESHOOTING.md +35 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-performance/SKILL.md +75 -105
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-performance/evals/trigger-evals.json +5 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-performance/references/PERFORMANCE-REVIEW-CHECKLIST.md +85 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-performance/references/SUSPENSE-AND-STREAMING.md +58 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-project-setup/SKILL.md +103 -116
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-project-setup/evals/trigger-evals.json +5 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-project-setup/references/PROJECT-STRUCTURE.md +61 -99
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-project-setup/references/SCRIPTS.md +47 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-project-setup/references/SFNEXT-CLI.md +63 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-quality-gates/SKILL.md +70 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-quality-gates/evals/trigger-evals.json +5 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-quality-gates/references/lint-and-budgets.md +39 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-revalidation/SKILL.md +121 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-revalidation/evals/trigger-evals.json +5 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-revalidation/references/POLICIES-AND-TAGS.md +55 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-routing/SKILL.md +86 -143
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-routing/evals/trigger-evals.json +5 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-routing/references/ROUTE-CONVENTIONS.md +51 -51
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-routing/references/URLS-AND-SEO-ROUTES.md +22 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-scapi/SKILL.md +126 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-scapi/evals/trigger-evals.json +5 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-scapi/references/WORKED-EXAMPLE.md +39 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-security/SKILL.md +129 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-security/evals/trigger-evals.json +5 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-security/references/COOKIE-DOMAIN.md +39 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-security/references/TURNSTILE.md +43 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-seo/SKILL.md +95 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-seo/evals/trigger-evals.json +5 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-seo/references/MULTI-DOMAIN-BASE-PATH.md +17 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-seo/references/SEO-ROUTES.md +31 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-state-management/SKILL.md +80 -89
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-state-management/evals/trigger-evals.json +5 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-state-management/references/PATTERNS.md +45 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-testing/SKILL.md +105 -138
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-testing/evals/trigger-evals.json +5 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-testing/references/E2E.md +38 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-testing/references/STORYBOOK-PATTERNS.md +73 -94
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-testing/references/UNIT-AND-ROUTE-TESTS.md +60 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-theming/SKILL.md +104 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-theming/evals/trigger-evals.json +5 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-theming/references/REBRAND-CHECKLIST.md +29 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next-figma/skills/sfnext-create-figma-kit/SKILL.md +3 -3
- package/oclif.manifest.json +21 -4
- package/package.json +3 -3
- package/content/guidance/storefront-next/sfnext-create-component/SKILL.md +0 -195
- package/content/guidance/storefront-next/sfnext-create-component/references/COMPONENT-AUTHORING.md +0 -206
- package/content/guidance/storefront-next/sfnext-create-component/references/PROJECT-STRUCTURE.md +0 -43
- package/content/guidance/storefront-next/sfnext-create-component/references/TOKEN-SYSTEM.md +0 -130
- package/content/guidance/storefront-next/sfnext-create-component/references/TROUBLESHOOTING.md +0 -34
- package/content/guidance/storefront-next/sfnext-create-vertical/SKILL.md +0 -135
- package/content/guidance/storefront-next/sfnext-create-vertical/references/COMPONENT-AUTHORING.md +0 -206
- package/content/guidance/storefront-next/sfnext-create-vertical/references/PROJECT-STRUCTURE.md +0 -43
- package/content/guidance/storefront-next/sfnext-create-vertical/references/TOKEN-SYSTEM.md +0 -130
- package/content/guidance/storefront-next/sfnext-create-vertical/references/TROUBLESHOOTING.md +0 -34
- package/content/guidance/storefront-next/sfnext-custom-apis/SKILL.md +0 -221
- package/content/guidance/storefront-next/sfnext-custom-apis/references/WORKFLOW-EXAMPLES.md +0 -294
- package/content/guidance/storefront-next/sfnext-data-fetching/references/LOADER-PATTERNS.md +0 -102
- package/content/guidance/storefront-next/sfnext-project-setup/references/ENV-VARIABLES.md +0 -82
- package/content/guidance/storefront-next/sfnext-scapi-management/SKILL.md +0 -203
- package/content/guidance/storefront-next/sfnext-scapi-management/references/CLI-COMMANDS.md +0 -122
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-create-component/SKILL.md +0 -195
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-create-component/evals/trigger-evals.json +0 -12
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-create-component/references/COMPONENT-AUTHORING.md +0 -206
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-create-component/references/PROJECT-STRUCTURE.md +0 -43
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-create-component/references/TOKEN-SYSTEM.md +0 -130
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-create-component/references/TROUBLESHOOTING.md +0 -34
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-create-vertical/SKILL.md +0 -135
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-create-vertical/evals/trigger-evals.json +0 -12
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-create-vertical/references/COMPONENT-AUTHORING.md +0 -206
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-create-vertical/references/PROJECT-STRUCTURE.md +0 -43
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-create-vertical/references/TOKEN-SYSTEM.md +0 -130
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-create-vertical/references/TROUBLESHOOTING.md +0 -34
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-custom-apis/SKILL.md +0 -221
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-custom-apis/evals/trigger-evals.json +0 -12
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-custom-apis/references/WORKFLOW-EXAMPLES.md +0 -294
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-data-fetching/references/LOADER-PATTERNS.md +0 -102
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-project-setup/references/ENV-VARIABLES.md +0 -82
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-scapi-management/SKILL.md +0 -203
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-scapi-management/evals/trigger-evals.json +0 -12
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-scapi-management/references/CLI-COMMANDS.md +0 -122
- /package/content/guidance/mcp/{scapi → b2c-mcp-scapi}/references/custom-apis.md +0 -0
- /package/content/guidance/mcp/{scapi → b2c-mcp-scapi}/references/custom-properties.md +0 -0
- /package/content/guidance/mcp/{scapi → b2c-mcp-scapi}/references/jobs.md +0 -0
- /package/content/guidance/mcp/{scapi → b2c-mcp-scapi}/references/products.md +0 -0
- /package/content/guidance/mcp/{scapi → b2c-mcp-scapi}/references/promotions.md +0 -0
- /package/content/guidance/mcp/{scapi → b2c-mcp-scapi}/references/saving.md +0 -0
- /package/content/guidance/mcp/{scapi → b2c-mcp-scapi}/references/snippets.md +0 -0
- /package/content/guidance/mcp/{scapi → b2c-mcp-scapi}/references/tokens.md +0 -0
- /package/content/guidance/mcp/{server → b2c-mcp-server}/references/files.md +0 -0
|
@@ -1,123 +1,86 @@
|
|
|
1
1
|
# Hybrid Proxy Configuration Reference
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Authoritative guide in your project: `docs/README-HYBRID-PROXY.md`. Plugin wiring: `vite-plugins/hybrid-proxy.ts`.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Environment variables
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
| Variable | Scope | Purpose |
|
|
8
|
+
|---|---|---|
|
|
9
|
+
| `PUBLIC__app__hybrid__enabled` | all environments | Activates the client-side legacy-routes middleware. Default `false`. |
|
|
10
|
+
| `PUBLIC__app__hybrid__legacyRoutes` | all environments | JSON array of SFRA-owned routes (strings or `{ pattern, suffix }`). |
|
|
11
|
+
| `HYBRID_PROXY_ENABLED` | dev only | `true` turns the proxy on. |
|
|
12
|
+
| `SFCC_ORIGIN` | dev only | Full HTTPS URL of the SFRA sandbox. Highest priority target. |
|
|
13
|
+
| `SCAPI_PROXY_HOST` | dev only | Secondary target-origin override. |
|
|
14
|
+
| `HYBRID_ROUTING_RULES` | dev only | Cloudflare-style expression of paths Storefront Next owns. |
|
|
15
|
+
| `HYBRID_PROXY_LOCALE` | dev only, optional | Fallback locale for the SFRA path; else `PUBLIC__app__i18n__fallbackLng`, else `default`. |
|
|
16
|
+
| `PUBLIC__app__defaultSiteId` | dev | Site id used in `/s/<siteId>/...`. |
|
|
8
17
|
|
|
9
|
-
|
|
18
|
+
`hybrid` defaults to `{ enabled: false, legacyRoutes: [] }` in `config.server.ts`.
|
|
10
19
|
|
|
11
|
-
|
|
12
|
-
# Enable hybrid mode (activates client-side legacy-routes middleware)
|
|
13
|
-
PUBLIC__app__hybrid__enabled=true
|
|
14
|
-
|
|
15
|
-
# Routes owned by SFRA — Link clicks to these force full-page navigation
|
|
16
|
-
# Supports exact paths and React Router parameterized routes (/product/:id)
|
|
17
|
-
PUBLIC__app__hybrid__legacyRoutes='["/cart", "/checkout"]'
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
### Local Development Only
|
|
21
|
-
|
|
22
|
-
```bash
|
|
23
|
-
# Enable the Vite proxy
|
|
24
|
-
HYBRID_PROXY_ENABLED=true
|
|
25
|
-
|
|
26
|
-
# SFCC sandbox URL (the actual hostname, not the SCAPI base URL)
|
|
27
|
-
SFCC_ORIGIN=https://zzrf-001.dx.commercecloud.salesforce.com
|
|
28
|
-
|
|
29
|
-
# Cloudflare-style routing expression
|
|
30
|
-
# Paths matching → Storefront Next; paths not matching → proxied to SFCC
|
|
31
|
-
HYBRID_ROUTING_RULES='(http.request.uri.path matches "^/$" or http.request.uri.path matches "^/product.*" or http.request.uri.path matches "^/category.*" or http.request.uri.path matches "^/search.*" or http.request.uri.path matches "^/account.*" or http.request.uri.path matches "^/resource.*" or http.request.uri.path matches "^/action/.*")'
|
|
32
|
-
|
|
33
|
-
# Optional: locale for SFRA path transformation
|
|
34
|
-
HYBRID_PROXY_LOCALE=en-GB
|
|
35
|
-
|
|
36
|
-
# Commerce Cloud site ID (likely already set)
|
|
37
|
-
PUBLIC__app__defaultSiteId=RefArchGlobal
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
## Routing Rules Format
|
|
41
|
-
|
|
42
|
-
Each clause follows `http.request.uri.path matches "<regex>"`, joined with `or`:
|
|
20
|
+
## Routing rule format
|
|
43
21
|
|
|
44
22
|
```
|
|
45
23
|
(http.request.uri.path matches "^/$" or http.request.uri.path matches "^/category.*")
|
|
46
24
|
```
|
|
47
25
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
### Required Patterns
|
|
51
|
-
|
|
52
|
-
| Pattern | Why |
|
|
53
|
-
| -------------- | ------------------------------------------------ |
|
|
54
|
-
| `^/resource.*` | React Router resource routes (server endpoints) |
|
|
55
|
-
| `^/action/.*` | React Router actions (form submissions) |
|
|
56
|
-
|
|
57
|
-
### Automatically Excluded Paths (never proxied)
|
|
58
|
-
|
|
59
|
-
- `/@*`, `/__*` — Vite internals
|
|
60
|
-
- `/src/*`, `/node_modules/*` — Source files
|
|
61
|
-
- `*.data` — React Router data requests
|
|
62
|
-
- `/mobify/*` — SCAPI proxy paths
|
|
63
|
-
- Static asset extensions (`.js`, `.css`, `.png`, `.woff2`, etc.)
|
|
26
|
+
Only `http.request.uri.path matches "<regex>"` clauses joined by `or` are parsed. Always include `^/resource.*` and `^/action/.*`. `.data` requests are excluded automatically.
|
|
64
27
|
|
|
65
|
-
|
|
28
|
+
| Pattern | Route |
|
|
29
|
+
|---|---|
|
|
30
|
+
| `^/$` | Home |
|
|
31
|
+
| `^/login.*`, `^/logout.*`, `^/signup.*`, `^/reset-password.*` | Auth pages |
|
|
32
|
+
| `^/account.*` | Account |
|
|
33
|
+
| `^/product.*`, `^/category.*`, `^/search.*` | Catalog |
|
|
34
|
+
| `^/social-callback.*` | Social login callback |
|
|
66
35
|
|
|
67
|
-
## Path
|
|
36
|
+
## Path transformation
|
|
68
37
|
|
|
69
|
-
|
|
38
|
+
| Browser URL | Proxied to |
|
|
39
|
+
|---|---|
|
|
40
|
+
| `/` | `/s/<siteId>` |
|
|
41
|
+
| `/cart` | `/s/<siteId>/<locale>/cart` |
|
|
42
|
+
| `/on/demandware.static/...`, `/s/...` | unchanged |
|
|
70
43
|
|
|
71
|
-
|
|
72
|
-
| -------------- | ------------------------------------- |
|
|
73
|
-
| `/cart` | `/s/RefArchGlobal/en-GB/cart` |
|
|
74
|
-
| `/checkout` | `/s/RefArchGlobal/en-GB/checkout` |
|
|
44
|
+
With `url.prefix` set in `config.server.ts`:
|
|
75
45
|
|
|
76
|
-
|
|
46
|
+
| `url.prefix` | URL | Proxied to |
|
|
47
|
+
|---|---|---|
|
|
48
|
+
| `/:localeId` | `/uk/cart` | `/s/<siteId>/uk/cart` |
|
|
49
|
+
| `/:localeId` | `/cart` | `/s/<siteId>/<fallback locale>/cart` (`cart` is not a known locale) |
|
|
50
|
+
| `/:siteId/:localeId` | `/global/en-GB/cart` | `/s/global/en-GB/cart` |
|
|
77
51
|
|
|
78
|
-
|
|
52
|
+
Query strings are preserved.
|
|
79
53
|
|
|
80
|
-
|
|
54
|
+
## Cookie layers (local dev)
|
|
81
55
|
|
|
82
|
-
1.
|
|
83
|
-
2.
|
|
84
|
-
3.
|
|
56
|
+
1. Set-Cookie headers from SFCC: `Domain=.salesforce.com` rewritten to `localhost`.
|
|
57
|
+
2. Storefront Next's own cookies are written to `localhost` directly.
|
|
58
|
+
3. Injected `document.cookie` patch in proxied HTML so SFRA client-side cookie writes get the same treatment (SFRA omits `Secure` on `http://localhost`). Localhost-only; no production equivalent.
|
|
85
59
|
|
|
86
|
-
## Custom
|
|
60
|
+
## Custom matcher (last resort)
|
|
87
61
|
|
|
88
|
-
|
|
62
|
+
Edit `vite-plugins/hybrid-proxy.ts`:
|
|
89
63
|
|
|
90
64
|
```typescript
|
|
91
65
|
import { hybridProxyPlugin, shouldRouteToNext } from '@salesforce/storefront-next-dev';
|
|
92
66
|
|
|
93
67
|
hybridProxyPlugin({
|
|
68
|
+
// ...existing options...
|
|
94
69
|
routeMatcher: (pathname, rules) => {
|
|
95
|
-
if (pathname === '/my-custom-page') return true;
|
|
96
|
-
if (pathname === '/legacy-only') return false;
|
|
97
|
-
return shouldRouteToNext(pathname, rules);
|
|
70
|
+
if (pathname === '/my-custom-page') return true; // Storefront Next
|
|
71
|
+
if (pathname === '/legacy-only') return false; // SFRA
|
|
72
|
+
return shouldRouteToNext(pathname, rules); // default eCDN-style matching
|
|
98
73
|
},
|
|
74
|
+
// rewritePath: (pathname) => myRewrite(pathname) ?? null, // non-standard URL models only
|
|
99
75
|
});
|
|
100
76
|
```
|
|
101
77
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
In production, Cloudflare eCDN origin rules handle the split:
|
|
105
|
-
|
|
106
|
-
```
|
|
107
|
-
# Conceptual — configured in Cloudflare dashboard
|
|
108
|
-
/ → Storefront Next (MRT origin)
|
|
109
|
-
/product/* → Storefront Next (MRT origin)
|
|
110
|
-
/category/* → Storefront Next (MRT origin)
|
|
111
|
-
/cart → SFRA (B2C Instance origin)
|
|
112
|
-
/checkout/* → SFRA (B2C Instance origin)
|
|
113
|
-
/on/demandware.static/* → SFRA (B2C Instance origin)
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
## Shared Cookie Requirements
|
|
78
|
+
If the matcher throws, the request falls through to React Router. Overriding the matcher means local routing no longer matches eCDN behavior; avoid unless necessary.
|
|
117
79
|
|
|
118
|
-
|
|
80
|
+
## Gotchas
|
|
119
81
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
82
|
+
- Rules out of sync with eCDN: local behavior differs from production.
|
|
83
|
+
- A proxied path that does not exist on SFRA returns whatever SFCC returns.
|
|
84
|
+
- `HYBRID_PROXY_LOCALE` must be a locale SFRA accepts in `/s/<site>/<locale>/`; match the site's `defaultLocale`.
|
|
85
|
+
- Unsupported compression formats skip body rewriting and leak SFCC URLs.
|
|
86
|
+
- Production: do not rely on the plugin; configure eCDN routing (`b2c-cli:b2c-ecdn`) and the same cookie domain on both sides.
|
package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-i18n/SKILL.md
CHANGED
|
@@ -1,187 +1,152 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: sfnext-i18n
|
|
3
|
-
description:
|
|
3
|
+
description: >-
|
|
4
|
+
Translate and localize a Storefront Next storefront with i18next: useTranslation in components, getTranslation in loaders/actions/utilities, translations.json namespaces, pluralization and interpolation, Zod validation-message factories, adding a new language or locale, extension translations, and locale/currency switching. Use when adding or editing strings, "add a Brazilian Portuguese locale", supportedLngs / fallbackLng / supportedLocales, src/locales, locales:aggregate-extensions, LocaleSwitcher, mockI18nContext, hydration mismatch on translated text, or missing-key problems. Do not use for site/locale URL prefix routing (use `storefront-next:sfnext-routing`), site and currency configuration keys (use `storefront-next:sfnext-configuration`), or extension scaffolding (use `storefront-next:sfnext-extensions`).
|
|
4
5
|
---
|
|
5
6
|
|
|
6
|
-
#
|
|
7
|
+
# Storefront Next Internationalization
|
|
7
8
|
|
|
8
|
-
|
|
9
|
+
Storefront Next uses `i18next` with a server instance (all languages loaded) and a browser instance (loads the active language as a static JS chunk). The infrastructure comes from `@salesforce/storefront-next-runtime/i18n`; your project owns the translations in `src/locales/`. The full guide ships in your project as `docs/README-I18N.md`. Caution: its locale-detection and `set-locale` passages are outdated; trust the code and this skill.
|
|
9
10
|
|
|
10
|
-
##
|
|
11
|
+
## Which API to use
|
|
11
12
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
| Where | API |
|
|
14
|
+
|-------|-----|
|
|
15
|
+
| React components | `useTranslation` from `react-i18next` |
|
|
16
|
+
| Loaders, actions, middleware, utilities, tests | `getTranslation` from `@salesforce/storefront-next-runtime/i18n` |
|
|
15
17
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
Translations are organized as namespace files per locale, compiled into a TypeScript index:
|
|
18
|
+
```tsx
|
|
19
|
+
import { useTranslation } from 'react-i18next';
|
|
19
20
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
└── product.json # "product" namespace (separate file)
|
|
25
|
-
|
|
26
|
-
src/locales/en-GB/
|
|
27
|
-
├── index.ts
|
|
28
|
-
├── translations.json
|
|
29
|
-
└── product.json
|
|
21
|
+
export function AddToCart({ count }: { count: number }) {
|
|
22
|
+
const { t } = useTranslation('product'); // namespace = top-level key in translations.json
|
|
23
|
+
return <button>{t('addToCart', { count })}</button>;
|
|
24
|
+
}
|
|
30
25
|
```
|
|
31
26
|
|
|
32
|
-
|
|
27
|
+
```ts
|
|
28
|
+
import type { LoaderFunctionArgs } from 'react-router';
|
|
29
|
+
import { getTranslation } from '@salesforce/storefront-next-runtime/i18n';
|
|
33
30
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
const allTranslations = { ...translations, product, ...extensionTranslations };
|
|
40
|
-
export default allTranslations satisfies ResourceLanguage;
|
|
31
|
+
export function loader({ context }: LoaderFunctionArgs) {
|
|
32
|
+
const { t } = getTranslation(context); // server: pass the router context
|
|
33
|
+
return { title: t('product:title') };
|
|
34
|
+
}
|
|
41
35
|
```
|
|
42
36
|
|
|
43
|
-
|
|
37
|
+
- Without a namespace argument, prefix keys: `useTranslation()` then `t('product:title')` works. You lose key autocomplete, not correctness.
|
|
38
|
+
- Client-only non-component code may call `getTranslation()` with no argument.
|
|
39
|
+
- Other exports from the same module: `getLocale`, `mockI18nContext` (tests), `createI18nMiddleware`.
|
|
44
40
|
|
|
45
|
-
|
|
41
|
+
## File layout
|
|
46
42
|
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
"copyright": "© {{year}} Company"
|
|
55
|
-
}
|
|
56
|
-
}
|
|
43
|
+
```
|
|
44
|
+
src/locales/
|
|
45
|
+
├── index.ts # barrel: explicit import of every locale
|
|
46
|
+
├── types.ts # DeepPartial<T>
|
|
47
|
+
└── en-US/
|
|
48
|
+
├── index.ts # merges translations.json + aggregated extension strings
|
|
49
|
+
└── translations.json # ONE file; each top-level key is a namespace
|
|
57
50
|
```
|
|
58
51
|
|
|
59
|
-
|
|
52
|
+
The project ships 17 locale directories (`ls src/locales`). Each `translations.json` is a single file whose top-level keys (`product`, `cart`, `checkout`, `routeError`, ...) are namespaces. There is no separate per-namespace file.
|
|
60
53
|
|
|
61
54
|
```json
|
|
62
55
|
{
|
|
63
|
-
"
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
56
|
+
"product": {
|
|
57
|
+
"addToCart": "Add to cart",
|
|
58
|
+
"greeting": "Hello, {{name}}!",
|
|
59
|
+
"itemCount_one": "{{count}} item",
|
|
60
|
+
"itemCount_other": "{{count}} items"
|
|
61
|
+
}
|
|
68
62
|
}
|
|
69
63
|
```
|
|
70
64
|
|
|
71
|
-
|
|
65
|
+
- Interpolation uses `{{var}}`.
|
|
66
|
+
- Plurals use i18next suffix keys (`_one`, `_other`, plus `_zero`, `_few`, ... where a language needs them), as in the shipped files. Call `t('itemCount', { count })` with the base key. Do not use nested `{ one, other }` objects.
|
|
67
|
+
- `t()` key types come from the `en-GB` resources (`src/middlewares/i18next.server.ts`). Non-English locales are typed `satisfies DeepPartial<typeof enUS>`, so they may omit keys (i18next falls back to `fallbackLng`) but keys they include must match the English shape.
|
|
72
68
|
|
|
73
|
-
|
|
74
|
-
import { useTranslation } from 'react-i18next';
|
|
69
|
+
To customize copy, edit `translations.json` directly.
|
|
75
70
|
|
|
76
|
-
|
|
77
|
-
const { t } = useTranslation('product');
|
|
78
|
-
|
|
79
|
-
return (
|
|
80
|
-
<div>
|
|
81
|
-
<h1>{t('title')}</h1>
|
|
82
|
-
<button>{t('addToCart')}</button>
|
|
83
|
-
<p>{t('greeting', { name: 'John' })}</p>
|
|
84
|
-
<p>{t('itemCount', { count: 5 })}</p>
|
|
85
|
-
</div>
|
|
86
|
-
);
|
|
87
|
-
}
|
|
88
|
-
```
|
|
71
|
+
## Add a new locale (checklist)
|
|
89
72
|
|
|
90
|
-
|
|
73
|
+
Keep these in sync or the locale silently never appears:
|
|
91
74
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
75
|
+
1. Create `src/locales/pt-BR/index.ts` and `translations.json`. Copy an existing locale (for example `de-DE`, which carries the `DeepPartial` typing) and translate.
|
|
76
|
+
2. Import and register it in the barrel `src/locales/index.ts` (both the import and the exported object).
|
|
77
|
+
3. Add the id to `i18n.supportedLngs` in `config.server.ts` (and check `fallbackLng`).
|
|
78
|
+
4. Add `{ id: 'pt-BR', preferredCurrency: 'BRL' }` to the site's `supportedLocales`, and make sure that currency is in the site's `supportedCurrencies`. The shape is `commerce.sites[]`; see `storefront-next:sfnext-configuration`.
|
|
79
|
+
5. Add extension translations for the new locale (`src/extensions/<ext>/locales/pt-BR/translations.json`) if the extensions you use ship translations.
|
|
80
|
+
6. Run `pnpm locales:aggregate-extensions` (also run automatically by `pnpm dev` and `pnpm build`).
|
|
81
|
+
7. Verify: `pnpm dev`, then open the site under the new locale prefix and switch via the locale switcher.
|
|
96
82
|
|
|
97
|
-
|
|
98
|
-
const { t } = useTranslation('product');
|
|
99
|
-
t('title'); // Works
|
|
100
|
-
```
|
|
83
|
+
Details and currency rules: [references/locale-config.md](references/locale-config.md).
|
|
101
84
|
|
|
102
|
-
##
|
|
85
|
+
## How the active locale is chosen
|
|
103
86
|
|
|
104
|
-
|
|
105
|
-
import { getTranslation } from '@/lib/i18next';
|
|
87
|
+
The locale is resolved from the site context, driven by the URL prefix (default `/:siteId/:localeId`, from `config.url.prefix`). `siteContextMiddleware` runs before `i18nextMiddleware` (see the middleware array in `src/root.tsx`). It is not read from a `lng` cookie or `Accept-Language`.
|
|
106
88
|
|
|
107
|
-
|
|
108
|
-
export function loader(args: LoaderFunctionArgs) {
|
|
109
|
-
const { t } = getTranslation(args.context);
|
|
110
|
-
return { title: t('product:title') };
|
|
111
|
-
}
|
|
89
|
+
`src/components/locale-switcher` changes locale by navigating to the same page under the rebuilt prefix (`buildUrl`, `resolvePrefix`, `stripPathPrefix` from `@salesforce/storefront-next-runtime/site-context`) and posting the choice to persist it. There is no `action.set-locale` route. Render it with `import LocaleSwitcher from '@/components/locale-switcher'`. Currency is switched independently with `src/components/currency-switcher`.
|
|
112
90
|
|
|
113
|
-
|
|
114
|
-
const { t } = getTranslation();
|
|
115
|
-
const message = t('product:addToCart');
|
|
116
|
-
```
|
|
91
|
+
## Extension translations
|
|
117
92
|
|
|
118
|
-
|
|
93
|
+
Each extension keeps its strings in `src/extensions/<name>/locales/<locale>/translations.json`. Its namespace is `ext` + PascalCase directory name:
|
|
119
94
|
|
|
120
|
-
|
|
95
|
+
```tsx
|
|
96
|
+
const { t } = useTranslation('extStoreLocator'); // src/extensions/store-locator
|
|
97
|
+
```
|
|
121
98
|
|
|
122
|
-
|
|
123
|
-
// WRONG — Module-level schema (race condition: t() may not be initialized)
|
|
124
|
-
export const schema = z.object({
|
|
125
|
-
email: z.string().email(t('validation:emailInvalid'))
|
|
126
|
-
});
|
|
99
|
+
`src/extensions/locales/<locale>/index.ts` is generated by `pnpm locales:aggregate-extensions`. Never edit it, and leave its `// @sfdc-extension-line` marker comments alone.
|
|
127
100
|
|
|
128
|
-
|
|
129
|
-
import type { TFunction } from 'i18next';
|
|
101
|
+
## Validation messages: Zod schema factories
|
|
130
102
|
|
|
131
|
-
|
|
132
|
-
return z.object({
|
|
133
|
-
email: z.string().email(t('validation:emailInvalid'))
|
|
134
|
-
});
|
|
135
|
-
};
|
|
103
|
+
Module-level `t()` runs before i18next is initialized. Build the schema from a function:
|
|
136
104
|
|
|
137
|
-
|
|
105
|
+
```tsx
|
|
138
106
|
import { useMemo } from 'react';
|
|
107
|
+
import { z } from 'zod';
|
|
108
|
+
import type { TFunction } from 'i18next';
|
|
139
109
|
import { useTranslation } from 'react-i18next';
|
|
140
110
|
|
|
111
|
+
export const createSchema = (t: TFunction) =>
|
|
112
|
+
z.object({ email: z.string().email(t('validation:emailInvalid')) });
|
|
113
|
+
|
|
141
114
|
function MyForm() {
|
|
142
115
|
const { t } = useTranslation();
|
|
143
|
-
const schema = useMemo(() => createSchema(t), [t]);
|
|
144
|
-
|
|
145
|
-
const form = useForm({ resolver: zodResolver(schema) });
|
|
116
|
+
const schema = useMemo(() => createSchema(t as unknown as TFunction), [t]);
|
|
117
|
+
// useForm({ resolver: zodResolver(schema) })
|
|
146
118
|
}
|
|
147
119
|
```
|
|
148
120
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
```typescript
|
|
152
|
-
import LocaleSwitcher from '@/components/locale-switcher';
|
|
153
|
-
|
|
154
|
-
export function Footer() {
|
|
155
|
-
return <footer><LocaleSwitcher /></footer>;
|
|
156
|
-
}
|
|
157
|
-
```
|
|
121
|
+
`createCustomerProfileFormSchema` in `src/components/customer-profile-form/index.tsx` is a working example.
|
|
158
122
|
|
|
159
|
-
##
|
|
123
|
+
## Testing translations
|
|
160
124
|
|
|
161
|
-
|
|
125
|
+
`vitest.setup.ts` initializes i18next with all locales (language `en-GB`), so components using `useTranslation` render real English text. For loaders/actions, `createTestContext({ locale })` from `@/lib/test-utils` wires `mockI18nContext` for you; call it directly when building a context by hand. Assert on text with `getTranslation()` or literal English. Locale completeness tests (for example `src/locales/*.locale-completeness.test.ts`) are a good pattern for feature-specific keys. See `storefront-next:sfnext-testing`.
|
|
162
126
|
|
|
163
|
-
|
|
164
|
-
src/extensions/my-extension/locales/
|
|
165
|
-
├── en-US/translations.json
|
|
166
|
-
└── it-IT/translations.json
|
|
167
|
-
```
|
|
127
|
+
## Pitfalls
|
|
168
128
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
129
|
+
| Pitfall | Fix |
|
|
130
|
+
|---------|-----|
|
|
131
|
+
| Importing `getTranslation` from `@/lib/i18next` | It lives in `@salesforce/storefront-next-runtime/i18n`. |
|
|
132
|
+
| Importing `@salesforce/storefront-next-runtime/i18n/client` from a `*.server.ts` file | Browser-only; it fails to bundle and lint blocks it. |
|
|
133
|
+
| Statically importing `@/locales` in `root.tsx` or the error boundary | Pulls every language into the client bundle; `src/locales/locale-imports.test.ts` guards this. The root loader passes `errorTranslations` (the `routeError` bundle) instead. |
|
|
134
|
+
| New locale not showing up | Check all of: `src/locales/index.ts`, `supportedLngs`, site `supportedLocales`. |
|
|
135
|
+
| `t()` at module scope | Use a factory or call inside the component/function. |
|
|
136
|
+
| Hydration mismatch on translated text | `src/i18n-client-init.ts` gates hydration with `whenI18nReady()`; do not bypass it. |
|
|
137
|
+
| Same key name in two namespaces | Use `t('ns:key')` to disambiguate. |
|
|
138
|
+
| "Click here" style link text | `jsx-a11y/anchor-ambiguous-text` cannot see translated strings; review link copy in JSON (see `storefront-next:sfnext-accessibility`). |
|
|
173
139
|
|
|
174
|
-
##
|
|
140
|
+
## Finding more
|
|
175
141
|
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
| Missing namespace | Keys not found | Always pass namespace: `useTranslation('product')` |
|
|
179
|
-
| Module-level `t()` in schemas | Race condition on initialization | Use factory pattern: `createSchema(t)` |
|
|
180
|
-
| Forgetting context on server | Translations not found | Use `getTranslation(args.context)` in loaders |
|
|
181
|
-
| Duplicate keys across namespaces | Wrong translation shown | Prefix with namespace: `t('product:title')` |
|
|
142
|
+
- `docs/README-I18N.md` (architecture, currency flow, using a different i18n library) and the doc index in `AGENTS.md`.
|
|
143
|
+
- `b2c docs search "i18n"` (or the MCP `docs_search` tool) for the Storefront Next docs corpus.
|
|
182
144
|
|
|
183
145
|
## Related Skills
|
|
184
146
|
|
|
185
|
-
- `storefront-next:sfnext-
|
|
186
|
-
- `storefront-next:sfnext-
|
|
187
|
-
- `storefront-next:sfnext-
|
|
147
|
+
- `storefront-next:sfnext-configuration` - `i18n`, `supportedLocales`, `supportedCurrencies` config
|
|
148
|
+
- `storefront-next:sfnext-routing` - site/locale URL prefix and site-aware links
|
|
149
|
+
- `storefront-next:sfnext-extensions` - extension structure and `ext*` namespaces
|
|
150
|
+
- `storefront-next:sfnext-components` - using translations in UI components
|
|
151
|
+
- `storefront-next:sfnext-testing` - unit and story tests
|
|
152
|
+
- `storefront-next:sfnext-accessibility` - translated link and label text
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
[
|
|
2
|
+
{"query": "Add Brazilian Portuguese (pt-BR) as a supported language for our Storefront Next site and translate the cart strings", "should_trigger": true},
|
|
3
|
+
{"query": "How do I translate a Zod validation message in my checkout form without it showing the raw key?", "should_trigger": true},
|
|
4
|
+
{"query": "Change the URL prefix so the storefront uses /:siteId/:localeId paths and add a new site to commerce.sites", "should_trigger": false}
|
|
5
|
+
]
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Locale and currency configuration
|
|
2
|
+
|
|
3
|
+
Locale support is declared in several places that must agree. All keys below live in `config.server.ts`; see `storefront-next:sfnext-configuration` and `docs/README-CONFIG-OPTIONS.md` for the full option reference.
|
|
4
|
+
|
|
5
|
+
## Must stay in sync
|
|
6
|
+
|
|
7
|
+
| Place | What |
|
|
8
|
+
|-------|------|
|
|
9
|
+
| `i18n.supportedLngs` / `i18n.fallbackLng` | Languages the app serves; `src/middlewares/i18next.server.ts` reads them |
|
|
10
|
+
| `commerce.sites[].supportedLocales` | `{ id, preferredCurrency }` per locale, per site |
|
|
11
|
+
| `commerce.sites[].supportedCurrencies` | Currencies a shopper may pick; each `preferredCurrency` must be listed |
|
|
12
|
+
| `src/locales/<id>/` + `src/locales/index.ts` | Translation files and barrel registration |
|
|
13
|
+
|
|
14
|
+
Rules of thumb:
|
|
15
|
+
|
|
16
|
+
- Every id in `supportedLngs` needs a directory in `src/locales/` and an entry in the barrel.
|
|
17
|
+
- Every id in `supportedLngs` should appear in at least one site's `supportedLocales`; the locale switcher only lists languages that are in both `supportedLngs` and the current site's `supportedLocales`.
|
|
18
|
+
- Different sites can expose different subsets of locales.
|
|
19
|
+
- Env overrides use the `PUBLIC__` double-underscore convention described in `docs/README-CONFIG.md`.
|
|
20
|
+
|
|
21
|
+
## Currency
|
|
22
|
+
|
|
23
|
+
Locale and currency switch independently. Priority: shopper's manual choice (cookie) over the locale's `preferredCurrency` over the site default currency. The UI is `src/components/currency-switcher`.
|
|
24
|
+
|
|
25
|
+
## Typing
|
|
26
|
+
|
|
27
|
+
`src/middlewares/i18next.server.ts` augments i18next `CustomTypeOptions` with the `en-GB` resources so `t('ns:key')` is type-checked. `src/locales/types.ts` exports `DeepPartial`; non-English locales use `satisfies ResourceLanguage satisfies DeepPartial<typeof enUS>`. Run `pnpm typecheck` after adding keys: a key present in a translated locale but missing in English, or with a different nested shape, fails the type check.
|
|
28
|
+
|
|
29
|
+
## Client loading
|
|
30
|
+
|
|
31
|
+
`src/i18n-client-init.ts` calls `initI18next` from `@salesforce/storefront-next-runtime/i18n/client` with a `loadLocale` that dynamically imports `@/locales/<language>/index.ts`, so each language becomes its own chunk. `whenI18nReady()` delays hydration until the active language chunk is loaded (with a timeout safety net). Keep the `import()` template there so Vite can split the chunks.
|
|
32
|
+
|
|
33
|
+
## Using a different i18n library
|
|
34
|
+
|
|
35
|
+
i18next is only the translation layer; locale resolution is independent (site context). `docs/README-I18N.md` ("Using a Different i18n Library") describes what to replace.
|
package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-overview/SKILL.md
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sfnext-overview
|
|
3
|
+
description: >-
|
|
4
|
+
Start here for any Salesforce Commerce Storefront Next (sfnext) task: a router that maps what you want to do to the right storefront-next skill, says to read your project's AGENTS.md and docs/README-*.md first, and carries a cheat sheet for the sfnext CLI, the b2c CLI, the b2c-dx-mcp tools, and the docs search fallback. Use when starting work in a Storefront Next project, when unsure which skill applies, when asked "how do I do X in Storefront Next", "what commands exist", or "where is the documentation". Do not use once a specific area is clear; go straight to that skill (for example `storefront-next:sfnext-routing` or `storefront-next:sfnext-seo`).
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Storefront Next Overview and Router
|
|
8
|
+
|
|
9
|
+
## Before anything else
|
|
10
|
+
|
|
11
|
+
1. Read `AGENTS.md` at your project root. It is the source of truth for project structure, commands, and conventions; skills never override it.
|
|
12
|
+
2. Check `docs/README-*.md` (one per topic) and `instructions/*.mdc` in the project. Prefer them over memory.
|
|
13
|
+
3. Versions and compatibility: `docs/COMPATIBILITY.md` and `package.json#storefrontNext`.
|
|
14
|
+
4. Requirements: Node >= 24, pnpm >= 10.28.
|
|
15
|
+
|
|
16
|
+
## Which skill for which task
|
|
17
|
+
|
|
18
|
+
| I want to... | Skill |
|
|
19
|
+
|---|---|
|
|
20
|
+
| Create a project, install, run locally, pick a starter theme | `storefront-next:sfnext-project-setup` |
|
|
21
|
+
| Change `config.server.ts`, env overrides, feature flags, multi-site config | `storefront-next:sfnext-configuration` |
|
|
22
|
+
| Build a bundle, push to Managed Runtime, deploy cartridges, env vars | `storefront-next:sfnext-deployment` |
|
|
23
|
+
| Add or change a route, loader, action, URL pattern | `storefront-next:sfnext-routing` |
|
|
24
|
+
| Fetch data, SCAPI calls in loaders, streaming, Suspense | `storefront-next:sfnext-data-fetching` |
|
|
25
|
+
| Control loader revalidation and caching after actions | `storefront-next:sfnext-revalidation` |
|
|
26
|
+
| Client state, contexts, stores | `storefront-next:sfnext-state-management` |
|
|
27
|
+
| Speed, bundle size, Lighthouse, web vitals | `storefront-next:sfnext-performance` |
|
|
28
|
+
| Login, SLAS, guest/registered sessions, passkeys, social login | `storefront-next:sfnext-authentication` |
|
|
29
|
+
| Add or inspect SCAPI endpoints and clients (including custom APIs) | `storefront-next:sfnext-scapi` |
|
|
30
|
+
| Serve some routes from another storefront (hybrid proxy) | `storefront-next:sfnext-hybrid-storefronts` |
|
|
31
|
+
| Build or modify UI components | `storefront-next:sfnext-components` |
|
|
32
|
+
| Design tokens, Tailwind, styling | `storefront-next:sfnext-theming` |
|
|
33
|
+
| Page Designer components and regions | `storefront-next:sfnext-page-designer` |
|
|
34
|
+
| Author or install extensions, UITargets | `storefront-next:sfnext-extensions` |
|
|
35
|
+
| Translations, locales, language switching | `storefront-next:sfnext-i18n` |
|
|
36
|
+
| Unit, component, Storybook and e2e tests | `storefront-next:sfnext-testing` |
|
|
37
|
+
| CSP, security headers, bot protection | `storefront-next:sfnext-security` |
|
|
38
|
+
| Analytics adapters, consent banner, attribution | `storefront-next:sfnext-analytics-consent` |
|
|
39
|
+
| Meta tags, JSON-LD, canonical URLs, seoRoutes | `storefront-next:sfnext-seo` |
|
|
40
|
+
| Shopper Context, order management, guest order lookup, email cartridge, shipped extensions | `storefront-next:sfnext-commerce-features` |
|
|
41
|
+
| Lint, typecheck, pre-merge checks | `storefront-next:sfnext-quality-gates` |
|
|
42
|
+
| Accessibility checks and fixes | `storefront-next:sfnext-accessibility` |
|
|
43
|
+
|
|
44
|
+
Figma-to-Page-Designer work lives in the separate `figma-to-sfnext-pagedesigner` plugin.
|
|
45
|
+
|
|
46
|
+
## sfnext CLI cheat sheet
|
|
47
|
+
|
|
48
|
+
Installed with the project (`@salesforce/storefront-next-dev`). Prefer the `package.json` scripts, which wrap these.
|
|
49
|
+
|
|
50
|
+
| Command | Purpose |
|
|
51
|
+
|---|---|
|
|
52
|
+
| `sfnext create-storefront` | Scaffold a project (`--vertical` picks the starter theme) |
|
|
53
|
+
| `sfnext dev` / `sfnext preview` | Dev server / preview of the built app |
|
|
54
|
+
| `sfnext create-bundle`, `sfnext push` | Build and push a bundle to Managed Runtime |
|
|
55
|
+
| `sfnext prepare-local` | Prepare a local build |
|
|
56
|
+
| `sfnext generate-cartridge`, `validate-cartridge`, `deploy-cartridge` | Cartridge build, check, upload |
|
|
57
|
+
| `sfnext setup-base-cartridge` | Register the SLAS scope for the base cartridge |
|
|
58
|
+
| `sfnext create-instructions` | Generate extension install instructions |
|
|
59
|
+
| `sfnext config inspect`, `config aggregate-extensions` | Show resolved config; merge extension config |
|
|
60
|
+
| `sfnext extensions create|install|list|remove` | Manage extensions |
|
|
61
|
+
| `sfnext scapi add|available|list|remove` | Manage SCAPI client wiring |
|
|
62
|
+
| `sfnext locales aggregate-extensions` | Merge extension locale files |
|
|
63
|
+
|
|
64
|
+
Run `sfnext <command> --help` for flags; check your project's `package.json` scripts for the exact invocations.
|
|
65
|
+
|
|
66
|
+
## b2c CLI cheat sheet
|
|
67
|
+
|
|
68
|
+
Use `b2c` (`npx @salesforce/b2c-cli` if not installed) for platform work around the storefront:
|
|
69
|
+
|
|
70
|
+
| Need | Command family |
|
|
71
|
+
|---|---|
|
|
72
|
+
| Managed Runtime projects, envs, env vars, bundles, logs | `b2c mrt ...` (skill `b2c-cli:b2c-mrt`) |
|
|
73
|
+
| Deploy or watch cartridges on an instance | `b2c code deploy`, `b2c code watch` |
|
|
74
|
+
| SCAPI schemas and custom APIs | `b2c scapi schemas ...`, `b2c scapi custom ...` |
|
|
75
|
+
| SLAS clients | `b2c slas ...` (skill `b2c-cli:b2c-slas`) |
|
|
76
|
+
| Instance and site data, WebDAV, jobs, logs | `b2c sites`, `b2c webdav`, `b2c job`, `b2c logs` |
|
|
77
|
+
| Documentation | `b2c docs search`, `b2c docs read` |
|
|
78
|
+
|
|
79
|
+
## MCP tools (b2c-dx-mcp, STOREFRONTNEXT toolset)
|
|
80
|
+
|
|
81
|
+
`mrt_bundle_push`, `mrt_logs_watch`, `scapi_search`, `scapi_execute`, `scapi_snippet_save`, `scapi_schemas_list`, `scapi_custom_apis_get_status`, plus the docs tools `docs_search`, `docs_read`, `docs_list`, `docs_schema_search`, `docs_schema_read`, `docs_schema_list`. Availability depends on how the MCP server was started; list tools in your client.
|
|
82
|
+
|
|
83
|
+
## Docs search fallback
|
|
84
|
+
|
|
85
|
+
When the project docs and skills do not answer it, search the Storefront Next developer guides:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
b2c docs search "storefront next getting started" --category sfnext
|
|
89
|
+
b2c docs read <id-from-results>
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
MCP equivalent: `docs_search` with the storefront category, then `docs_read`. Workspace detection also boosts Storefront Next results automatically in a project. See `b2c-cli:b2c-docs`.
|
|
93
|
+
|
|
94
|
+
## Related Skills
|
|
95
|
+
|
|
96
|
+
- `storefront-next:sfnext-project-setup` - usual next step for new work
|
|
97
|
+
- `storefront-next:sfnext-configuration` - config and env
|
|
98
|
+
- `storefront-next:sfnext-routing` - routes and loaders
|
|
99
|
+
- `storefront-next:sfnext-quality-gates` - checks before you finish
|
|
100
|
+
- `b2c-cli:b2c-docs` - documentation search
|
|
101
|
+
- `b2c-cli:b2c-mrt` - Managed Runtime
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
[
|
|
2
|
+
{"query": "I just opened a Storefront Next project for the first time - where do I start and which commands exist?", "should_trigger": true},
|
|
3
|
+
{"query": "Which Storefront Next skill or doc covers what I need to do? I'm not sure where to look", "should_trigger": true},
|
|
4
|
+
{"query": "Add a custom engagement adapter that respects the consent banner", "should_trigger": false}
|
|
5
|
+
]
|