replace @timbenniks/contentstack-endpoints with @contentstack/utils#36
Merged
Conversation
🔒 Security Scan Results
⏱️ SLA Breach Summary
ℹ️ Vulnerabilities Without Available Fixes (Informational Only)The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:
✅ BUILD PASSED - All security checks passed |
abhishek-ezhava-cstk
approved these changes
Jun 19, 2026
reeshika-h
approved these changes
Jun 19, 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@timbenniks/contentstack-endpointsas a direct dependency and adds@contentstack/utils: ^1.9.1lib/contentstack.tsand simplifies region handlingWhat changed and why
lib/contentstack.tsBefore:
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 SDK errorregion ? region : ...ternary is removed —host:in the SDK config takes precedence overregionat runtime, so passing the raw env var string is equivalent@contentstack/utilswas already used forEmbeddedItemtypes in this file — the new import simply addsgetContentstackEndpointandContentstackEndpointsto what was already an existing dependencypackage.jsonRemoved
@timbenniks/contentstack-endpointsas a direct dependency. Added@contentstack/utilsat^1.9.1.README.mdTwo changes:
"Configured for EU region"→"Automatic endpoint resolution via getContentstackEndpoint from @contentstack/utils — supports all 7 Contentstack regions"NEXT_PUBLIC_CONTENTSTACK_*) for dedicated/private cloud instances.env.exampleUpdated region comment to list all 7 valid options:
Files changed
lib/contentstack.tspackage.json@timbenniks/contentstack-endpoints, add@contentstack/utils: ^1.9.1package-lock.jsonnpm installREADME.md.env.exampleNo breaking changes
NEXT_PUBLIC_CONTENTSTACK_*)stack,isPreview,initLivePreview,getPage,getHeader,getCategory,getProduct,getProductLine,createOgTags) are untouched — no consumer changes neededEmbeddedItemimport from@contentstack/utils/dist/types/...is unchanged