![Maven Central Adds Sigstore Signature Validation](https://cdn.sanity.io/images/cgdhsj6q/production/7da3bc8a946cfb5df15d7fcf49767faedc72b483-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
@sitecore-cloudsdk/core
Advanced tools
This package is for initializing the Cloud SDK and its other packages in your app.
This package is for initializing the Cloud SDK and its other packages in your app.
npm install @sitecore-cloudsdk/core
To initialize other Cloud SDK packages, first install them:
npm install @sitecore-cloudsdk/events
npm install @sitecore-cloudsdk/personalize
npm install @sitecore-cloudsdk/search
CloudSDK
function, available in the core
package.Initialize the Cloud SDK and its packages on the browser side:
'use client';
import { useEffect } from 'react';
import { CloudSDK } from '@sitecore-cloudsdk/core/browser';
import '@sitecore-cloudsdk/events/browser';
import '@sitecore-cloudsdk/personalize/browser';
export default function Home() {
useEffect(() => {
CloudSDK({
sitecoreEdgeContextId: '<YOUR_CONTEXT_ID>',
siteName: '<YOUR_SITE_NAME>',
enableBrowserCookie: true
})
.addEvents() // Initialize the `events` package.
.addPersonalize({
enablePersonalizeCookie: true,
webPersonalization: true
}) // Initialize the `personalize` package and enable web personalization.
.addSearch() // Initialize the `search` package.
.initialize();
}, []);
return <></>;
}
Initialize the Cloud SDK and its packages on the server side:
import type { NextRequest, NextResponse } from 'next/server';
import { CloudSDK } from '@sitecore-cloudsdk/core/server';
import '@sitecore-cloudsdk/events/server';
import '@sitecore-cloudsdk/personalize/server';
export async function middleware(request: NextRequest) {
const response = NextResponse.next();
await CloudSDK(request, response, {
sitecoreEdgeContextId: '<YOUR_CONTEXT_ID>',
siteName: '<YOUR_SITE_NAME>',
enableServerCookie: true
})
.addEvents() // Initialize the `events` package.
.addPersonalize({ enablePersonalizeCookie: true }) // Initialize the `personalize` package.
.addSearch() // Initialize the `search` package.
.initialize();
return response;
}
FAQs
This package is for initializing the Cloud SDK and its other packages in your app.
The npm package @sitecore-cloudsdk/core receives a total of 12,665 weekly downloads. As such, @sitecore-cloudsdk/core popularity was classified as popular.
We found that @sitecore-cloudsdk/core demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.