Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
aem-content-builder
Advanced tools
NodeJS utility to rapidly define AEM components, structures, set associated content and issue Sling POST requests to a target AEM instance. Can be used as a stand-alone content creation library or as part of a migration tool for AEM.
This is a nodeJS module that is intended to assist with the creation and migration of content from legacy websites into new AEM installations and projects. This tool utilizes the Sling POST methods of content manipulation in AEM.
:exclamation: This will now be released as version 2.x.x. This is major breaking changes to previous releases and has no compatibility with previous usage-scenarios. Apologies to anyone whom has used this repository that this will impact; however it was deemed necessary and the benefits outweighed the current usage. Future updates will follow proper notices.
This package is to be used as the bases for creating customized content building systems. This package will maintain consistency with release AEM Core Components, however the expectation is that implementors will use this package as a basis and then create extensions of the core components in a similar manner to how AEM projects structures using core components. See the examples folder for details on usage.
The target of this framework is to enable rapid development of new content creation and migration tools. Single or multi-value property setting and the setting of properties and content (e.g. adding under jcr:content
) are accounted for in the AbstractComponent. The AbstractPage adds the ability to add components and page-related properties, such as the associated template, as would be expected in an AEM Page.
The current component structure is provided via a single framework entry-point at index.js. Calling require
on this module will return the following object:
{
components: {
core: {
Accordian,
Breadcrumb,
Button,
Carousel,
Commons,
Container,
ContentFragment,
ContentFragmentList,
Download,
Image,
Page,
Teaser,
Text,
Title
},
AbstractComponent,
AbstractPage
},
sling: {
Resource,
Folder
},
request: {
AbstractRequest,
GET,
POST,
Handler
}
}
The below is an example of how implementations are expected to utilize this script, including use of extension.
// Declare the objects we'll need
const aem = require('aem-content-builder');
// Create new component for the implementation
class MyComponent extends aem.components.AbstractComponent {
constructor() {
super();
this.setResourceType("my/resource/type");
}
}
// Create new page for the implementation
class MyPage extends aem.components.core.Page {
construtor() {
super();
this.setResourceType("my/project/structure/page");
}
}
// Instantiate and add components
let page = new MyPage();
page.setContent("jcr:title", "About Us");
let component = new MyComponent();
page.addComponent(component);
// Build new AEM request
const pageUrl = "http://localhost:4502/content/wknd/us/en/about";
let req = new aem.request.POST(pageUrl);
req.credentails("admin","admin").payload(page.getData());
aem.request.Handler.handle(req.build());
:exclamation: Some examples depend on having specific AEM projects, such as the AEM WKND tutorial installed. See the README in the root of each example set.
Users can run the examples by navigating to the folder and running node <file>
(e.g. node create-page.js
).
Note that this is all clear-text, so don't store sensative or real passwords in this configuration; it's only for local testing!
FAQs
NodeJS utility to rapidly define AEM components, structures, set associated content and issue Sling POST requests to a target AEM instance. Can be used as a stand-alone content creation library or as part of a migration tool for AEM.
We found that aem-content-builder demonstrated a not healthy version release cadence and project activity because the last version was released 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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.