| name | contentstack-js-cda |
|---|---|
| description | Contentstack Content Delivery (CDA) JavaScript SDK — Stack, tokens, regions, queries, sync, live preview in src/core/. |
This repository ships contentstack, the Content Delivery API read client. It is not the Content Management API client (@contentstack/management).
Contentstack.Stack(options)(src/core/stack.js) configures the stack (api_key,delivery_token,environment, optionalregion,branch,host,live_preview,plugins,fetchOptions).- Modules under
src/core/modules/implement entries, assets, queries, taxonomy, results, etc., composed from the stack instance. src/core/lib/request.jsperformsfetch, query string building, retries, and plugin hooks.src/runtime/*provides platform-specifichttpand localstorage implementations selected at build time.
region/host— CDN / API host selection (seestack.jsandconfig.jsdefaults).fetchOptions—timeout,retryLimit,retryDelay,retryCondition(defaults include 408 / 429),retryDelayOptions,debug,logHandler.live_preview— enable flag,host,management_tokenorpreview_token; affects which host serves preview vs delivery.plugins—{ onRequest, onResponse }hooks invoked fromrequest.js.
- Follow neighbors in
src/core/modules/for method chaining, URL construction, and parameter passing intoRequest. - Consider cache policy and sync behaviors when changing read paths.
- Multi-platform: verify webpack entries for node, web, react-native, nativescript if adding runtime dependencies.
- Product: Content Delivery API
- Types: root
index.d.ts
.cursor/rules/contentstack-javascript-cda.mdcwhen editingsrc/**/*.js