chore: replace @timbenniks/contentstack-endpoints with @contentstack/utils#70
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 |
naman-contentstack
approved these changes
Jun 17, 2026
sunil-lakshman
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@timbenniks/contentstack-endpointsas a direct dependency frompackage.jsonnuxt.config.tsand simplifies the region handlingf.jsscratch fileWhat changed and why
nuxt.config.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 equivalentpackage.jsonRemoved
@timbenniks/contentstack-endpointsas a direct dependency.@contentstack/utilswas already listed at^1.9.1.README.mdAdded a Regions and endpoint configuration section covering:
.env.exampleAdded all valid region options as an inline comment:
Files changed
nuxt.config.tspackage.json@timbenniks/contentstack-endpointsdirect dependencypackage-lock.jsonnpm installREADME.md.env.exampleNo breaking changes
app/plugins/contentstack.tsis untouched — it still receives the samecontentDelivery,previewHost, andapplicationHostkeys fromruntimeConfig.publicapp/composables/useGetPage.tsis untouchedTest plan
npm run devstarts without errors forNUXT_CONTENTSTACK_REGION=NAnpm run devstarts without errors forNUXT_CONTENTSTACK_REGION=EUhttp://localhost:3000NUXT_CONTENTSTACK_PREVIEW=trueNUXT_CONTENTSTACK_REGION=INVALID) throws a clear error at startupNUXT_CONTENTSTACK_CONTENT_DELIVERYetc.) still take precedence over resolved values