Scaffolding framework for B2C Commerce components#102
Merged
Conversation
- Add service scaffold to built-in scaffolds tables - Document SDK programmatic API for non-CLI usage (MCP, IDE integrations) - Add scaffold module to typedoc entry points for API reference generation
yhsieh1
previously approved these changes
Feb 2, 2026
Contributor
yhsieh1
left a comment
There was a problem hiding this comment.
It looks good. The custom scaffold seems very powerful.
yhsieh1
reviewed
Feb 2, 2026
yhsieh1
reviewed
Feb 2, 2026
Use generic operation descriptions instead of specific CLI commands to keep scaffold content tool-agnostic.
Resolve conflicts by keeping both: - Scaffolding guide/commands from this branch - IDE Support guide and Account Manager commands from main
Use export...from syntax for re-exports per unicorn/prefer-export-from rule.
yhsieh1
approved these changes
Feb 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR introduces a comprehensive scaffolding framework for generating B2C Commerce components from templates. The framework enables rapid creation of cartridges, controllers, hooks, services, custom APIs, job steps, and Page Designer components with consistent structure and best practices.
Key Features
~/.b2c/scaffolds/), project (.b2c/scaffolds/), and plugin scaffoldsCLI Commands
b2c scaffold listb2c scaffold generate <id>b2c scaffold info <id>b2c scaffold search <query>b2c scaffold init <name>b2c scaffold validate <path>SDK Programmatic API
The scaffold functionality is available as a programmatic API for IDE integrations, MCP servers, and custom tooling:
Key SDK functions:
resolveScaffoldParameters()- Resolve and validate parameters from provided valuesparseParameterOptions()- Parse key=value option stringsgetParameterSchemas()- Get parameter metadata with resolved choices for building UIsvalidateScaffoldDirectory()- Comprehensive scaffold validationresolveOutputDirectory()- Resolve output directory with priority logicArchitecture
The scaffolding is split between CLI and SDK:
SDK (
@salesforce/b2c-tooling-sdk/scaffold):CLI (
b2c scaffold):Changes
New Files
SDK (packages/b2c-tooling-sdk):
src/scaffold/- Complete scaffold module (types, registry, engine, executor, validators, sources, parameter-resolver, validation, merge)data/scaffolds/- 7 built-in scaffold templatestest/scaffold/- Comprehensive test coverageCLI (packages/b2c-cli):
src/commands/scaffold/- 7 scaffold commandssrc/lib/scaffold/- Generate helper and source resolverDocumentation:
docs/guide/scaffolding.md- User guide with SDK programmatic APIdocs/cli/scaffold.md- CLI reference