vona-core 5.0.50 → 5.0.52
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/lib/core/config.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { hashkey,
|
|
1
|
+
import { hashkey, isEmptyObject } from '@cabloy/utils';
|
|
2
2
|
import { ZodMetadata } from '@cabloy/zod-openapi';
|
|
3
3
|
import { extendZodWithOpenApi } from '@cabloy/zod-to-openapi';
|
|
4
4
|
import { z } from 'zod';
|
|
@@ -15,8 +15,10 @@ export function zodExtendOpenApi() {
|
|
|
15
15
|
return openapiOriginal.call(this, ...args);
|
|
16
16
|
// metadata
|
|
17
17
|
const metadata = args[0];
|
|
18
|
-
if (
|
|
19
|
-
return
|
|
18
|
+
if (isEmptyObject(metadata)) {
|
|
19
|
+
return this;
|
|
20
|
+
// return openapiOriginal.call(this, ...args);
|
|
21
|
+
}
|
|
20
22
|
const options = args[1];
|
|
21
23
|
// refId: update
|
|
22
24
|
const refIdNew = `${refId}_${hashkey(metadata)}`;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { VonaConfigMeta } from '@cabloy/module-info';
|
|
2
2
|
import type { ConfigLogger, IBeanScopeConfig } from '../../index.ts';
|
|
3
3
|
import type { PowerPartial } from '../utils/powerPartial.ts';
|
|
4
|
-
import type { ConfigInstanceBase } from './instance.ts';
|
|
5
4
|
export interface VonaConfig {
|
|
6
5
|
meta: VonaConfigMeta;
|
|
7
6
|
server: {
|
|
@@ -31,6 +30,5 @@ export interface VonaConfig {
|
|
|
31
30
|
};
|
|
32
31
|
logger: ConfigLogger;
|
|
33
32
|
modules: IBeanScopeConfig;
|
|
34
|
-
instances: ConfigInstanceBase[];
|
|
35
33
|
}
|
|
36
34
|
export type VonaConfigOptional = PowerPartial<VonaConfig>;
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
import type { VonaConfigOptional } from './config.ts';
|
|
2
1
|
export interface IInstanceRecord {
|
|
3
2
|
'': never;
|
|
4
3
|
}
|
|
5
4
|
export interface IHostRecord {
|
|
6
5
|
}
|
|
7
|
-
export interface ConfigInstanceBase {
|
|
8
|
-
name: keyof IInstanceRecord;
|
|
9
|
-
password?: string;
|
|
10
|
-
title?: string;
|
|
11
|
-
config?: VonaConfigOptional;
|
|
12
|
-
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vona-core",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "5.0.
|
|
4
|
+
"version": "5.0.52",
|
|
5
5
|
"description": "vona",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"@cabloy/utils": "^1.0.39",
|
|
36
36
|
"@cabloy/word-utils": "^2.0.1",
|
|
37
37
|
"@cabloy/zod-errors-custom": "^2.0.2",
|
|
38
|
-
"@cabloy/zod-openapi": "^1.0.
|
|
38
|
+
"@cabloy/zod-openapi": "^1.0.2",
|
|
39
39
|
"@cabloy/zod-query": "^2.0.1",
|
|
40
40
|
"@cabloy/zod-to-openapi": "^8.1.1",
|
|
41
41
|
"chalk": "^5.3.0",
|