Skip to content

Remove B2CInstance.fromEnvironment() in favor of resolveConfig()#37

Merged
clavery merged 1 commit intomainfrom
remove-from-environment-method
Jan 13, 2026
Merged

Remove B2CInstance.fromEnvironment() in favor of resolveConfig()#37
clavery merged 1 commit intomainfrom
remove-from-environment-method

Conversation

@clavery
Copy link
Collaborator

@clavery clavery commented Jan 13, 2026

Summary

Following PR #30 (Unified Configuration System), this PR removes the unused B2CInstance.fromEnvironment() method and updates all documentation to use the new resolveConfig() pattern.

  • Remove FromEnvironmentOptions interface and fromEnvironment() static method (had zero runtime usages)
  • Update all JSDoc examples across SDK modules to use resolveConfig() pattern
  • Restructure docs/api-readme.md with comprehensive documentation for the unified config system
  • Add @salesforce/b2c-tooling-sdk/config to SDK README exports table

The resolveConfig() API provides better validation, warnings, and multi-source configuration loading compared to the removed method.

The fromEnvironment() method had no runtime usages - only documentation
examples. This change:

- Removes FromEnvironmentOptions interface and fromEnvironment() static method
- Updates all JSDoc examples to use resolveConfig() pattern
- Restructures docs/api-readme.md to document the unified config system
- Adds Configuration Resolution section covering multi-source loading,
  validation helpers, warnings, and hostname protection
@clavery clavery requested a review from yhsieh1 January 13, 2026 01:24
Copy link
Contributor

@yhsieh1 yhsieh1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good.

@clavery clavery merged commit 8a1a9ef into main Jan 13, 2026
2 checks passed
@clavery clavery deleted the remove-from-environment-method branch January 27, 2026 01:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants