@aomex/core
Advanced tools
Comparing version 1.0.3 to 1.0.4
# @aomex/core | ||
## 1.0.4 | ||
### Patch Changes | ||
- [`c860c2d`](https://github.com/aomex/aomex/commit/c860c2dbec0f9d442816ea5f2ca9b72e8e06e8c7) Thanks [@geekact](https://github.com/geekact)! - chore(core): 最低node版本为20.13.0 | ||
- [`a1a1787`](https://github.com/aomex/aomex/commit/a1a1787c791bf113c7e87e4435ea364eb8ce8eb8) Thanks [@geekact](https://github.com/geekact)! - refactor: 使用node内置的 util.styleText 替换 chalk 包 | ||
- [`42447fb`](https://github.com/aomex/aomex/commit/42447fb9d3916c4d6242841d1fa3eab67e48be70) Thanks [@geekact](https://github.com/geekact)! - refactor(core): 重命名I18nFormat为I18nMessage | ||
- Updated dependencies [[`a1a1787`](https://github.com/aomex/aomex/commit/a1a1787c791bf113c7e87e4435ea364eb8ce8eb8)]: | ||
- @aomex/internal-tools@1.0.4 | ||
## 1.0.3 | ||
@@ -4,0 +17,0 @@ |
@@ -7,4 +7,4 @@ import { OpenAPIV3 } from 'openapi-types'; | ||
declare abstract class I18nFormat<Args extends object | unknown = unknown> { | ||
protected readonly __i18n_format_string__: 'i18n-format'; | ||
declare abstract class I18nMessage<Args extends object | unknown = unknown> { | ||
protected readonly __i18n_message__: 'i18n-message'; | ||
protected readonly generic: Args; | ||
@@ -53,3 +53,3 @@ } | ||
type GetContent<T extends object> = { | ||
[K in keyof T]: T[K] extends I18nFormat<infer R> ? string | { | ||
[K in keyof T]: T[K] extends I18nMessage<infer R> ? string | { | ||
message: string; | ||
@@ -62,3 +62,3 @@ args: { | ||
type GetPartialContent<T extends object> = { | ||
[K in keyof T]?: T[K] extends I18nFormat<infer R> ? string | { | ||
[K in keyof T]?: T[K] extends I18nMessage<infer R> ? string | { | ||
message: string; | ||
@@ -71,6 +71,6 @@ args: { | ||
type GetKeys<T extends object> = { | ||
[K in keyof T]: K extends string ? T[K] extends object ? T[K] extends I18nFormat ? K : `${K}.${GetKeys<T[K]>}` : K : never; | ||
[K in keyof T]: K extends string ? T[K] extends object ? T[K] extends I18nMessage ? K : `${K}.${GetKeys<T[K]>}` : K : never; | ||
}[keyof T]; | ||
type GetArgs<T extends object, MatchKey extends string, Parent extends string = ''> = { | ||
[K in keyof T]: K extends string ? T[K] extends object ? T[K] extends I18nFormat<infer R> ? CombineKey<Parent, K> extends MatchKey ? R : never : GetArgs<T[K], MatchKey, CombineKey<Parent, K>> : never : never; | ||
[K in keyof T]: K extends string ? T[K] extends object ? T[K] extends I18nMessage<infer R> ? CombineKey<Parent, K> extends MatchKey ? R : never : GetArgs<T[K], MatchKey, CombineKey<Parent, K>> : never : never; | ||
}[keyof T]; | ||
@@ -84,11 +84,11 @@ type CombineKey<Parent extends string, Key extends string> = `${Parent}${'' extends Parent ? '' : '.'}${Key}`; | ||
validator: { | ||
required: I18nFormat<{ | ||
required: I18nMessage<{ | ||
label: string; | ||
}>; | ||
validation_failed: I18nFormat; | ||
validation_failed: I18nMessage; | ||
array: { | ||
must_be_array: I18nFormat<{ | ||
must_be_array: I18nMessage<{ | ||
label: string; | ||
}>; | ||
length_not_in_range: I18nFormat<{ | ||
length_not_in_range: I18nMessage<{ | ||
label: string; | ||
@@ -98,3 +98,3 @@ }>; | ||
boolean: { | ||
must_be_boolean: I18nFormat<{ | ||
must_be_boolean: I18nMessage<{ | ||
label: string; | ||
@@ -104,3 +104,3 @@ }>; | ||
buffer: { | ||
must_be_buffer: I18nFormat<{ | ||
must_be_buffer: I18nMessage<{ | ||
label: string; | ||
@@ -110,3 +110,3 @@ }>; | ||
stream: { | ||
must_be_stream: I18nFormat<{ | ||
must_be_stream: I18nMessage<{ | ||
label: string; | ||
@@ -116,6 +116,6 @@ }>; | ||
dateTime: { | ||
must_be_date: I18nFormat<{ | ||
must_be_date: I18nMessage<{ | ||
label: string; | ||
}>; | ||
not_in_range: I18nFormat<{ | ||
not_in_range: I18nMessage<{ | ||
label: string; | ||
@@ -125,12 +125,12 @@ }>; | ||
number: { | ||
must_be_number: I18nFormat<{ | ||
must_be_number: I18nMessage<{ | ||
label: string; | ||
}>; | ||
must_be_integer: I18nFormat<{ | ||
must_be_integer: I18nMessage<{ | ||
label: string; | ||
}>; | ||
must_be_bigint: I18nFormat<{ | ||
must_be_bigint: I18nMessage<{ | ||
label: string; | ||
}>; | ||
not_in_range: I18nFormat<{ | ||
not_in_range: I18nMessage<{ | ||
label: string; | ||
@@ -140,26 +140,26 @@ }>; | ||
string: { | ||
must_be_string: I18nFormat<{ | ||
must_be_string: I18nMessage<{ | ||
label: string; | ||
}>; | ||
must_be_email: I18nFormat<{ | ||
must_be_email: I18nMessage<{ | ||
label: string; | ||
}>; | ||
must_be_hash: I18nFormat<{ | ||
must_be_hash: I18nMessage<{ | ||
label: string; | ||
}>; | ||
must_be_ulid: I18nFormat<{ | ||
must_be_ulid: I18nMessage<{ | ||
label: string; | ||
}>; | ||
must_be_uuid: I18nFormat<{ | ||
must_be_uuid: I18nMessage<{ | ||
label: string; | ||
versions: string; | ||
}>; | ||
must_be_ip: I18nFormat<{ | ||
must_be_ip: I18nMessage<{ | ||
label: string; | ||
versions: string; | ||
}>; | ||
length_not_in_range: I18nFormat<{ | ||
length_not_in_range: I18nMessage<{ | ||
label: string; | ||
}>; | ||
not_match_pattern: I18nFormat<{ | ||
not_match_pattern: I18nMessage<{ | ||
label: string; | ||
@@ -169,6 +169,6 @@ }>; | ||
url: { | ||
must_be_url: I18nFormat<{ | ||
must_be_url: I18nMessage<{ | ||
label: string; | ||
}>; | ||
unsupported_scheme: I18nFormat<{ | ||
unsupported_scheme: I18nMessage<{ | ||
label: string; | ||
@@ -179,3 +179,3 @@ scheme: string; | ||
object: { | ||
must_be_object: I18nFormat<{ | ||
must_be_object: I18nMessage<{ | ||
label: string; | ||
@@ -185,7 +185,7 @@ }>; | ||
enum: { | ||
not_in_range: I18nFormat<{ | ||
not_in_range: I18nMessage<{ | ||
label: string; | ||
}>; | ||
only_support_string_number: I18nFormat; | ||
can_not_be_empty: I18nFormat<{ | ||
only_support_string_number: I18nMessage; | ||
can_not_be_empty: I18nMessage<{ | ||
item: any; | ||
@@ -195,3 +195,3 @@ }>; | ||
one_of: { | ||
not_match_rule: I18nFormat<{ | ||
not_match_rule: I18nMessage<{ | ||
label: string; | ||
@@ -202,3 +202,3 @@ }>; | ||
middleware: { | ||
call_next_multiple: I18nFormat; | ||
call_next_multiple: I18nMessage; | ||
}; | ||
@@ -1075,2 +1075,2 @@ }; | ||
export { AnyValidator, ArrayValidator, BaseNumberValidator, BaseStringValidator, BigIntValidator, BooleanValidator, BufferValidator, type CombinedServices, type ComposeFn, DateTimeValidator, EmailValidator, EnumValidator, HashValidator, I18n, I18nFormat, IntValidator, IpValidator, type MiddleWareToken, Middleware, MiddlewareChain, type MiddlewareChainPlatform, type MiddlewarePlatform, MixinMiddleware, MixinMiddlewareChain, type MixinMiddlewareToken, type Next, NumberValidator, ObjectValidator, OneOfValidator, Rule, Service, StreamValidator, StringValidator, type TransformedValidator, UlidValidator, UrlValidator, UuidValidator, Validator, ValidatorError, type ValidatorToken, combineServices, compose, flattenMiddlewareToken, i18n, magistrate, mdchain, middleware, rule, toValidator, validate }; | ||
export { AnyValidator, ArrayValidator, BaseNumberValidator, BaseStringValidator, BigIntValidator, BooleanValidator, BufferValidator, type CombinedServices, type ComposeFn, DateTimeValidator, EmailValidator, EnumValidator, HashValidator, I18n, I18nMessage, IntValidator, IpValidator, type MiddleWareToken, Middleware, MiddlewareChain, type MiddlewareChainPlatform, type MiddlewarePlatform, MixinMiddleware, MixinMiddlewareChain, type MixinMiddlewareToken, type Next, NumberValidator, ObjectValidator, OneOfValidator, Rule, Service, StreamValidator, StringValidator, type TransformedValidator, UlidValidator, UrlValidator, UuidValidator, Validator, ValidatorError, type ValidatorToken, combineServices, compose, flattenMiddlewareToken, i18n, magistrate, mdchain, middleware, rule, toValidator, validate }; |
@@ -1,3 +0,3 @@ | ||
// src/i18n/i18n-format.ts | ||
var I18nFormat = class { | ||
// src/i18n/i18n-message.ts | ||
var I18nMessage = class { | ||
}; | ||
@@ -1603,3 +1603,3 @@ | ||
I18n, | ||
I18nFormat, | ||
I18nMessage, | ||
IntValidator, | ||
@@ -1606,0 +1606,0 @@ IpValidator, |
{ | ||
"name": "@aomex/core", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "aomex核心库", | ||
@@ -29,3 +29,3 @@ "type": "module", | ||
"engines": { | ||
"node": "^20.9.0 || ^22" | ||
"node": "^20.13.0 || ^22" | ||
}, | ||
@@ -40,5 +40,5 @@ "peerDependencies": { | ||
"openapi-types": "^12.1.3", | ||
"@aomex/internal-tools": "^1.0.3" | ||
"@aomex/internal-tools": "^1.0.4" | ||
}, | ||
"scripts": {} | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
208974
Updated@aomex/internal-tools@^1.0.4