netlify 13.3.2 → 13.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.js +1 -0
- package/lib/methods/response.js +2 -2
- package/lib/omit.d.ts +1 -0
- package/lib/omit.js +7 -0
- package/lib/operations.js +2 -2
- package/package.json +3 -4
package/lib/index.js
CHANGED
|
@@ -6,6 +6,7 @@ import { getOperations } from './operations.js';
|
|
|
6
6
|
const DEFAULT_TICKET_POLL = 1e3;
|
|
7
7
|
// 1 hour
|
|
8
8
|
const DEFAULT_TICKET_TIMEOUT = 3.6e6;
|
|
9
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging
|
|
9
10
|
export class NetlifyAPI {
|
|
10
11
|
#accessToken = null;
|
|
11
12
|
defaultHeaders = {
|
package/lib/methods/response.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { JSONHTTPError, TextHTTPError } from 'micro-api-client';
|
|
2
|
-
import omit from 'omit.js';
|
|
2
|
+
import omit from '../omit.js';
|
|
3
3
|
// Read and parse the HTTP response
|
|
4
4
|
export const parseResponse = async function (response) {
|
|
5
5
|
const responseType = getResponseType(response);
|
|
@@ -34,7 +34,7 @@ const addFallbackErrorMessage = function (error, textResponse) {
|
|
|
34
34
|
return error;
|
|
35
35
|
};
|
|
36
36
|
export const getFetchError = function (error, url, opts) {
|
|
37
|
-
const data = omit
|
|
37
|
+
const data = omit(opts, ['Authorization']);
|
|
38
38
|
if (error.name !== 'FetchError') {
|
|
39
39
|
error.name = 'FetchError';
|
|
40
40
|
}
|
package/lib/omit.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function omit<T extends Record<string | number | symbol, unknown>, K extends keyof T>(obj: T, keys: K[]): Omit<T, K>;
|
package/lib/omit.js
ADDED
package/lib/operations.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import omit from 'omit.js';
|
|
1
|
+
import omit from './omit.js';
|
|
2
2
|
import { openApiSpec } from './open_api.js';
|
|
3
3
|
// Retrieve all OpenAPI operations
|
|
4
4
|
export const getOperations = function () {
|
|
5
5
|
return Object.entries(openApiSpec.paths).flatMap(([path, pathItem]) => {
|
|
6
|
-
const operations = omit
|
|
6
|
+
const operations = omit(pathItem, ['parameters']);
|
|
7
7
|
return Object.entries(operations).map(([method, operation]) => {
|
|
8
8
|
const parameters = getParameters(pathItem.parameters, operation.parameters);
|
|
9
9
|
return { ...operation, verb: method, path, parameters };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "netlify",
|
|
3
3
|
"description": "Netlify Node.js API client",
|
|
4
|
-
"version": "13.3.
|
|
4
|
+
"version": "13.3.4",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": "./lib/index.js",
|
|
7
7
|
"main": "./lib/index.js",
|
|
@@ -41,11 +41,10 @@
|
|
|
41
41
|
"node client"
|
|
42
42
|
],
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@netlify/open-api": "^2.
|
|
44
|
+
"@netlify/open-api": "^2.36.0",
|
|
45
45
|
"lodash-es": "^4.17.21",
|
|
46
46
|
"micro-api-client": "^3.3.0",
|
|
47
47
|
"node-fetch": "^3.0.0",
|
|
48
|
-
"omit.js": "^2.0.2",
|
|
49
48
|
"p-wait-for": "^5.0.0",
|
|
50
49
|
"qs": "^6.9.6"
|
|
51
50
|
},
|
|
@@ -63,5 +62,5 @@
|
|
|
63
62
|
"engines": {
|
|
64
63
|
"node": "^14.16.0 || >=16.0.0"
|
|
65
64
|
},
|
|
66
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "0e4628f57a0a7d02594b5070074445a4ff69b809"
|
|
67
66
|
}
|