Socket
Socket
Sign inDemoInstall

netlify-purge-cloudflare-on-deploy

Package Overview
Dependencies
7
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.0 to 1.2.0

21

index.js

@@ -19,9 +19,7 @@ const fetch = require('node-fetch');

module.exports = {
async onEnd({
utils: {
build: { failPlugin, failBuild },
},
}) {
// Since calling utils.build.failBuild will not actually fail the build in onPreBuild, moved the conditions in onPreBuild.
onPostBuild({
utils: {
build: { failBuild },
},
}) {
if( authMethod === 'na' ) {

@@ -40,3 +38,8 @@ return failBuild(

}
},
async onSuccess({
utils: {
build: { failPlugin },
},
}) {
console.log('Preparing to trigger Cloudflare cache purge');

@@ -77,5 +80,5 @@ let baseUrl = `https://api.cloudflare.com/client/v4/zones/${CLOUDFLARE_ZONE_ID}/purge_cache`;

} catch (error) {
return failBuild('Cloudflare cache purge failed', { error });
return failPlugin('Cloudflare cache purge failed', { error });
}
},
};
{
"name": "netlify-purge-cloudflare-on-deploy",
"version": "1.1.0",
"version": "1.2.0",
"description": "Automatically purge Cloudflare cache on Netlify deploy.",

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

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc