You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Extends libraries to accept {id, siteLibrary?} entries (mixed with strings).
b2c content list/export default --site-library from a matching entry; the
flag is now allowNo with no default so explicit values still win. The VS
Code Content Libraries tree auto-seeds every entry on activation. Adds
libraries, assetQuery, and realm rows to the documented package.json /
dw.json field tables.
The `libraries` config field now accepts `{id, siteLibrary?}` objects in addition to bare strings (mixed forms allowed in the same array). This lets you mark site-private libraries in `dw.json` or `package.json` so `b2c content list` / `content export` can default `--site-library` based on which library you target, and the VS Code Content Libraries tree auto-loads every configured library on activation. To upgrade, optionally replace `"libraries": ["RefArch"]` with `"libraries": ["RefArch", {"id": "homepage", "siteLibrary": true}]`. The existing string-only form continues to work unchanged. Also adds `libraries`, `assetQuery`, and `realm` to the documented `package.json` allowed fields list (already supported in code).
|`--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|
57
57
|`--asset-query`, `-q`| JSON dot-paths for static asset extraction (can be repeated) |`image.path`|
58
58
|`--regex`, `-r`| Treat page IDs as regular expressions |`false`|
59
59
|`--folder`| Filter by folder classification (can be repeated) ||
@@ -116,7 +116,7 @@ With `--json`, returns a structured result including the library tree, output pa
116
116
117
117
### Notes
118
118
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
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. 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
120
120
- Use `b2c content list` to discover available page IDs before exporting
121
121
- 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
122
122
- 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 +141,7 @@ In addition to [global flags](./index#global-flags):
141
141
| Flag | Description | Default |
142
142
|------|-------------|---------|
143
143
|`--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`|
144
+
|`--site-library`/ `--no-site-library`| Treat the library as a site-private library. Defaults from a matching `libraries` config entry, otherwise `false`| from config|
145
145
|`--library-file`| Use a local library XML file instead of fetching from instance ||
146
146
|`--type`| Filter by node type: `page`, `content`, or `component`||
147
147
|`--components`| Include components in table output |`false`|
Copy file name to clipboardExpand all lines: docs/guide/configuration.md
+39-9Lines changed: 39 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -258,8 +258,11 @@ For the full command reference with all flags, see [Setup Commands](/cli/setup).
258
258
|`account-manager-host`| Account Manager hostname for OAuth |
259
259
|`shortCode`| SCAPI short code. Also accepts `short-code` or `scapi-shortcode`. |
260
260
|`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`|
261
263
|`tenant-id`| Organization/tenant ID for SCAPI |
262
264
|`sandbox-api-host`| ODS (sandbox) API hostname |
265
+
|`realm`| Default ODS realm for sandbox operations |
263
266
|`cip-host`| CIP analytics host override |
264
267
|`mrtApiKey`| MRT API key |
265
268
|`mrtProject`| MRT project slug |
@@ -319,15 +322,18 @@ You can store project-level defaults in your `package.json` file under the `b2c`
319
322
320
323
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`):
|`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 |
331
337
332
338
::: warning Security Note
333
339
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
337
343
`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.
338
344
:::
339
345
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
+
"RefArch",
357
+
{ "id": "homepage", "siteLibrary": true }
358
+
]
359
+
}
360
+
}
361
+
```
362
+
363
+
With this config:
364
+
365
+
-`b2c content list --library homepage` calls the site-library API automatically (no need to pass `--site-library`).
366
+
-`b2c content list --library RefArch` treats `RefArch` 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 `homepage` marked `[site]`.
369
+
340
370
### Resolution Priority
341
371
342
372
Configuration is resolved with the following precedence (highest to lowest):
0 commit comments