enhc: replace @timbenniks/contentstack-endpoints with @contentstack/utils#81
Merged
Conversation
🔒 Security Scan Results
⏱️ SLA Breach Summary
✅ BUILD PASSED - All security checks passed |
1 similar comment
🔒 Security Scan Results
⏱️ SLA Breach Summary
✅ BUILD PASSED - All security checks passed |
sunil-lakshman
approved these changes
Jun 17, 2026
naman-contentstack
approved these changes
Jun 17, 2026
abhishek-ezhava-cstk
approved these changes
Jun 17, 2026
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
@timbenniks/contentstack-endpoints(third-party) withgetContentstackEndpointfrom@contentstack/utils(official Contentstack package) for region-to-endpoint resolution ingenerate-env.js@timbenniks/contentstack-endpointsas a direct dependency and adds@contentstack/utils: ^1.9.1What changed and why
generate-env.jsBefore:
After:
Key improvements:
getContentstackEndpointhandles all alias normalisation internally (NA,na,US,usall resolve correctly)&&null-guard is removed —getContentstackEndpointthrows on an invalid region at startup (fail-fast) instead of silently returningundefinedand causing a downstream errorregion ? region : ...ternary is removed — the raw env var string is used directly (equivalent at runtime sincehost:takes precedence overregionin the SDK)environmentContent(dev) andenvironmentProdContent(prod) templatespackage.jsonRemoved
@timbenniks/contentstack-endpointsas a direct dependency. Added@contentstack/utilsat^1.9.1.README.mdAdded a Regions and endpoint configuration section covering:
NG_APP_CONTENTSTACK_*) for dedicated/private cloud instances.env.exampleAdded all valid region options as an inline comment:
Files changed
generate-env.jspackage.json@timbenniks/contentstack-endpoints, add@contentstack/utils: ^1.9.1README.md.env.exampleNo breaking changes
environment.tsandenvironment.production.tsexpose the same fields (contentDelivery,previewHost,applicationHost,region) — no consumer changes needed