Skip to content

Commit ae5ce82

Browse files
committed
Merge remote-tracking branch 'origin/main' into t/commerce/release-prep
2 parents 9de2301 + f82eaaf commit ae5ce82

95 files changed

Lines changed: 5638 additions & 1166 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.changeset/many-knives-attend.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@salesforce/b2c-dx-docs': minor
3+
---
4+
5+
Added MCP Server documentation
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: VS Extension Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- 'packages/b2c-vs-extension/**'
9+
pull_request:
10+
branches:
11+
- main
12+
paths:
13+
- 'packages/b2c-vs-extension/**'
14+
15+
permissions:
16+
contents: read
17+
18+
env:
19+
SFCC_DISABLE_TELEMETRY: ${{ vars.SFCC_DISABLE_TELEMETRY }}
20+
21+
jobs:
22+
test:
23+
runs-on: ubuntu-latest
24+
25+
strategy:
26+
matrix:
27+
node-version: [22.x]
28+
29+
steps:
30+
- name: Checkout code
31+
uses: actions/checkout@v4
32+
33+
- name: Setup Node.js ${{ matrix.node-version }}
34+
uses: actions/setup-node@v4
35+
with:
36+
node-version: ${{ matrix.node-version }}
37+
38+
- name: Setup pnpm
39+
uses: pnpm/action-setup@v4
40+
with:
41+
version: 10.17.1
42+
43+
- name: Get pnpm store directory
44+
shell: bash
45+
run: |
46+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
47+
48+
- name: Setup pnpm cache
49+
uses: actions/cache@v4
50+
with:
51+
path: ${{ env.STORE_PATH }}
52+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
53+
restore-keys: |
54+
${{ runner.os }}-pnpm-store-
55+
56+
- name: Install dependencies
57+
run: pnpm install --frozen-lockfile
58+
59+
- name: Build packages
60+
run: pnpm -r run build
61+
62+
- name: Run VS Extension tests
63+
working-directory: packages/b2c-vs-extension
64+
run: xvfb-run -a pnpm run test

.github/workflows/ci.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,11 @@ jobs:
8080
working-directory: packages/b2c-cli
8181
run: pnpm run pretest && pnpm run test:ci && pnpm run lint
8282

83-
- name: Run VS Extension lint
83+
- name: Run VS Extension checks
8484
id: vs-extension-test
85-
if: always() && steps.vs-extension-test.conclusion != 'cancelled'
85+
if: always() && steps.cli-test.conclusion != 'cancelled'
8686
working-directory: packages/b2c-vs-extension
87-
# Testing not currently supported on CI
88-
run: pnpm run lint
87+
run: pnpm run typecheck:agent && pnpm run lint
8988

9089
- name: Test Report
9190
uses: dorny/test-reporter@fe45e9537387dac839af0d33ba56eed8e24189e8 # v2.3.0

.github/workflows/publish.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,17 @@ jobs:
153153
check_package "@salesforce/b2c-cli" "packages/b2c-cli" "cli"
154154
check_package "@salesforce/b2c-dx-mcp" "packages/b2c-dx-mcp" "mcp"
155155
156+
# VS Code extension — compare against git tags (not npm)
157+
LOCAL_VSX_VERSION=$(node -p "require('./packages/b2c-vs-extension/package.json').version")
158+
LAST_VSX_TAG=$(git tag -l "b2c-vs-extension@*" --sort=-v:refname | head -1 | sed 's/b2c-vs-extension@//')
159+
echo "b2c-vs-extension: local=${LOCAL_VSX_VERSION} tag=${LAST_VSX_TAG:-none}"
160+
if [ "$LOCAL_VSX_VERSION" != "$LAST_VSX_TAG" ]; then
161+
echo "publish_vsx=true" >> $GITHUB_OUTPUT
162+
echo "version_vsx=${LOCAL_VSX_VERSION}" >> $GITHUB_OUTPUT
163+
else
164+
echo "publish_vsx=false" >> $GITHUB_OUTPUT
165+
fi
166+
156167
# Check if docs version changed (private package — not published to npm, uses git tag)
157168
DOCS_VERSION=$(node -p "require('./docs/package.json').version")
158169
if git rev-parse "docs@${DOCS_VERSION}" >/dev/null 2>&1; then
@@ -204,6 +215,11 @@ jobs:
204215
pnpm --filter @salesforce/b2c-dx-mcp publish --provenance --no-git-checks
205216
--tag ${{ steps.release-type.outputs.type == 'nightly' && 'nightly' || steps.packages.outputs.tag_mcp }}
206217
218+
- name: Package VS Code extension
219+
if: steps.release-type.outputs.type == 'stable' && steps.packages.outputs.publish_vsx == 'true'
220+
working-directory: packages/b2c-vs-extension
221+
run: pnpm run package
222+
207223
- name: Create git tags
208224
if: steps.release-type.outputs.type == 'stable' && steps.changesets.outputs.skip != 'true' && steps.quick-check.outputs.skip != 'true'
209225
run: |
@@ -230,6 +246,12 @@ jobs:
230246
TAGS_CREATED="$TAGS_CREATED $TAG"
231247
fi
232248
249+
if [[ "${{ steps.packages.outputs.publish_vsx }}" == "true" ]]; then
250+
TAG="b2c-vs-extension@${{ steps.packages.outputs.version_vsx }}"
251+
git tag "$TAG"
252+
TAGS_CREATED="$TAGS_CREATED $TAG"
253+
fi
254+
233255
if [ -n "$TAGS_CREATED" ]; then
234256
git push origin $TAGS_CREATED
235257
echo "Created tags:$TAGS_CREATED"
@@ -279,6 +301,13 @@ jobs:
279301
echo ""
280302
fi
281303
304+
if [[ "${{ steps.packages.outputs.publish_vsx }}" == "true" ]]; then
305+
echo "## b2c-vs-extension@${{ steps.packages.outputs.version_vsx }}"
306+
echo ""
307+
extract_latest packages/b2c-vs-extension/CHANGELOG.md
308+
echo ""
309+
fi
310+
282311
if [[ "${{ steps.packages.outputs.publish_docs }}" == "true" && -f docs/CHANGELOG.md ]]; then
283312
echo "## Documentation"
284313
echo ""
@@ -297,6 +326,8 @@ jobs:
297326
RELEASE_TAG="@salesforce/b2c-tooling-sdk@${{ steps.packages.outputs.version_sdk }}"
298327
elif [[ "${{ steps.packages.outputs.publish_mcp }}" == "true" ]]; then
299328
RELEASE_TAG="@salesforce/b2c-dx-mcp@${{ steps.packages.outputs.version_mcp }}"
329+
elif [[ "${{ steps.packages.outputs.publish_vsx }}" == "true" ]]; then
330+
RELEASE_TAG="b2c-vs-extension@${{ steps.packages.outputs.version_vsx }}"
300331
elif [[ "${{ steps.packages.outputs.publish_docs }}" == "true" ]]; then
301332
RELEASE_TAG="docs@${{ steps.packages.outputs.version_docs }}"
302333
else
@@ -330,6 +361,8 @@ jobs:
330361
RELEASE_TAG="@salesforce/b2c-tooling-sdk@${{ steps.packages.outputs.version_sdk }}"
331362
elif [[ "${{ steps.packages.outputs.publish_mcp }}" == "true" ]]; then
332363
RELEASE_TAG="@salesforce/b2c-dx-mcp@${{ steps.packages.outputs.version_mcp }}"
364+
elif [[ "${{ steps.packages.outputs.publish_vsx }}" == "true" ]]; then
365+
RELEASE_TAG="b2c-vs-extension@${{ steps.packages.outputs.version_vsx }}"
333366
else
334367
echo "No package release to upload to"
335368
exit 0
@@ -339,6 +372,27 @@ jobs:
339372
env:
340373
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
341374

375+
- name: Upload VS Code extension to release
376+
if: steps.release-type.outputs.type == 'stable' && steps.packages.outputs.publish_vsx == 'true'
377+
run: |
378+
# Determine the release tag (same logic as Create GitHub Release)
379+
if [[ "${{ steps.packages.outputs.publish_cli }}" == "true" ]]; then
380+
RELEASE_TAG="@salesforce/b2c-cli@${{ steps.packages.outputs.version_cli }}"
381+
elif [[ "${{ steps.packages.outputs.publish_sdk }}" == "true" ]]; then
382+
RELEASE_TAG="@salesforce/b2c-tooling-sdk@${{ steps.packages.outputs.version_sdk }}"
383+
elif [[ "${{ steps.packages.outputs.publish_mcp }}" == "true" ]]; then
384+
RELEASE_TAG="@salesforce/b2c-dx-mcp@${{ steps.packages.outputs.version_mcp }}"
385+
elif [[ "${{ steps.packages.outputs.publish_vsx }}" == "true" ]]; then
386+
RELEASE_TAG="b2c-vs-extension@${{ steps.packages.outputs.version_vsx }}"
387+
else
388+
echo "No release to upload to"
389+
exit 0
390+
fi
391+
392+
gh release upload "$RELEASE_TAG" packages/b2c-vs-extension/*.vsix
393+
env:
394+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
395+
342396
- name: Trigger documentation deployment
343397
if: >-
344398
steps.release-type.outputs.type == 'stable' && steps.changesets.outputs.skip != 'true' && steps.quick-check.outputs.skip != 'true'

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Issues labelled `good first contribution`.
4444

4545
# Running the MCP server from source
4646

47-
When developing the B2C DX MCP package (`packages/b2c-dx-mcp`), use `node` with the path to `bin/dev.js` in args. Build to latest (`pnpm run build` from the repo root) so changes that require a rebuild are reflected when you run the server.
47+
For information on running the MCP server from source and local development, see [packages/b2c-dx-mcp/CONTRIBUTING.md](packages/b2c-dx-mcp/CONTRIBUTING.md).
4848

4949
# Contribution Checklist
5050

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
> [!NOTE]
66
> This project is currently in **Developer Preview**. Not all features are implemented, and the API may change in future releases. Please provide feedback via GitHub issues and Unofficial Slack.
77
8-
Salesforce Commerce Cloud B2C Command Line Tools.
8+
Salesforce B2C Commerce Command Line Tools.
99

1010
> [!TIP]
1111
> **Just looking for the B2C CLI or MCP install instructions?** Visit the documentation site at [https://salesforcecommercecloud.github.io/b2c-developer-tooling/](https://salesforcecommercecloud.github.io/b2c-developer-tooling/) for the latest install guide and CLI reference.

docs/.vitepress/config.mts

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,15 @@ const guideSidebar = [
5151
{text: 'Storefront Next', link: '/guide/storefront-next'},
5252
],
5353
},
54+
{
55+
text: 'MCP Server',
56+
items: [
57+
{text: 'Overview', link: '/mcp/'},
58+
{text: 'Installation', link: '/mcp/installation'},
59+
{text: 'Configuration', link: '/mcp/configuration'},
60+
{text: 'Toolsets & Tools', link: '/mcp/toolsets'},
61+
],
62+
},
5463
{
5564
text: 'Extending',
5665
items: [
@@ -83,6 +92,16 @@ const guideSidebar = [
8392
{text: 'Logging', link: '/cli/logging'},
8493
],
8594
},
95+
{
96+
text: 'Tools Reference',
97+
items: [
98+
{text: 'cartridge_deploy', link: '/mcp/tools/cartridge-deploy'},
99+
{text: 'mrt_bundle_push', link: '/mcp/tools/mrt-bundle-push'},
100+
{text: 'scapi_schemas_list', link: '/mcp/tools/scapi-schemas-list'},
101+
{text: 'scapi_custom_apis_status', link: '/mcp/tools/scapi-custom-apis-status'},
102+
{text: 'storefront_next_page_designer_decorator', link: '/mcp/tools/storefront-next-page-designer-decorator'},
103+
],
104+
},
86105
];
87106

88107
// Script to force hard navigation for version switching links
@@ -111,7 +130,7 @@ document.addEventListener('click', (e) => {
111130

112131
export default defineConfig({
113132
title: 'B2C DX',
114-
description: 'Salesforce Commerce Cloud B2C Developer Experience - CLI, MCP Server, and SDK',
133+
description: 'Salesforce B2C Commerce Developer Experience - CLI, MCP Server, and SDK',
115134
base: basePath,
116135

117136
head: [['script', {}, versionSwitchScript]],
@@ -132,6 +151,7 @@ export default defineConfig({
132151
nav: [
133152
{text: 'Guide', link: '/guide/'},
134153
{text: 'CLI Reference', link: '/cli/'},
154+
{text: 'MCP Server', link: '/mcp/'},
135155
{text: 'API Reference', link: '/api/'},
136156
{
137157
text: isDevBuild ? 'Dev' : 'Latest',
@@ -147,6 +167,7 @@ export default defineConfig({
147167
sidebar: {
148168
'/guide/': guideSidebar,
149169
'/cli/': guideSidebar,
170+
'/mcp/': guideSidebar,
150171
'/api/': [
151172
{
152173
text: 'API Reference',

docs/guide/account-manager.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
---
2-
description: Managing Account Manager users, roles, organizations, and API clients with the B2C CLI including authentication options, CI/CD automation, and common workflows.
2+
description: Manage Account Manager users, roles, organizations, and API clients with the B2C CLI, including authentication options, CI/CD automation, and common workflows.
33
---
44

55
# Account Manager Guide
66

7-
The B2C CLI provides commands for managing Account Manager resourcesusers, roles, organizations, and API clientsdirectly from the terminal. This guide covers authentication setup, common workflows, and CI/CD automation.
7+
The B2C CLI provides commands for managing Account Manager resources—users, roles, organizations, and API clients—directly from the terminal. This guide covers authentication setup, common workflows, and CI/CD automation.
88

99
::: tip
1010
For the full command reference with all flags and options, see [Account Manager Commands](/cli/account-manager).
1111
:::
1212

1313
## Authentication
1414

15-
Account Manager commands work out of the boxno configuration required. The CLI uses a built-in public client that authenticates via browser login. For automation, you can provide your own API client credentials.
15+
Account Manager commands work out of the box—no configuration is required. The CLI uses a built—in public client that authenticates via browser login. For automation, you can provide your own API client credentials.
1616

1717
### Zero-Config (Default)
1818

19-
Just run commands. The CLI opens a browser for login using the built-in client:
19+
Just run the commands without configuring any settings. The CLI opens a browser for login using the built-in client.
2020

2121
```bash
2222
# Works immediately — opens browser for login
@@ -40,7 +40,7 @@ b2c am orgs list --user-auth
4040

4141
### Client Credentials
4242

43-
Uses the API client's secret for non-interactive authentication. Best for CI/CD pipelines, scripts, and automation.
43+
Uses the API client's secret for non-interactive authentication. This option is best for CI/CD pipelines, scripts, and automation.
4444

4545
```bash
4646
# List users with client credentials
@@ -53,11 +53,11 @@ Requirements:
5353

5454
### Authentication Order
5555

56-
By default, the CLI tries client credentials first (if `--client-secret` is provided), then falls back to browser-based user authentication (using either your configured `--client-id` or the built-in public client). To force browser-based login, pass `--user-auth`.
56+
By default, the CLI tries client credentials first (if `--client-secret` is provided), then falls back to browser-based user authentication by using either your configured `--client-id` or the built-in public client. To force browser-based login, pass `--user-auth`.
5757

5858
### Role Requirements
5959

60-
Different operations require different roles, and the required roles depend on how you authenticate:
60+
Different operations require different roles, and the required roles depend on how you authenticate.
6161

6262
| Operations | Client Credentials (roles on API client) | User Auth (roles on user account) |
6363
|---|---|---|
@@ -75,18 +75,18 @@ If authentication fails, the CLI provides contextual error messages recommending
7575

7676
### For Interactive Use
7777

78-
No setup required. Account Manager commands use the CLI's built-in public client by default:
78+
No setup required. Account Manager commands use the CLI's built-in public client by default.
7979

8080
```bash
8181
b2c am users list
8282
```
8383

84-
If you need to use your own API client (for specific scopes or organization restrictions):
84+
If you need to use your own API client for specific scopes or organization restrictions:
8585

86-
1. In [Account Manager](https://account.demandware.com), find or create an API client
87-
2. Under **Redirect URLs**, add `http://localhost:8080`
88-
3. Under **Allowed Scopes**, add: `mail roles tenantFilter openid`
89-
4. Set **Default Scopes** to: `mail roles tenantFilter openid`
86+
1. In [Account Manager](https://account.demandware.com), find or create an API client.
87+
2. Under **Redirect URLs**, add `http://localhost:8080`.
88+
3. Under **Allowed Scopes**, add: `mail roles tenantFilter openid`.
89+
4. Set **Default Scopes** to: `mail roles tenantFilter openid`.
9090

9191
```bash
9292
export SFCC_CLIENT_ID=your-client-id
@@ -95,12 +95,12 @@ b2c am users list --user-auth
9595

9696
### For CI/CD and Automation
9797

98-
1. In [Account Manager](https://account.demandware.com), create a dedicated API client
99-
2. Set a strong password (client secret) and save it securely
100-
3. Set **Token Endpoint Auth Method** to `client_secret_post`
101-
4. Under **Roles**, add **User Administrator** (for user/role management)
102-
5. Under **Allowed Scopes**, add: `mail roles tenantFilter openid`
103-
6. Set **Default Scopes** to: `mail roles tenantFilter openid`
98+
1. In [Account Manager](https://account.demandware.com), create a dedicated API client.
99+
2. Set a strong password (client secret) and save it securely.
100+
3. Set **Token Endpoint Auth Method** to `client_secret_post`.
101+
4. Under **Roles**, add **User Administrator** (for user/role management).
102+
5. Under **Allowed Scopes**, add: `mail roles tenantFilter openid`.
103+
6. Set **Default Scopes** to: `mail roles tenantFilter openid`.
104104

105105
Then configure your CI/CD environment:
106106

@@ -110,7 +110,7 @@ export SFCC_CLIENT_SECRET=your-client-secret
110110
```
111111

112112
::: tip
113-
Store the client secret in your CI/CD system's secrets managernever commit it to source control.
113+
Store the client secret in your CI/CD system's secrets manager—never commit it to source control.
114114
:::
115115

116116
## Common Workflows
@@ -236,7 +236,7 @@ The CLI will suggest the specific role or auth method needed. Common fixes:
236236

237237
### "No valid auth method available"
238238

239-
The CLI could not find credentials for any allowed auth method:
239+
The CLI couldn't find credentials for any allowed auth method:
240240

241241
- Verify `--client-id` is set (or `SFCC_CLIENT_ID` environment variable)
242242
- For client credentials, verify `--client-secret` is set

0 commit comments

Comments
 (0)