You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@netlify/functions

Package Overview
Dependencies
Maintainers
17
Versions
96
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@netlify/functions - npm Package Compare versions

Comparing version

to
3.0.0

dist/chunk-6V4VUZWK.mjs

1

dist/lib/purge_cache.d.ts

@@ -6,2 +6,3 @@ interface BasePurgeCacheOptions {

token?: string;
userAgent?: string;
}

@@ -8,0 +9,0 @@ interface PurgeCacheOptionsWithSiteID extends BasePurgeCacheOptions {

12

dist/lib/purge_cache.js

@@ -61,9 +61,13 @@ "use strict";

}
const headers = {
"Content-Type": "application/json; charset=utf8",
Authorization: `Bearer ${token}`
};
if (options.userAgent) {
headers["user-agent"] = options.userAgent;
}
const apiURL = options.apiURL || "https://api.netlify.com";
const response = await fetch(`${apiURL}/api/v1/purge`, {
method: "POST",
headers: {
"Content-Type": "application/json; charset=utf8",
Authorization: `Bearer ${token}`
},
headers,
body: JSON.stringify(payload)

@@ -70,0 +74,0 @@ });

@@ -108,9 +108,13 @@ "use strict";

}
const headers = {
"Content-Type": "application/json; charset=utf8",
Authorization: `Bearer ${token}`
};
if (options.userAgent) {
headers["user-agent"] = options.userAgent;
}
const apiURL = options.apiURL || "https://api.netlify.com";
const response = await fetch(`${apiURL}/api/v1/purge`, {
method: "POST",
headers: {
"Content-Type": "application/json; charset=utf8",
Authorization: `Bearer ${token}`
},
headers,
body: JSON.stringify(payload)

@@ -117,0 +121,0 @@ });

@@ -28,3 +28,3 @@ {

},
"version": "2.8.2",
"version": "3.0.0",
"description": "JavaScript utilities for Netlify Functions",

@@ -54,6 +54,6 @@ "files": [

"test:ci": "run-s test:ci:*",
"test:dev:ava": "ava",
"test:dev:vitest": "vitest",
"test:dev:tsd": "tsd",
"test:publish": "publint && attw --pack",
"test:ci:ava": "nyc -r lcovonly -r text -r json ava"
"test:ci:vitest": "vitest run --coverage"
},

@@ -64,8 +64,2 @@ "config": {

},
"ava": {
"files": [
"test/unit/*.js"
],
"verbose": true
},
"tsd": {

@@ -85,3 +79,3 @@ "directory": "test/types/"

"dependencies": {
"@netlify/serverless-functions-api": "1.26.1"
"@netlify/serverless-functions-api": "1.30.1"
},

@@ -93,6 +87,6 @@ "devDependencies": {

"@netlify/eslint-config-node": "^7.0.1",
"ava": "^2.4.0",
"@types/semver": "^7.5.8",
"@vitest/coverage-v8": "^2.1.8",
"husky": "^7.0.4",
"npm-run-all2": "^5.0.0",
"nyc": "^15.0.0",
"publint": "^0.2.7",

@@ -102,7 +96,8 @@ "semver": "^7.5.4",

"tsup": "^8.0.2",
"typescript": "^4.4.4"
"typescript": "^4.4.4",
"vitest": "^2.1.8"
},
"engines": {
"node": ">=14.0.0"
"node": ">=18.0.0"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet