vona-module-a-openapi 5.0.65 → 5.0.66
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.
|
@@ -48,6 +48,35 @@ declare module 'vona' {
|
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
/** service: end */
|
|
51
|
+
/** event: begin */
|
|
52
|
+
export * from '../bean/event.clearAllCaches.ts';
|
|
53
|
+
import 'vona';
|
|
54
|
+
declare module 'vona' {
|
|
55
|
+
}
|
|
56
|
+
declare module 'vona-module-a-openapi' {
|
|
57
|
+
interface EventClearAllCaches {
|
|
58
|
+
}
|
|
59
|
+
interface EventClearAllCaches {
|
|
60
|
+
get $beanFullName(): 'a-openapi.event.clearAllCaches';
|
|
61
|
+
get $onionName(): 'a-openapi:clearAllCaches';
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
/** event: end */
|
|
65
|
+
/** event: begin */
|
|
66
|
+
import type { EventClearAllCaches } from '../bean/event.clearAllCaches.ts';
|
|
67
|
+
export interface IModuleEvent {
|
|
68
|
+
'clearAllCaches': EventClearAllCaches;
|
|
69
|
+
}
|
|
70
|
+
/** event: end */
|
|
71
|
+
/** event: begin */
|
|
72
|
+
import type { TypeEventClearAllCachesData, TypeEventClearAllCachesResult } from '../bean/event.clearAllCaches.ts';
|
|
73
|
+
import type { EventOn } from 'vona-module-a-event';
|
|
74
|
+
declare module 'vona-module-a-event' {
|
|
75
|
+
interface IEventRecord {
|
|
76
|
+
'a-openapi:clearAllCaches': EventOn<TypeEventClearAllCachesData, TypeEventClearAllCachesResult>;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
/** event: end */
|
|
51
80
|
/** summerCache: begin */
|
|
52
81
|
export * from '../bean/summerCache.json.ts';
|
|
53
82
|
import { type IDecoratorSummerCacheOptions } from 'vona-module-a-summer';
|
|
@@ -87,6 +116,7 @@ export interface ScopeModuleAOpenapi {
|
|
|
87
116
|
util: BeanScopeUtil;
|
|
88
117
|
config: TypeModuleConfig<typeof config>;
|
|
89
118
|
service: IModuleService;
|
|
119
|
+
event: IModuleEvent;
|
|
90
120
|
summerCache: IModuleSummerCache;
|
|
91
121
|
}
|
|
92
122
|
import 'vona';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { BeanEventBase } from 'vona-module-a-event';
|
|
2
|
+
export type TypeEventClearAllCachesData = unknown;
|
|
3
|
+
export type TypeEventClearAllCachesResult = void;
|
|
4
|
+
export declare class EventClearAllCaches extends BeanEventBase<TypeEventClearAllCachesData, TypeEventClearAllCachesResult> {
|
|
5
|
+
}
|
package/dist/index.js
CHANGED
|
@@ -11,6 +11,7 @@ import { translateError } from '@cabloy/zod-errors-custom';
|
|
|
11
11
|
import { getInnerTypeName } from '@cabloy/zod-query';
|
|
12
12
|
import { SymbolRequestMappingHandler } from 'vona-module-a-web';
|
|
13
13
|
import { z } from 'zod';
|
|
14
|
+
import { Event, BeanEventBase } from 'vona-module-a-event';
|
|
14
15
|
import { SummerCache, BeanSummerCacheBase } from 'vona-module-a-summer';
|
|
15
16
|
import { ZodMetadata } from '@cabloy/zod-openapi';
|
|
16
17
|
import 'openapi3-ts/oas30';
|
|
@@ -92,6 +93,8 @@ let ServiceOpenapi = class ServiceOpenapi extends BeanBase {
|
|
|
92
93
|
await cacheSwagger.clear();
|
|
93
94
|
const cacheRapidoc = this.bean.summer.cache(beanFullNameFromOnionName('a-swagger:rapidoc', 'summerCache'));
|
|
94
95
|
await cacheRapidoc.clear();
|
|
96
|
+
// event
|
|
97
|
+
await this.scope.event.clearAllCaches.emit();
|
|
95
98
|
}
|
|
96
99
|
translate(apiObj, generateJsonScene) {
|
|
97
100
|
// paths
|
|
@@ -458,6 +461,11 @@ ServiceOpenapi = __decorate([Service(), BeanInfo({
|
|
|
458
461
|
module: "a-openapi"
|
|
459
462
|
})], ServiceOpenapi);
|
|
460
463
|
|
|
464
|
+
let EventClearAllCaches = class EventClearAllCaches extends BeanEventBase {};
|
|
465
|
+
EventClearAllCaches = __decorate([Event(), BeanInfo({
|
|
466
|
+
module: "a-openapi"
|
|
467
|
+
})], EventClearAllCaches);
|
|
468
|
+
|
|
461
469
|
let SummerCacheJson = class SummerCacheJson extends BeanSummerCacheBase {
|
|
462
470
|
async getNative(_key, _options) {}
|
|
463
471
|
};
|
|
@@ -537,4 +545,4 @@ ScopeModuleAOpenapi = __decorate([Scope(), BeanInfo({
|
|
|
537
545
|
})], ScopeModuleAOpenapi);
|
|
538
546
|
/** scope: end */
|
|
539
547
|
|
|
540
|
-
export { BeanOpenapi, Main, ScopeModuleAOpenapi, ServiceOpenapi, SummerCacheJson, config, schemaRefCustomAdapter };
|
|
548
|
+
export { BeanOpenapi, EventClearAllCaches, Main, ScopeModuleAOpenapi, ServiceOpenapi, SummerCacheJson, config, schemaRefCustomAdapter };
|