Skip to content

Commit 3cefda3

Browse files
committed
Documentation audit pass: corrected flag mismatches and missing commands
- Documented previously omitted commands: b2c sandbox ips, b2c mrt env var push, b2c debug - Fixed MRT reference: project get/update/delete now show the required positional slug; project member roles use integer values; env invalidate uses --pattern; redirect create/delete/clone flag names corrected; user api-key and email-prefs rewritten against the real flags - Rewrote ecdn flag tables for zones create, cache purge, security update, speed update, and logpush jobs create to match source - Removed phantom flags from am users update - Standardized Node.js requirement on >=22.16.0 across guides - account-manager guide no longer recommends the unsupported client_secret_post; authentication warning reframed as guidance - Added Copilot section to agent-skills so the homepage Copilot link lands on meaningful content - Filled gaps in cli/index.md command-topic listing - b2c debug --help now deep-links to the new docs page
1 parent bff62fc commit 3cefda3

20 files changed

Lines changed: 318 additions & 117 deletions

.changeset/cli-debug-docs-link.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@salesforce/b2c-cli': patch
3+
---
4+
5+
`b2c debug --help` now deep-links to the Debug command reference page on the docs site.

.changeset/docs-audit-fixes.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
'@salesforce/b2c-dx-docs': patch
3+
---
4+
5+
Documentation audit pass: corrected mismatched flags and missing commands across the CLI reference. Highlights:
6+
7+
- Documented `b2c sandbox ips`, `b2c mrt env var push`, and `b2c debug` (previously omitted).
8+
- Fixed `mrt project get/update/delete` examples to use the required positional slug; corrected `mrt project member add/update --role` to integer values; replaced `mrt env invalidate --path` with the actual `--pattern` flag; corrected `mrt env redirect create/delete/clone` flag names; rewrote `mrt user api-key` and `mrt user email-prefs` against the real flags.
9+
- Rewrote `ecdn zones create`, `ecdn cache purge`, `ecdn security update`, `ecdn speed update`, and `ecdn logpush jobs create` flag tables to match source.
10+
- Removed phantom flags (`--display-name`, etc.) from `am users update`.
11+
- Standardized Node.js requirement on `>=22.16.0` across all installation guides.
12+
- `account-manager` guide no longer recommends the unsupported `client_secret_post`; the `authentication` warning was reframed as guidance toward `client_secret_basic`.
13+
- Added a Copilot section to the agent-skills guide so the homepage Copilot link points at meaningful content.
14+
- Filled gaps in the CLI command-topic index (`bm-roles`, `setup`, `ecdn`, `replications`, `scapi-schemas`, `cap`, `logs`).

docs/.vitepress/config.mts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ const referenceSidebar = [
108108
{text: 'Code', link: '/cli/code'},
109109
{text: 'Content', link: '/cli/content'},
110110
{text: 'Custom APIs', link: '/cli/custom-apis'},
111+
{text: 'Debug', link: '/cli/debug'},
111112
{text: 'Docs', link: '/cli/docs'},
112113
{text: 'eCDN', link: '/cli/ecdn'},
113114
{text: 'Jobs', link: '/cli/jobs'},

docs/api-readme.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,8 @@ Used for OCAPI and can be used for WebDAV:
176176
const config = resolveConfig({
177177
clientId: 'your-client-id',
178178
clientSecret: 'your-client-secret',
179-
scopes: ['SALESFORCE_COMMERCE_API:...:dwsid'],
179+
// Scopes are tenant-specific; replace `zzxy_001` with your tenant short code.
180+
scopes: ['SALESFORCE_COMMERCE_API:zzxy_001:sites_rw'],
180181
});
181182

182183
const instance = config.createB2CInstance();

docs/cli/account-manager.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -256,11 +256,6 @@ b2c am users update <LOGIN> [FLAGS]
256256
|------|-------------|
257257
| `--first-name` | Update first name |
258258
| `--last-name` | Update last name |
259-
| `--display-name` | Update display name |
260-
| `--preferred-locale` | Update preferred locale |
261-
| `--business-phone` | Update business phone |
262-
| `--home-phone` | Update home phone |
263-
| `--mobile-phone` | Update mobile phone |
264259
| `--json` | Output results as JSON |
265260

266261
#### Examples
@@ -269,11 +264,10 @@ b2c am users update <LOGIN> [FLAGS]
269264
# Update user's first name
270265
b2c am users update user@example.com --first-name Jane
271266

272-
# Update multiple fields
267+
# Update both name fields
273268
b2c am users update user@example.com \
274269
--first-name Jane \
275-
--last-name Smith \
276-
--display-name "Jane Smith"
270+
--last-name Smith
277271

278272
# Output as JSON
279273
b2c am users update user@example.com --first-name Jane --json

docs/cli/debug.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
---
2+
description: Start a DAP debug adapter for B2C Commerce server-side script debugging.
3+
---
4+
5+
# Debug Command
6+
7+
The `b2c debug` command launches a [Debug Adapter Protocol (DAP)](https://microsoft.github.io/debug-adapter-protocol/) adapter that bridges your IDE to the B2C Commerce script debugger. It's designed to be invoked by an IDE (VS Code, JetBrains, etc.) over stdio, not run directly in a shell.
8+
9+
## Authentication
10+
11+
The script debugger uses **Basic auth** (Business Manager username and password). OAuth credentials are not sufficient. Provide credentials via any of:
12+
13+
- `--username` / `--password` flags
14+
- `SFCC_USERNAME` / `SFCC_PASSWORD` environment variables
15+
- `username` / `password` fields in `dw.json`
16+
17+
See the [Authentication Guide](/guide/authentication) for details.
18+
19+
## b2c debug
20+
21+
Start the DAP adapter for the configured B2C instance.
22+
23+
### Usage
24+
25+
```bash
26+
b2c debug [--cartridge-path <PATH>] [--client-id <ID>]
27+
```
28+
29+
### Flags
30+
31+
| Flag | Description | Default |
32+
|------|-------------|---------|
33+
| `--cartridge-path` | Path to your cartridges directory. The adapter recursively discovers cartridges under this path and maps them to the running instance. | `.` |
34+
| `--client-id` | Client ID reported to the B2C script debugger API. Useful when multiple debug sessions share an instance. | `b2c-cli` |
35+
36+
Inherits the [global instance and authentication flags](./index#global-flags) (`--server`, `--username`, `--password`, etc.).
37+
38+
### Examples
39+
40+
```bash
41+
# Run from a project root with cartridges in ./cartridges or ./
42+
b2c debug
43+
44+
# Point at an explicit cartridges directory
45+
b2c debug --cartridge-path ./cartridges
46+
47+
# Use a non-default debugger client ID
48+
b2c debug --client-id my-debugger
49+
```
50+
51+
### IDE Integration
52+
53+
Most IDEs spawn DAP adapters automatically based on a launch configuration. The adapter speaks DAP over **stdin/stdout**, so direct shell invocation will appear to hang — that's expected. Configure your IDE's debug launcher to invoke `b2c debug` and supply the appropriate environment.
54+
55+
## Notes
56+
57+
- A warning is emitted if no cartridges are found at `--cartridge-path`.
58+
- Source maps are derived from the discovered cartridge layout; ensure your local cartridge tree matches what's deployed to the instance, otherwise breakpoints may not bind.
59+
- The adapter exits when its stdin stream closes.

docs/cli/ecdn.md

Lines changed: 54 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -62,48 +62,44 @@ b2c ecdn zones list --tenant-id zzxy_prd
6262

6363
### b2c ecdn zones create
6464

65-
Create a new storefront zone.
65+
Create a new storefront CDN zone.
6666

6767
```bash
68-
b2c ecdn zones create --tenant-id zzxy_prd --storefront-hostname www.example.com --origin-hostname origin.example.com
68+
b2c ecdn zones create --tenant-id zzxy_prd --domain-name example.com
69+
b2c ecdn zones create --tenant-id zzxy_prd --domain-name store.example.com --json
6970
```
7071

7172
#### Flags
7273

7374
| Flag | Description | Required |
7475
|------|-------------|----------|
75-
| `--storefront-hostname` | Customer-facing hostname | Yes |
76-
| `--origin-hostname` | Origin server hostname | Yes |
76+
| `--domain-name`, `-d` | Domain name for the storefront zone | Yes |
7777

7878
---
7979

8080
## Cache Management
8181

8282
### b2c ecdn cache purge
8383

84-
Purge cached content from the CDN.
84+
Purge cached content from the CDN by path or cache tag. At least one of `--path` or `--tag` must be supplied.
8585

8686
```bash
87-
# Purge by path
88-
b2c ecdn cache purge --zone my-zone --path /products --path /categories
87+
# Purge a single path (format: hostname/path)
88+
b2c ecdn cache purge --zone my-zone --path "www.example.com/products"
8989

90-
# Purge by cache tag
91-
b2c ecdn cache purge --zone my-zone --tag product-123
90+
# Purge by cache tag (repeatable)
91+
b2c ecdn cache purge --zone my-zone --tag product-123 --tag category-456
9292

93-
# Purge everything
94-
b2c ecdn cache purge --zone my-zone --purge-everything
93+
# Wildcard path purge
94+
b2c ecdn cache purge --zone my-zone --path "www.example.com/dw/image/v2/realm_instance/*" --json
9595
```
9696

9797
#### Flags
9898

9999
| Flag | Description |
100100
|------|-------------|
101-
| `--path` | Path to purge (can be repeated) |
102-
| `--tag` | Cache tag to purge (can be repeated) |
103-
| `--host` | Host for path purging |
104-
| `--purge-everything` | Purge all cached content |
105-
106-
At least one purge method must be specified.
101+
| `--path`, `-p` | Path to purge in `hostname/path` format |
102+
| `--tag`, `-t` | Cache tag to purge (repeatable) |
107103

108104
---
109105

@@ -180,33 +176,36 @@ b2c ecdn security get --zone my-zone
180176
#### Output
181177

182178
Displays settings including:
183-
- SSL mode
184-
- Always use HTTPS
185-
- Minimum TLS version
186-
- TLS 1.3 status
187-
- Automatic HTTPS rewrites
188-
- Opportunistic encryption
179+
- Security level
180+
- Always-use-HTTPS state
181+
- TLS 1.3 state
182+
- WAF (OWASP) state
183+
- HSTS configuration (enabled, include subdomains, max age, preload)
189184

190185
---
191186

192187
### b2c ecdn security update
193188

194-
Update security settings.
189+
Update security settings for a zone. Provide only the flags you want to change.
195190

196191
```bash
197-
b2c ecdn security update --zone my-zone --ssl-mode full --min-tls-version 1.2 --always-use-https
192+
b2c ecdn security update --zone my-zone --security-level medium
193+
b2c ecdn security update --zone my-zone --always-use-https
194+
b2c ecdn security update --zone my-zone --tls13 --waf
198195
```
199196

200197
#### Flags
201198

202199
| Flag | Description | Options |
203200
|------|-------------|---------|
204-
| `--ssl-mode` | SSL/TLS mode | `off`, `flexible`, `full`, `strict` |
205-
| `--min-tls-version` | Minimum TLS version | `1.0`, `1.1`, `1.2`, `1.3` |
206-
| `--always-use-https` / `--no-always-use-https` | Force HTTPS | - |
207-
| `--tls-1-3` / `--no-tls-1-3` | Enable TLS 1.3 | - |
208-
| `--automatic-https-rewrites` / `--no-automatic-https-rewrites` | Rewrite HTTP links | - |
209-
| `--opportunistic-encryption` / `--no-opportunistic-encryption` | Enable opportunistic encryption | - |
201+
| `--security-level` | Zone security level | `off`, `essentially_off`, `low`, `medium`, `high`, `under_attack` |
202+
| `--always-use-https` / `--no-always-use-https` | Redirect all HTTP requests to HTTPS ||
203+
| `--tls13` / `--no-tls13` | Enable TLS 1.3 ||
204+
| `--waf` / `--no-waf` | Enable WAF (OWASP) protection ||
205+
| `--hsts-enabled` / `--no-hsts-enabled` | Enable HSTS ||
206+
| `--hsts-include-subdomains` / `--no-hsts-include-subdomains` | Include subdomains in HSTS ||
207+
| `--hsts-max-age` | HSTS max age in seconds | integer |
208+
| `--hsts-preload` / `--no-hsts-preload` | Enable HSTS preload ||
210209

211210
---
212211

@@ -224,28 +223,25 @@ b2c ecdn speed get --zone my-zone
224223

225224
### b2c ecdn speed update
226225

227-
Update speed optimization settings.
226+
Update speed optimization settings. Each flag accepts a string value (typically `on`/`off`); omitted flags default to `off` in the request body.
228227

229228
```bash
230-
b2c ecdn speed update --zone my-zone --browser-cache-ttl 14400 --auto-minify-html --auto-minify-css --auto-minify-js
229+
b2c ecdn speed update --zone my-zone --brotli on
230+
b2c ecdn speed update --zone my-zone --http3 on --early-hints on
231+
b2c ecdn speed update --zone my-zone --polish lossy --webp on
231232
```
232233

233234
#### Flags
234235

235-
| Flag | Description |
236-
|------|-------------|
237-
| `--browser-cache-ttl` | Browser cache TTL in seconds |
238-
| `--auto-minify-html` / `--no-auto-minify-html` | Auto-minify HTML |
239-
| `--auto-minify-css` / `--no-auto-minify-css` | Auto-minify CSS |
240-
| `--auto-minify-js` / `--no-auto-minify-js` | Auto-minify JavaScript |
241-
| `--brotli` / `--no-brotli` | Enable Brotli compression |
242-
| `--early-hints` / `--no-early-hints` | Enable Early Hints |
243-
| `--h2-prioritization` / `--no-h2-prioritization` | HTTP/2 prioritization |
244-
| `--image-resizing` / `--no-image-resizing` | Enable image resizing |
245-
| `--mirage` / `--no-mirage` | Enable Mirage |
246-
| `--polish` | Polish mode (`off`, `lossless`, `lossy`) |
247-
| `--prefetch-preload` / `--no-prefetch-preload` | Prefetch preload |
248-
| `--rocket-loader` / `--no-rocket-loader` | Rocket Loader |
236+
| Flag | Description | Options |
237+
|------|-------------|---------|
238+
| `--brotli` | Brotli compression | `on`, `off` |
239+
| `--http2-prioritization` | HTTP/2 prioritization | `on`, `off` |
240+
| `--http2-to-origin` | HTTP/2 to origin | `on`, `off` |
241+
| `--http3` | HTTP/3 | `on`, `off` |
242+
| `--early-hints` | Early hints | `on`, `off` |
243+
| `--webp` | WebP image format support | `on`, `off` |
244+
| `--polish` | Image polish level | `off`, `lossless`, `lossy` |
249245

250246
---
251247

@@ -410,19 +406,23 @@ b2c ecdn logpush jobs list --zone my-zone
410406
Create a Logpush job.
411407

412408
```bash
413-
b2c ecdn logpush jobs create --zone my-zone --name "HTTP logs" --destination-path 's3://my-bucket/logs?region=us-east-1' --log-type http_requests --log-fields ClientRequestHost,ClientRequestMethod
409+
b2c ecdn logpush jobs create --zone my-zone \
410+
--name "HTTP logs" \
411+
--destination-path 's3://my-bucket/logs/{DATE}?region=us-east-1' \
412+
--log-type http_requests \
413+
--log-fields ClientRequestHost,ClientRequestMethod
414414
```
415415

416416
#### Flags
417417

418418
| Flag | Description | Required |
419419
|------|-------------|----------|
420-
| `--name` | Job name | Yes |
421-
| `--destination-path` | Log destination path | Yes |
422-
| `--log-type` | Type of logs (`http_requests`, `firewall_events`, `nel_reports`, `dns_logs`) | Yes |
423-
| `--log-fields` | Comma-separated log fields | No |
424-
| `--filter` | JSON filter expression | No |
425-
| `--enabled` | Enable job on creation | No |
420+
| `--name` | Job name (immutable after creation) | Yes |
421+
| `--destination-path` | Destination path, e.g. `s3://bucket/path/{DATE}?region=us-east-1` | Yes |
422+
| `--log-type` | Type of logs: `http_requests`, `firewall_events`, `page_shield_events` | Yes |
423+
| `--log-fields` | Comma-separated list of log fields to include | Yes |
424+
| `--filter` | JSON filter expression for log selection | No |
425+
| `--ownership-token` | Ownership challenge token for destination verification | No |
426426

427427
---
428428

docs/cli/index.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,18 +67,26 @@ Safety Mode operates at the HTTP layer and cannot be bypassed by command-line fl
6767
- [Job Commands](./jobs) - Execute and monitor jobs, import/export site archives
6868
- [Sites Commands](./sites) - List and manage sites
6969
- [WebDAV Commands](./webdav) - File operations on instance WebDAV
70+
- [Logs Commands](./logs) - Tail and retrieve instance logs
71+
- [Content Commands](./content) - Export Page Designer content from a site
72+
- [BM Roles Commands](./bm-roles) - Manage Business Manager roles and permissions
7073

7174
### Services
7275

7376
- [Sandbox Commands](./sandbox) - Create and manage On-Demand Sandboxes
7477
- [MRT Commands](./mrt) - Manage Managed Runtime (MRT) projects and deployments
7578
- [SLAS Commands](./slas) - Manage Shopper Login and Access Service (SLAS) API clients
7679
- [CIP Commands](./cip) - Run CIP SQL queries and curated analytics reports
80+
- [eCDN Commands](./ecdn) - Manage eCDN zones, certificates, WAF, Page Shield, and edge configuration
7781
- [Custom APIs](./custom-apis) - SCAPI Custom API endpoint status
82+
- [SCAPI Schemas](./scapi-schemas) - Browse and retrieve SCAPI OpenAPI schemas
83+
- [Granular Replications](./replications) - Trigger and monitor SCAPI granular replications
84+
- [CAP Commands](./cap) - Manage Commerce App Packages
7885

7986
### Development
8087

8188
- [Scaffold Commands](./scaffold) - Generate cartridges, controllers, hooks, and more from templates
89+
- [Debug Command](./debug) - Start a DAP adapter for IDE-driven script debugging
8290

8391
### Account Management
8492

@@ -91,10 +99,11 @@ All Account Manager commands are under the `am` topic:
9199
- `b2c am orgs ...` - Organization management commands
92100
- `b2c am clients ...` - API client management (list, get, create, update, delete, password)
93101

94-
### Utilities
102+
### Setup & Utilities
95103

96-
- [Docs Commands](./docs) - Search/read Script API docs and XSD schemas, and download docs from an instance
104+
- [Setup Commands](./setup) - Configure instances, install IDE integrations, and install agent skills
97105
- [Auth Commands](./auth) - Authentication and token management
106+
- [Docs Commands](./docs) - Search/read Script API docs and XSD schemas, and download docs from an instance
98107
- [Logging](./logging) - Log levels, output formats, and environment variables
99108

100109
## Getting Help

0 commit comments

Comments
 (0)