Comparing version 8.0.4 to 9.0.0
{ | ||
"name": "netlify", | ||
"description": "Netlify Node.js API client", | ||
"version": "8.0.4", | ||
"version": "9.0.0", | ||
"files": [ | ||
@@ -65,3 +65,3 @@ "src/**/*.js", | ||
"dependencies": { | ||
"@netlify/open-api": "^2.5.2", | ||
"@netlify/open-api": "^2.6.0", | ||
"lodash.camelcase": "^4.3.0", | ||
@@ -79,3 +79,3 @@ "micro-api-client": "^3.3.0", | ||
"@babel/runtime": "^7.12.18", | ||
"@netlify/eslint-config-node": "^3.3.5", | ||
"@netlify/eslint-config-node": "^3.3.8", | ||
"ava": "^2.4.0", | ||
@@ -93,3 +93,3 @@ "babel-loader": "^8.2.2", | ||
"engines": { | ||
"node": ">=10.18.0" | ||
"node": "^12.20.0 || ^14.14.0 || >=16.0.0" | ||
}, | ||
@@ -96,0 +96,0 @@ "ava": { |
@@ -6,13 +6,9 @@ const { paths } = require('@netlify/open-api') | ||
const getOperations = function () { | ||
// TODO: switch to Array.flat() once we drop support for Node.js < 11.0.0 | ||
// eslint-disable-next-line unicorn/prefer-spread | ||
return [].concat( | ||
...Object.entries(paths).map(([path, pathItem]) => { | ||
const operations = omit(pathItem, ['parameters']) | ||
return Object.entries(operations).map(([method, operation]) => { | ||
const parameters = getParameters(pathItem.parameters, operation.parameters) | ||
return { ...operation, verb: method, path, parameters } | ||
}) | ||
}), | ||
) | ||
return Object.entries(paths).flatMap(([path, pathItem]) => { | ||
const operations = omit(pathItem, ['parameters']) | ||
return Object.entries(operations).map(([method, operation]) => { | ||
const parameters = getParameters(pathItem.parameters, operation.parameters) | ||
return { ...operation, verb: method, path, parameters } | ||
}) | ||
}) | ||
} | ||
@@ -19,0 +15,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
463382
1139
Updated@netlify/open-api@^2.6.0