@webiny/utils 6.0.0-alpha.5 → 6.0.0-rc.0
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/GenericRecord.js +1 -5
- package/README.md +6 -20
- package/cacheKey.d.ts +1 -8
- package/cacheKey.js +5 -11
- package/cacheKey.js.map +1 -1
- package/compose.js +2 -9
- package/compose.js.map +1 -1
- package/compression/CompressionPlugin.js +2 -9
- package/compression/CompressionPlugin.js.map +1 -1
- package/compression/Compressor.d.ts +1 -1
- package/compression/Compressor.js +6 -13
- package/compression/Compressor.js.map +1 -1
- package/compression/gzip.d.ts +0 -3
- package/compression/gzip.js +5 -14
- package/compression/gzip.js.map +1 -1
- package/compression/index.d.ts +4 -4
- package/compression/index.js +4 -49
- package/compression/index.js.map +1 -1
- package/compression/jsonpack.js +5 -14
- package/compression/jsonpack.js.map +1 -1
- package/compression/plugins/GzipCompression.d.ts +2 -4
- package/compression/plugins/GzipCompression.js +7 -16
- package/compression/plugins/GzipCompression.js.map +1 -1
- package/compression/plugins/JsonpackCompression.d.ts +1 -1
- package/compression/plugins/JsonpackCompression.js +6 -14
- package/compression/plugins/JsonpackCompression.js.map +1 -1
- package/createIdentifier.js +5 -11
- package/createIdentifier.js.map +1 -1
- package/createZodError.d.ts +1 -1
- package/createZodError.js +5 -13
- package/createZodError.js.map +1 -1
- package/cursor.js +2 -10
- package/cursor.js.map +1 -1
- package/exception.js +1 -8
- package/exception.js.map +1 -1
- package/executeWithRetry.js +3 -11
- package/executeWithRetry.js.map +1 -1
- package/generateId.d.ts +5 -5
- package/generateId.js +9 -21
- package/generateId.js.map +1 -1
- package/getObjectProperties.js +1 -8
- package/getObjectProperties.js.map +1 -1
- package/headers.js +2 -9
- package/headers.js.map +1 -1
- package/index.d.ts +18 -18
- package/index.js +18 -207
- package/index.js.map +1 -1
- package/mdbid.js +4 -12
- package/mdbid.js.map +1 -1
- package/middleware.d.ts +1 -1
- package/middleware.js +1 -8
- package/middleware.js.map +1 -1
- package/package.json +15 -18
- package/parseIdentifier.d.ts +1 -1
- package/parseIdentifier.js +5 -14
- package/parseIdentifier.js.map +1 -1
- package/removeNullValues.js +1 -8
- package/removeNullValues.js.map +1 -1
- package/removeUndefinedValues.js +1 -8
- package/removeUndefinedValues.js.map +1 -1
- package/utcTimezones.js +1 -7
- package/utcTimezones.js.map +1 -1
- package/zeroPad.js +1 -8
- package/zeroPad.js.map +1 -1
package/createZodError.d.ts
CHANGED
package/createZodError.js
CHANGED
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.createZodError = void 0;
|
|
8
|
-
var _error = _interopRequireDefault(require("@webiny/error"));
|
|
9
|
-
var _generateId = require("./generateId.js");
|
|
1
|
+
import WebinyError from "@webiny/error";
|
|
2
|
+
import { generateAlphaNumericId } from "./generateId.js";
|
|
10
3
|
const createValidationErrorData = error => {
|
|
11
4
|
return {
|
|
12
5
|
invalidFields: error.issues.reduce((collection, issue) => {
|
|
@@ -14,7 +7,7 @@ const createValidationErrorData = error => {
|
|
|
14
7
|
if (!name && !issue.code) {
|
|
15
8
|
return collection;
|
|
16
9
|
}
|
|
17
|
-
const key = name || issue.path.join(".") || issue.message || issue.code ||
|
|
10
|
+
const key = name || issue.path.join(".") || issue.message || issue.code || generateAlphaNumericId();
|
|
18
11
|
collection[key] = {
|
|
19
12
|
code: issue.code,
|
|
20
13
|
message: issue.message,
|
|
@@ -27,13 +20,12 @@ const createValidationErrorData = error => {
|
|
|
27
20
|
}, {})
|
|
28
21
|
};
|
|
29
22
|
};
|
|
30
|
-
const createZodError = error => {
|
|
31
|
-
return new
|
|
23
|
+
export const createZodError = error => {
|
|
24
|
+
return new WebinyError({
|
|
32
25
|
message: `Validation failed.`,
|
|
33
26
|
code: "VALIDATION_FAILED_INVALID_FIELDS",
|
|
34
27
|
data: createValidationErrorData(error)
|
|
35
28
|
});
|
|
36
29
|
};
|
|
37
|
-
exports.createZodError = createZodError;
|
|
38
30
|
|
|
39
31
|
//# sourceMappingURL=createZodError.js.map
|
package/createZodError.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["WebinyError","generateAlphaNumericId","createValidationErrorData","error","invalidFields","issues","reduce","collection","issue","name","path","join","code","key","message","data","fatal","createZodError"],"sources":["createZodError.ts"],"sourcesContent":["import WebinyError from \"@webiny/error\";\nimport type { ZodError } from \"zod\";\nimport { generateAlphaNumericId } from \"~/generateId.js\";\n\ninterface OutputError {\n code: string;\n data: Record<string, any> | null;\n message: string;\n}\n\nexport interface OutputErrors {\n [key: string]: OutputError;\n}\n\nconst createValidationErrorData = (error: ZodError) => {\n return {\n invalidFields: error.issues.reduce<OutputErrors>((collection, issue) => {\n const name = issue.path.join(\".\");\n if (!name && !issue.code) {\n return collection;\n }\n\n const key =\n name ||\n issue.path.join(\".\") ||\n issue.message ||\n issue.code ||\n generateAlphaNumericId();\n collection[key] = {\n code: issue.code,\n message: issue.message,\n data: {\n fatal: issue.fatal,\n path: issue.path\n }\n };\n\n return collection;\n }, {})\n };\n};\n\nexport const createZodError = (error: ZodError) => {\n return new WebinyError({\n message: `Validation failed.`,\n code: \"VALIDATION_FAILED_INVALID_FIELDS\",\n data: createValidationErrorData(error)\n });\n};\n"],"mappings":"AAAA,OAAOA,WAAW,MAAM,eAAe;AAEvC,SAASC,sBAAsB;AAY/B,MAAMC,yBAAyB,GAAIC,KAAe,IAAK;EACnD,OAAO;IACHC,aAAa,EAAED,KAAK,CAACE,MAAM,CAACC,MAAM,CAAe,CAACC,UAAU,EAAEC,KAAK,KAAK;MACpE,MAAMC,IAAI,GAAGD,KAAK,CAACE,IAAI,CAACC,IAAI,CAAC,GAAG,CAAC;MACjC,IAAI,CAACF,IAAI,IAAI,CAACD,KAAK,CAACI,IAAI,EAAE;QACtB,OAAOL,UAAU;MACrB;MAEA,MAAMM,GAAG,GACLJ,IAAI,IACJD,KAAK,CAACE,IAAI,CAACC,IAAI,CAAC,GAAG,CAAC,IACpBH,KAAK,CAACM,OAAO,IACbN,KAAK,CAACI,IAAI,IACVX,sBAAsB,CAAC,CAAC;MAC5BM,UAAU,CAACM,GAAG,CAAC,GAAG;QACdD,IAAI,EAAEJ,KAAK,CAACI,IAAI;QAChBE,OAAO,EAAEN,KAAK,CAACM,OAAO;QACtBC,IAAI,EAAE;UACFC,KAAK,EAAER,KAAK,CAACQ,KAAK;UAClBN,IAAI,EAAEF,KAAK,CAACE;QAChB;MACJ,CAAC;MAED,OAAOH,UAAU;IACrB,CAAC,EAAE,CAAC,CAAC;EACT,CAAC;AACL,CAAC;AAED,OAAO,MAAMU,cAAc,GAAId,KAAe,IAAK;EAC/C,OAAO,IAAIH,WAAW,CAAC;IACnBc,OAAO,EAAE,oBAAoB;IAC7BF,IAAI,EAAE,kCAAkC;IACxCG,IAAI,EAAEb,yBAAyB,CAACC,KAAK;EACzC,CAAC,CAAC;AACN,CAAC","ignoreList":[]}
|
package/cursor.js
CHANGED
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.encodeCursor = exports.decodeCursor = void 0;
|
|
7
|
-
const encodeCursor = cursor => {
|
|
1
|
+
export const encodeCursor = cursor => {
|
|
8
2
|
if (!cursor) {
|
|
9
3
|
return null;
|
|
10
4
|
}
|
|
@@ -16,8 +10,7 @@ const encodeCursor = cursor => {
|
|
|
16
10
|
return null;
|
|
17
11
|
}
|
|
18
12
|
};
|
|
19
|
-
|
|
20
|
-
const decodeCursor = cursor => {
|
|
13
|
+
export const decodeCursor = cursor => {
|
|
21
14
|
if (!cursor) {
|
|
22
15
|
return null;
|
|
23
16
|
}
|
|
@@ -33,6 +26,5 @@ const decodeCursor = cursor => {
|
|
|
33
26
|
return null;
|
|
34
27
|
}
|
|
35
28
|
};
|
|
36
|
-
exports.decodeCursor = decodeCursor;
|
|
37
29
|
|
|
38
30
|
//# sourceMappingURL=cursor.js.map
|
package/cursor.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["encodeCursor","cursor","Buffer","from","JSON","stringify","toString","ex","console","log","message","
|
|
1
|
+
{"version":3,"names":["encodeCursor","cursor","Buffer","from","JSON","stringify","toString","ex","console","log","message","decodeCursor","value","parse"],"sources":["cursor.ts"],"sourcesContent":["export type CursorInput = string | number | (string | number)[] | null;\nexport type CursorOutput = string | null;\n\nexport const encodeCursor = (cursor?: CursorInput): CursorOutput => {\n if (!cursor) {\n return null;\n }\n\n try {\n return Buffer.from(JSON.stringify(cursor)).toString(\"base64\");\n } catch (ex) {\n console.log(\"Utils encode cursor.\");\n console.log(ex.message);\n return null;\n }\n};\n\nexport const decodeCursor = (cursor?: CursorOutput): CursorInput => {\n if (!cursor) {\n return null;\n }\n\n try {\n const value = Buffer.from(cursor, \"base64\").toString(\"ascii\");\n if (!value) {\n return null;\n }\n return JSON.parse(value);\n } catch (ex) {\n console.log(\"Utils decode cursor.\");\n console.log(ex.message);\n return null;\n }\n};\n"],"mappings":"AAGA,OAAO,MAAMA,YAAY,GAAIC,MAAoB,IAAmB;EAChE,IAAI,CAACA,MAAM,EAAE;IACT,OAAO,IAAI;EACf;EAEA,IAAI;IACA,OAAOC,MAAM,CAACC,IAAI,CAACC,IAAI,CAACC,SAAS,CAACJ,MAAM,CAAC,CAAC,CAACK,QAAQ,CAAC,QAAQ,CAAC;EACjE,CAAC,CAAC,OAAOC,EAAE,EAAE;IACTC,OAAO,CAACC,GAAG,CAAC,sBAAsB,CAAC;IACnCD,OAAO,CAACC,GAAG,CAACF,EAAE,CAACG,OAAO,CAAC;IACvB,OAAO,IAAI;EACf;AACJ,CAAC;AAED,OAAO,MAAMC,YAAY,GAAIV,MAAqB,IAAkB;EAChE,IAAI,CAACA,MAAM,EAAE;IACT,OAAO,IAAI;EACf;EAEA,IAAI;IACA,MAAMW,KAAK,GAAGV,MAAM,CAACC,IAAI,CAACF,MAAM,EAAE,QAAQ,CAAC,CAACK,QAAQ,CAAC,OAAO,CAAC;IAC7D,IAAI,CAACM,KAAK,EAAE;MACR,OAAO,IAAI;IACf;IACA,OAAOR,IAAI,CAACS,KAAK,CAACD,KAAK,CAAC;EAC5B,CAAC,CAAC,OAAOL,EAAE,EAAE;IACTC,OAAO,CAACC,GAAG,CAAC,sBAAsB,CAAC;IACnCD,OAAO,CAACC,GAAG,CAACF,EAAE,CAACG,OAAO,CAAC;IACvB,OAAO,IAAI;EACf;AACJ,CAAC","ignoreList":[]}
|
package/exception.js
CHANGED
|
@@ -1,14 +1,8 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.convertException = void 0;
|
|
7
1
|
/**
|
|
8
2
|
* This will help with output of the error object.
|
|
9
3
|
* Normally, the error object is not serializable, so we need to convert it to a plain object.
|
|
10
4
|
*/
|
|
11
|
-
const convertException = (error, remove) => {
|
|
5
|
+
export const convertException = (error, remove) => {
|
|
12
6
|
const properties = Object.getOwnPropertyNames(error);
|
|
13
7
|
return properties.reduce((items, property) => {
|
|
14
8
|
if (remove && remove.includes(property)) {
|
|
@@ -18,6 +12,5 @@ const convertException = (error, remove) => {
|
|
|
18
12
|
return items;
|
|
19
13
|
}, {});
|
|
20
14
|
};
|
|
21
|
-
exports.convertException = convertException;
|
|
22
15
|
|
|
23
16
|
//# sourceMappingURL=exception.js.map
|
package/exception.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["convertException","error","remove","properties","Object","getOwnPropertyNames","reduce","items","property","includes"
|
|
1
|
+
{"version":3,"names":["convertException","error","remove","properties","Object","getOwnPropertyNames","reduce","items","property","includes"],"sources":["exception.ts"],"sourcesContent":["import type { GenericRecord } from \"~/GenericRecord.js\";\n\n/**\n * This will help with output of the error object.\n * Normally, the error object is not serializable, so we need to convert it to a plain object.\n */\nexport const convertException = (error: Error, remove?: string[]): GenericRecord => {\n const properties = Object.getOwnPropertyNames(error) as (keyof Error)[];\n return properties.reduce<GenericRecord>((items, property) => {\n if (remove && remove.includes(property)) {\n return items;\n }\n items[property] = error[property];\n return items;\n }, {});\n};\n"],"mappings":"AAEA;AACA;AACA;AACA;AACA,OAAO,MAAMA,gBAAgB,GAAGA,CAACC,KAAY,EAAEC,MAAiB,KAAoB;EAChF,MAAMC,UAAU,GAAGC,MAAM,CAACC,mBAAmB,CAACJ,KAAK,CAAoB;EACvE,OAAOE,UAAU,CAACG,MAAM,CAAgB,CAACC,KAAK,EAAEC,QAAQ,KAAK;IACzD,IAAIN,MAAM,IAAIA,MAAM,CAACO,QAAQ,CAACD,QAAQ,CAAC,EAAE;MACrC,OAAOD,KAAK;IAChB;IACAA,KAAK,CAACC,QAAQ,CAAC,GAAGP,KAAK,CAACO,QAAQ,CAAC;IACjC,OAAOD,KAAK;EAChB,CAAC,EAAE,CAAC,CAAC,CAAC;AACV,CAAC","ignoreList":[]}
|
package/executeWithRetry.js
CHANGED
|
@@ -1,14 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.executeWithRetry = void 0;
|
|
8
|
-
var _pRetry = _interopRequireDefault(require("p-retry"));
|
|
9
|
-
const executeWithRetry = (execute, options) => {
|
|
1
|
+
import pRetry from "p-retry";
|
|
2
|
+
export const executeWithRetry = (execute, options) => {
|
|
10
3
|
const retries = 20;
|
|
11
|
-
return (
|
|
4
|
+
return pRetry(execute, {
|
|
12
5
|
maxRetryTime: 300000,
|
|
13
6
|
retries,
|
|
14
7
|
minTimeout: 1500,
|
|
@@ -16,6 +9,5 @@ const executeWithRetry = (execute, options) => {
|
|
|
16
9
|
...options
|
|
17
10
|
});
|
|
18
11
|
};
|
|
19
|
-
exports.executeWithRetry = executeWithRetry;
|
|
20
12
|
|
|
21
13
|
//# sourceMappingURL=executeWithRetry.js.map
|
package/executeWithRetry.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["pRetry","executeWithRetry","execute","options","retries","maxRetryTime","minTimeout","maxTimeout"],"sources":["executeWithRetry.ts"],"sourcesContent":["import pRetry from \"p-retry\";\n\nexport type ExecuteWithRetryOptions = Parameters<typeof pRetry>[1];\n\nexport const executeWithRetry = <T>(\n execute: () => Promise<T>,\n options?: ExecuteWithRetryOptions\n) => {\n const retries = 20;\n return pRetry(execute, {\n maxRetryTime: 300000,\n retries,\n minTimeout: 1500,\n maxTimeout: 30000,\n ...options\n });\n};\n"],"mappings":"AAAA,OAAOA,MAAM,MAAM,SAAS;AAI5B,OAAO,MAAMC,gBAAgB,GAAGA,CAC5BC,OAAyB,EACzBC,OAAiC,KAChC;EACD,MAAMC,OAAO,GAAG,EAAE;EAClB,OAAOJ,MAAM,CAACE,OAAO,EAAE;IACnBG,YAAY,EAAE,MAAM;IACpBD,OAAO;IACPE,UAAU,EAAE,IAAI;IAChBC,UAAU,EAAE,KAAK;IACjB,GAAGJ;EACP,CAAC,CAAC;AACN,CAAC","ignoreList":[]}
|
package/generateId.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export declare const generateAlphaNumericId: (size?: number
|
|
2
|
-
export declare const generateAlphaNumericLowerCaseId: (size?: number
|
|
3
|
-
export declare const generateAlphaId: (size?: number
|
|
4
|
-
export declare const generateAlphaLowerCaseId: (size?: number
|
|
5
|
-
export declare const generateAlphaUpperCaseId: (size?: number
|
|
1
|
+
export declare const generateAlphaNumericId: (size?: number) => string;
|
|
2
|
+
export declare const generateAlphaNumericLowerCaseId: (size?: number) => string;
|
|
3
|
+
export declare const generateAlphaId: (size?: number) => string;
|
|
4
|
+
export declare const generateAlphaLowerCaseId: (size?: number) => string;
|
|
5
|
+
export declare const generateAlphaUpperCaseId: (size?: number) => string;
|
|
6
6
|
export declare const generateId: (size?: number) => string;
|
package/generateId.js
CHANGED
|
@@ -1,25 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.generateId = exports.generateAlphaUpperCaseId = exports.generateAlphaNumericLowerCaseId = exports.generateAlphaNumericId = exports.generateAlphaLowerCaseId = exports.generateAlphaId = void 0;
|
|
7
|
-
var _nanoid = require("nanoid");
|
|
8
|
-
var _nanoidDictionary = require("nanoid-dictionary");
|
|
9
|
-
/**
|
|
10
|
-
* Package nanoid-dictionary is missing types
|
|
11
|
-
*/
|
|
12
|
-
// @ts-expect-error
|
|
13
|
-
|
|
1
|
+
import { customAlphabet, nanoid } from "nanoid";
|
|
2
|
+
import { alphanumeric, lowercase, numbers, uppercase } from "nanoid-dictionary";
|
|
14
3
|
const DEFAULT_SIZE = 21;
|
|
15
|
-
const generateAlphaNumericId =
|
|
16
|
-
const generateAlphaNumericLowerCaseId =
|
|
17
|
-
const generateAlphaId =
|
|
18
|
-
const generateAlphaLowerCaseId =
|
|
19
|
-
const generateAlphaUpperCaseId =
|
|
20
|
-
const generateId = (size = DEFAULT_SIZE) => {
|
|
21
|
-
return
|
|
4
|
+
export const generateAlphaNumericId = customAlphabet(alphanumeric, DEFAULT_SIZE);
|
|
5
|
+
export const generateAlphaNumericLowerCaseId = customAlphabet(`${lowercase}${numbers}`, DEFAULT_SIZE);
|
|
6
|
+
export const generateAlphaId = customAlphabet(`${lowercase}${uppercase}`, DEFAULT_SIZE);
|
|
7
|
+
export const generateAlphaLowerCaseId = customAlphabet(lowercase, DEFAULT_SIZE);
|
|
8
|
+
export const generateAlphaUpperCaseId = customAlphabet(uppercase, DEFAULT_SIZE);
|
|
9
|
+
export const generateId = (size = DEFAULT_SIZE) => {
|
|
10
|
+
return nanoid(size);
|
|
22
11
|
};
|
|
23
|
-
exports.generateId = generateId;
|
|
24
12
|
|
|
25
13
|
//# sourceMappingURL=generateId.js.map
|
package/generateId.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["customAlphabet","nanoid","alphanumeric","lowercase","numbers","uppercase","DEFAULT_SIZE","generateAlphaNumericId","generateAlphaNumericLowerCaseId","generateAlphaId","generateAlphaLowerCaseId","generateAlphaUpperCaseId","generateId","size"],"sources":["generateId.ts"],"sourcesContent":["import { customAlphabet, nanoid } from \"nanoid\";\nimport { alphanumeric, lowercase, numbers, uppercase } from \"nanoid-dictionary\";\n\nconst DEFAULT_SIZE = 21;\n\nexport const generateAlphaNumericId = customAlphabet(alphanumeric, DEFAULT_SIZE);\n\nexport const generateAlphaNumericLowerCaseId = customAlphabet(\n `${lowercase}${numbers}`,\n DEFAULT_SIZE\n);\n\nexport const generateAlphaId = customAlphabet(`${lowercase}${uppercase}`, DEFAULT_SIZE);\n\nexport const generateAlphaLowerCaseId = customAlphabet(lowercase, DEFAULT_SIZE);\n\nexport const generateAlphaUpperCaseId = customAlphabet(uppercase, DEFAULT_SIZE);\n\nexport const generateId = (size = DEFAULT_SIZE): string => {\n return nanoid(size);\n};\n"],"mappings":"AAAA,SAASA,cAAc,EAAEC,MAAM,QAAQ,QAAQ;AAC/C,SAASC,YAAY,EAAEC,SAAS,EAAEC,OAAO,EAAEC,SAAS,QAAQ,mBAAmB;AAE/E,MAAMC,YAAY,GAAG,EAAE;AAEvB,OAAO,MAAMC,sBAAsB,GAAGP,cAAc,CAACE,YAAY,EAAEI,YAAY,CAAC;AAEhF,OAAO,MAAME,+BAA+B,GAAGR,cAAc,CACzD,GAAGG,SAAS,GAAGC,OAAO,EAAE,EACxBE,YACJ,CAAC;AAED,OAAO,MAAMG,eAAe,GAAGT,cAAc,CAAC,GAAGG,SAAS,GAAGE,SAAS,EAAE,EAAEC,YAAY,CAAC;AAEvF,OAAO,MAAMI,wBAAwB,GAAGV,cAAc,CAACG,SAAS,EAAEG,YAAY,CAAC;AAE/E,OAAO,MAAMK,wBAAwB,GAAGX,cAAc,CAACK,SAAS,EAAEC,YAAY,CAAC;AAE/E,OAAO,MAAMM,UAAU,GAAGA,CAACC,IAAI,GAAGP,YAAY,KAAa;EACvD,OAAOL,MAAM,CAACY,IAAI,CAAC;AACvB,CAAC","ignoreList":[]}
|
package/getObjectProperties.js
CHANGED
|
@@ -1,14 +1,8 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.getObjectProperties = void 0;
|
|
7
1
|
/**
|
|
8
2
|
* Unfortunately we need some casting as we do not know which properties are available on the object.
|
|
9
3
|
*/
|
|
10
4
|
|
|
11
|
-
const getObjectProperties = input => {
|
|
5
|
+
export const getObjectProperties = input => {
|
|
12
6
|
if (!input || typeof input !== "object") {
|
|
13
7
|
return {};
|
|
14
8
|
}
|
|
@@ -17,6 +11,5 @@ const getObjectProperties = input => {
|
|
|
17
11
|
return acc;
|
|
18
12
|
}, {});
|
|
19
13
|
};
|
|
20
|
-
exports.getObjectProperties = getObjectProperties;
|
|
21
14
|
|
|
22
15
|
//# sourceMappingURL=getObjectProperties.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getObjectProperties","input","Object","getOwnPropertyNames","reduce","acc","key"
|
|
1
|
+
{"version":3,"names":["getObjectProperties","input","Object","getOwnPropertyNames","reduce","acc","key"],"sources":["getObjectProperties.ts"],"sourcesContent":["/**\n * Unfortunately we need some casting as we do not know which properties are available on the object.\n */\ninterface GenericRecord {\n [key: string]: any;\n}\n\nexport const getObjectProperties = <T = GenericRecord>(input: unknown): T => {\n if (!input || typeof input !== \"object\") {\n return {} as unknown as T;\n }\n return Object.getOwnPropertyNames(input).reduce<T>((acc, key) => {\n acc[key as keyof T] = (input as unknown as T)[key as keyof T];\n return acc;\n }, {} as T) as unknown as T;\n};\n"],"mappings":"AAAA;AACA;AACA;;AAKA,OAAO,MAAMA,mBAAmB,GAAuBC,KAAc,IAAQ;EACzE,IAAI,CAACA,KAAK,IAAI,OAAOA,KAAK,KAAK,QAAQ,EAAE;IACrC,OAAO,CAAC,CAAC;EACb;EACA,OAAOC,MAAM,CAACC,mBAAmB,CAACF,KAAK,CAAC,CAACG,MAAM,CAAI,CAACC,GAAG,EAAEC,GAAG,KAAK;IAC7DD,GAAG,CAACC,GAAG,CAAY,GAAIL,KAAK,CAAkBK,GAAG,CAAY;IAC7D,OAAOD,GAAG;EACd,CAAC,EAAE,CAAC,CAAM,CAAC;AACf,CAAC","ignoreList":[]}
|
package/headers.js
CHANGED
|
@@ -1,11 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.getWebinyVersionHeaders = exports.WEBINY_VERSION_HEADER = void 0;
|
|
7
|
-
const WEBINY_VERSION_HEADER = exports.WEBINY_VERSION_HEADER = "x-webiny-version";
|
|
8
|
-
const getWebinyVersionHeaders = () => {
|
|
1
|
+
export const WEBINY_VERSION_HEADER = "x-webiny-version";
|
|
2
|
+
export const getWebinyVersionHeaders = () => {
|
|
9
3
|
const enable = process.env.WEBINY_ENABLE_VERSION_HEADER;
|
|
10
4
|
const version = process.env.WEBINY_VERSION;
|
|
11
5
|
/**
|
|
@@ -18,6 +12,5 @@ const getWebinyVersionHeaders = () => {
|
|
|
18
12
|
"x-webiny-version": version
|
|
19
13
|
};
|
|
20
14
|
};
|
|
21
|
-
exports.getWebinyVersionHeaders = getWebinyVersionHeaders;
|
|
22
15
|
|
|
23
16
|
//# sourceMappingURL=headers.js.map
|
package/headers.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["WEBINY_VERSION_HEADER","
|
|
1
|
+
{"version":3,"names":["WEBINY_VERSION_HEADER","getWebinyVersionHeaders","enable","process","env","WEBINY_ENABLE_VERSION_HEADER","version","WEBINY_VERSION"],"sources":["headers.ts"],"sourcesContent":["export const WEBINY_VERSION_HEADER = \"x-webiny-version\";\n\nexport const getWebinyVersionHeaders = () => {\n const enable: string | undefined = process.env.WEBINY_ENABLE_VERSION_HEADER;\n const version: string | undefined = process.env.WEBINY_VERSION;\n /**\n * Disable version headers by default.\n */\n if (enable !== \"true\" || !version) {\n return {};\n }\n return {\n \"x-webiny-version\": version\n };\n};\n"],"mappings":"AAAA,OAAO,MAAMA,qBAAqB,GAAG,kBAAkB;AAEvD,OAAO,MAAMC,uBAAuB,GAAGA,CAAA,KAAM;EACzC,MAAMC,MAA0B,GAAGC,OAAO,CAACC,GAAG,CAACC,4BAA4B;EAC3E,MAAMC,OAA2B,GAAGH,OAAO,CAACC,GAAG,CAACG,cAAc;EAC9D;AACJ;AACA;EACI,IAAIL,MAAM,KAAK,MAAM,IAAI,CAACI,OAAO,EAAE;IAC/B,OAAO,CAAC,CAAC;EACb;EACA,OAAO;IACH,kBAAkB,EAAEA;EACxB,CAAC;AACL,CAAC","ignoreList":[]}
|
package/index.d.ts
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
export * from "./parseIdentifier";
|
|
2
|
-
export * from "./zeroPad";
|
|
1
|
+
export * from "./parseIdentifier.js";
|
|
2
|
+
export * from "./zeroPad.js";
|
|
3
3
|
export * from "./exception.js";
|
|
4
|
-
export * from "./createIdentifier";
|
|
5
|
-
export * from "./cursor";
|
|
6
|
-
export * from "./headers";
|
|
7
|
-
export * from "./generateId";
|
|
8
|
-
export * from "./mdbid";
|
|
9
|
-
export * from "./createZodError";
|
|
10
|
-
export * from "./executeWithRetry";
|
|
11
|
-
export * from "./removeUndefinedValues";
|
|
12
|
-
export * from "./removeNullValues";
|
|
13
|
-
export * from "./utcTimezones";
|
|
14
|
-
export * from "./cacheKey";
|
|
15
|
-
export * from "./getObjectProperties";
|
|
16
|
-
export * from "./middleware";
|
|
17
|
-
export type { GenericRecord } from "./GenericRecord";
|
|
18
|
-
import type { AsyncProcessor, NextAsyncProcessor } from "./compose";
|
|
19
|
-
import { composeAsync } from "./compose";
|
|
4
|
+
export * from "./createIdentifier.js";
|
|
5
|
+
export * from "./cursor.js";
|
|
6
|
+
export * from "./headers.js";
|
|
7
|
+
export * from "./generateId.js";
|
|
8
|
+
export * from "./mdbid.js";
|
|
9
|
+
export * from "./createZodError.js";
|
|
10
|
+
export * from "./executeWithRetry.js";
|
|
11
|
+
export * from "./removeUndefinedValues.js";
|
|
12
|
+
export * from "./removeNullValues.js";
|
|
13
|
+
export * from "./utcTimezones.js";
|
|
14
|
+
export * from "./cacheKey.js";
|
|
15
|
+
export * from "./getObjectProperties.js";
|
|
16
|
+
export * from "./middleware.js";
|
|
17
|
+
export type { GenericRecord } from "./GenericRecord.js";
|
|
18
|
+
import type { AsyncProcessor, NextAsyncProcessor } from "./compose.js";
|
|
19
|
+
import { composeAsync } from "./compose.js";
|
|
20
20
|
export { composeAsync };
|
|
21
21
|
export type { AsyncProcessor, NextAsyncProcessor };
|
package/index.js
CHANGED
|
@@ -1,209 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
if (key in exports && exports[key] === _parseIdentifier[key]) return;
|
|
20
|
-
Object.defineProperty(exports, key, {
|
|
21
|
-
enumerable: true,
|
|
22
|
-
get: function () {
|
|
23
|
-
return _parseIdentifier[key];
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
});
|
|
27
|
-
var _zeroPad = require("./zeroPad");
|
|
28
|
-
Object.keys(_zeroPad).forEach(function (key) {
|
|
29
|
-
if (key === "default" || key === "__esModule") return;
|
|
30
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
31
|
-
if (key in exports && exports[key] === _zeroPad[key]) return;
|
|
32
|
-
Object.defineProperty(exports, key, {
|
|
33
|
-
enumerable: true,
|
|
34
|
-
get: function () {
|
|
35
|
-
return _zeroPad[key];
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
});
|
|
39
|
-
var _exception = require("./exception.js");
|
|
40
|
-
Object.keys(_exception).forEach(function (key) {
|
|
41
|
-
if (key === "default" || key === "__esModule") return;
|
|
42
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
43
|
-
if (key in exports && exports[key] === _exception[key]) return;
|
|
44
|
-
Object.defineProperty(exports, key, {
|
|
45
|
-
enumerable: true,
|
|
46
|
-
get: function () {
|
|
47
|
-
return _exception[key];
|
|
48
|
-
}
|
|
49
|
-
});
|
|
50
|
-
});
|
|
51
|
-
var _createIdentifier = require("./createIdentifier");
|
|
52
|
-
Object.keys(_createIdentifier).forEach(function (key) {
|
|
53
|
-
if (key === "default" || key === "__esModule") return;
|
|
54
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
55
|
-
if (key in exports && exports[key] === _createIdentifier[key]) return;
|
|
56
|
-
Object.defineProperty(exports, key, {
|
|
57
|
-
enumerable: true,
|
|
58
|
-
get: function () {
|
|
59
|
-
return _createIdentifier[key];
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
});
|
|
63
|
-
var _cursor = require("./cursor");
|
|
64
|
-
Object.keys(_cursor).forEach(function (key) {
|
|
65
|
-
if (key === "default" || key === "__esModule") return;
|
|
66
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
67
|
-
if (key in exports && exports[key] === _cursor[key]) return;
|
|
68
|
-
Object.defineProperty(exports, key, {
|
|
69
|
-
enumerable: true,
|
|
70
|
-
get: function () {
|
|
71
|
-
return _cursor[key];
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
});
|
|
75
|
-
var _headers = require("./headers");
|
|
76
|
-
Object.keys(_headers).forEach(function (key) {
|
|
77
|
-
if (key === "default" || key === "__esModule") return;
|
|
78
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
79
|
-
if (key in exports && exports[key] === _headers[key]) return;
|
|
80
|
-
Object.defineProperty(exports, key, {
|
|
81
|
-
enumerable: true,
|
|
82
|
-
get: function () {
|
|
83
|
-
return _headers[key];
|
|
84
|
-
}
|
|
85
|
-
});
|
|
86
|
-
});
|
|
87
|
-
var _generateId = require("./generateId");
|
|
88
|
-
Object.keys(_generateId).forEach(function (key) {
|
|
89
|
-
if (key === "default" || key === "__esModule") return;
|
|
90
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
91
|
-
if (key in exports && exports[key] === _generateId[key]) return;
|
|
92
|
-
Object.defineProperty(exports, key, {
|
|
93
|
-
enumerable: true,
|
|
94
|
-
get: function () {
|
|
95
|
-
return _generateId[key];
|
|
96
|
-
}
|
|
97
|
-
});
|
|
98
|
-
});
|
|
99
|
-
var _mdbid = require("./mdbid");
|
|
100
|
-
Object.keys(_mdbid).forEach(function (key) {
|
|
101
|
-
if (key === "default" || key === "__esModule") return;
|
|
102
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
103
|
-
if (key in exports && exports[key] === _mdbid[key]) return;
|
|
104
|
-
Object.defineProperty(exports, key, {
|
|
105
|
-
enumerable: true,
|
|
106
|
-
get: function () {
|
|
107
|
-
return _mdbid[key];
|
|
108
|
-
}
|
|
109
|
-
});
|
|
110
|
-
});
|
|
111
|
-
var _createZodError = require("./createZodError");
|
|
112
|
-
Object.keys(_createZodError).forEach(function (key) {
|
|
113
|
-
if (key === "default" || key === "__esModule") return;
|
|
114
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
115
|
-
if (key in exports && exports[key] === _createZodError[key]) return;
|
|
116
|
-
Object.defineProperty(exports, key, {
|
|
117
|
-
enumerable: true,
|
|
118
|
-
get: function () {
|
|
119
|
-
return _createZodError[key];
|
|
120
|
-
}
|
|
121
|
-
});
|
|
122
|
-
});
|
|
123
|
-
var _executeWithRetry = require("./executeWithRetry");
|
|
124
|
-
Object.keys(_executeWithRetry).forEach(function (key) {
|
|
125
|
-
if (key === "default" || key === "__esModule") return;
|
|
126
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
127
|
-
if (key in exports && exports[key] === _executeWithRetry[key]) return;
|
|
128
|
-
Object.defineProperty(exports, key, {
|
|
129
|
-
enumerable: true,
|
|
130
|
-
get: function () {
|
|
131
|
-
return _executeWithRetry[key];
|
|
132
|
-
}
|
|
133
|
-
});
|
|
134
|
-
});
|
|
135
|
-
var _removeUndefinedValues = require("./removeUndefinedValues");
|
|
136
|
-
Object.keys(_removeUndefinedValues).forEach(function (key) {
|
|
137
|
-
if (key === "default" || key === "__esModule") return;
|
|
138
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
139
|
-
if (key in exports && exports[key] === _removeUndefinedValues[key]) return;
|
|
140
|
-
Object.defineProperty(exports, key, {
|
|
141
|
-
enumerable: true,
|
|
142
|
-
get: function () {
|
|
143
|
-
return _removeUndefinedValues[key];
|
|
144
|
-
}
|
|
145
|
-
});
|
|
146
|
-
});
|
|
147
|
-
var _removeNullValues = require("./removeNullValues");
|
|
148
|
-
Object.keys(_removeNullValues).forEach(function (key) {
|
|
149
|
-
if (key === "default" || key === "__esModule") return;
|
|
150
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
151
|
-
if (key in exports && exports[key] === _removeNullValues[key]) return;
|
|
152
|
-
Object.defineProperty(exports, key, {
|
|
153
|
-
enumerable: true,
|
|
154
|
-
get: function () {
|
|
155
|
-
return _removeNullValues[key];
|
|
156
|
-
}
|
|
157
|
-
});
|
|
158
|
-
});
|
|
159
|
-
var _utcTimezones = require("./utcTimezones");
|
|
160
|
-
Object.keys(_utcTimezones).forEach(function (key) {
|
|
161
|
-
if (key === "default" || key === "__esModule") return;
|
|
162
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
163
|
-
if (key in exports && exports[key] === _utcTimezones[key]) return;
|
|
164
|
-
Object.defineProperty(exports, key, {
|
|
165
|
-
enumerable: true,
|
|
166
|
-
get: function () {
|
|
167
|
-
return _utcTimezones[key];
|
|
168
|
-
}
|
|
169
|
-
});
|
|
170
|
-
});
|
|
171
|
-
var _cacheKey = require("./cacheKey");
|
|
172
|
-
Object.keys(_cacheKey).forEach(function (key) {
|
|
173
|
-
if (key === "default" || key === "__esModule") return;
|
|
174
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
175
|
-
if (key in exports && exports[key] === _cacheKey[key]) return;
|
|
176
|
-
Object.defineProperty(exports, key, {
|
|
177
|
-
enumerable: true,
|
|
178
|
-
get: function () {
|
|
179
|
-
return _cacheKey[key];
|
|
180
|
-
}
|
|
181
|
-
});
|
|
182
|
-
});
|
|
183
|
-
var _getObjectProperties = require("./getObjectProperties");
|
|
184
|
-
Object.keys(_getObjectProperties).forEach(function (key) {
|
|
185
|
-
if (key === "default" || key === "__esModule") return;
|
|
186
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
187
|
-
if (key in exports && exports[key] === _getObjectProperties[key]) return;
|
|
188
|
-
Object.defineProperty(exports, key, {
|
|
189
|
-
enumerable: true,
|
|
190
|
-
get: function () {
|
|
191
|
-
return _getObjectProperties[key];
|
|
192
|
-
}
|
|
193
|
-
});
|
|
194
|
-
});
|
|
195
|
-
var _middleware = require("./middleware");
|
|
196
|
-
Object.keys(_middleware).forEach(function (key) {
|
|
197
|
-
if (key === "default" || key === "__esModule") return;
|
|
198
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
199
|
-
if (key in exports && exports[key] === _middleware[key]) return;
|
|
200
|
-
Object.defineProperty(exports, key, {
|
|
201
|
-
enumerable: true,
|
|
202
|
-
get: function () {
|
|
203
|
-
return _middleware[key];
|
|
204
|
-
}
|
|
205
|
-
});
|
|
206
|
-
});
|
|
207
|
-
var _compose = require("./compose");
|
|
1
|
+
export * from "./parseIdentifier.js";
|
|
2
|
+
export * from "./zeroPad.js";
|
|
3
|
+
export * from "./exception.js";
|
|
4
|
+
export * from "./createIdentifier.js";
|
|
5
|
+
export * from "./cursor.js";
|
|
6
|
+
export * from "./headers.js";
|
|
7
|
+
export * from "./generateId.js";
|
|
8
|
+
export * from "./mdbid.js";
|
|
9
|
+
export * from "./createZodError.js";
|
|
10
|
+
export * from "./executeWithRetry.js";
|
|
11
|
+
export * from "./removeUndefinedValues.js";
|
|
12
|
+
export * from "./removeNullValues.js";
|
|
13
|
+
export * from "./utcTimezones.js";
|
|
14
|
+
export * from "./cacheKey.js";
|
|
15
|
+
export * from "./getObjectProperties.js";
|
|
16
|
+
export * from "./middleware.js";
|
|
17
|
+
import { composeAsync } from "./compose.js";
|
|
18
|
+
export { composeAsync };
|
|
208
19
|
|
|
209
20
|
//# sourceMappingURL=index.js.map
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["composeAsync"],"sources":["index.ts"],"sourcesContent":["export * from \"~/parseIdentifier.js\";\nexport * from \"~/zeroPad.js\";\nexport * from \"~/exception.js\";\nexport * from \"~/createIdentifier.js\";\nexport * from \"~/cursor.js\";\nexport * from \"~/headers.js\";\nexport * from \"~/generateId.js\";\nexport * from \"~/mdbid.js\";\nexport * from \"~/createZodError.js\";\nexport * from \"~/executeWithRetry.js\";\nexport * from \"~/removeUndefinedValues.js\";\nexport * from \"~/removeNullValues.js\";\nexport * from \"~/utcTimezones.js\";\nexport * from \"./cacheKey.js\";\nexport * from \"./getObjectProperties.js\";\nexport * from \"./middleware.js\";\nexport type { GenericRecord } from \"./GenericRecord.js\";\n\nimport type { AsyncProcessor, NextAsyncProcessor } from \"~/compose.js\";\nimport { composeAsync } from \"~/compose.js\";\n\nexport { composeAsync };\nexport type { AsyncProcessor, NextAsyncProcessor };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA,SAASA,YAAY;AAErB,SAASA,YAAY","ignoreList":[]}
|
package/mdbid.js
CHANGED
|
@@ -1,14 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.mdbid = void 0;
|
|
8
|
-
var _mdbid = _interopRequireDefault(require("mdbid"));
|
|
9
|
-
// @ts-expect-error `mdbid` package has no types
|
|
10
|
-
|
|
11
|
-
const mdbid = () => (0, _mdbid.default)();
|
|
12
|
-
exports.mdbid = mdbid;
|
|
1
|
+
import ObjectID from "bson-objectid";
|
|
2
|
+
export const mdbid = () => {
|
|
3
|
+
return ObjectID().toHexString();
|
|
4
|
+
};
|
|
13
5
|
|
|
14
6
|
//# sourceMappingURL=mdbid.js.map
|
package/mdbid.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["ObjectID","mdbid","toHexString"],"sources":["mdbid.ts"],"sourcesContent":["import ObjectID from \"bson-objectid\";\n\nexport const mdbid = () => {\n return ObjectID().toHexString();\n};\n"],"mappings":"AAAA,OAAOA,QAAQ,MAAM,eAAe;AAEpC,OAAO,MAAMC,KAAK,GAAGA,CAAA,KAAM;EACvB,OAAOD,QAAQ,CAAC,CAAC,CAACE,WAAW,CAAC,CAAC;AACnC,CAAC","ignoreList":[]}
|
package/middleware.d.ts
CHANGED
|
@@ -10,4 +10,4 @@ export interface MiddlewareReject {
|
|
|
10
10
|
/**
|
|
11
11
|
* Compose a single middleware from the array of middleware functions
|
|
12
12
|
*/
|
|
13
|
-
export declare const middleware: <Params = any,
|
|
13
|
+
export declare const middleware: <Params = any, Response = any>(functions?: MiddlewareCallable[]) => (...args: Params[]) => Promise<Response | undefined>;
|