vona-module-a-web 5.0.15 → 5.0.16
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/.metadata/index.d.ts +26 -27
- package/dist/index.js +21 -21
- package/package.json +1 -1
|
@@ -1,38 +1,25 @@
|
|
|
1
|
-
import type { BeanScopeUtil, TypeModuleConfig } from 'vona';
|
|
2
|
-
import type { IDecoratorStartupOptions } from 'vona-module-a-startup';
|
|
3
|
-
/** bean: end */
|
|
4
|
-
/** bean: begin */
|
|
5
|
-
import type { BeanRouter } from '../bean/bean.router.ts';
|
|
6
|
-
import type { config } from '../config/config.ts';
|
|
7
|
-
/** service: end */
|
|
8
|
-
/** service: begin */
|
|
9
|
-
import type { ServiceWeb } from '../service/web.ts';
|
|
10
|
-
/** main: end */
|
|
11
|
-
/** scope: begin */
|
|
12
|
-
import { BeanScopeBase } from 'vona';
|
|
13
|
-
/** service: end */
|
|
14
|
-
/** service: begin */
|
|
15
1
|
/** bean: begin */
|
|
16
|
-
import 'vona';
|
|
17
|
-
import 'vona';
|
|
18
|
-
import 'vona';
|
|
19
|
-
import 'vona';
|
|
20
|
-
import 'vona';
|
|
21
2
|
export * from '../bean/bean.router.ts';
|
|
3
|
+
import 'vona';
|
|
22
4
|
declare module 'vona' {
|
|
23
5
|
}
|
|
24
6
|
declare module 'vona-module-a-web' {
|
|
25
7
|
interface BeanRouter {
|
|
26
8
|
}
|
|
27
9
|
}
|
|
10
|
+
/** bean: end */
|
|
11
|
+
/** bean: begin */
|
|
12
|
+
import type { BeanRouter } from '../bean/bean.router.ts';
|
|
13
|
+
import 'vona';
|
|
28
14
|
declare module 'vona' {
|
|
29
15
|
interface IBeanRecordGlobal {
|
|
30
|
-
router: BeanRouter;
|
|
16
|
+
'router': BeanRouter;
|
|
31
17
|
}
|
|
32
18
|
}
|
|
33
19
|
/** bean: end */
|
|
34
20
|
/** startup: begin */
|
|
35
21
|
export * from '../bean/startup.listen.ts';
|
|
22
|
+
import { type IDecoratorStartupOptions } from 'vona-module-a-startup';
|
|
36
23
|
declare module 'vona-module-a-startup' {
|
|
37
24
|
interface IStartupRecord {
|
|
38
25
|
'a-web:listen': IDecoratorStartupOptions;
|
|
@@ -42,9 +29,10 @@ declare module 'vona-module-a-web' {
|
|
|
42
29
|
interface StartupListen {
|
|
43
30
|
}
|
|
44
31
|
}
|
|
45
|
-
/**
|
|
46
|
-
/**
|
|
47
|
-
export * from '../
|
|
32
|
+
/** startup: end */
|
|
33
|
+
/** service: begin */
|
|
34
|
+
export * from '../service/web.ts';
|
|
35
|
+
import 'vona';
|
|
48
36
|
declare module 'vona-module-a-web' {
|
|
49
37
|
interface IServiceRecord {
|
|
50
38
|
'a-web:web': never;
|
|
@@ -54,20 +42,30 @@ declare module 'vona-module-a-web' {
|
|
|
54
42
|
interface ServiceWeb {
|
|
55
43
|
}
|
|
56
44
|
}
|
|
45
|
+
/** service: end */
|
|
46
|
+
/** service: begin */
|
|
47
|
+
import type { ServiceWeb } from '../service/web.ts';
|
|
57
48
|
export interface IModuleService {
|
|
58
|
-
web: ServiceWeb;
|
|
49
|
+
'web': ServiceWeb;
|
|
59
50
|
}
|
|
51
|
+
/** service: end */
|
|
52
|
+
/** service: begin */
|
|
53
|
+
import 'vona';
|
|
60
54
|
declare module 'vona' {
|
|
61
55
|
interface IBeanRecordGeneral {
|
|
62
56
|
'a-web.service.web': ServiceWeb;
|
|
63
57
|
}
|
|
64
58
|
}
|
|
59
|
+
/** service: end */
|
|
60
|
+
/** config: begin */
|
|
61
|
+
export * from '../config/config.ts';
|
|
62
|
+
import type { config } from '../config/config.ts';
|
|
65
63
|
/** config: end */
|
|
66
64
|
/** main: begin */
|
|
67
65
|
export * from '../main.ts';
|
|
68
|
-
/**
|
|
69
|
-
/**
|
|
70
|
-
|
|
66
|
+
/** main: end */
|
|
67
|
+
/** scope: begin */
|
|
68
|
+
import { BeanScopeBase, type BeanScopeUtil, type TypeModuleConfig } from 'vona';
|
|
71
69
|
export declare class ScopeModuleAWeb extends BeanScopeBase {
|
|
72
70
|
}
|
|
73
71
|
export interface ScopeModuleAWeb {
|
|
@@ -75,6 +73,7 @@ export interface ScopeModuleAWeb {
|
|
|
75
73
|
config: TypeModuleConfig<typeof config>;
|
|
76
74
|
service: IModuleService;
|
|
77
75
|
}
|
|
76
|
+
import 'vona';
|
|
78
77
|
declare module 'vona' {
|
|
79
78
|
interface IBeanScopeRecord {
|
|
80
79
|
'a-web': ScopeModuleAWeb;
|
package/dist/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { appMetadata, BeanInfo, BeanBase, appResource, deepExtend, compose, cast, BeanSimple, BeanScopeBase, createBeanDecorator } from 'vona';
|
|
2
|
-
import { Bean, Scope } from 'vona-module-a-bean';
|
|
3
2
|
import * as ModuleInfo from '@cabloy/module-info';
|
|
3
|
+
import { Bean, Scope } from 'vona-module-a-bean';
|
|
4
4
|
import { SymbolUseOnionOptions } from 'vona-module-a-onion';
|
|
5
5
|
import { SymbolRouteHandlersArgumentsValue, SymbolRouteHandlersArgumentsMeta, SymbolOpenApiOptions, mergeFieldsOpenAPIMetadata } from 'vona-module-a-openapi';
|
|
6
6
|
import { valid } from 'vona-module-a-validation';
|
|
7
7
|
import { SymbolUploadValue } from 'vona-module-a-upload';
|
|
8
8
|
import http from 'node:http';
|
|
9
9
|
import { Startup } from 'vona-module-a-startup';
|
|
10
|
+
import { Service as Service$1, SymbolRequestMappingHandler as SymbolRequestMappingHandler$1 } from 'vona-module-a-web';
|
|
10
11
|
import Router from 'find-my-way';
|
|
11
12
|
import { SymbolRouterMiddleware } from 'vona-module-a-executor';
|
|
12
|
-
import { Service as Service$1, SymbolRequestMappingHandler as SymbolRequestMappingHandler$1 } from 'vona-module-a-web';
|
|
13
13
|
import { combineParamsAndQuery } from '@cabloy/utils';
|
|
14
14
|
|
|
15
15
|
async function middlewareGuard(ctx, next) {
|
|
@@ -415,6 +415,25 @@ let StartupListen = (_dec$2 = Startup({
|
|
|
415
415
|
}
|
|
416
416
|
}) || _class$2) || _class$2);
|
|
417
417
|
|
|
418
|
+
var _dec$1, _dec2$1, _class$1;
|
|
419
|
+
let ServiceWeb = (_dec$1 = Service$1(), _dec2$1 = BeanInfo({
|
|
420
|
+
module: "a-web"
|
|
421
|
+
}), _dec$1(_class$1 = _dec2$1(_class$1 = class ServiceWeb extends BeanBase {
|
|
422
|
+
combineControllerActionApiPath(controller, actionKey, prefix, simplify) {
|
|
423
|
+
// beanOptions
|
|
424
|
+
const beanOptions = appResource.getBean(controller);
|
|
425
|
+
if (!beanOptions) return undefined;
|
|
426
|
+
// controllerPath
|
|
427
|
+
const controllerOptions = beanOptions.options;
|
|
428
|
+
const controllerPath = controllerOptions.path;
|
|
429
|
+
// actionPath
|
|
430
|
+
const handlerMetadata = appMetadata.getMetadata(SymbolRequestMappingHandler$1, controller.prototype, actionKey);
|
|
431
|
+
const actionPath = handlerMetadata.path || '';
|
|
432
|
+
// combine
|
|
433
|
+
return this.app.util.combineApiPathControllerAndAction(beanOptions.module, controllerPath, actionPath, prefix, simplify);
|
|
434
|
+
}
|
|
435
|
+
}) || _class$1) || _class$1);
|
|
436
|
+
|
|
418
437
|
function config(_app) {
|
|
419
438
|
return {
|
|
420
439
|
router: {
|
|
@@ -488,25 +507,6 @@ function routerMiddleware(router) {
|
|
|
488
507
|
};
|
|
489
508
|
}
|
|
490
509
|
|
|
491
|
-
var _dec$1, _dec2$1, _class$1;
|
|
492
|
-
let ServiceWeb = (_dec$1 = Service$1(), _dec2$1 = BeanInfo({
|
|
493
|
-
module: "a-web"
|
|
494
|
-
}), _dec$1(_class$1 = _dec2$1(_class$1 = class ServiceWeb extends BeanBase {
|
|
495
|
-
combineControllerActionApiPath(controller, actionKey, prefix, simplify) {
|
|
496
|
-
// beanOptions
|
|
497
|
-
const beanOptions = appResource.getBean(controller);
|
|
498
|
-
if (!beanOptions) return undefined;
|
|
499
|
-
// controllerPath
|
|
500
|
-
const controllerOptions = beanOptions.options;
|
|
501
|
-
const controllerPath = controllerOptions.path;
|
|
502
|
-
// actionPath
|
|
503
|
-
const handlerMetadata = appMetadata.getMetadata(SymbolRequestMappingHandler$1, controller.prototype, actionKey);
|
|
504
|
-
const actionPath = handlerMetadata.path || '';
|
|
505
|
-
// combine
|
|
506
|
-
return this.app.util.combineApiPathControllerAndAction(beanOptions.module, controllerPath, actionPath, prefix, simplify);
|
|
507
|
-
}
|
|
508
|
-
}) || _class$1) || _class$1);
|
|
509
|
-
|
|
510
510
|
var _dec, _dec2, _class;
|
|
511
511
|
let ScopeModuleAWeb = (_dec = Scope(), _dec2 = BeanInfo({
|
|
512
512
|
module: "a-web"
|