@vsf-enterprise/contentstack-api
6.0.1ri:link
Patch Changesri:link
- FIXED
getPage
method expects the live preview query to be sent in asearchParams
param instead of cookie.
6.0.0ri:link
Major Changesri:link
- CHANGED Guarantee compatibility with
@alokai/connect
package. - CHANGED Updated the package for compatibility with Node.js 22.
Key Updates:ri:link
- Upgraded to the latest version of Node.js 22
- Updated CI pipelines to use Node.js 22 for consistency.
- Updated
.nvmrc
or.node-version
files to specify Node.js version22.14
. - Upgraded
@types/node
to version^22.13.17
for compatibility with the latest Node.js features.
Recommendations:ri:link
- Use Node.js version
22.14.0
or 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/connect
package.@vue-storefront/middleware
,@vue-storefront/sdk
,vue-storefront/logger
,vue-storefront/unified-data-model
,@vue-storefront/multistore
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.
Patch Changesri:link
- Updated dependencies:
- @vsf-enterprise/cms-components-utils@3.0.0
- @alokai/connect@1.0.0
6.0.0-rc.5ri:link
Patch Changesri:link
- Updated dependencies:
- @alokai/connect@1.0.0-rc.4
6.0.0-rc.4ri:link
Major Changesri:link
- CHANGED Updated the package for compatibility with Node.js 22.
Key Updates:ri:link
- Upgraded to the latest version of Node.js 22
- Updated CI pipelines to use Node.js 22 for consistency.
- Updated
.nvmrc
or.node-version
files to specify Node.js version22.14
. - Upgraded
@types/node
to version^22.13.17
for compatibility with the latest Node.js features.
Recommendations:ri:link
- Use Node.js version
22.14.0
or 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 Changesri:link
- Updated dependencies:
- @vsf-enterprise/cms-components-utils@3.0.0-rc.1
- @alokai/connect@1.0.0-rc.3
6.0.0-rc.3ri:link
Patch Changesri:link
- Updated dependencies:
- @alokai/connect@1.0.0-rc.2
6.0.0-rc.2ri:link
Patch Changesri:link
- Updated dependencies:
- @alokai/connect@1.0.0-rc.1
6.0.0-rc.1ri:link
Major Changesri:link
Update packages to work with connect rc version
Patch Changesri:link
- Updated dependencies:
- @vsf-enterprise/cms-components-utils@3.0.0-rc.0
- @alokai/connect@1.0.0-rc.0
6.0.0-rc.0ri:link
Major Changesri:link
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.1ri:link
Patch Changesri:link
CHANGED logging level for unified getPage
method.
5.1.0ri:link
Minor Changesri:link
- CHANGED Replaced
consola
with Alokai Logger. To learn more about logger, visit Alokai Logger.
5.0.0ri:link
Major Changesri:link
CHANGED
- Update
@vue-storefront/middleware
to^5.1.0
- Update
@vue-storefront/unified-data-model
to^3.0.0
4.3.1ri:link
Patch Changesri:link
- FIXED Fetch first by the exact page url in
getPage
, only then use the resolved url.
4.3.0ri:link
Minor Changesri:link
- 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.3ri:link
Patch Changesri:link
- Updated dependencies:
- @vsf-enterprise/cms-components-utils@2.0.0
4.2.2ri:link
Patch Changesri:link
- CHANGED Removed
_metadata
from the response
4.2.1ri:link
Patch Changesri:link
- FIXED Rich text and image normalization
4.2.0ri:link
Minor Changesri:link
- ADDED Unified extension which allows fetching data from Contentstack and extracting components. The extension is available at the
/unified
namespace and adds two methods: getPage
- Fetches the page data from Contentstack.
To use the extension on the Storefront side:
- Add
unified
property 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.ts
file:
+ 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
getPage
method 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.0ri:link
Minor Changesri:link
- ADDED: Add
exclude
option to the params ofgetContent
method.
4.0.0ri:link
Major Changesri:link
- REMOVED The package no longer exports the
ContextualizedEndpoints
interface. Use theApiMethods
interface instead.
3.0.0ri:link
Major Changesri:link
- BREAKING Updated
@vue-storefront/middleware
version 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.1ri:link
Patch Changesri:link
Update axios to ^0.28.0 to mitigate security vulnerability CVE-2023-45857
2.0.0ri:link
Major Changesri:link
- 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.0ri:link
Minor Changesri:link
- 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.0
has been released. To enable this feature, a new tokenpreviewToken
has been added to themiddleware.config
object. The old 'management_token' is now deprecated and will be removed in future versions. Thepreview_token
is 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.0ri:link
Minor Changesri:link
- 4af65fe: ADDED Added new
addQuery
param for thegetContent
method. 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.0ri:link
Minor Changesri:link
- 80eeb99: Support for
only
feature.
1.2.0ri:link
Minor Changesri:link
- 2f9d766: Add
includeFallback
property to automatically include the published fallback language content in your API response (more info here).
1.2.0-rc.0ri:link
Minor Changesri:link
- Add
includeFallback
property to automatically include the published fallback language content in your API response.
1.1.0ri:link
Minor Changesri:link
- bumped
axios
version to^0.27.2
and@vue-storefront/middleware
version to^3.5.0
which introduces support for HTTP GET requests
1.0.0ri:link
Major Changesri:link
- initial release