/** * SFRA (Storefront Reference Architecture) detection pattern. * * Included in DEFAULT_PATTERNS alongside `cartridgesPattern`. A SFRA workspace * matches BOTH patterns (it has cartridges AND the SFRA base cartridge), so it * detects as `['cartridges', 'sfra']`. A cartridge project that is not SFRA * (custom APIs, integration cartridges, or a PWA Kit / Storefront Next repo that * also ships cartridges) matches only `cartridges`, so `sfra` is not asserted. * * @module discovery/patterns/sfra */ import type { DetectionPattern } from '../types.js'; /** * Detection pattern for SFRA projects. * * Detects SFRA workspaces by checking for: * 1. A cartridge named `app_storefront_base` - the core SFRA cartridge that serves as the * foundation for SFRA-based storefronts. Per Salesforce documentation, this cartridge * is essential and should not be renamed. (Primary detection method) * 2. A package.json with `paths.base` containing `app_storefront_base` - used in multi-repo * setups with sgmf-scripts where the SFRA base cartridge is external to the project. * (Secondary heuristic, less common) * * @see https://developer.salesforce.com/docs/commerce/b2c-commerce/guide/b2c-customizing-sfra.html * * @example * ``` * // Use in custom detection * import { sfraPattern, detectWorkspaceType } from '@salesforce/b2c-tooling-sdk/discovery'; * * const customPatterns = [sfraPattern, ...otherPatterns]; * const result = await detectWorkspaceType(workspacePath, { patterns: customPatterns }); * ``` */ export declare const sfraPattern: DetectionPattern;