vona-core 5.0.128 → 5.0.129
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/index.js
CHANGED
|
@@ -9,6 +9,7 @@ import { compose as compose$1 } from '@cabloy/compose';
|
|
|
9
9
|
import { extend } from '@cabloy/extend';
|
|
10
10
|
import fse from 'fs-extra';
|
|
11
11
|
import * as uuid from 'uuid';
|
|
12
|
+
import 'react';
|
|
12
13
|
import { setLocaleErrors, setLocaleAdapter, translateError } from '@cabloy/zod-errors-custom';
|
|
13
14
|
import { ZodMetadata } from '@cabloy/zod-openapi';
|
|
14
15
|
import { setParseAdapter } from '@cabloy/zod-query';
|
|
@@ -1705,6 +1706,8 @@ function $makeLocaleMagic(str, ...args) {
|
|
|
1705
1706
|
}
|
|
1706
1707
|
};
|
|
1707
1708
|
}
|
|
1709
|
+
|
|
1710
|
+
// not use : ILocaleMagic
|
|
1708
1711
|
function text(strings, ...expressions) {
|
|
1709
1712
|
return {
|
|
1710
1713
|
toString() {
|
|
@@ -3199,19 +3202,23 @@ function zodExtendOpenApi() {
|
|
|
3199
3202
|
z.ZodType.prototype.openapi = function (...args) {
|
|
3200
3203
|
// refId
|
|
3201
3204
|
if (typeof args[0] === 'string') return openapiOriginal.call(this, ...args);
|
|
3202
|
-
|
|
3203
|
-
if (!refId) return openapiOriginal.call(this, ...args);
|
|
3204
|
-
// metadata
|
|
3205
|
+
// metadata/options
|
|
3205
3206
|
const metadata = args[0];
|
|
3207
|
+
const options = args[1];
|
|
3208
|
+
// metadata
|
|
3206
3209
|
if (isEmptyObject(metadata)) {
|
|
3207
3210
|
return this;
|
|
3208
3211
|
// return openapiOriginal.call(this, ...args);
|
|
3209
3212
|
}
|
|
3210
|
-
const options = args[1];
|
|
3211
|
-
// refId: update
|
|
3212
|
-
const refIdNew = `${refId}_${hashkey(metadata)}`;
|
|
3213
3213
|
const metadataOld = ZodMetadata.getOpenapiMetadata(this);
|
|
3214
3214
|
const metadataNew = deepExtend({}, metadataOld, metadata);
|
|
3215
|
+
// refId
|
|
3216
|
+
const refId = ZodMetadata.getRefId(this);
|
|
3217
|
+
if (!refId) {
|
|
3218
|
+
return openapiOriginal.call(this, metadataNew, options);
|
|
3219
|
+
}
|
|
3220
|
+
// refId: update
|
|
3221
|
+
const refIdNew = `${refId}_${hashkey(metadata)}`;
|
|
3215
3222
|
return openapiOriginal.call(this, refIdNew, metadataNew, options);
|
|
3216
3223
|
};
|
|
3217
3224
|
}
|
|
@@ -2,5 +2,5 @@ import type { IBeanScopeLocale } from '../../type.ts';
|
|
|
2
2
|
import type { ILocaleMagic } from './type.ts';
|
|
3
3
|
export declare function $localeScope<M extends keyof IBeanScopeLocale, K extends keyof IBeanScopeLocale[M]>(moduleName: M, key: K, ...args: any[]): ILocaleMagic<`${M}::${K extends string ? K : never}`>;
|
|
4
4
|
export declare function $makeLocaleMagic<T extends string>(str: T, ...args: any[]): ILocaleMagic<T>;
|
|
5
|
-
export declare function text(strings: any, ...expressions: any):
|
|
5
|
+
export declare function text(strings: any, ...expressions: any): any;
|
|
6
6
|
export declare function isLocaleMagic(str: string | object): any;
|
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.129",
|
|
5
5
|
"description": "vona",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -32,15 +32,17 @@
|
|
|
32
32
|
"@cabloy/module-info": "^1.3.37",
|
|
33
33
|
"@cabloy/module-info-pro": "^1.0.44",
|
|
34
34
|
"@cabloy/type-fest": "^5.3.1",
|
|
35
|
-
"@cabloy/utils": "^2.0.
|
|
35
|
+
"@cabloy/utils": "^2.0.16",
|
|
36
36
|
"@cabloy/word-utils": "^2.0.2",
|
|
37
37
|
"@cabloy/zod-errors-custom": "^2.0.6",
|
|
38
38
|
"@cabloy/zod-openapi": "^1.0.8",
|
|
39
39
|
"@cabloy/zod-query": "^2.0.4",
|
|
40
40
|
"@cabloy/zod-to-openapi": "^8.1.5",
|
|
41
|
+
"@types/react": "^19.2.7",
|
|
41
42
|
"chalk": "^5.3.0",
|
|
42
43
|
"fs-extra": "^10.1.0",
|
|
43
44
|
"koa": "^3.0.0",
|
|
45
|
+
"react": "^19.2.3",
|
|
44
46
|
"reflect-metadata": "^0.2.2",
|
|
45
47
|
"retry": "^0.13.1",
|
|
46
48
|
"triple-beam": "^1.4.1",
|