Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@sitecore/byoc

Package Overview
Dependencies
Maintainers
4
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sitecore/byoc - npm Package Compare versions

Comparing version 0.2.9-alpha.2 to 0.2.9

2

package.json

@@ -5,3 +5,3 @@ {

"description": "Bring-Your-Own-Components runtime to register and retrieve react components",
"version": "0.2.9-alpha.2",
"version": "0.2.9",
"repository": {

@@ -8,0 +8,0 @@ "type": "git",

@@ -211,3 +211,6 @@ # Sitecore BYOC components

// Promise overrides data fetching logic, original request is not made
const dataResolverPromise: DataResolver =
const dataResolverPromise: DataResolver = (settings) =>
Promise.resolve({
hello: 'world'
})
```

@@ -223,21 +226,15 @@

// Register datasource to be displayed in the UI
registerDatasource(
() =>
Promise.resolve({
hello: 'world'
}),
{
id: 'datasource-id',
name: 'Datasource based on schema',
mode: 'register',
title: 'title',
schema: {
type: 'object',
properties: {
name: { type: 'string', description: 'First and Last name' },
age: { type: 'number' }
}
registerDatasource(dataResolver, {
id: 'datasource-id',
name: 'Datasource based on schema',
mode: 'register',
title: 'title',
schema: {
type: 'object',
properties: {
name: { type: 'string', description: 'First and Last name' },
age: { type: 'number' }
}
}
)
})
```

@@ -253,12 +250,10 @@

// Intercept datasource requests by its id to add Authorization header
registerDatasource(
() => ({
...settings,
header: {
...settings.header,
Authorization: 'Bearer token'
}
}),
{ id: 'existing-datasource-id' }
)
registerDatasource(() => ({
...settings,
header: {
...settings.header,
Authorization: 'Bearer token'
}
}), { id: 'existing-datasource-id' })
```

@@ -265,0 +260,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc