Skip to content

Commit 7864b5b

Browse files
committed
Merge origin/main into feature/cip
2 parents 36dcb46 + f12984e commit 7864b5b

49 files changed

Lines changed: 6544 additions & 1286 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@salesforce/b2c-cli': minor
3+
---
4+
5+
Add `b2c setup ide prophet` to generate a Prophet-compatible `dw.js` script from resolved CLI configuration (including plugin-resolved values), plus new IDE integration docs and setup command reference.

.github/CODEOWNERS

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
#GUSINFO:CC Cosmos,B2C CLI and Developer Tools
22
* @clavery
3-
/packages/b2c-dx-mcp/ @yhsieh1 @patricksullivansf
3+
/packages/b2c-dx-mcp/ @yhsieh1 @patricksullivansf @wei-liu-sf
4+
/packages/b2c-vs-extension/ @wei-liu-sf
5+

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ docs/.vitepress/cache
2626
# TypeDoc generated API docs (regenerated on build)
2727
docs/api/
2828

29-
dw.json
30-
dw.json*
29+
*dw.json*
3130
.env
3231
.config/wt.toml
3332
.b2c/

docs/.vitepress/config.mts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ const guideSidebar = [
5050
{text: 'Authentication Setup', link: '/guide/authentication'},
5151
{text: 'Account Manager', link: '/guide/account-manager'},
5252
{text: 'Analytics Reports (CIP/CCAC)', link: '/guide/analytics-reports-cip-ccac'},
53+
{text: 'IDE Integration', link: '/guide/ide-integration'},
5354
{text: 'Scaffolding', link: '/guide/scaffolding'},
5455
{text: 'Security', link: '/guide/security'},
5556
{text: 'Storefront Next', link: '/guide/storefront-next'},
@@ -81,6 +82,7 @@ const guideSidebar = [
8182
{text: 'SCAPI Schemas', link: '/cli/scapi-schemas'},
8283
{text: 'Setup Commands', link: '/cli/setup'},
8384
{text: 'Scaffold Commands', link: '/cli/scaffold'},
85+
{text: 'Docs Commands', link: '/cli/docs'},
8486
{text: 'Auth Commands', link: '/cli/auth'},
8587
{text: 'Account Manager Commands', link: '/cli/account-manager'},
8688
{text: 'Logging', link: '/cli/logging'},

docs/cli/docs.md

Lines changed: 205 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,205 @@
1+
---
2+
description: Search, read, and download B2C Commerce Script API documentation and bundled XSD schemas.
3+
---
4+
5+
# Docs Commands
6+
7+
Commands for searching and reading Script API documentation (`dw.*` classes/modules), reading bundled XSD schemas, and downloading fresh documentation from an instance.
8+
9+
## Authentication
10+
11+
| Operation | Auth Required |
12+
| --------------- | --------------------------------- |
13+
| `docs search` | None (uses local bundled docs) |
14+
| `docs read` | None (uses local bundled docs) |
15+
| `docs schema` | None (uses local bundled schemas) |
16+
| `docs download` | Instance + WebDAV credentials |
17+
18+
For `b2c docs download`, configure instance and WebDAV access:
19+
20+
```bash
21+
export SFCC_SERVER=my-sandbox.demandware.net
22+
export SFCC_USERNAME=your-username
23+
export SFCC_PASSWORD=your-password
24+
```
25+
26+
In addition to these topic-specific options, all commands also support [global flags](./index#global-flags).
27+
28+
---
29+
30+
## b2c docs search
31+
32+
Search bundled Script API documentation using fuzzy matching.
33+
34+
### Usage
35+
36+
```bash
37+
b2c docs search [query]
38+
```
39+
40+
### Arguments
41+
42+
| Argument | Description | Required |
43+
| -------- | ------------------------------------------------------- | ------------------------------------- |
44+
| `query` | Search query (class name, module path, or partial text) | No (required unless `--list` is used) |
45+
46+
### Flags
47+
48+
| Flag | Description | Default |
49+
| --------------- | ---------------------------------------- | ------- |
50+
| `--limit`, `-l` | Maximum number of results to display | `20` |
51+
| `--list` | List all available documentation entries | `false` |
52+
53+
### Examples
54+
55+
```bash
56+
# Search by class name
57+
b2c docs search ProductMgr
58+
59+
# Search with multiple terms
60+
b2c docs search "catalog product"
61+
62+
# Limit result count
63+
b2c docs search status --limit 5
64+
65+
# List all available entries
66+
b2c docs search --list
67+
```
68+
69+
### Output
70+
71+
Default output is a table with `ID`, `Title`, and `Match` score. With `--list`, output shows all entries (`ID` and `Title`) plus a total count.
72+
73+
---
74+
75+
## b2c docs read
76+
77+
Read Script API documentation for a specific class or module.
78+
79+
### Usage
80+
81+
```bash
82+
b2c docs read <query>
83+
```
84+
85+
### Arguments
86+
87+
| Argument | Description | Required |
88+
| -------- | ---------------------------------- | -------- |
89+
| `query` | Class/module name or partial match | Yes |
90+
91+
### Flags
92+
93+
| Flag | Description | Default |
94+
| ------------- | ------------------------------------------- | ------- |
95+
| `--raw`, `-r` | Output raw markdown (no terminal rendering) | `false` |
96+
97+
### Examples
98+
99+
```bash
100+
# Read a class doc
101+
b2c docs read ProductMgr
102+
103+
# Read by fully qualified name
104+
b2c docs read dw.catalog.ProductMgr
105+
106+
# Output raw markdown for piping
107+
b2c docs read ProductMgr --raw
108+
109+
# JSON output with selected entry + content
110+
b2c docs read ProductMgr --json
111+
```
112+
113+
### Output
114+
115+
By default, markdown is rendered for terminal display. Raw markdown is emitted when using `--raw` (or when output is not a TTY).
116+
117+
---
118+
119+
## b2c docs schema
120+
121+
Read bundled XSD schemas (import/export data format definitions).
122+
123+
### Usage
124+
125+
```bash
126+
b2c docs schema [query]
127+
```
128+
129+
### Arguments
130+
131+
| Argument | Description | Required |
132+
| -------- | ------------------------------------------------------------- | ------------------------------------- |
133+
| `query` | Schema name or partial match (for example `catalog`, `order`) | No (required unless `--list` is used) |
134+
135+
### Flags
136+
137+
| Flag | Description | Default |
138+
| -------------- | -------------------------- | ------- |
139+
| `--list`, `-l` | List all available schemas | `false` |
140+
141+
### Examples
142+
143+
```bash
144+
# Read a specific schema
145+
b2c docs schema catalog
146+
147+
# Fuzzy match by schema name
148+
b2c docs schema order
149+
150+
# List available schemas
151+
b2c docs schema --list
152+
153+
# JSON output
154+
b2c docs schema catalog --json
155+
```
156+
157+
### Output
158+
159+
Without `--json`, the command writes schema XML directly to stdout. With `--list`, it prints available schema IDs and a total count.
160+
161+
---
162+
163+
## b2c docs download
164+
165+
Download Script API documentation from a B2C Commerce instance to a local directory.
166+
167+
### Usage
168+
169+
```bash
170+
b2c docs download <output>
171+
```
172+
173+
### Arguments
174+
175+
| Argument | Description | Required |
176+
| -------- | ----------------------------------------- | -------- |
177+
| `output` | Local output directory for extracted docs | Yes |
178+
179+
### Flags
180+
181+
| Flag | Description | Default |
182+
| ---------------- | ------------------------------------------------- | ------- |
183+
| `--keep-archive` | Keep the downloaded archive file after extraction | `false` |
184+
185+
In addition to [global flags](./index#global-flags), this command supports [instance flags](./index#instance-flags) and authentication flags for WebDAV access.
186+
187+
### Examples
188+
189+
```bash
190+
# Download docs to a local directory
191+
b2c docs download ./docs
192+
193+
# Keep the downloaded archive
194+
b2c docs download ./docs --keep-archive
195+
196+
# Specify instance hostname directly
197+
b2c docs download ./my-docs --server sandbox.demandware.net
198+
199+
# JSON output
200+
b2c docs download ./docs --json
201+
```
202+
203+
### Output
204+
205+
The command reports the number of extracted files and output path. If `--keep-archive` is set, it also prints the saved archive location.

docs/cli/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ All Account Manager commands are under the `am` topic:
6767

6868
### Utilities
6969

70+
- [Docs Commands](./docs) - Search/read Script API docs and XSD schemas, and download docs from an instance
7071
- [Auth Commands](./auth) - Authentication and token management
7172
- [Logging](./logging) - Log levels, output formats, and environment variables
7273

0 commit comments

Comments
 (0)