vona-module-a-web 5.0.10 → 5.0.12

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,28 +0,0 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- import { appMetadata, appResource, BeanBase } from 'vona';
8
- import { Service, SymbolRequestMappingHandler } from 'vona-module-a-web';
9
- let ServiceWeb = class ServiceWeb extends BeanBase {
10
- combineControllerActionApiPath(controller, actionKey, prefix, simplify) {
11
- // beanOptions
12
- const beanOptions = appResource.getBean(controller);
13
- if (!beanOptions)
14
- return undefined;
15
- // controllerPath
16
- const controllerOptions = beanOptions.options;
17
- const controllerPath = controllerOptions.path;
18
- // actionPath
19
- const handlerMetadata = appMetadata.getMetadata(SymbolRequestMappingHandler, controller.prototype, actionKey);
20
- const actionPath = handlerMetadata.path || '';
21
- // combine
22
- return this.app.util.combineApiPathControllerAndAction(beanOptions.module, controllerPath, actionPath, prefix, simplify);
23
- }
24
- };
25
- ServiceWeb = __decorate([
26
- Service()
27
- ], ServiceWeb);
28
- export { ServiceWeb };
@@ -1 +0,0 @@
1
- export {};
package/dist/types/dto.js DELETED
@@ -1 +0,0 @@
1
- export {};
@@ -1,6 +0,0 @@
1
- export * from "./controller.js";
2
- export * from "./dto.js";
3
- export * from "./request.js";
4
- export * from "./response.js";
5
- export * from "./router.js";
6
- export * from "./service.js";
@@ -1,11 +0,0 @@
1
- export const SymbolRequestMappingHandler = Symbol('SymbolRequestMappingHandler');
2
- export var RequestMethod;
3
- (function (RequestMethod) {
4
- RequestMethod["GET"] = "get";
5
- RequestMethod["POST"] = "post";
6
- RequestMethod["PUT"] = "put";
7
- RequestMethod["DELETE"] = "delete";
8
- RequestMethod["PATCH"] = "patch";
9
- RequestMethod["OPTIONS"] = "options";
10
- RequestMethod["HEAD"] = "head";
11
- })(RequestMethod || (RequestMethod = {}));
@@ -1,4 +0,0 @@
1
- export {};
2
- // todo: 如果没有必要,就删除这里的代码
3
- // export const SymbolResponseMetadata = Symbol('SymbolResponseMetadata');
4
- // export type TypeResponseMetadata = Record<string, any>;
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};