autumn-js 0.0.45 → 0.0.46
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.
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
import { A as Autumn } from './client-C4aZxBxK.mjs';
|
|
1
2
|
import { AuthResult } from './utils/AuthFunction.mjs';
|
|
3
|
+
import './response-ByHPEnHs.mjs';
|
|
2
4
|
|
|
3
5
|
type AutumnRequestHandler = (req: any, res: any, next: any) => void;
|
|
4
6
|
type AutumnHandlerOptions = {
|
|
5
7
|
identify: (req: any) => AuthResult;
|
|
8
|
+
autumn?: (req: any) => Autumn | Autumn;
|
|
6
9
|
version?: string;
|
|
7
10
|
};
|
|
8
11
|
declare const autumnHandler: (options?: AutumnHandlerOptions) => AutumnRequestHandler;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
import { A as Autumn } from './client-DJJAbrX7.js';
|
|
1
2
|
import { AuthResult } from './utils/AuthFunction.js';
|
|
3
|
+
import './response-ByHPEnHs.js';
|
|
2
4
|
|
|
3
5
|
type AutumnRequestHandler = (req: any, res: any, next: any) => void;
|
|
4
6
|
type AutumnHandlerOptions = {
|
|
5
7
|
identify: (req: any) => AuthResult;
|
|
8
|
+
autumn?: (req: any) => Autumn | Autumn;
|
|
6
9
|
version?: string;
|
|
7
10
|
};
|
|
8
11
|
declare const autumnHandler: (options?: AutumnHandlerOptions) => AutumnRequestHandler;
|
|
@@ -756,8 +756,9 @@ var autumnHandler = (options) => {
|
|
|
756
756
|
}
|
|
757
757
|
}
|
|
758
758
|
try {
|
|
759
|
+
let autumnClient = typeof options?.autumn === "function" ? options.autumn(req) : options?.autumn || autumn;
|
|
759
760
|
let result = await handler({
|
|
760
|
-
autumn,
|
|
761
|
+
autumn: autumnClient,
|
|
761
762
|
body,
|
|
762
763
|
path: req.path,
|
|
763
764
|
getCustomer: async () => {
|
|
@@ -40,8 +40,9 @@ var autumnHandler = (options) => {
|
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
try {
|
|
43
|
+
let autumnClient = typeof options?.autumn === "function" ? options.autumn(req) : options?.autumn || autumn;
|
|
43
44
|
let result = await handler({
|
|
44
|
-
autumn,
|
|
45
|
+
autumn: autumnClient,
|
|
45
46
|
body,
|
|
46
47
|
path: req.path,
|
|
47
48
|
getCustomer: async () => {
|