New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

netlify-plugin-submit-sitemap

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

netlify-plugin-submit-sitemap - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

18

index.js

@@ -43,3 +43,3 @@ const url = require('url');

// helper
// helpers
const removeEmptyValues = (obj) => {

@@ -54,2 +54,9 @@ return Object.keys(obj)

// Make sure the url is prepended with 'https://'
const prependScheme = (baseUrl) => {
return baseUrl.match(/^[a-zA-Z]+:\/\//)
? baseUrl
: baseUrl = `https://${baseUrl}`;
}
module.exports = {

@@ -60,3 +67,2 @@ async onSuccess({ utils, inputs }) {

}
const sitemapUrl = (new url.URL(sitemapPath, baseUrl)).href;

@@ -69,2 +75,10 @@ // Only run on production branch

let sitemapUrl;
const baseUrlWithScheme = prependScheme(baseUrl);
try {
sitemapUrl = (new url.URL(sitemapPath, baseUrlWithScheme)).href;
} catch(error) {
return utils.build.failPlugin(`Invalid sitemap URL! baseUrl: ${baseUrlWithScheme}, sitemapPath: ${sitemapPath}`, { error });
}
// submit sitemap to all providers

@@ -71,0 +85,0 @@ const submissions = await Promise.all(

2

package.json
{
"name": "netlify-plugin-submit-sitemap",
"version": "0.2.1",
"version": "0.2.2",
"description": "Automatically submit your sitemap to Google, Bing, and Yandex!",

@@ -5,0 +5,0 @@ "main": "index.js",

Sorry, the diff of this file is not supported yet

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