UNPKG

@sapphire/plugin-api

Version:

Plugin for @sapphire/framework to expose a REST API

26 lines (24 loc) 786 B
import { __name, __publicField } from '../../chunk-S573YWRP.mjs'; import { Piece } from '@sapphire/pieces'; var _Middleware = class _Middleware extends Piece { constructor(context, options = {}) { super(context, options); /** * The position the middleware has. The {@link MiddlewareStore} will run all middlewares with lower position than * this one. * * The built-in middlewares follow the following positions: * - headers: 10 * - body: 20 * - cookies: 30 * - auth: 40 */ __publicField(this, "position"); this.position = options.position ?? 1e3; } }; __name(_Middleware, "Middleware"); var Middleware = _Middleware; export { Middleware }; //# sourceMappingURL=Middleware.mjs.map //# sourceMappingURL=Middleware.mjs.map