Skip to content

Commit f44ac32

Browse files
committed
Merge remote-tracking branch 'upstream/main' into W-21766978-Add-scheduling-user-email-management-ODS
2 parents 80aa373 + b324de6 commit f44ac32

208 files changed

Lines changed: 12009 additions & 4207 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.

.agents/plugins/marketplace.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"name": "b2c-developer-tooling",
3+
"interface": {
4+
"displayName": "B2C Developer Tooling"
5+
},
6+
"plugins": [
7+
{
8+
"name": "b2c-cli",
9+
"source": {
10+
"source": "local",
11+
"path": "./skills/b2c-cli"
12+
},
13+
"policy": {
14+
"installation": "AVAILABLE",
15+
"authentication": "ON_INSTALL"
16+
},
17+
"category": "Productivity"
18+
},
19+
{
20+
"name": "b2c",
21+
"source": {
22+
"source": "local",
23+
"path": "./skills/b2c"
24+
},
25+
"policy": {
26+
"installation": "AVAILABLE",
27+
"authentication": "ON_INSTALL"
28+
},
29+
"category": "Productivity"
30+
}
31+
]
32+
}

.changeset/RELEASE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Tue Apr 21 02:13:31 UTC 2026

.claude-plugin/marketplace.json

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
"license": "Apache-2.0",
1717
"source": "./skills/b2c-cli",
1818
"category": "productivity",
19-
"strict": false
19+
"strict": false,
20+
"version": "1.1.0"
2021
},
2122
{
2223
"name": "b2c",
@@ -27,18 +28,8 @@
2728
"license": "Apache-2.0",
2829
"source": "./skills/b2c",
2930
"category": "productivity",
30-
"strict": false
31-
},
32-
{
33-
"name": "b2c-experimental",
34-
"description": "Experimental B2C Commerce skills including scaffold templates. Not installed by default.",
35-
"author": {
36-
"name": "Salesforce"
37-
},
38-
"license": "Apache-2.0",
39-
"source": "./skills/b2c-experimental",
40-
"category": "productivity",
41-
"strict": false
31+
"strict": false,
32+
"version": "1.1.0"
4233
},
4334
{
4435
"name": "b2c-dx-mcp",

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#GUSINFO:CC Cosmos,B2C CLI and Developer Tools
22
* @clavery
3+
/.changeset/RELEASE @SalesforceCommerceCloud/b2c-developer-experience
34
/packages/b2c-dx-mcp/ @yhsieh1 @patricksullivansf @wei-liu-sf
4-
/packages/b2c-dx-mcp/src/tools/storefrontnext/ @commerce-emu/cc-sharks
55
/packages/b2c-vs-extension/ @wei-liu-sf
66
/docs/mcp/ @wei-liu-sf @yhsieh1 @patricksullivansf
77
/docs/.vitepress/ @wei-liu-sf @yhsieh1 @patricksullivansf
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: setup-windows
2+
description: 'Set up a Windows CI runner for the B2C developer tooling monorepo (Node, pnpm, dependency install, pnpm-store cache).'
3+
4+
# Mirrors the SalesforceCommerceCloud/pwa-kit `setup_windows` composite action.
5+
# Windows runs everything under Git Bash (`shell: bash`) so the inline `env VAR=value ...`
6+
# style used in the package.json test scripts keeps working on windows-latest.
7+
8+
inputs:
9+
node-version:
10+
description: 'Node.js version to install (matches `actions/setup-node` input).'
11+
required: false
12+
default: '22.x'
13+
14+
runs:
15+
using: composite
16+
steps:
17+
- name: Setup Node.js ${{ inputs.node-version }}
18+
uses: actions/setup-node@v6
19+
with:
20+
node-version: ${{ inputs.node-version }}
21+
22+
- name: Setup pnpm
23+
uses: pnpm/action-setup@v5
24+
25+
- name: Get pnpm store directory
26+
shell: bash
27+
run: |
28+
echo "STORE_PATH=$(pnpm store path --silent)" >> "$GITHUB_ENV"
29+
30+
- name: Setup pnpm cache
31+
uses: actions/cache@v5
32+
with:
33+
path: ${{ env.STORE_PATH }}
34+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
35+
restore-keys: |
36+
${{ runner.os }}-pnpm-store-
37+
38+
- name: Install dependencies
39+
shell: bash
40+
run: pnpm install --frozen-lockfile

.github/workflows/changesets.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ jobs:
2020
steps:
2121
- name: Checkout
2222
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
23+
with:
24+
token: ${{ secrets.CHANGESETS_TOKEN }}
2325

2426
- name: Setup pnpm
2527
uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5
@@ -37,12 +39,18 @@ jobs:
3739
id: changesets
3840
uses: changesets/action@6a0a831ff30acef54f2c6aa1cbbc1096b066edaf # v1.7.0
3941
with:
40-
version: pnpm changeset version
42+
version: pnpm run version
4143
title: 'Next Release: changelog and version packages'
4244
commit: 'chore: version packages'
4345
env:
4446
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4547

48+
- name: Add release label to PR
49+
if: steps.changesets.outputs.pullRequestNumber
50+
run: gh pr edit ${{ steps.changesets.outputs.pullRequestNumber }} --add-label release
51+
env:
52+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
53+
4654
- name: Trigger publish workflow
4755
if: steps.changesets.outputs.hasChangesets == 'false'
4856
run: gh workflow run publish.yml -f release_type=stable

.github/workflows/ci.yml

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,3 +124,105 @@ jobs:
124124
packages/b2c-tooling-sdk/coverage/
125125
packages/b2c-cli/coverage/
126126
retention-days: 30
127+
128+
test-windows:
129+
runs-on: windows-latest
130+
# Advisory rollout: Windows coverage is new; surface failures without
131+
# blocking Linux CI while remaining Windows-specific test issues are
132+
# addressed in follow-up PRs. Remove once Windows tests are green.
133+
continue-on-error: true
134+
defaults:
135+
run:
136+
shell: bash
137+
strategy:
138+
fail-fast: false
139+
matrix:
140+
node-version: [22.x, 24.x]
141+
steps:
142+
- name: Checkout code
143+
uses: actions/checkout@v6
144+
- name: Setup Windows machine
145+
uses: ./.github/actions/setup-windows
146+
with:
147+
node-version: ${{ matrix.node-version }}
148+
- name: Build packages
149+
run: pnpm -r run build
150+
- name: Run SDK tests
151+
id: sdk-test
152+
working-directory: packages/b2c-tooling-sdk
153+
run: pnpm run pretest && pnpm run test:ci && pnpm run lint
154+
- name: Run MCP tests
155+
id: mcp-test
156+
if: always() && steps.sdk-test.conclusion != 'cancelled'
157+
working-directory: packages/b2c-dx-mcp
158+
run: pnpm run pretest && pnpm run test:ci && pnpm run lint
159+
- name: Run CLI tests
160+
id: cli-test
161+
if: always() && steps.mcp-test.conclusion != 'cancelled'
162+
working-directory: packages/b2c-cli
163+
# Use the Windows-specific script (test:ci:win) to bypass c8's
164+
# coverage threshold check. V8 coverage on Windows double-counts
165+
# some TS source files (distinct URL casing emitted by the tsx
166+
# loader), which drops the reported function-coverage number below
167+
# the Linux-calibrated 70% threshold even though the tests pass.
168+
# Coverage is still generated and uploaded for inspection.
169+
run: pnpm run pretest && pnpm run test:ci:win && pnpm run lint
170+
- name: Run VS Extension checks
171+
if: always() && steps.cli-test.conclusion != 'cancelled'
172+
working-directory: packages/b2c-vs-extension
173+
run: pnpm run typecheck:agent && pnpm run lint
174+
- name: Print Windows test failures
175+
# Mocha's JSON reporter swallows stdout, so Windows-only failures are
176+
# invisible in the step log. Parse the per-package test-results.json
177+
# and echo failing test titles + error messages to the job log for triage.
178+
if: always() && steps.sdk-test.conclusion != 'cancelled'
179+
shell: bash
180+
run: |
181+
node -e "
182+
const fs = require('node:fs');
183+
const path = require('node:path');
184+
const reports = [
185+
'packages/b2c-tooling-sdk/test-results.json',
186+
'packages/b2c-dx-mcp/test-results.json',
187+
'packages/b2c-cli/test-results.json',
188+
];
189+
let totalFailures = 0;
190+
for (const report of reports) {
191+
if (!fs.existsSync(report)) continue;
192+
const data = JSON.parse(fs.readFileSync(report, 'utf8'));
193+
const failures = data.failures || [];
194+
if (failures.length === 0) continue;
195+
totalFailures += failures.length;
196+
console.log('\n=== ' + report + ' (' + failures.length + ' failures) ===');
197+
for (const f of failures) {
198+
console.log('\n✖ ' + f.fullTitle);
199+
if (f.err && f.err.message) console.log(' message: ' + f.err.message.split('\n')[0]);
200+
if (f.err && f.err.stack) console.log(' stack: ' + f.err.stack.split('\n').slice(0, 5).join('\n '));
201+
}
202+
}
203+
if (totalFailures === 0) console.log('No Windows test failures reported.');
204+
else console.log('\nTotal Windows failures: ' + totalFailures);
205+
"
206+
- name: Test Report
207+
uses: dorny/test-reporter@a43b3a5f7366b97d083190328d2c652e1a8b6aa2 # v3.0.0
208+
if: always() && steps.sdk-test.conclusion != 'cancelled'
209+
with:
210+
name: Test Results (Windows Node ${{ matrix.node-version }})
211+
path: 'packages/*/test-results.json'
212+
reporter: mocha-json
213+
- name: Upload test results (for Windows triage)
214+
if: always() && steps.sdk-test.conclusion != 'cancelled'
215+
uses: actions/upload-artifact@v7
216+
with:
217+
name: test-results-windows-node-${{ matrix.node-version }}
218+
path: 'packages/*/test-results.json'
219+
retention-days: 30
220+
- name: Upload coverage reports
221+
if: always() && steps.sdk-test.conclusion != 'cancelled'
222+
uses: actions/upload-artifact@v7
223+
with:
224+
name: coverage-reports-windows-node-${{ matrix.node-version }}
225+
path: |
226+
packages/b2c-tooling-sdk/coverage/
227+
packages/b2c-cli/coverage/
228+
retention-days: 30

.github/workflows/deploy-docs.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,11 @@ jobs:
8484
- name: Build stable documentation from release tag
8585
if: steps.release.outputs.exists == 'true'
8686
run: |
87-
# Save config from main (has version dropdown and dynamic base path)
87+
# Save docs build files from main (config has version dropdown/dynamic
88+
# base path, and package.json/lockfile have its dependencies)
8889
cp docs/.vitepress/config.mts /tmp/config.mts
90+
cp docs/package.json /tmp/docs-package.json
91+
cp pnpm-lock.yaml /tmp/pnpm-lock.yaml
8992
9093
# Remove S3-extracted uxstudio files before checkout to avoid conflicts
9194
# (older tags still have these files tracked in git)
@@ -101,8 +104,10 @@ jobs:
101104
tar -xzf /tmp/uxstudio-4.5.tar.gz -C docs/public/uxstudio
102105
tar -xzf /tmp/uxstudio-4.6.tar.gz -C docs/public/uxstudio
103106
104-
# Restore config from main (has version dropdown and dynamic base path)
107+
# Restore docs build files from main so dependencies match the config
105108
cp /tmp/config.mts docs/.vitepress/config.mts
109+
cp /tmp/docs-package.json docs/package.json
110+
cp /tmp/pnpm-lock.yaml pnpm-lock.yaml
106111
107112
# Build at release tag with main's config (no IS_DEV_BUILD = stable at root)
108113
pnpm install --frozen-lockfile

.github/workflows/e2e-shell-tests.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,3 +87,67 @@ jobs:
8787
echo "Running E2E shell tests with realm: ${TEST_REALM}"
8888
cd packages/b2c-cli
8989
./test/functional/e2e_cli_test.sh
90+
91+
e2e-shell-tests-windows:
92+
runs-on: windows-latest
93+
# Advisory rollout: surface Windows shell-test failures without blocking
94+
# the Linux shell-test job while Windows-specific issues are triaged.
95+
continue-on-error: true
96+
environment: e2e-dev
97+
timeout-minutes: 45
98+
defaults:
99+
run:
100+
shell: bash
101+
steps:
102+
- uses: actions/checkout@v6
103+
104+
- name: Check for required secrets and vars
105+
id: check-secrets
106+
env:
107+
SFCC_CLIENT_ID: ${{ vars.SFCC_CLIENT_ID }}
108+
SFCC_CLIENT_SECRET: ${{ secrets.SFCC_CLIENT_SECRET }}
109+
TEST_REALM: ${{ vars.TEST_REALM }}
110+
SFCC_ACCOUNT_MANAGER_HOST: ${{ vars.SFCC_ACCOUNT_MANAGER_HOST }}
111+
SFCC_SANDBOX_API_HOST: ${{ vars.SFCC_SANDBOX_API_HOST }}
112+
SFCC_SHORTCODE: ${{ vars.SFCC_SHORTCODE }}
113+
run: |
114+
missing=""
115+
[ -z "$SFCC_CLIENT_ID" ] && missing="$missing SFCC_CLIENT_ID"
116+
[ -z "$SFCC_CLIENT_SECRET" ] && missing="$missing SFCC_CLIENT_SECRET"
117+
[ -z "$TEST_REALM" ] && missing="$missing TEST_REALM"
118+
[ -z "$SFCC_ACCOUNT_MANAGER_HOST" ] && missing="$missing SFCC_ACCOUNT_MANAGER_HOST"
119+
[ -z "$SFCC_SANDBOX_API_HOST" ] && missing="$missing SFCC_SANDBOX_API_HOST"
120+
[ -z "$SFCC_SHORTCODE" ] && missing="$missing SFCC_SHORTCODE"
121+
122+
if [ -z "$missing" ]; then
123+
echo "has-secrets=true" >> "$GITHUB_OUTPUT"
124+
else
125+
echo "has-secrets=false" >> "$GITHUB_OUTPUT"
126+
echo "Windows E2E shell tests skipped - missing required variables:$missing" >> "$GITHUB_STEP_SUMMARY"
127+
fi
128+
129+
- name: Setup Windows machine
130+
if: steps.check-secrets.outputs.has-secrets == 'true'
131+
uses: ./.github/actions/setup-windows
132+
with:
133+
node-version: '24'
134+
135+
- name: Build packages
136+
if: steps.check-secrets.outputs.has-secrets == 'true'
137+
run: pnpm -r run build
138+
139+
- name: Run E2E Shell Tests
140+
if: steps.check-secrets.outputs.has-secrets == 'true'
141+
env:
142+
SFCC_CLIENT_ID: ${{ vars.SFCC_CLIENT_ID }}
143+
SFCC_CLIENT_SECRET: ${{ secrets.SFCC_CLIENT_SECRET }}
144+
SFCC_ACCOUNT_MANAGER_HOST: ${{ vars.SFCC_ACCOUNT_MANAGER_HOST }}
145+
SFCC_SANDBOX_API_HOST: ${{ vars.SFCC_SANDBOX_API_HOST }}
146+
SFCC_SHORTCODE: ${{ vars.SFCC_SHORTCODE }}
147+
TEST_REALM: ${{ vars.TEST_REALM }}
148+
SFCC_EXTRA_HEADERS: ${{ secrets.SFCC_EXTRA_HEADERS }}
149+
CURL_EXTRA_HEADERS: ${{ secrets.CURL_EXTRA_HEADERS }}
150+
run: |
151+
echo "Running Windows E2E shell tests with realm: ${TEST_REALM}"
152+
cd packages/b2c-cli
153+
./test/functional/e2e_cli_test.sh

0 commit comments

Comments
 (0)