
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
@contentful/ecommerce-app-base
Advanced tools
Library to quickly build an app to integrate your e-commerce system of choice with Contentful
@contentful/ecommerce-app-base
is a library that helps you to quickly build an app to integrate your e-commerce system of choice with Contentful. Many e-commerce integrations are very similar, therefore this library provides the boilerplate for your app and you only need to add the code for your specific service.
This library creates an app which can be used in the entry field location to select stock keeping units (sku) from your e-commerce service. The library also provides a configuration screen for an easy customization.
import { setup } from '@contentful/ecommerce-app-base';
setup({
makeCTA: () => 'Select products',
name: 'My SKU App',
logo: 'https://example.com/logo.svg',
color: '#d7f0fa',
description: 'My example SKU App',
parameterDefinitions: [
{
"id": "category",
"type": "Symbol",
"name": "Catehory",
"description": "Product category of our shop",
"required": true
}
],
validateParameters: () => null,
fetchProductPreviews: async (skus) => {
const responess = await Promise.all(
skus.map(sku => fetch(`https://example.com/products/${sku}`))
);
return responses.map(response => response.json());
},
renderDialog: (sdk) => {
const config = sdk.parameters.invocation;
const container = document.createElement('div');
container.innerHTML = `<iframe src="https://example.com/products-search?category=${config.category}" />`;
document.body.appendChild(container);
},
openDialog: async (sdk, currentValue, config) => {
return await sdk.dialogs.openCurrentApp({
parameters: { config, currentValue },
});
},
isDisabled: () => false,
productCardVersion: 'v2'
});
These Contentful apps use @contentful/ecommerce-app-base
. Look at their source code to learn how they utilize this library:
FAQs
Library to quickly build an app to integrate your e-commerce system of choice with Contentful
We found that @contentful/ecommerce-app-base demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.