Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
sitemap-b-framework
Advanced tools
Advanced Sitemap Management, Building, Deployment Framework [Open Source]
More info on sitemaps here
npm i sitemap-b-framework --save
https://www.npmjs.com/package/sitemap-b-framework
var sitemapBFramework = require("sitemap-b-framework");
var SitemapBFramework = new sitemapBFramework();
// sitemapItemAdd(itemLoc , sitemapName @optional, lastmod @optional, changefreq @optional, priority @optional);
const data = await SitemapBFramework.sitemapItemAdd('https://example.com/product/laptop');
const data = await SitemapBFramework.sitemapBuildAndDeploy();
// Sitemap XML files will be generated at ./sitemap-xml/build folder;
var sitemapBFramework = require("sitemap-b-framework");
// Refer options in heading below for more documentation
const options = {
path:'data/sitemap',
maxLinksPerSitemap: 50000,
build:{
cron: '0 1 * * *',
deployToBucket: {
s3: {
accessKeyId: "Access Key ID",
secretAccessKey: "Secret Key",
bucket: "Name of Bucket",
path: "Path Inside Bucket",
makePublic: true | false,
},
}
}
}
var SitemapBFramework = new sitemapBFramework(options);
/*
Add sitemap index file for multiple sitemaps
sitemapIndexAdd(sitemapName , loc, type @optional, limit @optional, locked @optional);
sitemapName = sitemapName
loc = location url
type = webpages,news,image,video
limit = 0 to 50000
locked = true or false
*/
await SitemapBFramework.sitemapIndexAdd('sitemap-products','https://sitemap/sitemap-products.xml','webpages',50000,false);
/*
Add sitemap links to each sitemap file
sitemapItemAdd(itemLoc , sitemapName @optional, lastmod @optional, changefreq @optional, priority @optional);
sitemapName = sitemapName
itemLoc = each item location
lastmod = Last Modified Date YYYY-MM-DD
changefreq = always, hourly, daily, weekly, monthly, yearly, never
priority = 0.1 to 1.0
*/
await SitemapBFramework.sitemapItemAdd('https://example.com/product/laptop','sitemap-products','2020-05-10','monthly',0.5);
/*
Build Sitemap Index and Sitemap Files and Deploy To Buckets - AWS S3 or GCP GCS
sitemapBuildAndDeploy();
- Sitemap generated at default folder ./sitemap-xml/build , Can be overridden in option parameters
- Deploying To Buckets depends on options parameters
- Auto Build can be trigger on cron parameters in options
*/
await SitemapBFramework.sitemapBuildAndDeploy();
/*
Notes:
- Default path for framework data stored as json files at ./sitemap-config
- Default path for lastest generated sitemap files are stored at ./sitemap-xml/build
- Persistent storage requires for ./sitemap-config path for all operations
*/
const options = {
path: 'data/sitemap', // Persistent folder location, optional
maxLinksPerSitemap: 15000, // Max of 50000 links allowed per sitemap file, optional
build: { // optional
cron: "Cron Expression to auto build sitemap files and deploy to bucket if defined", // optional
deployToBucket: { // optional
gcs: {
projectId: "GCP Project ID",
service_account_key_path: "Path to gcp service account json file",
bucket: "Name of Bucket",
path: "Path Inside Bucket",
makePublic: true | false,
},
s3: {
accessKeyId: "Access Key ID",
secretAccessKey: "Secret Key",
bucket: "Name of Bucket",
path: "Path Inside Bucket",
makePublic: true | false,
},
}
},
backup: { // optional
cron: "Cron Expression to auto backup framework data and sitemap xml files to bucket if defined", // optional
bakcupToBucket: { // optional
gcs: {
projectId: "GCP Project ID",
service_account_key_path: "Path to gcp service account json file",
bucket: "Name of Bucket",
path: "Path Inside Bucket"
},
s3: {
accessKeyId: "Access Key ID",
secretAccessKey: "Secret Key",
bucket: "Name of Bucket",
path: "Path Inside Bucket"
},
}
}
};
//sitemapIndexAdd(sitemapName, loc, type @optional, limit @optional, locked @optional);
sitemapIndexAdd('sitemap-products', 'https://sitemap/sitemap-products.xml', 'webpages', 50000, false);
//sitemapIndexAdd(sitemapName, loc, type @optional, limit @optional, locked @optional);
sitemapIndexAdd('sitemap-products', 'https://sitemap/sitemap-products-new.xml', 'webpages', 50000, false);
//sitemapIndexDelete(sitemapName);
sitemapIndexDelete('sitemap-products');
//sitemapIndexList();
sitemapIndexList();
//sitemapItemAdd(itemLoc , sitemapName @optional, lastmod @optional, changefreq @optional, priority @optional);
sitemapItemAdd('https://example.com/product/laptop', 'sitemap-products', '2020-05-10', 'monthly', 0.5);
//sitemapItemAdd(olditemLoc, itemLoc , sitemapName @optional, lastmod @optional, changefreq @optional, priority @optional);
sitemapItemUpdate('https://example.com/product/laptop', 'https://example.com/product/laptop-trending', 'sitemap-products', '2020-05-10', 'daily', 0.9);
//sitemapItemDelete(itemLoc , sitemapName @optional);
sitemapItemDelete('https://example.com/product/laptop-trending', 'sitemap-products', );
//sitemapItemList(sitemapName @optional)
sitemapItemList('sitemap-products');
//sitemapGlobalSearch(loc)
sitemapGlobalSearch('https://example.com/product/laptop-trending');
//sitemapBuildAndDeploy()
sitemapBuildAndDeploy();
//BackupToBucket()
BackupToBucket();
Contributors are welcome
See LICENSE file.
Development In Progress [GA by june,2020]
FAQs
Advanced Sitemap Management, Generating & Deployment Framework
The npm package sitemap-b-framework receives a total of 1 weekly downloads. As such, sitemap-b-framework popularity was classified as not popular.
We found that sitemap-b-framework 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 threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.