Add EnvSource config source and dedicated VS Code extension release#241
Merged
Add EnvSource config source and dedicated VS Code extension release#241
Conversation
- Add EnvSource ConfigSource in SDK that maps SFCC_* env vars to NormalizedConfig fields (priority -10, opt-in via sourcesBefore) - Extension now loads .env files and uses EnvSource for env var support - Smart workspace folder detection scans for dw.json, .env with SFCC_* vars, and package.json b2c key in multi-root workspaces - Add "Use as B2C Commerce Root" context menu on workspace folders to pin a specific folder, with "Reset to Auto-Detect" command to clear - Pinned root persisted in workspace state, shown in status bar - Add .env file watchers alongside existing dw.json watchers
Add a new publish.yml step that creates a separate `b2c-vs-extension@X.Y.Z` GitHub Release with the VSIX attached, so users can easily find and download the latest extension. The release is marked `--latest=false` to avoid overtaking the primary npm publish releases. The step only runs when the extension publishes alongside other packages (to avoid duplicating the combined release when extension-only).
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
New
EnvSourceconfig source in the SDK that mapsSFCC_*environment variables to config fields, enabling the VS Code extension (and other consumers) to resolve config from.envfiles and env varsSmart workspace folder detection in the VS Code extension — scans all workspace folders for B2C indicators (
dw.json,.envwithSFCC_*vars,package.jsonwithb2ckey) instead of hardcodingworkspaceFolders[0].envfile loading and watching in the extension — loads.envon startup and resets config when it changesDedicated VS Code extension GitHub Release — creates a separate
b2c-vs-extension@X.Y.Zrelease (marked not-latest) with the VSIX attached, so users can easily find the latest extension without knowing which CLI release it was bundled withManual: open multi-root workspace with B2C project as non-first folder → config resolves
Manual: add
SFCC_CLIENT_IDto.env→ extension picks it upCI: verify publish workflow creates dedicated extension release when extension publishes alongside other packages