Skip to content

Commit b165e7f

Browse files
Merge branch 'main' into feature-W-21207882-add-scapi-cors-support
2 parents a205a83 + 8faf831 commit b165e7f

File tree

19 files changed

+1008
-93
lines changed

19 files changed

+1008
-93
lines changed

.changeset/early-clubs-eat.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@salesforce/b2c-dx-mcp': patch
3+
'@salesforce/b2c-dx-docs': patch
4+
---
5+
6+
MCP MRT Push now uses correct defaults based on detected project type
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+
Reorganize documentation navigation into Guides, Reference, and SDK sections for clearer information architecture
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@salesforce/b2c-tooling-sdk': minor
3+
---
4+
5+
Add `detectSourceFromPath()` for context-aware scaffold parameter detection, `cartridgePathForDestination()` export, and `builtInScaffoldsDir` option on `createScaffoldRegistry()` for bundled consumers

docs/.vitepress/config.mts

Lines changed: 37 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,18 @@ function getVersionItems() {
2828
];
2929
}
3030

31-
const guideSidebar = [
31+
const guidesSidebar = [
3232
{
3333
text: 'Getting Started',
3434
items: [
3535
{text: 'Introduction', link: '/guide/'},
36-
{text: 'Installation', link: '/guide/installation'},
37-
{text: 'Configuration', link: '/guide/configuration'},
36+
{text: 'CLI Installation', link: '/guide/installation'},
37+
{text: 'CLI Configuration', link: '/guide/configuration'},
3838
{text: 'Agent Skills & Plugins', link: '/guide/agent-skills'},
3939
],
4040
},
4141
{
42-
text: 'Guides',
42+
text: 'How-To',
4343
items: [
4444
{text: 'Authentication Setup', link: '/guide/authentication'},
4545
{text: 'CI/CD with GitHub Actions', link: '/guide/ci-cd'},
@@ -55,8 +55,8 @@ const guideSidebar = [
5555
text: 'MCP Server',
5656
items: [
5757
{text: 'Overview', link: '/mcp/'},
58-
{text: 'Installation', link: '/mcp/installation'},
59-
{text: 'Configuration', link: '/mcp/configuration'},
58+
{text: 'MCP Installation', link: '/mcp/installation'},
59+
{text: 'MCP Configuration', link: '/mcp/configuration'},
6060
{text: 'Toolsets & Tools', link: '/mcp/toolsets'},
6161
{text: 'Figma Tools Setup', link: '/mcp/figma-tools-setup'},
6262
],
@@ -68,34 +68,37 @@ const guideSidebar = [
6868
{text: '3rd Party Plugins', link: '/guide/third-party-plugins'},
6969
],
7070
},
71+
];
72+
73+
const referenceSidebar = [
7174
{
72-
text: 'CLI Reference',
75+
text: 'CLI Commands',
7376
items: [
7477
{text: 'Overview', link: '/cli/'},
75-
{text: 'Code Commands', link: '/cli/code'},
76-
{text: 'Content Commands', link: '/cli/content'},
77-
{text: 'CIP Commands', link: '/cli/cip'},
78-
{text: 'Job Commands', link: '/cli/jobs'},
79-
{text: 'Logs Commands', link: '/cli/logs'},
80-
{text: 'Sites Commands', link: '/cli/sites'},
81-
{text: 'WebDAV Commands', link: '/cli/webdav'},
82-
{text: 'Sandbox Commands', link: '/cli/sandbox'},
83-
{text: 'MRT Commands', link: '/cli/mrt'},
84-
{text: 'eCDN Commands', link: '/cli/ecdn'},
85-
{text: 'SLAS Commands', link: '/cli/slas'},
78+
{text: 'Account Manager', link: '/cli/account-manager'},
79+
{text: 'Auth', link: '/cli/auth'},
80+
{text: 'CIP', link: '/cli/cip'},
81+
{text: 'Code', link: '/cli/code'},
82+
{text: 'Content', link: '/cli/content'},
8683
{text: 'Custom APIs', link: '/cli/custom-apis'},
84+
{text: 'Docs', link: '/cli/docs'},
85+
{text: 'eCDN', link: '/cli/ecdn'},
86+
{text: 'Jobs', link: '/cli/jobs'},
87+
{text: 'Logs', link: '/cli/logs'},
88+
{text: 'MRT', link: '/cli/mrt'},
89+
{text: 'Sandbox', link: '/cli/sandbox'},
90+
{text: 'Scaffold', link: '/cli/scaffold'},
8791
{text: 'SCAPI Schemas', link: '/cli/scapi-schemas'},
88-
{text: 'SCAPI CORS Commands', link: '/cli/scapi-cors'},
89-
{text: 'Setup Commands', link: '/cli/setup'},
90-
{text: 'Scaffold Commands', link: '/cli/scaffold'},
91-
{text: 'Docs Commands', link: '/cli/docs'},
92-
{text: 'Auth Commands', link: '/cli/auth'},
93-
{text: 'Account Manager Commands', link: '/cli/account-manager'},
92+
{text: 'SCAPI Cors Preferences', link: '/cli/scapi-cors'},
93+
{text: 'Setup', link: '/cli/setup'},
94+
{text: 'Sites', link: '/cli/sites'},
95+
{text: 'SLAS', link: '/cli/slas'},
96+
{text: 'WebDAV', link: '/cli/webdav'},
9497
{text: 'Logging', link: '/cli/logging'},
9598
],
9699
},
97100
{
98-
text: 'Tools Reference',
101+
text: 'MCP Tools',
99102
items: [
100103
{text: 'cartridge_deploy', link: '/mcp/tools/cartridge-deploy'},
101104
{text: 'mrt_bundle_push', link: '/mcp/tools/mrt-bundle-push'},
@@ -158,10 +161,10 @@ export default defineConfig({
158161
level: [2, 3],
159162
},
160163
nav: [
161-
{text: 'Guide', link: '/guide/'},
162-
{text: 'CLI Reference', link: '/cli/'},
163-
{text: 'API Reference', link: '/api/'},
164-
{text: 'MCP Server', link: '/mcp/'},
164+
{text: 'Guides', link: '/guide/'},
165+
{text: 'MCP', link: '/mcp/'},
166+
{text: 'Reference', link: '/cli/'},
167+
{text: 'SDK', link: '/api/'},
165168
{
166169
text: isDevBuild ? 'Dev' : 'Latest',
167170
items: getVersionItems(),
@@ -174,12 +177,13 @@ export default defineConfig({
174177
},
175178

176179
sidebar: {
177-
'/guide/': guideSidebar,
178-
'/cli/': guideSidebar,
179-
'/mcp/': guideSidebar,
180+
'/mcp/tools/': referenceSidebar,
181+
'/mcp/': guidesSidebar,
182+
'/cli/': referenceSidebar,
183+
'/guide/': guidesSidebar,
180184
'/api/': [
181185
{
182-
text: 'API Reference',
186+
text: 'SDK Reference',
183187
items: [{text: 'Overview', link: '/api/'}],
184188
},
185189
...typedocSidebar,

docs/api-readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
2-
description: API reference for the B2C Tooling SDK with typed WebDAV and OCAPI clients for programmatic B2C Commerce operations.
2+
description: SDK reference for the B2C Tooling SDK with typed WebDAV and OCAPI clients for programmatic B2C Commerce operations.
33
---
44

5-
# API Reference
5+
# SDK Reference
66

77
The `@salesforce/b2c-tooling-sdk` package provides TypeScript APIs for B2C Commerce development, including instance clients (WebDAV, OCAPI), platform service clients (SCAPI, SLAS, MRT, ODS), high-level operations, and developer utilities.
88

docs/guide/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,5 +69,5 @@ See the [MCP Server Installation Guide](/mcp/installation) for detailed setup in
6969
- [IDE Integration](./ide-integration) - Connect Prophet VS Code to B2C CLI configuration
7070
- [MCP Server](/mcp/) - AI-assisted development with Model Context Protocol
7171
- [CLI Reference](/cli/) - Browse available commands
72-
- [Tools Reference](/mcp/toolsets) - Explore MCP tools for cartridges, MRT, SCAPI, and so on
73-
- [API Reference](/api/) - Explore the SDK API
72+
- [MCP Tools](/mcp/toolsets) - Explore MCP tools for cartridges, MRT, SCAPI, and so on
73+
- [SDK Reference](/api/) - Explore the SDK

docs/index.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,12 @@ hero:
1313
- theme: brand
1414
text: Get Started
1515
link: /guide/
16-
- theme: alt
17-
text: CLI Reference
18-
link: /cli/
1916
- theme: alt
2017
text: MCP Server
2118
link: /mcp/
2219
- theme: alt
23-
text: API Reference
24-
link: /api/
20+
text: Reference
21+
link: /cli/
2522

2623
features:
2724
- icon: "\U0001F680"
@@ -53,7 +50,7 @@ features:
5350
title: SDK Library
5451
details: Build custom integrations with @salesforce/b2c-tooling-sdk - the same SDK powering the CLI.
5552
link: /api/
56-
linkText: API Reference
53+
linkText: SDK Reference
5754
- icon: "\U0001F510"
5855
title: Account Management
5956
details: Manage users, roles, organizations, and API clients in Account Manager via CLI and SDK.

docs/mcp/tools/mrt-bundle-push.md

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,38 @@ Requires Managed Runtime (MRT) credentials. See [MRT Credentials](../configurati
3030

3131
## Parameters
3232

33+
Defaults for `buildDirectory`, `ssrOnly`, and `ssrShared` are chosen by detected project type (Storefront Next, PWA Kit v3, or generic). Explicit parameters override the project-type defaults.
34+
3335
| Parameter | Type | Required | Default | Description |
3436
|-----------|------|----------|---------|-------------|
3537
| `buildDirectory` | string | No | `./build` | Path to build directory containing the built project files. Can be absolute or relative to the project directory. |
3638
| `message` | string | No | None | Deployment message to include with the bundle push. Useful for tracking deployments. |
37-
| `ssrOnly` | string | No | `ssr.js,ssr.mjs,server/**/*` | Comma-separated glob patterns for server-only files (SSR). These files are only included in the server bundle. |
38-
| `ssrShared` | string | No | `static/**/*,client/**/*` | Comma-separated glob patterns for shared files. These files are included in both server and client bundles. |
39+
| `ssrOnly` | string | No | Varies by project type | Glob patterns for server-only files (SSR), comma-separated or JSON array. These files are only included in the server bundle. |
40+
| `ssrShared` | string | No | Varies by project type | Glob patterns for shared files, comma-separated or JSON array. These files are included in both server and client bundles. |
3941
| `deploy` | boolean | No | `false` | Whether to deploy to an environment after push. When `true`, `environment` must be provided via `--environment` flag or `MRT_ENVIRONMENT`. |
4042

43+
### Default values by project type
44+
45+
When `buildDirectory`, `ssrOnly`, or `ssrShared` are omitted, the tool detects the project type and applies these defaults:
46+
47+
**Generic** (used when no project type is detected; matches CLI `b2c mrt bundle deploy` defaults):
48+
49+
- `buildDirectory`: `./build`
50+
- `ssrOnly`: `ssr.js`, `ssr.mjs`, `server/**/*`
51+
- `ssrShared`: `static/**/*`, `client/**/*`
52+
53+
**PWA Kit v3**:
54+
55+
- `buildDirectory`: `./build`
56+
- `ssrOnly`: `ssr.js`, `ssr.js.map`, `node_modules/**/*.*`
57+
- `ssrShared`: `static/ico/favicon.ico`, `static/robots.txt`, `**/*.js`, `**/*.js.map`, `**/*.json`
58+
59+
**Storefront Next**:
60+
61+
- `buildDirectory`: `./build`
62+
- `ssrOnly`: `server/**/*`, `loader.js`, `streamingHandler.{js,mjs,cjs}`, `streamingHandler.{js,mjs,cjs}.map`, `ssr.{js,mjs,cjs}`, `ssr.{js,mjs,cjs}.map`, `!static/**/*`, `sfnext-server-*.mjs`, plus exclusions for Storybook and test files
63+
- `ssrShared`: `client/**/*`, `static/**/*`, `**/*.css`, image/font extensions, plus exclusions for Storybook and test files
64+
4165
## Usage Examples
4266

4367
### Push Bundle Only

0 commit comments

Comments
 (0)