@salesforce/b2c-dx-mcp 3.2.1 → 3.4.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 +54 -25
- 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/SKILL.md +2 -0
- package/content/guidance/b2c-cli/b2c-ecdn/references/ADVANCED.md +1 -1
- package/content/guidance/b2c-cli/b2c-job/SKILL.md +9 -3
- package/content/guidance/b2c-cli/b2c-job/references/IMPORT.md +1 -1
- package/content/guidance/b2c-cli/b2c-job/references/RUN-AND-MONITOR.md +35 -6
- 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 +6 -2
- 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-edge-traffic-triage/SKILL.md +69 -0
- package/content/guidance/b2c-ops/b2c-job-health/SKILL.md +13 -8
- 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 +5 -4
- package/content/guidance/index.json +981 -259
- 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/b2c-mcp-scapi/SKILL.md +98 -0
- package/content/guidance/mcp/b2c-mcp-scapi/references/authentication.md +34 -0
- package/content/guidance/mcp/b2c-mcp-scapi/references/compose-verify.md +25 -0
- package/content/guidance/mcp/b2c-mcp-scapi/references/confirmation.md +30 -0
- package/content/guidance/mcp/b2c-mcp-scapi/references/discover.md +94 -0
- package/content/guidance/mcp/b2c-mcp-scapi/references/jobs.md +72 -0
- package/content/guidance/mcp/b2c-mcp-scapi/references/workflows.md +28 -0
- package/content/guidance/mcp/{server → b2c-mcp-server}/SKILL.md +52 -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/docs/docs-read.js +4 -2
- package/dist/tools/docs/docs-search.js +10 -8
- package/dist/tools/docs/topics.d.ts +5 -0
- package/dist/tools/docs/topics.js +5 -0
- 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 +106 -81
- package/dist/tools/scapi/scapi-schemas-list.js +93 -56
- package/dist/utils/types.d.ts +6 -0
- package/node_modules/@salesforce/b2c-agent-plugins/CHANGELOG.md +32 -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 +54 -25
- 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/SKILL.md +2 -0
- 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/SKILL.md +9 -3
- 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-job/references/RUN-AND-MONITOR.md +35 -6
- 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 +6 -2
- 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 +4 -3
- package/node_modules/@salesforce/b2c-agent-plugins/b2c-ops/README.md +1 -0
- package/node_modules/@salesforce/b2c-agent-plugins/b2c-ops/plugin.json +4 -3
- 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-edge-traffic-triage/SKILL.md +69 -0
- package/node_modules/@salesforce/b2c-agent-plugins/b2c-ops/skills/b2c-job-health/SKILL.md +13 -8
- 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 +5 -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 +4 -4
- package/content/guidance/mcp/scapi/SKILL.md +0 -203
- package/content/guidance/mcp/scapi/references/jobs.md +0 -30
- 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/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,203 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: sfnext-scapi-management
|
|
3
|
-
description: Add, remove, and list typed SCAPI clients in a Storefront Next project using `b2c sfnext scapi` commands, and browse API schemas to discover endpoints before writing loaders. Use this skill whenever the user says 'sfnext scapi', 'add an API to my storefront next project', 'what SCAPI clients does my sfnext project have', 'remove an API client', 'list available APIs for sfnext', 'browse schema before writing a loader', or asks how to integrate a specific SCAPI (shopper-baskets, shopper-search, etc.) into their Storefront Next project as a typed client. Also use when they want to check what parameters an endpoint accepts before coding. NOT for making actual SCAPI calls from loaders — see sfnext-data-fetching. NOT for standalone schema browsing outside a Storefront Next project — see b2c-cli:b2c-scapi-schemas.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# SCAPI Client Management Skill
|
|
7
|
-
|
|
8
|
-
This skill covers managing which typed SCAPI clients are available in a Storefront Next project and how to discover their shapes before writing data-fetching code.
|
|
9
|
-
|
|
10
|
-
## Overview
|
|
11
|
-
|
|
12
|
-
Storefront Next projects use typed SCAPI clients generated from OpenAPI schemas. Two complementary command sets work together:
|
|
13
|
-
|
|
14
|
-
| Command Set | Purpose | When to Use |
|
|
15
|
-
|-------------|---------|-------------|
|
|
16
|
-
| `b2c sfnext scapi` | Manage which clients exist in your project | Adding/removing APIs, checking what's configured |
|
|
17
|
-
| `b2c scapi schemas` | Browse API shapes (endpoints, fields, types) | Before writing a loader — discover what's available |
|
|
18
|
-
|
|
19
|
-
## Managing Project Clients
|
|
20
|
-
|
|
21
|
-
### List Available APIs
|
|
22
|
-
|
|
23
|
-
See what SCAPI APIs can be added to your project:
|
|
24
|
-
|
|
25
|
-
```bash
|
|
26
|
-
# show all APIs available to add
|
|
27
|
-
b2c sfnext scapi available
|
|
28
|
-
|
|
29
|
-
# filter by API family
|
|
30
|
-
b2c sfnext scapi available --api-family product
|
|
31
|
-
|
|
32
|
-
# JSON output for scripting
|
|
33
|
-
b2c sfnext scapi available --json
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
### Add a Client
|
|
37
|
-
|
|
38
|
-
Add a typed SCAPI client to your project. This generates type-safe client code accessible via `createApiClients(context)`:
|
|
39
|
-
|
|
40
|
-
```bash
|
|
41
|
-
# add the shopper-products API
|
|
42
|
-
b2c sfnext scapi add product shopper-products v1
|
|
43
|
-
|
|
44
|
-
# add a custom API
|
|
45
|
-
b2c sfnext scapi add custom my-loyalty-api v1
|
|
46
|
-
|
|
47
|
-
# force re-add (overwrite existing)
|
|
48
|
-
b2c sfnext scapi add product shopper-products v1 --force
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
After adding, the client becomes available in your loaders:
|
|
52
|
-
|
|
53
|
-
```typescript
|
|
54
|
-
import { createApiClients } from '@/lib/api-clients';
|
|
55
|
-
|
|
56
|
-
export function loader({ context }: LoaderFunctionArgs) {
|
|
57
|
-
const clients = createApiClients(context);
|
|
58
|
-
return {
|
|
59
|
-
product: clients.shopperProducts.getProduct({
|
|
60
|
-
params: { path: { id: params.productId } }
|
|
61
|
-
}).then(({ data }) => data),
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
### List Current Project Clients
|
|
67
|
-
|
|
68
|
-
See which SCAPI clients are currently configured in your project:
|
|
69
|
-
|
|
70
|
-
```bash
|
|
71
|
-
# list all configured clients
|
|
72
|
-
b2c sfnext scapi list
|
|
73
|
-
|
|
74
|
-
# JSON output
|
|
75
|
-
b2c sfnext scapi list --json
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
### Remove a Client
|
|
79
|
-
|
|
80
|
-
Remove an unused client to reduce bundle size:
|
|
81
|
-
|
|
82
|
-
```bash
|
|
83
|
-
# remove a client
|
|
84
|
-
b2c sfnext scapi remove product shopper-products
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
## Discovering API Shapes
|
|
88
|
-
|
|
89
|
-
Before writing a loader or action, use `b2c scapi schemas` to explore what endpoints and fields an API offers.
|
|
90
|
-
|
|
91
|
-
### The Schema-First Workflow
|
|
92
|
-
|
|
93
|
-
```
|
|
94
|
-
1. b2c scapi schemas list → Find the API family/name/version
|
|
95
|
-
2. b2c scapi schemas get ... --list-paths → See available endpoints
|
|
96
|
-
3. b2c scapi schemas get ... --expand-paths → See request params + response shape
|
|
97
|
-
4. Write your loader using the discovered types
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
### Step 1: Find the API
|
|
101
|
-
|
|
102
|
-
```bash
|
|
103
|
-
# list all available schemas
|
|
104
|
-
b2c scapi schemas list
|
|
105
|
-
|
|
106
|
-
# filter to product APIs
|
|
107
|
-
b2c scapi schemas list --api-family product
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
### Step 2: See Available Endpoints
|
|
111
|
-
|
|
112
|
-
```bash
|
|
113
|
-
# list all paths in shopper-products
|
|
114
|
-
b2c scapi schemas get product shopper-products v1 --list-paths
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
Output shows endpoints like `/products/{productId}`, `/products`, etc.
|
|
118
|
-
|
|
119
|
-
### Step 3: Expand Endpoint Details
|
|
120
|
-
|
|
121
|
-
```bash
|
|
122
|
-
# see the full shape of a specific endpoint
|
|
123
|
-
b2c scapi schemas get product shopper-products v1 --expand-paths /products/{productId}
|
|
124
|
-
|
|
125
|
-
# see the response schema type
|
|
126
|
-
b2c scapi schemas get product shopper-products v1 --expand-schemas Product
|
|
127
|
-
|
|
128
|
-
# combine: endpoint + its response type
|
|
129
|
-
b2c scapi schemas get product shopper-products v1 \
|
|
130
|
-
--expand-paths /products/{productId} \
|
|
131
|
-
--expand-schemas Product,ProductResult
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
### Step 4: Write Your Loader
|
|
135
|
-
|
|
136
|
-
Now that you know the endpoint path and parameter structure, write your loader:
|
|
137
|
-
|
|
138
|
-
```typescript
|
|
139
|
-
export function loader({ params, context }: LoaderFunctionArgs) {
|
|
140
|
-
const clients = createApiClients(context);
|
|
141
|
-
return {
|
|
142
|
-
product: clients.shopperProducts.getProduct({
|
|
143
|
-
params: { path: { id: params.productId } }
|
|
144
|
-
}).then(({ data }) => data),
|
|
145
|
-
};
|
|
146
|
-
}
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
## Example: Adding and Using a New API
|
|
150
|
-
|
|
151
|
-
Complete walkthrough — adding shopper-search and writing a search loader:
|
|
152
|
-
|
|
153
|
-
```bash
|
|
154
|
-
# 1. Check what's available
|
|
155
|
-
b2c sfnext scapi available --api-family search
|
|
156
|
-
|
|
157
|
-
# 2. Add the client
|
|
158
|
-
b2c sfnext scapi add search shopper-search v1
|
|
159
|
-
|
|
160
|
-
# 3. Discover endpoints
|
|
161
|
-
b2c scapi schemas get search shopper-search v1 --list-paths
|
|
162
|
-
|
|
163
|
-
# 4. Inspect the productSearch endpoint
|
|
164
|
-
b2c scapi schemas get search shopper-search v1 \
|
|
165
|
-
--expand-paths /product-search \
|
|
166
|
-
--expand-schemas ProductSearchResult
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
Then write the loader:
|
|
170
|
-
|
|
171
|
-
```typescript
|
|
172
|
-
export function loader({ request, context }: LoaderFunctionArgs) {
|
|
173
|
-
const url = new URL(request.url);
|
|
174
|
-
const q = url.searchParams.get('q') ?? '';
|
|
175
|
-
const clients = createApiClients(context);
|
|
176
|
-
|
|
177
|
-
return {
|
|
178
|
-
results: clients.shopperSearch.productSearch({
|
|
179
|
-
params: { query: { q, limit: 25 } }
|
|
180
|
-
}).then(({ data }) => data),
|
|
181
|
-
};
|
|
182
|
-
}
|
|
183
|
-
```
|
|
184
|
-
|
|
185
|
-
## Common Pitfalls
|
|
186
|
-
|
|
187
|
-
| Pitfall | Problem | Solution |
|
|
188
|
-
|---------|---------|----------|
|
|
189
|
-
| Writing a loader without checking the schema | Wrong parameter names or missing required fields | Run `--expand-paths` first to see exact param structure |
|
|
190
|
-
| Adding an API but client not appearing | Missing `pnpm install` after add | Run `pnpm install` to regenerate types |
|
|
191
|
-
| Trying to browse custom API schemas before registration | Schema returns empty/404 | Deploy and register the custom API first (see `sfnext-custom-apis`) |
|
|
192
|
-
| Using wrong API version | Types don't match runtime behavior | Use `scapi available` to verify the current version |
|
|
193
|
-
|
|
194
|
-
## Related Skills
|
|
195
|
-
|
|
196
|
-
- `storefront-next:sfnext-data-fetching` - Using the clients in loaders, actions, and useScapiFetcher
|
|
197
|
-
- `storefront-next:sfnext-custom-apis` - End-to-end custom API implementation and consumption
|
|
198
|
-
- `b2c-cli:b2c-scapi-schemas` - Full reference for schema browsing commands and flags
|
|
199
|
-
- `storefront-next:sfnext-project-setup` - Project creation and initial structure
|
|
200
|
-
|
|
201
|
-
## Reference Documentation
|
|
202
|
-
|
|
203
|
-
- [CLI Commands Reference](references/CLI-COMMANDS.md) - Detailed command reference for `b2c sfnext scapi`
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
# CLI Commands Reference
|
|
2
|
-
|
|
3
|
-
Detailed reference for `b2c sfnext scapi` subcommands that manage typed SCAPI clients in a Storefront Next project.
|
|
4
|
-
|
|
5
|
-
## How It Works
|
|
6
|
-
|
|
7
|
-
The `b2c sfnext scapi` commands are provided by the `@salesforce/storefront-next-dev` package, which is auto-installed as a JIT (just-in-time) plugin when you first run any `sfnext` command. If you have `@salesforce/storefront-next-dev` in your project's `devDependencies`, the local version is used automatically.
|
|
8
|
-
|
|
9
|
-
## `b2c sfnext scapi available`
|
|
10
|
-
|
|
11
|
-
Lists all SCAPI APIs that can be added to your project.
|
|
12
|
-
|
|
13
|
-
```bash
|
|
14
|
-
b2c sfnext scapi available [--api-family <family>] [--api-name <name>] [--json]
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
| Flag | Description |
|
|
18
|
-
|------|-------------|
|
|
19
|
-
| `--api-family` | Filter by API family (e.g., `product`, `search`, `checkout`, `customer`, `custom`) |
|
|
20
|
-
| `--api-name` | Filter by API name (e.g., `shopper-products`) |
|
|
21
|
-
| `--json` | Output as JSON |
|
|
22
|
-
|
|
23
|
-
**Example output:**
|
|
24
|
-
|
|
25
|
-
```
|
|
26
|
-
API Family API Name Version Status
|
|
27
|
-
product shopper-products v1 current
|
|
28
|
-
search shopper-search v1 current
|
|
29
|
-
checkout shopper-baskets-v2 v1 current
|
|
30
|
-
customer shopper-customers v1 current
|
|
31
|
-
custom my-loyalty-api v1 current
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
## `b2c sfnext scapi add`
|
|
35
|
-
|
|
36
|
-
Adds a typed SCAPI client to the project. Generates type definitions and registers the client in the `createApiClients()` factory.
|
|
37
|
-
|
|
38
|
-
```bash
|
|
39
|
-
b2c sfnext scapi add <apiFamily> <apiName> <version> [--force]
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
| Argument/Flag | Description |
|
|
43
|
-
|---------------|-------------|
|
|
44
|
-
| `<apiFamily>` | API family (e.g., `product`, `search`, `custom`) |
|
|
45
|
-
| `<apiName>` | API name (e.g., `shopper-products`, `my-loyalty-api`) |
|
|
46
|
-
| `<version>` | API version (e.g., `v1`) |
|
|
47
|
-
| `--force` | Overwrite if client already exists |
|
|
48
|
-
|
|
49
|
-
**What it does:**
|
|
50
|
-
1. Fetches the OpenAPI schema for the specified API
|
|
51
|
-
2. Generates TypeScript type definitions
|
|
52
|
-
3. Registers the client in the project's API client configuration
|
|
53
|
-
4. The client becomes accessible via `createApiClients(context).<camelCaseName>`
|
|
54
|
-
|
|
55
|
-
**Client property naming:**
|
|
56
|
-
|
|
57
|
-
| API Name | Client Property |
|
|
58
|
-
|----------|----------------|
|
|
59
|
-
| `shopper-products` | `clients.shopperProducts` |
|
|
60
|
-
| `shopper-search` | `clients.shopperSearch` |
|
|
61
|
-
| `shopper-baskets-v2` | `clients.shopperBasketsV2` |
|
|
62
|
-
| `my-loyalty-api` | `clients.myLoyaltyApi` |
|
|
63
|
-
|
|
64
|
-
## `b2c sfnext scapi list`
|
|
65
|
-
|
|
66
|
-
Lists SCAPI clients currently configured in the project.
|
|
67
|
-
|
|
68
|
-
```bash
|
|
69
|
-
b2c sfnext scapi list [--json]
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
| Flag | Description |
|
|
73
|
-
|------|-------------|
|
|
74
|
-
| `--json` | Output as JSON |
|
|
75
|
-
|
|
76
|
-
Shows all clients that have been added to the project and are available via `createApiClients()`.
|
|
77
|
-
|
|
78
|
-
## `b2c sfnext scapi remove`
|
|
79
|
-
|
|
80
|
-
Removes a typed SCAPI client from the project.
|
|
81
|
-
|
|
82
|
-
```bash
|
|
83
|
-
b2c sfnext scapi remove <apiFamily> <apiName>
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
| Argument | Description |
|
|
87
|
-
|----------|-------------|
|
|
88
|
-
| `<apiFamily>` | API family of the client to remove |
|
|
89
|
-
| `<apiName>` | API name of the client to remove |
|
|
90
|
-
|
|
91
|
-
**What it does:**
|
|
92
|
-
1. Removes the generated type definitions
|
|
93
|
-
2. Unregisters the client from the API client configuration
|
|
94
|
-
3. The client property is no longer available on `createApiClients()` output
|
|
95
|
-
|
|
96
|
-
**When to use:** Remove unused API clients to reduce bundle size and type-checking scope.
|
|
97
|
-
|
|
98
|
-
## Complementary: `b2c scapi schemas`
|
|
99
|
-
|
|
100
|
-
While `b2c sfnext scapi` manages which clients exist in your project, use `b2c scapi schemas` to explore what those APIs offer before writing code:
|
|
101
|
-
|
|
102
|
-
```bash
|
|
103
|
-
# list all schemas
|
|
104
|
-
b2c scapi schemas list [--api-family <family>] [--api-name <name>] [--status <status>]
|
|
105
|
-
|
|
106
|
-
# get schema with selective expansion
|
|
107
|
-
b2c scapi schemas get <apiFamily> <apiName> <version> [options]
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
Key flags for `b2c scapi schemas get`:
|
|
111
|
-
|
|
112
|
-
| Flag | Description |
|
|
113
|
-
|------|-------------|
|
|
114
|
-
| `--list-paths` | List all endpoint paths |
|
|
115
|
-
| `--list-schemas` | List all type/schema names |
|
|
116
|
-
| `--expand-paths <paths>` | Expand specific paths (comma-separated) |
|
|
117
|
-
| `--expand-schemas <schemas>` | Expand specific schemas (comma-separated) |
|
|
118
|
-
| `--expand-all` | Full schema without collapsing |
|
|
119
|
-
| `--yaml` | Output as YAML |
|
|
120
|
-
| `--json` | Output wrapped JSON with metadata |
|
|
121
|
-
|
|
122
|
-
See `b2c-cli:b2c-scapi-schemas` skill for complete documentation of schema browsing.
|
|
@@ -1,195 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: sfnext-create-component
|
|
3
|
-
description: Author a new Storefront Next design-system component the right way — pick the correct layer (primitive vs composite), reuse-or-extend before creating, define CVA variants bound to semantic tokens, add data-slot attributes, satisfy the accessibility checklist, and ship a Storybook story. Use when asked to create, add, or build a new UI component, button/badge/tile/card variant, or design-system primitive. This is the design-system authoring discipline; for createPage/Suspense/shadcn page-rendering patterns see sfnext-components.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Create a Component Skill
|
|
7
|
-
|
|
8
|
-
This skill is the authoring discipline for adding a new component to a Storefront Next storefront: choosing the right layer, reusing before creating, and meeting the token / a11y / Storybook requirements that keep the design system consistent.
|
|
9
|
-
|
|
10
|
-
> **It complements `sfnext-components`.** That skill covers engineering patterns — `createPage`, Suspense/`Await` streaming, shadcn/ui setup, the `cn()` utility. **This** skill covers design-system authoring — the layer model, the extend-before-create gate, CVA variants bound to semantic tokens, `data-slot`, accessibility, and story coverage. Use both together when building UI.
|
|
11
|
-
|
|
12
|
-
## Before you start — scan first (extend before create)
|
|
13
|
-
|
|
14
|
-
Do not create a new component file until you have run this scan:
|
|
15
|
-
|
|
16
|
-
1. Search `src/components/` for components with a similar name or behaviour.
|
|
17
|
-
2. Search `src/components/ui/` for Shadcn primitives — run `npx shadcn@latest add <name>` to check whether it exists before hand-rolling one.
|
|
18
|
-
3. Apply the REUSE / EXTEND / CREATE decision:
|
|
19
|
-
- **REUSE** — an existing component already does this → use it as-is.
|
|
20
|
-
- **EXTEND** — an existing component is close → add a new CVA variant (cheaper than a new file).
|
|
21
|
-
- **CREATE** — nothing exists → proceed with this skill.
|
|
22
|
-
|
|
23
|
-
See [Component Authoring Reference](references/COMPONENT-AUTHORING.md) for the full layer model and the extend-before-create rule.
|
|
24
|
-
|
|
25
|
-
## Step 1 — Decide the layer
|
|
26
|
-
|
|
27
|
-
| Question | Layer | Location |
|
|
28
|
-
|----------|-------|----------|
|
|
29
|
-
| Pure UI element, no data or business logic? | **Primitive** | `src/components/ui/` (check shadcn first) |
|
|
30
|
-
| Assembles primitives or takes data props? | **Composite** | `src/components/` |
|
|
31
|
-
|
|
32
|
-
For primitives, always check shadcn before hand-rolling:
|
|
33
|
-
|
|
34
|
-
```bash
|
|
35
|
-
# from packages/template-retail-rsc-app
|
|
36
|
-
npx shadcn@latest add <component-name>
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
Shadcn components land in `src/components/ui/` already wired to the token system. If it exists in shadcn, use it — do not hand-roll a replacement.
|
|
40
|
-
|
|
41
|
-
## Step 2 — Create the file with the copyright header
|
|
42
|
-
|
|
43
|
-
```
|
|
44
|
-
src/components/<feature>/<component-name>.tsx ← preferred (feature-grouped)
|
|
45
|
-
src/components/<component-name>.tsx ← acceptable for standalone components
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
Start every `.ts`/`.tsx` file with the Apache 2.0 copyright header (ESLint enforces it), then imports:
|
|
49
|
-
|
|
50
|
-
```tsx
|
|
51
|
-
import * as React from 'react'
|
|
52
|
-
import { cva, type VariantProps } from 'class-variance-authority'
|
|
53
|
-
import { cn } from '@/lib/utils'
|
|
54
|
-
// Import primitives from src/components/ui/ — not from @radix-ui directly
|
|
55
|
-
import { Button } from '@/components/ui/button'
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
## Step 3 — Type the props explicitly
|
|
59
|
-
|
|
60
|
-
```tsx
|
|
61
|
-
interface ProductTileProps {
|
|
62
|
-
productId: string
|
|
63
|
-
name: string
|
|
64
|
-
price: number
|
|
65
|
-
imageUrl: string
|
|
66
|
-
currency?: string
|
|
67
|
-
className?: string
|
|
68
|
-
}
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
No `any`. Extend `React.ComponentProps<'element'>` for native passthrough. Use discriminated unions for mutually exclusive prop shapes.
|
|
72
|
-
|
|
73
|
-
## Step 4 — Define CVA variants (if the component has visual states)
|
|
74
|
-
|
|
75
|
-
```tsx
|
|
76
|
-
const productTileVariants = cva(
|
|
77
|
-
'relative flex flex-col overflow-hidden rounded-md bg-card text-card-foreground',
|
|
78
|
-
{
|
|
79
|
-
variants: {
|
|
80
|
-
density: {
|
|
81
|
-
comfortable: 'gap-4 p-4',
|
|
82
|
-
compact: 'gap-2 p-2',
|
|
83
|
-
},
|
|
84
|
-
},
|
|
85
|
-
defaultVariants: { density: 'comfortable' },
|
|
86
|
-
}
|
|
87
|
-
)
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
**Token rules:** every class that affects color MUST use a semantic token utility (`bg-primary`, `text-foreground`, `border-border`, …). No raw hex, no `bg-black`, no `text-gray-500`. See [Token System Reference](references/TOKEN-SYSTEM.md).
|
|
91
|
-
|
|
92
|
-
## Step 5 — Write the component
|
|
93
|
-
|
|
94
|
-
```tsx
|
|
95
|
-
export function ProductTile({
|
|
96
|
-
productId,
|
|
97
|
-
name,
|
|
98
|
-
price,
|
|
99
|
-
imageUrl,
|
|
100
|
-
currency = 'USD',
|
|
101
|
-
className,
|
|
102
|
-
density,
|
|
103
|
-
...props
|
|
104
|
-
}: ProductTileProps & VariantProps<typeof productTileVariants>) {
|
|
105
|
-
return (
|
|
106
|
-
<article
|
|
107
|
-
data-slot="product-tile"
|
|
108
|
-
data-product-id={productId}
|
|
109
|
-
className={cn(productTileVariants({ density }), className)}
|
|
110
|
-
{...props}
|
|
111
|
-
>
|
|
112
|
-
<div data-slot="product-tile-image">{/* image */}</div>
|
|
113
|
-
<div data-slot="product-tile-body" className="flex flex-col gap-1">
|
|
114
|
-
<span data-slot="product-tile-name" className="text-sm font-medium text-foreground">
|
|
115
|
-
{name}
|
|
116
|
-
</span>
|
|
117
|
-
<span data-slot="product-tile-price" className="text-sm text-muted-foreground">
|
|
118
|
-
{new Intl.NumberFormat('en-US', { style: 'currency', currency }).format(price)}
|
|
119
|
-
</span>
|
|
120
|
-
</div>
|
|
121
|
-
</article>
|
|
122
|
-
)
|
|
123
|
-
}
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
Required on every component:
|
|
127
|
-
- `data-slot` on the root and each named region.
|
|
128
|
-
- `className` accepted and merged via `cn()` **last** so callers can override.
|
|
129
|
-
- Native props spread via `{...props}`.
|
|
130
|
-
|
|
131
|
-
## Step 6 — Create the Storybook story
|
|
132
|
-
|
|
133
|
-
Every new component in `src/components/` needs a `.stories.tsx` — one story per CVA variant plus a `Snapshot` story for CI diffing.
|
|
134
|
-
|
|
135
|
-
```tsx
|
|
136
|
-
import type { Meta, StoryObj } from '@storybook/react'
|
|
137
|
-
import { ProductTile } from './product-tile'
|
|
138
|
-
|
|
139
|
-
const meta: Meta<typeof ProductTile> = {
|
|
140
|
-
title: 'Components/Product/ProductTile',
|
|
141
|
-
component: ProductTile,
|
|
142
|
-
}
|
|
143
|
-
export default meta
|
|
144
|
-
|
|
145
|
-
type Story = StoryObj<typeof ProductTile>
|
|
146
|
-
|
|
147
|
-
const defaultProps = { productId: 'P001', name: 'Classic Shirt', price: 89.99, imageUrl: '/placeholder.jpg' }
|
|
148
|
-
|
|
149
|
-
export const Default: Story = { args: defaultProps }
|
|
150
|
-
export const Compact: Story = { args: { ...defaultProps, density: 'compact' } }
|
|
151
|
-
|
|
152
|
-
export const Snapshot: Story = {
|
|
153
|
-
name: 'Snapshot',
|
|
154
|
-
render: () => (
|
|
155
|
-
<div className="grid grid-cols-2 gap-4">
|
|
156
|
-
<ProductTile {...defaultProps} density="comfortable" />
|
|
157
|
-
<ProductTile {...defaultProps} density="compact" />
|
|
158
|
-
</div>
|
|
159
|
-
),
|
|
160
|
-
}
|
|
161
|
-
```
|
|
162
|
-
|
|
163
|
-
## Step 7 — Accessibility check
|
|
164
|
-
|
|
165
|
-
- [ ] Interactive elements are `<button>` or `<a>`, never `<div onClick>`.
|
|
166
|
-
- [ ] All form inputs have `<Label htmlFor>`.
|
|
167
|
-
- [ ] Focus ring: `focus-visible:ring-ring focus-visible:ring-[3px]`.
|
|
168
|
-
- [ ] No color-only information (pair with icon or text).
|
|
169
|
-
- [ ] `aria-label` on icon-only buttons.
|
|
170
|
-
|
|
171
|
-
## Verification
|
|
172
|
-
|
|
173
|
-
Before marking the task complete, run from the monorepo root:
|
|
174
|
-
|
|
175
|
-
```bash
|
|
176
|
-
pnpm typecheck
|
|
177
|
-
pnpm lint
|
|
178
|
-
pnpm test-storybook:snapshot:agent
|
|
179
|
-
```
|
|
180
|
-
|
|
181
|
-
All three must pass with zero errors and zero warnings. Lint runs with `--max-warnings 0`.
|
|
182
|
-
|
|
183
|
-
## Related Skills
|
|
184
|
-
|
|
185
|
-
- `storefront-next:sfnext-components` - createPage HOC, Suspense/Await, shadcn/ui, Tailwind page-rendering patterns
|
|
186
|
-
- `storefront-next:sfnext-testing` - Vitest unit tests and Storybook interaction/a11y tests
|
|
187
|
-
- `storefront-next:sfnext-create-vertical` - Brand theming via the token layer
|
|
188
|
-
- `storefront-next:sfnext-extensions` - Injecting a component into a page via UITarget
|
|
189
|
-
|
|
190
|
-
## Reference Documentation
|
|
191
|
-
|
|
192
|
-
- [Component Authoring Reference](references/COMPONENT-AUTHORING.md) - Layer model, CVA, data-slot, extend-before-create
|
|
193
|
-
- [Token System Reference](references/TOKEN-SYSTEM.md) - Semantic token classes and dark mode rules
|
|
194
|
-
- [Project Structure Reference](references/PROJECT-STRUCTURE.md) - Where components live in the monorepo
|
|
195
|
-
- [Troubleshooting Reference](references/TROUBLESHOOTING.md) - Token, lint, and snapshot pitfalls
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
[
|
|
2
|
-
{"query": "I need to build a new ProductTile component for our Storefront Next storefront. It should have comfortable and compact density variants and follow the design-system rules — semantic tokens, data-slot attributes, and a Storybook story.", "should_trigger": true},
|
|
3
|
-
{"query": "Add a new badge component with primary, secondary, and destructive variants using CVA. How do I make sure the variant classes use semantic tokens and not raw colors?", "should_trigger": true},
|
|
4
|
-
{"query": "I want to create a reusable card component in the design system. Which layer does it belong in, primitive or composite, and what accessibility checks must it pass before I'm done?", "should_trigger": true},
|
|
5
|
-
{"query": "Before I build a new button, how do I check whether I should reuse an existing one, add a CVA variant, or create a brand-new component?", "should_trigger": true},
|
|
6
|
-
{"query": "Build a new swatch-group UI element with proper data-slot attributes, a focus ring, and one Storybook story per variant.", "should_trigger": true},
|
|
7
|
-
{"query": "How do I wire up a route loader that streams product data into my page using Suspense and Await?", "should_trigger": false},
|
|
8
|
-
{"query": "I need to create a new brand vertical with its own color palette and dark header. Where do the brand tokens live?", "should_trigger": false},
|
|
9
|
-
{"query": "How do I register a Page Designer component in the component registry and add its meta definition?", "should_trigger": false},
|
|
10
|
-
{"query": "Set up authentication middleware with the split-cookie SLAS architecture for my storefront.", "should_trigger": false},
|
|
11
|
-
{"query": "How do I add an extension that injects a promo banner at the header.before.nav target point?", "should_trigger": false}
|
|
12
|
-
]
|