Skip to content

Commit 299f7ea

Browse files
committed
Merge remote-tracking branch 'upstream/main' into W-21112167-Replications-API
2 parents a9691f8 + 12bd455 commit 299f7ea

File tree

150 files changed

+9566
-1513
lines changed

Some content is hidden

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

150 files changed

+9566
-1513
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@salesforce/b2c-dx-docs': patch
3+
---
4+
5+
MCP docs: preview release wording, sidebar nav, remove placeholder tool references
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
'@salesforce/b2c-dx-mcp': patch
3+
---
4+
5+
Unregister placeholder tools and update README for preview release
6+
7+
- Remove placeholder tools (PWA Kit, Storefront Next) so users only see implemented tools at startup
8+
- Update README: preview release wording, accurate tool tables, credential notes, example prompts
9+
- Fix package license to Apache-2.0

.github/CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@
22
* @clavery
33
/packages/b2c-dx-mcp/ @yhsieh1 @patricksullivansf @wei-liu-sf
44
/packages/b2c-vs-extension/ @wei-liu-sf
5+
/docs/mcp/ @wei-liu-sf @yhsieh1 @patricksullivansf
6+
/docs/.vitepress/ @wei-liu-sf @yhsieh1 @patricksullivansf
57

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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ document.addEventListener('click', (e) => {
112112

113113
export default defineConfig({
114114
title: 'B2C DX',
115-
description: 'Salesforce Commerce Cloud B2C Developer Experience - CLI, MCP Server, and SDK',
115+
description: 'Salesforce B2C Commerce Developer Experience - CLI, MCP Server, and SDK',
116116
base: basePath,
117117

118118
head: [['script', {}, versionSwitchScript]],

docs/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# @salesforce/b2c-dx-docs
2+
3+
## 0.2.0
4+
5+
### Minor Changes
6+
7+
- [#172](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/pull/172) [`f82eaaf`](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/commit/f82eaaf83b9d80636eaa03c746a5594db25a9c43) - Added MCP Server documentation (Thanks [@patricksullivansf](https://github.com/patricksullivansf)!)

0 commit comments

Comments
 (0)