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

@netlify/config

Package Overview
Dependencies
Maintainers
18
Versions
438
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@netlify/config - npm Package Compare versions

Comparing version 20.8.0 to 20.8.1

10

lib/edge_functions.js
import { isString, validProperties } from './validate/helpers.js';
const cacheValues = ['manual', 'off'];
const methodValues = ['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'OPTIONS'];
const isMethod = (value) => typeof value === 'string' && methodValues.includes(value.toUpperCase());
export const validations = [
{
property: 'edge_functions.*',
...validProperties(['path', 'excludedPath', 'pattern', 'excludedPattern', 'function', 'cache'], []),
...validProperties(['path', 'excludedPath', 'pattern', 'excludedPattern', 'function', 'cache', 'method'], []),
example: () => ({ edge_functions: [{ path: '/hello', function: 'hello' }] }),

@@ -79,2 +81,8 @@ },

},
{
property: 'edge_functions.*.method',
check: (value) => isMethod(value) || (Array.isArray(value) && value.length !== 0 && value.every(isMethod)),
message: `must be one of or array of: ${methodValues.join(', ')}`,
example: () => ({ edge_functions: [{ method: ['PUT', 'DELETE'], path: '/hello', function: 'hello' }] }),
},
];

@@ -9,2 +9,3 @@ import { existsSync } from 'fs';

* - a local path with the --config CLI flag
* - a `netlify.*` file in the `repositoryRoot/{base}/{packagePath}`
* - a `netlify.*` file in the `repositoryRoot/{base}`

@@ -11,0 +12,0 @@ * - a `netlify.*` file in the `repositoryRoot`

4

package.json
{
"name": "@netlify/config",
"version": "20.8.0",
"version": "20.8.1",
"description": "Netlify config module",

@@ -97,3 +97,3 @@ "type": "module",

},
"gitHead": "0c6f5c014958f692559ea720c38415a0e63b7522"
"gitHead": "0eb6dbbfd00ba11941b1ef638811eded8a030a17"
}
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