@W-22453800 site library support in libraries config#422
Merged
Conversation
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.
Add a concrete example of the libraries config (mixed shared + site entries) under b2c content export, and a corresponding inferred-flag example under b2c content list, so the new behavior is visible in the CLI command docs and not just the configuration guide.
The site library example now uses SiteGenesis (a real site ID) and the shared library is RefArchSharedLibrary so the difference between a site-private and shared library is obvious from the IDs alone.
When both contentLibrary and libraries are configured, the Content Libraries tree now seeds the union of both rather than only the libraries array. Uses a new getExplicitContentLibrary accessor so the seeder doesn't double-add a library that's already in the libraries list via the existing libraries[0] fallback in getContentLibrary.
5 tasks
clavery
added a commit
that referenced
this pull request
May 14, 2026
The SDK previously dual-published both ESM and CJS via tsconfig.cjs.json. With module: Node16, tsc respected the SDK's "type": "module" and emitted ESM syntax into dist/cjs/, which Node's CJS loader then rejected at runtime. Production paths (CLI, MCP, VSIX bundle) all consumed the ESM build, so the broken CJS output went unnoticed until vscode-test loaded out/test/*.js as CJS and required the SDK transitively (#422 added the first such SDK import to webdav-mappings.ts). Drop the CJS build entirely and simplify the SDK exports map to ESM-only. Convert the VS extension package to "type": "module" so its tsc test compile emits ESM; rename the esbuild output to dist/extension.cjs (still CJS-formatted, since VS Code requires a CJS extension entry) and point main at the new filename. Replace two __dirname usages in tests with fileURLToPath(import.meta.url). Re-enable the VS extension test step.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
librariesconfig field (indw.json,package.json, env) now accepts{id, siteLibrary?}entries in addition to bare strings; mixed shapes allowed in the same array.b2c content list/content exportdefault--site-libraryfrom a matchinglibrariesentry. The flag is nowallowNowith no default, so--site-library/--no-site-librarystill wins when passed.contentLibrary), with each entry'ssiteLibraryflag honored — site-private libraries show the[site]tag automatically.libraries,assetQuery, andrealm(already supported in code) in thepackage.jsonanddw.jsonfield tables.Closes #421
GUS: W-22453800
Test plan
pnpm run typecheck:agentpnpm run lint:agentpnpm run test:agentresolveLibraryEntrieshelper unit tests +PackageJsonSourceacceptslibraries(string and object forms)content listdefaults--site-libraryfrom a matching libraries entry;--no-site-libraryoverrides; falls back to firstlibrariesentry when--libraryandcontentLibraryare unsetpackage.jsonlike{ "b2c": { "libraries": ["RefArch", {"id": "homepage", "siteLibrary": true}] } }— both libraries appear,homepageshows[site]