vona-module-a-web 5.0.18 → 5.0.21
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.
|
@@ -11,7 +11,7 @@ export default async function (options: IMetadataCustomGenerateOptions): Promise
|
|
|
11
11
|
contentImports.push(`import type { ${className} } from '${fileNameJSRelative}';`);
|
|
12
12
|
contentFields.push(`
|
|
13
13
|
export interface ${opionsName} {
|
|
14
|
-
fields?: TypeEntityOptionsFields<${className}, ${opionsName}[
|
|
14
|
+
fields?: TypeEntityOptionsFields<${className}, ${opionsName}[TypeSymbolKeyFieldsMore]>;
|
|
15
15
|
}`);
|
|
16
16
|
}
|
|
17
17
|
if (contentFields.length === 0) return '';
|
|
@@ -28,6 +28,10 @@ declare module 'vona-module-a-bean' {
|
|
|
28
28
|
declare module 'vona-module-a-web' {
|
|
29
29
|
interface ServiceWeb {
|
|
30
30
|
}
|
|
31
|
+
interface ServiceWeb {
|
|
32
|
+
get $beanFullName(): 'a-web.service.web';
|
|
33
|
+
get $onionName(): 'a-web:web';
|
|
34
|
+
}
|
|
31
35
|
}
|
|
32
36
|
/** service: end */
|
|
33
37
|
/** service: begin */
|
|
@@ -55,6 +59,10 @@ declare module 'vona-module-a-startup' {
|
|
|
55
59
|
declare module 'vona-module-a-web' {
|
|
56
60
|
interface StartupListen {
|
|
57
61
|
}
|
|
62
|
+
interface StartupListen {
|
|
63
|
+
get $beanFullName(): 'a-web.startup.listen';
|
|
64
|
+
get $onionName(): 'a-web:listen';
|
|
65
|
+
}
|
|
58
66
|
}
|
|
59
67
|
/** startup: end */
|
|
60
68
|
/** config: begin */
|
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { appMetadata, BeanInfo, BeanBase, appResource, deepExtend, compose, cast
|
|
|
2
2
|
import * as ModuleInfo from '@cabloy/module-info';
|
|
3
3
|
import { Bean, Service, Scope } from 'vona-module-a-bean';
|
|
4
4
|
import { SymbolUseOnionOptions } from 'vona-module-a-onion';
|
|
5
|
-
import { SymbolRouteHandlersArgumentsValue, SymbolRouteHandlersArgumentsMeta,
|
|
5
|
+
import { SymbolRouteHandlersArgumentsValue, SymbolRouteHandlersArgumentsMeta, 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';
|
|
@@ -522,7 +522,7 @@ function Controller(path, options) {
|
|
|
522
522
|
} else {
|
|
523
523
|
options = path || {};
|
|
524
524
|
}
|
|
525
|
-
return createBeanDecorator('controller', options, false,
|
|
525
|
+
return createBeanDecorator('controller', options, false, target => {
|
|
526
526
|
// beanOptions
|
|
527
527
|
const beanOptions = appResource.getBean(target);
|
|
528
528
|
// IOpenApiOptions
|
|
@@ -532,15 +532,15 @@ function Controller(path, options) {
|
|
|
532
532
|
if (option !== undefined) optionsMeta[key] = option;
|
|
533
533
|
}
|
|
534
534
|
// IOpenApiOptions
|
|
535
|
-
|
|
535
|
+
mergeActionsOpenapiMetadata(target);
|
|
536
536
|
});
|
|
537
537
|
}
|
|
538
538
|
function Dto(options) {
|
|
539
|
-
return createBeanDecorator('dto', options, false,
|
|
540
|
-
|
|
539
|
+
return createBeanDecorator('dto', options, false, target => {
|
|
540
|
+
mergeFieldsOpenapiMetadata(target);
|
|
541
541
|
});
|
|
542
542
|
}
|
|
543
|
-
function
|
|
543
|
+
function mergeActionsOpenapiMetadata(target) {
|
|
544
544
|
// beanOptions
|
|
545
545
|
const beanOptions = appResource.getBean(target);
|
|
546
546
|
const actions = cast(beanOptions?.options)?.actions;
|
|
@@ -611,4 +611,4 @@ function $apiPathAndCombineParamsAndQuery(path, options) {
|
|
|
611
611
|
return combineParamsAndQuery(path, options);
|
|
612
612
|
}
|
|
613
613
|
|
|
614
|
-
export { $apiPath, $apiPathAndCombineParamsAndQuery, BeanRouter, Controller, Dto, Main, RequestMapping, ScopeModuleAWeb, ServiceWeb, StartupListen, SymbolRequestMappingHandler, Web, config,
|
|
614
|
+
export { $apiPath, $apiPathAndCombineParamsAndQuery, BeanRouter, Controller, Dto, Main, RequestMapping, ScopeModuleAWeb, ServiceWeb, StartupListen, SymbolRequestMappingHandler, Web, config, mergeActionsOpenapiMetadata };
|
|
@@ -3,5 +3,5 @@ import type { IDecoratorControllerOptions } from '../../types/controller.ts';
|
|
|
3
3
|
import type { IDecoratorDtoOptions } from '../../types/dto.ts';
|
|
4
4
|
export declare function Controller<T extends IDecoratorControllerOptions>(options?: T): ClassDecorator;
|
|
5
5
|
export declare function Controller<T extends IDecoratorControllerOptions>(path?: string, options?: Omit<T, 'path'>): ClassDecorator;
|
|
6
|
-
export declare function Dto<T extends IDecoratorDtoOptions<any>>(options?:
|
|
7
|
-
export declare function
|
|
6
|
+
export declare function Dto<T extends IDecoratorDtoOptions<any>>(options?: T): ClassDecorator;
|
|
7
|
+
export declare function mergeActionsOpenapiMetadata(target: Constructable): void;
|
package/dist/types/dto.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import type { OmitNever } from 'vona';
|
|
2
2
|
import type { ServiceOnion } from 'vona-module-a-onion';
|
|
3
|
-
import type {
|
|
3
|
+
import type { TypeOpenapiMetadata } from 'vona-module-a-openapi';
|
|
4
|
+
import type { SymbolKeyFieldsMore } from 'vona-module-a-orm';
|
|
4
5
|
export interface IDtoRecord {
|
|
5
6
|
}
|
|
6
7
|
export interface IDecoratorDtoOptions<FieldsMore = never> {
|
|
8
|
+
[SymbolKeyFieldsMore]?: FieldsMore;
|
|
7
9
|
independent?: boolean;
|
|
8
|
-
openapi?:
|
|
9
|
-
_fieldsMore_?: FieldsMore;
|
|
10
|
+
openapi?: TypeOpenapiMetadata;
|
|
10
11
|
}
|
|
11
12
|
declare module 'vona-module-a-onion' {
|
|
12
13
|
interface BeanOnion {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vona-module-a-web",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "5.0.
|
|
4
|
+
"version": "5.0.21",
|
|
5
5
|
"title": "a-web",
|
|
6
6
|
"vonaModule": {
|
|
7
7
|
"capabilities": {
|
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
"onions": {
|
|
12
12
|
"dto": {
|
|
13
13
|
"sceneIsolate": true,
|
|
14
|
-
"optionsCustomInterfaceTemplate": "Omit<{{optionsCustomInterface}}, '_fieldsMore_'>",
|
|
15
14
|
"optionsGlobalInterfaceName": "IDecoratorDtoOptions",
|
|
16
15
|
"optionsGlobalInterfaceFrom": "vona-module-a-web",
|
|
17
16
|
"boilerplate": "cli/dto/boilerplate",
|