Skip to content

Commit a0bac21

Browse files
authored
Merge branch 'main' into W-22283814-local-dev-ach-header-forwarding
2 parents 8744cf6 + 5bd9fe3 commit a0bac21

129 files changed

Lines changed: 2945 additions & 896 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/RELEASE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Thu May 7 23:56:57 UTC 2026
1+
Wed May 13 01:22:16 UTC 2026

.changeset/exclude-evals-from-skill-zips.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.claude-plugin/marketplace.json

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"source": "./skills/b2c-cli",
1818
"category": "productivity",
1919
"strict": false,
20-
"version": "1.3.0"
20+
"version": "1.3.1"
2121
},
2222
{
2323
"name": "b2c",
@@ -29,7 +29,7 @@
2929
"source": "./skills/b2c",
3030
"category": "productivity",
3131
"strict": false,
32-
"version": "1.3.0"
32+
"version": "1.3.1"
3333
},
3434
{
3535
"name": "b2c-dx-mcp",
@@ -52,7 +52,7 @@
5252
"source": "./skills/storefront-next",
5353
"category": "productivity",
5454
"strict": false,
55-
"version": "1.3.0"
55+
"version": "1.3.1"
5656
},
5757
{
5858
"name": "cap-dev",
@@ -77,11 +77,6 @@
7777
"cap",
7878
"impex"
7979
],
80-
"interface": {
81-
"displayName": "Commerce Apps Dev",
82-
"shortDescription": "Scaffold, validate, package, and submit Commerce App Packages.",
83-
"longDescription": "Skills for building Salesforce Commerce Cloud app packages — scaffold new apps (UI-only, backend-only, or fullstack), generate IMPEX configurations for services, custom objects, and site preferences, validate packages against registry requirements, and submit pull requests to the commerce-apps registry."
84-
},
8580
"strict": false
8681
}
8782
]

.github/workflows/ci-vs-extension.yml

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,19 @@ on:
66
- main
77
paths:
88
- 'packages/b2c-vs-extension/**'
9+
- 'packages/b2c-tooling-sdk/**'
10+
- 'pnpm-lock.yaml'
11+
- 'pnpm-workspace.yaml'
12+
- '.github/workflows/ci-vs-extension.yml'
913
pull_request:
1014
branches:
1115
- main
1216
paths:
1317
- 'packages/b2c-vs-extension/**'
18+
- 'packages/b2c-tooling-sdk/**'
19+
- 'pnpm-lock.yaml'
20+
- 'pnpm-workspace.yaml'
21+
- '.github/workflows/ci-vs-extension.yml'
1422

1523
permissions:
1624
contents: read
@@ -51,12 +59,25 @@ jobs:
5159
restore-keys: |
5260
${{ runner.os }}-pnpm-store-
5361
62+
- name: Cache VS Code test binary
63+
uses: actions/cache@v5
64+
with:
65+
path: packages/b2c-vs-extension/.vscode-test
66+
key: ${{ runner.os }}-vscode-test-${{ hashFiles('packages/b2c-vs-extension/.vscode-test.mjs', 'pnpm-lock.yaml') }}
67+
restore-keys: |
68+
${{ runner.os }}-vscode-test-
69+
5470
- name: Install dependencies
5571
run: pnpm install --frozen-lockfile
5672

5773
- name: Build packages
5874
run: pnpm -r run build
5975

60-
- name: Run VS Extension tests
61-
working-directory: packages/b2c-vs-extension
62-
run: xvfb-run -a pnpm run test
76+
# Temporarily disabled: SDK dist/cjs emits ESM syntax (tsc with module: Node16
77+
# respects the SDK's "type": "module"), which Node's CJS loader rejects when
78+
# vscode-test requires it transitively from out/test/*.js. The production VSIX
79+
# is unaffected because esbuild bundles the SDK directly. Re-enable once the
80+
# SDK CJS emit is fixed.
81+
# - name: Run VS Extension tests
82+
# working-directory: packages/b2c-vs-extension
83+
# run: xvfb-run -a pnpm run test

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ docs/.vitepress/cache
2727
docs/api/
2828

2929
*dw.json*
30+
!packages/b2c-vs-extension/src/test/fixtures/**/dw.json
3031
.env
3132
.config/wt.toml
3233
.b2c/

docs/.vitepress/config.mts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,14 @@ const guidesSidebar = [
7676
{text: 'Commerce Apps (CAPs)', link: '/guide/commerce-apps'},
7777
],
7878
},
79+
{
80+
text: 'VS Code Extension',
81+
items: [
82+
{text: 'Overview', link: '/vscode-extension/'},
83+
{text: 'Installation', link: '/vscode-extension/installation'},
84+
{text: 'Configuration', link: '/vscode-extension/configuration'},
85+
],
86+
},
7987
{
8088
text: 'MCP Server',
8189
items: [
@@ -197,7 +205,7 @@ document.addEventListener('click', (e) => {
197205

198206
export default defineConfig({
199207
title: 'B2C Developer Toolkit',
200-
description: 'Agentic B2C Developer Toolkit — CLI, Agent Skills, MCP Server, SDK, and IDE extensions for Salesforce B2C Commerce',
208+
description: 'Agentic B2C Developer Toolkit — CLI, Agent Skills, MCP Server, SDK, and the B2C DX VS Code Extension for Salesforce B2C Commerce',
201209
base: basePath,
202210

203211
head: [['script', {}, versionSwitchScript]],
@@ -263,6 +271,7 @@ export default defineConfig({
263271
nav: [
264272
{text: 'Guides', link: '/guide/'},
265273
{text: 'Skills', link: '/guide/agent-skills'},
274+
{text: 'VS Code', link: '/vscode-extension/'},
266275
{text: 'MCP', link: '/mcp/'},
267276
{text: 'Reference', link: '/cli/'},
268277
{text: 'SDK', link: '/api/'},
@@ -280,6 +289,7 @@ export default defineConfig({
280289
sidebar: {
281290
'/mcp/tools/': referenceSidebar,
282291
'/mcp/': guidesSidebar,
292+
'/vscode-extension/': guidesSidebar,
283293
'/cli/': referenceSidebar,
284294
'/guide/': guidesSidebar,
285295
'/api/': [

docs/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# @salesforce/b2c-dx-docs
22

3+
## 0.3.1
4+
5+
### Patch Changes
6+
7+
- [#409](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/pull/409) [`ec31234`](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/commit/ec312342e14080fb5d51b72243e763030c429f80) - Document the B2C DX VS Code Extension. New `/vscode-extension/` section with overview, installation (with a dynamic download link to the latest VSIX release), configuration reference, and a feature tour covering Sandbox Realm Explorer, Cartridge Code Sync, WebDAV Browser, Content Libraries, SCAPI API Browser, B2C Script Debugger, scaffold/CAP install, log tailing, and B2C CLI plugin support. (Thanks [@clavery](https://github.com/clavery)!)
8+
39
## 0.3.0
410

511
### Minor Changes

docs/cli/content.md

Lines changed: 40 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ In addition to [global flags](./index#global-flags):
5353
|------|-------------|---------|
5454
| `--library` | Library ID or site ID. Also configurable via `content-library` in dw.json. | |
5555
| `--output`, `-o` | Output directory | `content-<timestamp>` |
56-
| `--site-library` | Treat the library as a site-private library | `false` |
56+
| `--site-library` / `--no-site-library` | Treat the library as a site-private library. Defaults from a matching `libraries` config entry, otherwise `false` | from config |
5757
| `--asset-query`, `-q` | JSON dot-paths for static asset extraction (can be repeated) | `image.path` |
5858
| `--regex`, `-r` | Treat page IDs as regular expressions | `false` |
5959
| `--folder` | Filter by folder classification (can be repeated) | |
@@ -102,6 +102,38 @@ export SFCC_SERVER=my-sandbox.demandware.net
102102
export SFCC_CLIENT_ID=your-client-id
103103
export SFCC_CLIENT_SECRET=your-client-secret
104104
b2c content export homepage
105+
106+
# With a libraries config entry (see below) marking the site library as
107+
# site-private, --site-library is inferred automatically:
108+
b2c content export homepage --library SiteGenesis
109+
```
110+
111+
### Configuring multiple libraries
112+
113+
Listing libraries under `b2c.libraries` in `package.json` (or `libraries` in `dw.json`) lets the CLI pick a default library and infer `--site-library` per entry. Bare strings are shared libraries; `{id, siteLibrary: true}` marks a site-private library. Both forms can be mixed:
114+
115+
```json
116+
{
117+
"b2c": {
118+
"libraries": [
119+
"RefArchSharedLibrary",
120+
{ "id": "SiteGenesis", "siteLibrary": true }
121+
]
122+
}
123+
}
124+
```
125+
126+
With this config:
127+
128+
```bash
129+
# Uses RefArchSharedLibrary (first entry) as the default library
130+
b2c content export hero-banner
131+
132+
# --site-library is inferred from the matching entry
133+
b2c content export homepage --library SiteGenesis
134+
135+
# Explicit flag still overrides the config
136+
b2c content export homepage --library SiteGenesis --no-site-library
105137
```
106138

107139
### Output
@@ -116,7 +148,7 @@ With `--json`, returns a structured result including the library tree, output pa
116148

117149
### Notes
118150

119-
- The `--library` flag can be set in `dw.json` as `content-library` or in `package.json` under `b2c.contentLibrary` to avoid passing it every time
151+
- The `--library` flag can be set in `dw.json` as `content-library` or in `package.json` under `b2c.contentLibrary` to avoid passing it every time. You can also list libraries under `b2c.libraries` (mixed strings or `{id, siteLibrary?}` objects); when the resolved library matches an entry marked `siteLibrary: true`, `--site-library` defaults to true automatically. The CLI flag still wins when passed explicitly
120152
- Use `b2c content list` to discover available page IDs before exporting
121153
- You can export pages, content assets, or individual components by their content ID. When a component ID is specified, it is promoted to the root of the export with its full child tree
122154
- The `--asset-query` flag specifies JSON dot-notation paths within component data to extract static asset references. The default `image.path` covers the common Page Designer image component pattern
@@ -141,7 +173,7 @@ In addition to [global flags](./index#global-flags):
141173
| Flag | Description | Default |
142174
|------|-------------|---------|
143175
| `--library` | Library ID or site ID. Also configurable via `content-library` in dw.json. | |
144-
| `--site-library` | Treat the library as a site-private library | `false` |
176+
| `--site-library` / `--no-site-library` | Treat the library as a site-private library. Defaults from a matching `libraries` config entry, otherwise `false` | from config |
145177
| `--library-file` | Use a local library XML file instead of fetching from instance | |
146178
| `--type` | Filter by node type: `page`, `content`, or `component` | |
147179
| `--components` | Include components in table output | `false` |
@@ -166,6 +198,11 @@ b2c content list --library SharedLibrary --tree
166198
# List from a site-private library
167199
b2c content list --library RefArch --site-library
168200

201+
# With a libraries config entry marking the site library as site-private,
202+
# --site-library is inferred automatically (see "b2c content export"
203+
# above for an example b2c.libraries config):
204+
b2c content list --library SiteGenesis
205+
169206
# List from a local XML file
170207
b2c content list --library SharedLibrary --library-file ./library.xml
171208

docs/guide/agent-skills.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,6 @@ Then enter:
2727
SalesforceCommerceCloud/b2c-developer-tooling
2828
```
2929

30-
::: tip Updating Copilot Skills in VS Code
31-
To update the extension marketplace for the latest skills, open the Extensions view sidebar, click **`···`** (the ellipsis menu), and select **Check for Extension Updates**.
32-
:::
33-
3430
```bash [Copilot CLI]
3531
copilot plugin marketplace add SalesforceCommerceCloud/b2c-developer-tooling
3632
copilot plugin install b2c-cli@b2c-developer-tooling

docs/guide/configuration.md

Lines changed: 39 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -258,8 +258,11 @@ For the full command reference with all flags, see [Setup Commands](/cli/setup).
258258
| `account-manager-host` | Account Manager hostname for OAuth |
259259
| `shortCode` | SCAPI short code. Also accepts `short-code` or `scapi-shortcode`. |
260260
| `content-library` | Default content library ID for `content export` and `content list` commands |
261+
| `libraries` | Library IDs for the WebDAV browser and Content Libraries tree. Accepts `string[]` or `[{id, siteLibrary?}]`; elements may be mixed |
262+
| `asset-query` | JSON dot-paths used to extract static asset URLs during content library parsing (default `["image.path"]`). Also accepts `assetQuery` |
261263
| `tenant-id` | Organization/tenant ID for SCAPI |
262264
| `sandbox-api-host` | ODS (sandbox) API hostname |
265+
| `realm` | Default ODS realm for sandbox operations |
263266
| `cip-host` | CIP analytics host override |
264267
| `mrtApiKey` | MRT API key |
265268
| `mrtProject` | MRT project slug |
@@ -319,15 +322,18 @@ You can store project-level defaults in your `package.json` file under the `b2c`
319322

320323
Only non-sensitive, project-level fields can be configured in `package.json`. Both camelCase and kebab-case are accepted (e.g., `shortCode` or `short-code`):
321324

322-
| Field | Description |
323-
| -------------------- | --------------------------------------------------------------------------- |
324-
| `shortCode` | SCAPI short code |
325-
| `clientId` | OAuth client ID (for implicit login discovery) |
326-
| `contentLibrary` | Default content library ID for `content export` and `content list` commands |
327-
| `mrtProject` | MRT project slug |
328-
| `mrtOrigin` | MRT API origin URL override |
329-
| `accountManagerHost` | Account Manager hostname for OAuth |
330-
| `sandboxApiHost` | ODS (sandbox) API hostname |
325+
| Field | Description |
326+
| -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
327+
| `shortCode` | SCAPI short code |
328+
| `clientId` | OAuth client ID (for implicit login discovery) |
329+
| `contentLibrary` | Default content library ID for `content export` and `content list` commands |
330+
| `libraries` | Library IDs for the WebDAV browser and Content Libraries tree. Accepts `string[]` or `[{id, siteLibrary?}]`; elements may be mixed |
331+
| `assetQuery` | JSON dot-paths used to extract static asset URLs during content library parsing (default `["image.path"]`) |
332+
| `mrtProject` | MRT project slug |
333+
| `mrtOrigin` | MRT API origin URL override |
334+
| `accountManagerHost` | Account Manager hostname for OAuth |
335+
| `sandboxApiHost` | ODS (sandbox) API hostname |
336+
| `realm` | Default ODS realm for sandbox operations |
331337

332338
::: warning Security Note
333339
Sensitive fields like `hostname`, `password`, `clientSecret`, `username`, and `mrtApiKey` are intentionally **not** supported in `package.json`. These should be configured via `dw.json` (which should be in `.gitignore`), environment variables, or secure credential stores.
@@ -337,6 +343,30 @@ Sensitive fields like `hostname`, `password`, `clientSecret`, `username`, and `m
337343
`package.json` has the lowest priority of all configuration sources. Values from `dw.json`, environment variables, or CLI flags will always override `package.json` settings. This makes it ideal for project defaults that can be overridden per-environment.
338344
:::
339345

346+
### Content Libraries Example
347+
348+
The `libraries` field can list the content libraries your project works with so that the VS Code Content Libraries tree auto-loads them and `b2c content list/export` can default `--site-library` based on the entry.
349+
350+
A bare string is treated as a shared library; an object can mark a library as site-private. Both forms can appear in the same array:
351+
352+
```json
353+
{
354+
"b2c": {
355+
"libraries": [
356+
"RefArchSharedLibrary",
357+
{ "id": "SiteGenesis", "siteLibrary": true }
358+
]
359+
}
360+
}
361+
```
362+
363+
With this config:
364+
365+
- `b2c content list --library SiteGenesis` calls the site-library API automatically (no need to pass `--site-library`); the library ID is the site ID.
366+
- `b2c content list --library RefArchSharedLibrary` treats `RefArchSharedLibrary` as a shared library.
367+
- `--site-library` / `--no-site-library` on the command line still wins over the config default.
368+
- The VS Code Content Libraries tree shows both entries on activation, with `SiteGenesis` marked `[site]`.
369+
340370
### Resolution Priority
341371

342372
Configuration is resolved with the following precedence (highest to lowest):

0 commit comments

Comments
 (0)