@bluemarble/bm-components 0.1.5 → 0.2.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/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -272,7 +272,7 @@ declare type MethodProps = Partial<Record<PossibleMethods, HandlerProps>>;
|
|
|
272
272
|
declare type MiddlewaresProps = ((handler: HandlerProps) => HandlerProps)[];
|
|
273
273
|
declare type ConstructorProps = {
|
|
274
274
|
middlewares?: MiddlewaresProps;
|
|
275
|
-
onFinally: () => void
|
|
275
|
+
onFinally: (req: NextApiRequest) => Promise<void>;
|
|
276
276
|
};
|
|
277
277
|
declare class ApiHelper {
|
|
278
278
|
middlewares: MiddlewaresProps;
|
package/dist/index.d.ts
CHANGED
|
@@ -272,7 +272,7 @@ declare type MethodProps = Partial<Record<PossibleMethods, HandlerProps>>;
|
|
|
272
272
|
declare type MiddlewaresProps = ((handler: HandlerProps) => HandlerProps)[];
|
|
273
273
|
declare type ConstructorProps = {
|
|
274
274
|
middlewares?: MiddlewaresProps;
|
|
275
|
-
onFinally: () => void
|
|
275
|
+
onFinally: (req: NextApiRequest) => Promise<void>;
|
|
276
276
|
};
|
|
277
277
|
declare class ApiHelper {
|
|
278
278
|
middlewares: MiddlewaresProps;
|
package/dist/index.js
CHANGED
|
@@ -3924,7 +3924,9 @@ var HttpError = class extends Error {
|
|
|
3924
3924
|
|
|
3925
3925
|
// src/helpers/apiHelper/index.ts
|
|
3926
3926
|
var ApiHelper = class _ApiHelper {
|
|
3927
|
-
onFinally() {
|
|
3927
|
+
onFinally(req) {
|
|
3928
|
+
return __async(this, null, function* () {
|
|
3929
|
+
});
|
|
3928
3930
|
}
|
|
3929
3931
|
constructor(props) {
|
|
3930
3932
|
this.middlewares = (props == null ? void 0 : props.middlewares.reverse()) || [];
|
|
@@ -3958,7 +3960,7 @@ var ApiHelper = class _ApiHelper {
|
|
|
3958
3960
|
});
|
|
3959
3961
|
throw new Error(error);
|
|
3960
3962
|
} finally {
|
|
3961
|
-
this.onFinally();
|
|
3963
|
+
yield this.onFinally(req);
|
|
3962
3964
|
}
|
|
3963
3965
|
});
|
|
3964
3966
|
}
|