vona-module-a-openapiutils 5.0.13 → 5.0.14

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.
@@ -7,4 +7,4 @@ export declare const locales: {
7
7
  ZodErrorRequired: string;
8
8
  };
9
9
  };
10
- export declare function $locale<K extends keyof (typeof locales)[TypeLocaleBase]>(key: K): import("vona").ILocaleMagic<`a-openapiutils::${K}`>;
10
+ export declare function $locale<K extends keyof (typeof locales)[TypeLocaleBase]>(key: K, ...args: any[]): import("vona").ILocaleMagic<`a-openapiutils::${K}`>;
package/dist/index.js CHANGED
@@ -1,15 +1,15 @@
1
1
  import { BeanInfo, BeanScopeBase, $makeLocaleMagic, registerMappedClassMetadataKey, appMetadata, appResource, cast, deepExtend, useApp, beanFullNameFromOnionName } from 'vona';
2
+ import { __decorate } from 'tslib';
2
3
  import { Scope } from 'vona-module-a-bean';
3
4
  import { isEmptyObject, isClass, isNil, combineParamsAndQuery } from '@cabloy/utils';
4
5
  import { z } from 'zod';
5
6
  import { ZodMetadata } from '@cabloy/zod-openapi';
6
7
  import { coerceWithNil } from '@cabloy/zod-query';
7
8
 
8
- var _dec, _dec2, _class;
9
- let ScopeModuleAOpenapiutils = (_dec = Scope(), _dec2 = BeanInfo({
9
+ let ScopeModuleAOpenapiutils = class ScopeModuleAOpenapiutils extends BeanScopeBase {};
10
+ ScopeModuleAOpenapiutils = __decorate([Scope(), BeanInfo({
10
11
  module: "a-openapiutils"
11
- }), _dec(_class = _dec2(_class = class ScopeModuleAOpenapiutils extends BeanScopeBase {}) || _class) || _class);
12
-
12
+ })], ScopeModuleAOpenapiutils);
13
13
  /** scope: end */
14
14
 
15
15
  var locale_en_us = {
@@ -24,8 +24,8 @@ const locales = {
24
24
  'en-us': locale_en_us,
25
25
  'zh-cn': locale_zh_cn
26
26
  };
27
- function $locale(key) {
28
- return $makeLocaleMagic(`a-openapiutils::${key}`);
27
+ function $locale(key, ...args) {
28
+ return $makeLocaleMagic(`a-openapiutils::${key}`, ...args);
29
29
  }
30
30
 
31
31
  const OrderCoreBase = 100;
@@ -38,8 +38,6 @@ const SymbolRouteHandlersArgumentsValue = Symbol('SymbolRouteHandlersArgumentsVa
38
38
 
39
39
  const SymbolOpenApiOptions = Symbol('SymbolOpenApiOptions');
40
40
 
41
- // not use z.ZodType
42
-
43
41
  const SymbolDecoratorRule = Symbol('SymbolDecoratorRule');
44
42
 
45
43
  function getTargetDecoratorRules(target, disableRegisterMetadata) {
@@ -75,7 +73,6 @@ function mergeFieldsOpenapiMetadata(target) {
75
73
  mergeFieldOpenapiMetadata(target.prototype, key, field);
76
74
  }
77
75
  }
78
-
79
76
  // fieldRule maybe undefined
80
77
  function mergeFieldOpenapiMetadata(target, prop, fieldRule) {
81
78
  // rules
@@ -463,9 +460,7 @@ function schemaArray(schemaLike, params) {
463
460
  if (typeof val !== 'string') return val;
464
461
  if (val.startsWith('[') && val.endsWith(']')) return JSON.parse(val);
465
462
  return val.split(params?.separator ?? ',');
466
- }, z.array(makeSchemaLike(schemaLike ?? schema, z.any()), params)
467
- // z.array(makeSchemaLike(schemaLike, schema), params),
468
- );
463
+ }, z.array(makeSchemaLike(schemaLike ?? schema, z.any()), params));
469
464
  };
470
465
  }
471
466
  function schemaStrictObject() {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vona-module-a-openapiutils",
3
3
  "type": "module",
4
- "version": "5.0.13",
4
+ "version": "5.0.14",
5
5
  "title": "a-openapiutils",
6
6
  "vonaModule": {
7
7
  "dependencies": {}