@hestjs/core
Version:
HestJS Core Framework - A TypeScript framework built on Hono with dependency injection and decorators
43 lines • 1.48 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Scope = exports.ParamType = exports.HttpMethod = exports.METADATA_KEYS = void 0;
// 元数据键常量
exports.METADATA_KEYS = {
CONTROLLER: Symbol.for('hest:controller'),
INJECTABLE: Symbol.for('hest:injectable'),
MODULE: Symbol.for('hest:module'),
ROUTE: Symbol.for('hest:route'),
PARAM: Symbol.for('hest:param'),
MIDDLEWARE: Symbol.for('hest:middleware'),
GUARD: Symbol.for('hest:guard'),
};
// HTTP 方法枚举
var HttpMethod;
(function (HttpMethod) {
HttpMethod["GET"] = "GET";
HttpMethod["POST"] = "POST";
HttpMethod["PUT"] = "PUT";
HttpMethod["DELETE"] = "DELETE";
HttpMethod["PATCH"] = "PATCH";
HttpMethod["OPTIONS"] = "OPTIONS";
HttpMethod["HEAD"] = "HEAD";
})(HttpMethod || (exports.HttpMethod = HttpMethod = {}));
// 参数类型枚举
var ParamType;
(function (ParamType) {
ParamType["BODY"] = "body";
ParamType["PARAM"] = "param";
ParamType["QUERY"] = "query";
ParamType["HEADER"] = "header";
ParamType["REQUEST"] = "request";
ParamType["RESPONSE"] = "response";
ParamType["CONTEXT"] = "context";
})(ParamType || (exports.ParamType = ParamType = {}));
// 注入作用域
var Scope;
(function (Scope) {
Scope["SINGLETON"] = "singleton";
Scope["TRANSIENT"] = "transient";
Scope["REQUEST"] = "request";
})(Scope || (exports.Scope = Scope = {}));
//# sourceMappingURL=constants.js.map