@vsf-enterprise/contentstack-api
6.0.1
Patch Changes
- FIXED
getPagemethod expects the live preview query to be sent in asearchParamsparam instead of cookie.
6.0.0
Major Changes
- CHANGED Guarantee compatibility with
@alokai/connectpackage. - CHANGED Updated the package for compatibility with Node.js 22.
Key Updates:
- Upgraded to the latest version of Node.js 22
- Updated CI pipelines to use Node.js 22 for consistency.
- Updated
.nvmrcor.node-versionfiles to specify Node.js version22.14. - Upgraded
@types/nodeto version^22.13.17for compatibility with the latest Node.js features.
Recommendations:
- Use Node.js version
22.14.0or higher for optimal performance, security, and compatibility. - While Node.js 20 is technically supported, it is not recommended as it may cause compatibility issues with certain packages and has not been thoroughly tested.
CHANGED Replaced core dependencies with a new
@alokai/connectpackage.@vue-storefront/middleware,@vue-storefront/sdk,vue-storefront/logger,vue-storefront/unified-data-model,@vue-storefront/multistorewere replaced with@alokai/connect. The replacement preserves the same functionality and interface as the original packages. To read more about the@alokai/connectpackage, please refer to the documentation.
Patch Changes
- Updated dependencies:
- @vsf-enterprise/cms-components-utils@3.0.0
- @alokai/connect@1.0.0
6.0.0-rc.5
Patch Changes
- Updated dependencies:
- @alokai/connect@1.0.0-rc.4
6.0.0-rc.4
Major Changes
- CHANGED Updated the package for compatibility with Node.js 22.
Key Updates:
- Upgraded to the latest version of Node.js 22
- Updated CI pipelines to use Node.js 22 for consistency.
- Updated
.nvmrcor.node-versionfiles to specify Node.js version22.14. - Upgraded
@types/nodeto version^22.13.17for compatibility with the latest Node.js features.
Recommendations:
- Use Node.js version
22.14.0or higher for optimal performance, security, and compatibility. - While Node.js 20 is technically supported, it is not recommended as it may cause compatibility issues with certain packages and has not been thoroughly tested.
Patch Changes
- Updated dependencies:
- @vsf-enterprise/cms-components-utils@3.0.0-rc.1
- @alokai/connect@1.0.0-rc.3
6.0.0-rc.3
Patch Changes
- Updated dependencies:
- @alokai/connect@1.0.0-rc.2
6.0.0-rc.2
Patch Changes
- Updated dependencies:
- @alokai/connect@1.0.0-rc.1
6.0.0-rc.1
Major Changes
Update packages to work with connect rc version
Patch Changes
- Updated dependencies:
- @vsf-enterprise/cms-components-utils@3.0.0-rc.0
- @alokai/connect@1.0.0-rc.0
6.0.0-rc.0
Major Changes
CHANGED Replaced core dependencies with a new @alokai/connect package. @vue-storefront/middleware, @vue-storefront/sdk, vue-storefront/logger, vue-storefront/unified-data-model were replaced with @alokai/connect. The replacement preserves the same functionality and interface as the original packages. To read more about the @alokai/connect package, please refer to the documentation. You will also find a migration guide in the documentation.
5.1.1
Patch Changes
CHANGED logging level for unified getPage method.
5.1.0
Minor Changes
- CHANGED Replaced
consolawith Alokai Logger. To learn more about logger, visit Alokai Logger.
5.0.0
Major Changes
CHANGED
- Update
@vue-storefront/middlewareto^5.1.0 - Update
@vue-storefront/unified-data-modelto^3.0.0
4.3.1
Patch Changes
- FIXED Fetch first by the exact page url in
getPage, only then use the resolved url.
4.3.0
Minor Changes
- CHANGED Upgraded the path-to-regexp package to version
8.0.0. Note that page path patterns must now follow a different convention. For more details, please refer to the Release Notes forpath-to-regexp@8.0.0.
4.2.3
Patch Changes
- Updated dependencies:
- @vsf-enterprise/cms-components-utils@2.0.0
4.2.2
Patch Changes
- CHANGED Removed
_metadatafrom the response
4.2.1
Patch Changes
- FIXED Rich text and image normalization
4.2.0
Minor Changes
- ADDED Unified extension which allows fetching data from Contentstack and extracting components. The extension is available at the
/unifiednamespace and adds two methods: getPage- Fetches the page data from Contentstack.
To use the extension on the Storefront side:
- Add
unifiedproperty in the API Client configuration:
export const config = {
location: "@vsf-enterprise/contentstack-api/server",
extensions: (existing: any[]) => existing.concat(resolverExtension, unifiedApiExtension),
configuration: {
key: CNTS_DELIVERY_KEY,
token: CNTS_DELIVERY_TOKEN,
env: CNTS_CONTENT_ENV,
branch: CNTS_CONTENT_BRANCH,
region: CNTS_REGION_KEY ?? 'US',
livePreview: {
enable: true,
previewToken: CNTS_PREVIEW_TOKEN,
host: CNTS_PREVIEW_HOST as string,
},
},
+ unified: {
+ resolvePages: () => ({
+ "/*": {
+ type: "page",
+ includeReference: [
+ "components_above_fold.items",
+ "components_below_fold.items",
+ ],
+ },
+ }),
+ resolveFallbackPage: () =>
+ Promise.resolve({
+ path: "/vsf-fallback-page",
+ type: "fallback-page",
+ }),
+ },
} satisfies Integration<MiddlewareConfig>;
- Export extension types in the
storefront-middleware/types.tsfile:
+ export type { UnifiedEndpoints as UnifiedCmsEndpoints } from '@vsf-enterprise/contentstack-api';
- In the SDK config, add a new
middlewareModule:
+ import type { UnifiedCmsEndpoints } from 'storefront-middleware/types';
+ unifiedCms: buildModule(middlewareModule<UnifiedCmsEndpoints>, {
+ apiUrl: `${config.middlewareUrl}/contentstack/unified`,
+ defaultRequestConfig: {
+ headers: getRequestHeaders(),
+ },
+ }),
// ...
- In your page component, use the
getPagemethod to fetch the page data:
const page = await sdk.unifiedCms.getPage({
path: "/",
locale: "en-us",
});
All components are extracted, so you don't need to use the extractComponent utility from contentstackModule anymore.
4.1.0
Minor Changes
- ADDED: Add
excludeoption to the params ofgetContentmethod.
4.0.0
Major Changes
- REMOVED The package no longer exports the
ContextualizedEndpointsinterface. Use theApiMethodsinterface instead.
3.0.0
Major Changes
- BREAKING Updated
@vue-storefront/middlewareversion to4.1.0. Make sure this version is used in your project.
{
...
"dependencies": {
- "@vue-storefront/middleware": "3.x.x",
+ "@vue-storefront/middleware": "4.1.0"
}
}
2.0.1
Patch Changes
Update axios to ^0.28.0 to mitigate security vulnerability CVE-2023-45857
2.0.0
Major Changes
- CHANGED Changed minimum Node version from 16 to 18. The condition that was forcing the Node version to be lower than 19 is also removed.
1.5.0
Minor Changes
- CHANGED Update axios library from ^0.27.2 to 1.6.8. This change is non-breaking and should not require any changes to your codebase. To read more about latest changes in axios library, please visit axios release notes.
- CHANGED Starting from contentstack js sdk version
3.19, theLivePreview 2.0has been released. To enable this feature, a new tokenpreviewTokenhas been added to themiddleware.configobject. The old 'management_token' is now deprecated and will be removed in future versions. Thepreview_tokenis currently optional but will be required in future versions. For more information about live preview, please refer to the official documentation.
Change is backward compatible, you do not need to update the middleware.config however we recommend updating configuration to the new format.
To migrate to the new version, please update the middleware.config file in your project as follows:
integrations: {
cntf: {
location: "@vsf-enterprise/contentstack-api/server",
configuration: {
// ...
livePreview: {
/** managementToken: "some-token", **/ // remove this line
previewToken: "some-preview-token", // add this line
enable: true,
host: "some-preview-host.contentstack.io", // Update the host to the preview host
},
//...
},
},
},
1.4.0
Minor Changes
- 4af65fe: ADDED Added new
addQueryparam for thegetContentmethod. The values passed to it will be used to callquery.addQuery()internally.
See the Contentstack documentation for addQuery for more information.
Example:const content = await sdk.cms.getContent({ id: "blt9fb6f1c06ef8549e", addQuery: { include_dimension: true }, });
1.3.0
Minor Changes
- 80eeb99: Support for
onlyfeature.
1.2.0
Minor Changes
- 2f9d766: Add
includeFallbackproperty to automatically include the published fallback language content in your API response (more info here).
1.2.0-rc.0
Minor Changes
- Add
includeFallbackproperty to automatically include the published fallback language content in your API response.
1.1.0
Minor Changes
- bumped
axiosversion to^0.27.2and@vue-storefront/middlewareversion to^3.5.0which introduces support for HTTP GET requests
1.0.0
Major Changes
- initial release