@leyyo/common 1.0.4 → 1.0.6
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/assertion/common-assertion.d.ts +54 -0
- package/dist/assertion/common-assertion.js +180 -0
- package/dist/assertion/common-assertion.js.map +1 -0
- package/dist/assertion/index-types.d.ts +154 -159
- package/dist/assertion/index-types.js +1 -0
- package/dist/assertion/index-types.js.map +1 -0
- package/dist/assertion/index.d.ts +0 -1
- package/dist/assertion/index.js +1 -1
- package/dist/assertion/index.js.map +1 -0
- package/dist/descriptor/common-descriptor.d.ts +19 -0
- package/dist/descriptor/common-descriptor.js +92 -0
- package/dist/descriptor/common-descriptor.js.map +1 -0
- package/dist/descriptor/index-types.d.ts +21 -0
- package/dist/{literal → descriptor}/index-types.js +1 -0
- package/dist/descriptor/index-types.js.map +1 -0
- package/dist/descriptor/index.d.ts +1 -0
- package/dist/{storage → descriptor}/index.js +1 -1
- package/dist/descriptor/index.js.map +1 -0
- package/dist/developer/common-developer.d.ts +29 -0
- package/dist/developer/common-developer.js +266 -0
- package/dist/developer/common-developer.js.map +1 -0
- package/dist/developer/index-types.d.ts +77 -0
- package/dist/{storage → developer}/index-types.js +1 -0
- package/dist/developer/index-types.js.map +1 -0
- package/dist/developer/index.d.ts +1 -0
- package/dist/developer/index.js +18 -0
- package/dist/developer/index.js.map +1 -0
- package/dist/error/{common-error-impl.d.ts → common-error.d.ts} +5 -5
- package/dist/error/common-error.js +104 -0
- package/dist/error/common-error.js.map +1 -0
- package/dist/error/index-types.d.ts +21 -2
- package/dist/error/index-types.js +1 -0
- package/dist/error/index-types.js.map +1 -0
- package/dist/error/index.d.ts +0 -1
- package/dist/error/index.js +1 -1
- package/dist/error/index.js.map +1 -0
- package/dist/exception/assertion-exception.d.ts +2 -2
- package/dist/exception/assertion-exception.js +3 -2
- package/dist/exception/assertion-exception.js.map +1 -0
- package/dist/exception/caused-exception.d.ts +2 -2
- package/dist/exception/caused-exception.js +3 -2
- package/dist/exception/caused-exception.js.map +1 -0
- package/dist/exception/developer-exception.d.ts +2 -2
- package/dist/exception/developer-exception.js +3 -2
- package/dist/exception/developer-exception.js.map +1 -0
- package/dist/exception/exception.d.ts +7 -5
- package/dist/exception/exception.js +14 -4
- package/dist/exception/exception.js.map +1 -0
- package/dist/exception/index-types.d.ts +1 -1
- package/dist/exception/index-types.js +1 -0
- package/dist/exception/index-types.js.map +1 -0
- package/dist/exception/index.d.ts +1 -0
- package/dist/exception/index.js +2 -0
- package/dist/exception/index.js.map +1 -0
- package/dist/exception/invalid-value-exception.d.ts +5 -0
- package/dist/exception/invalid-value-exception.js +12 -0
- package/dist/exception/invalid-value-exception.js.map +1 -0
- package/dist/exception/multiple-exception.js +1 -0
- package/dist/exception/multiple-exception.js.map +1 -0
- package/dist/fqn/common-fqn.d.ts +20 -0
- package/dist/fqn/common-fqn.js +116 -0
- package/dist/fqn/common-fqn.js.map +1 -0
- package/dist/fqn/index-types.d.ts +14 -5
- package/dist/fqn/index-types.js +1 -0
- package/dist/fqn/index-types.js.map +1 -0
- package/dist/fqn/index.d.ts +0 -1
- package/dist/fqn/index.js +1 -1
- package/dist/fqn/index.js.map +1 -0
- package/dist/hook/{common-hook-impl.d.ts → common-hook.d.ts} +12 -10
- package/dist/hook/{common-hook-impl.js → common-hook.js} +27 -21
- package/dist/hook/common-hook.js.map +1 -0
- package/dist/hook/index-types.d.ts +29 -14
- package/dist/hook/index-types.js +1 -0
- package/dist/hook/index-types.js.map +1 -0
- package/dist/hook/index.d.ts +0 -1
- package/dist/hook/index.js +1 -1
- package/dist/hook/index.js.map +1 -0
- package/dist/index.d.ts +27 -11
- package/dist/index.js +30 -20
- package/dist/index.js.map +1 -0
- package/dist/internal.d.ts +2 -0
- package/dist/internal.js +4 -1
- package/dist/internal.js.map +1 -0
- package/dist/is/{common-is-impl.d.ts → common-is.d.ts} +19 -5
- package/dist/is/common-is.js +136 -0
- package/dist/is/common-is.js.map +1 -0
- package/dist/is/index-types.d.ts +48 -3
- package/dist/is/index-types.js +1 -0
- package/dist/is/index-types.js.map +1 -0
- package/dist/is/index.d.ts +0 -1
- package/dist/is/index.js +1 -1
- package/dist/is/index.js.map +1 -0
- package/dist/leyyo/index-types.d.ts +30 -17
- package/dist/leyyo/index-types.js +1 -0
- package/dist/leyyo/index-types.js.map +1 -0
- package/dist/leyyo/index.d.ts +1 -1
- package/dist/leyyo/index.js +2 -1
- package/dist/leyyo/index.js.map +1 -0
- package/dist/leyyo/leyyo-common-hook.d.ts +10 -0
- package/dist/leyyo/leyyo-common-hook.js +18 -0
- package/dist/leyyo/leyyo-common-hook.js.map +1 -0
- package/dist/leyyo/leyyo.d.ts +35 -0
- package/dist/leyyo/leyyo.js +77 -0
- package/dist/leyyo/leyyo.js.map +1 -0
- package/dist/log/common-log.d.ts +14 -0
- package/dist/log/common-log.js +92 -0
- package/dist/log/common-log.js.map +1 -0
- package/dist/log/index-types.d.ts +57 -3
- package/dist/log/index-types.js +1 -0
- package/dist/log/index-types.js.map +1 -0
- package/dist/log/index.d.ts +2 -2
- package/dist/log/index.js +3 -2
- package/dist/log/index.js.map +1 -0
- package/dist/log/logger-instance.d.ts +31 -0
- package/dist/log/logger-instance.js +114 -0
- package/dist/log/logger-instance.js.map +1 -0
- package/dist/{literal → log}/severity.js +1 -0
- package/dist/log/severity.js.map +1 -0
- package/dist/repo/common-repo.d.ts +44 -0
- package/dist/repo/common-repo.js +180 -0
- package/dist/repo/common-repo.js.map +1 -0
- package/dist/repo/index-types.d.ts +104 -0
- package/dist/{shared/index-aliases.js → repo/index-types.js} +1 -2
- package/dist/repo/index-types.js.map +1 -0
- package/dist/repo/index.d.ts +2 -0
- package/dist/repo/index.js +19 -0
- package/dist/repo/index.js.map +1 -0
- package/dist/repo/repo-type.d.ts +8 -0
- package/dist/repo/repo-type.js +8 -0
- package/dist/repo/repo-type.js.map +1 -0
- package/dist/server.d.ts +1 -0
- package/dist/server.js +5 -0
- package/dist/server.js.map +1 -0
- package/dist/shared/index-types.d.ts +162 -132
- package/dist/shared/index-types.js +2 -1
- package/dist/shared/index-types.js.map +1 -0
- package/dist/shared/index.d.ts +0 -4
- package/dist/shared/index.js +1 -4
- package/dist/shared/index.js.map +1 -0
- package/dist/system/common-system.d.ts +10 -0
- package/dist/system/common-system.js +65 -0
- package/dist/system/common-system.js.map +1 -0
- package/dist/{literal → system}/country-code.js +1 -0
- package/dist/system/country-code.js.map +1 -0
- package/dist/{literal → system}/environment.js +1 -0
- package/dist/system/environment.js.map +1 -0
- package/dist/{literal → system}/http-method.js +1 -0
- package/dist/system/http-method.js.map +1 -0
- package/dist/{literal → system}/http-place.js +1 -0
- package/dist/system/http-place.js.map +1 -0
- package/dist/system/index-types.d.ts +6 -0
- package/dist/system/index-types.js +3 -0
- package/dist/system/index-types.js.map +1 -0
- package/dist/{literal → system}/index.d.ts +1 -8
- package/dist/{literal → system}/index.js +2 -8
- package/dist/system/index.js.map +1 -0
- package/dist/{literal → system}/language-code.js +1 -0
- package/dist/system/language-code.js.map +1 -0
- package/dist/{literal → system}/locale-code.js +1 -0
- package/dist/system/locale-code.js.map +1 -0
- package/dist/{literal → system}/sys-class.js +1 -0
- package/dist/system/sys-class.js.map +1 -0
- package/dist/{literal → system}/sys-function.js +1 -0
- package/dist/system/sys-function.js.map +1 -0
- package/dist/to/common-to.d.ts +45 -0
- package/dist/to/common-to.js +868 -0
- package/dist/to/common-to.js.map +1 -0
- package/dist/to/index-types.d.ts +38 -18
- package/dist/to/index-types.js +1 -0
- package/dist/to/index-types.js.map +1 -0
- package/dist/to/index.d.ts +6 -1
- package/dist/to/index.js +7 -1
- package/dist/to/index.js.map +1 -0
- package/dist/{literal → to}/key-value.js +1 -0
- package/dist/to/key-value.js.map +1 -0
- package/dist/{shared → to}/list.d.ts +1 -0
- package/dist/{shared → to}/list.js +4 -0
- package/dist/to/list.js.map +1 -0
- package/dist/{literal → to}/primitive.js +1 -0
- package/dist/to/primitive.js.map +1 -0
- package/dist/{literal → to}/real-value.js +1 -0
- package/dist/to/real-value.js.map +1 -0
- package/dist/{literal → to}/weak-false.js +1 -0
- package/dist/to/weak-false.js.map +1 -0
- package/dist/{literal → to}/weak-true.js +1 -0
- package/dist/to/weak-true.js.map +1 -0
- package/dist/wrapper/common-wrapper.d.ts +26 -0
- package/dist/wrapper/common-wrapper.js +81 -0
- package/dist/wrapper/common-wrapper.js.map +1 -0
- package/dist/wrapper/index-types.d.ts +29 -0
- package/dist/wrapper/index-types.js +3 -0
- package/dist/wrapper/index-types.js.map +1 -0
- package/dist/wrapper/index.d.ts +2 -0
- package/dist/wrapper/index.js +19 -0
- package/dist/wrapper/index.js.map +1 -0
- package/dist/wrapper/wrap.d.ts +7 -0
- package/dist/wrapper/wrap.js +11 -0
- package/dist/wrapper/wrap.js.map +1 -0
- package/package.json +13 -15
- package/dist/assertion/common-assertion-impl.d.ts +0 -65
- package/dist/assertion/common-assertion-impl.js +0 -248
- package/dist/error/common-error-impl.js +0 -92
- package/dist/fqn/common-fqn-impl.d.ts +0 -18
- package/dist/fqn/common-fqn-impl.js +0 -121
- package/dist/is/common-is-impl.js +0 -91
- package/dist/leyyo/leyyo-impl.d.ts +0 -26
- package/dist/leyyo/leyyo-impl.js +0 -94
- package/dist/literal/index-types.d.ts +0 -6
- package/dist/literal/storage-type.d.ts +0 -8
- package/dist/literal/storage-type.js +0 -7
- package/dist/log/common-log-impl.d.ts +0 -14
- package/dist/log/common-log-impl.js +0 -59
- package/dist/log/logger-impl.d.ts +0 -23
- package/dist/log/logger-impl.js +0 -77
- package/dist/shared/assert.d.ts +0 -6
- package/dist/shared/assert.js +0 -14
- package/dist/shared/index-aliases.d.ts +0 -167
- package/dist/shared/index-constants.d.ts +0 -8
- package/dist/shared/index-constants.js +0 -11
- package/dist/storage/common-storage-impl.d.ts +0 -47
- package/dist/storage/common-storage-impl.js +0 -150
- package/dist/storage/index-types.d.ts +0 -87
- package/dist/storage/index.d.ts +0 -2
- package/dist/to/common-to-impl.d.ts +0 -38
- package/dist/to/common-to-impl.js +0 -553
- /package/dist/{literal → log}/severity.d.ts +0 -0
- /package/dist/{literal → system}/country-code.d.ts +0 -0
- /package/dist/{literal → system}/environment.d.ts +0 -0
- /package/dist/{literal → system}/http-method.d.ts +0 -0
- /package/dist/{literal → system}/http-place.d.ts +0 -0
- /package/dist/{literal → system}/language-code.d.ts +0 -0
- /package/dist/{literal → system}/locale-code.d.ts +0 -0
- /package/dist/{literal → system}/sys-class.d.ts +0 -0
- /package/dist/{literal → system}/sys-function.d.ts +0 -0
- /package/dist/{literal → to}/key-value.d.ts +0 -0
- /package/dist/{literal → to}/primitive.d.ts +0 -0
- /package/dist/{literal → to}/real-value.d.ts +0 -0
- /package/dist/{literal → to}/weak-false.d.ts +0 -0
- /package/dist/{literal → to}/weak-true.d.ts +0 -0
|
@@ -1,142 +1,172 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import { LanguageCode, LocaleCode } from "../system";
|
|
2
|
+
export type BasicType = 'undefined' | 'string' | 'object' | 'number' | 'boolean' | 'function' | 'symbol' | 'bigint';
|
|
3
|
+
export type Dict<T = any> = Record<KeyValue, T>;
|
|
4
|
+
export type Arr<T = any> = Array<T>;
|
|
5
|
+
export type KeyValue = string | number;
|
|
6
|
+
export type Id = string | number;
|
|
7
|
+
export type Unknown = unknown;
|
|
8
|
+
export type Integer = number;
|
|
9
|
+
export type Float = number;
|
|
10
|
+
export type Boolean = boolean;
|
|
11
|
+
export type Enum = string;
|
|
12
|
+
export type Alpha = string;
|
|
13
|
+
export type String = string;
|
|
14
|
+
export type Digit = string;
|
|
15
|
+
export type Title = string;
|
|
16
|
+
export type Description = string;
|
|
17
|
+
export type RichText = string;
|
|
18
|
+
export type Uuid = string;
|
|
19
|
+
export type Host = string;
|
|
20
|
+
export type Url = string;
|
|
21
|
+
export type Email = string;
|
|
22
|
+
export type Folder = string;
|
|
23
|
+
export type Timestamp = number;
|
|
24
|
+
export type IsoDatetime = string;
|
|
25
|
+
export type IsoDate = string;
|
|
26
|
+
export type IsoTime = string;
|
|
27
|
+
interface _Func {
|
|
28
|
+
readonly name?: string;
|
|
29
|
+
readonly length?: number;
|
|
30
|
+
bind(thisArg: any, ...args: Array<any>): any;
|
|
31
|
+
apply(thisArg: any, args: Array<any>): any;
|
|
32
|
+
call(thisArg: any, ...args: Array<any>): any;
|
|
33
|
+
}
|
|
34
|
+
export interface Fnc<R = any> extends _Func {
|
|
35
|
+
(...args: Array<any>): R;
|
|
36
|
+
}
|
|
37
|
+
export interface AsyncFnc<R = any> extends _Func {
|
|
38
|
+
(...args: Array<any>): Promise<R>;
|
|
39
|
+
}
|
|
40
|
+
export type Func<R = any> = Function | Fnc<R>;
|
|
41
|
+
export type Async<R = any> = Function | AsyncFnc<R>;
|
|
42
|
+
export interface ClassLike<T = {}> extends _Func {
|
|
43
|
+
new (...args: Array<any>): T;
|
|
13
44
|
}
|
|
14
|
-
type AssertionReason = 'invalid.type' | 'not.found' | 'duplicated' | 'empty';
|
|
15
|
-
export type AssertionCallback = () => string | AssertionOpt;
|
|
16
|
-
export interface AssertionBuiltResult {
|
|
17
|
-
message?: string;
|
|
18
|
-
params: AssertionOpt;
|
|
19
|
-
}
|
|
20
|
-
export interface HookAttachedCallback {
|
|
21
|
-
initialization?: true;
|
|
22
|
-
fn: Function;
|
|
23
|
-
}
|
|
24
|
-
export interface $HookDefinedProvider extends HookDefinedProvider {
|
|
25
|
-
producer: Function;
|
|
26
|
-
}
|
|
27
|
-
export interface HookDefinedProvider {
|
|
28
|
-
proper: boolean;
|
|
29
|
-
}
|
|
30
|
-
export interface HookWaitingProviderItem {
|
|
31
|
-
consumer: Function;
|
|
32
|
-
callback: HookDefinedProviderLambda;
|
|
33
|
-
}
|
|
34
|
-
export type HookDefinedProviderLambda<T extends HookDefinedProvider = HookDefinedProvider> = (instance: T) => void;
|
|
35
|
-
export interface FqnDefinedProvider extends HookDefinedProvider {
|
|
36
|
-
exists(target: any): boolean;
|
|
37
|
-
name(target: any): string;
|
|
38
|
-
register(name: string, target: any, type: FqnStereoType, pckName: string): void;
|
|
39
|
-
}
|
|
40
|
-
export type FqnStereoType = 'class' | 'function' | 'enum' | 'literal';
|
|
41
|
-
export type CommonFqnHook = (name: string) => void;
|
|
42
|
-
export interface ErrorDefinedProvider extends HookDefinedProvider {
|
|
43
|
-
register(exception: ExceptionLike): void;
|
|
44
|
-
build?(e: Error | string): ExceptionLike;
|
|
45
|
-
afterCreate?(e: ExceptionLike): void;
|
|
46
|
-
causedBy?(e: Error | string): ExceptionLike;
|
|
47
|
-
initSign?(err: Error): boolean;
|
|
48
|
-
addSign?(err: Error, ...keys: Array<string>): boolean;
|
|
49
|
-
getSign?(err: Error): Array<string>;
|
|
50
|
-
removeSign?(err: Error, ...keys: Array<string>): boolean;
|
|
51
|
-
hasSign?(err: Error, key: string): boolean;
|
|
52
|
-
toObject?(e: Error, ...omittedFields: Array<string>): Dict;
|
|
53
|
-
buildStack?(e: Error): void;
|
|
54
|
-
copyStack?(exception: Exception, error: Error): void;
|
|
55
|
-
initOmit?(clz: Function): boolean;
|
|
56
|
-
addOmit?(clz: Function, ...properties: Array<string>): boolean;
|
|
57
|
-
getOmit?(clz: Function): Array<string>;
|
|
58
|
-
inheritOmit?(clz: Function): Array<string>;
|
|
59
|
-
}
|
|
60
|
-
export interface LogDefinedProvider extends HookDefinedProvider {
|
|
61
|
-
create?(clazz: Object | Function | string): Logger;
|
|
62
|
-
apply?(line: LogLine): void;
|
|
63
|
-
check?<T>(line: LogLineEnhanced<T>): void;
|
|
64
|
-
print<T>(line: LogLineEnhanced<T>): void;
|
|
65
|
-
}
|
|
66
|
-
export interface LogConsumer {
|
|
67
|
-
apply(line: LogLine): void;
|
|
68
|
-
}
|
|
69
|
-
export interface LogLine {
|
|
70
|
-
severity: Severity;
|
|
71
|
-
message: string | Error;
|
|
72
|
-
holder?: string;
|
|
73
|
-
params?: Dict;
|
|
74
|
-
}
|
|
75
|
-
export interface LogLineEnhanced<L = Dict> extends LogLine {
|
|
76
|
-
time?: Date;
|
|
77
|
-
locals?: L;
|
|
78
|
-
}
|
|
79
|
-
export interface Logger extends ShiftSecure<LoggerSecure> {
|
|
80
|
-
error(message: string, params?: any): void;
|
|
81
|
-
error(error: Error, params?: any): void;
|
|
82
|
-
error(whatever: any, params?: any): void;
|
|
83
|
-
warn(message: string, params?: any): void;
|
|
84
|
-
warn(error: Error, params?: any): void;
|
|
85
|
-
warn(whatever: any, params?: any): void;
|
|
86
|
-
info(message: string, params?: any): void;
|
|
87
|
-
info(error: Error, params?: any): void;
|
|
88
|
-
info(whatever: any, params?: any): void;
|
|
89
|
-
log(message: string, params?: any): void;
|
|
90
|
-
log(error: Error, params?: any): void;
|
|
91
|
-
log(whatever: any, params?: any): void;
|
|
92
|
-
trace(message: string, params?: any): void;
|
|
93
|
-
trace(error: Error, params?: any): void;
|
|
94
|
-
trace(whatever: any, params?: any): void;
|
|
95
|
-
debug(message: string, params?: any): void;
|
|
96
|
-
debug(error: Error, params?: any): void;
|
|
97
|
-
debug(whatever: any, params?: any): void;
|
|
98
|
-
}
|
|
99
|
-
export interface LoggerSecure extends ShiftMain<Logger> {
|
|
100
|
-
get $clazz(): Function;
|
|
101
|
-
get $name(): string;
|
|
102
|
-
$assert(error: Error, indicator: string, params?: unknown): void;
|
|
103
|
-
$setMethod(method: Severity, lambda?: LoggerLambda): void;
|
|
104
|
-
}
|
|
105
|
-
export type LoggerLambda = (whatever: any, params?: any) => void;
|
|
106
45
|
/**
|
|
107
|
-
*
|
|
46
|
+
* Serialized version of another type
|
|
47
|
+
*/
|
|
48
|
+
export type Serialized<T> = {
|
|
49
|
+
[P in keyof T]: T[P];
|
|
50
|
+
};
|
|
51
|
+
export type ClassOrName = ClassLike | string;
|
|
52
|
+
export type FuncOrName = Function | string;
|
|
53
|
+
/**
|
|
54
|
+
* Referenced from Object
|
|
108
55
|
* */
|
|
109
|
-
export type
|
|
56
|
+
export type Obj = Object & {};
|
|
57
|
+
export interface Abstract<T> extends Function {
|
|
58
|
+
prototype: T;
|
|
59
|
+
}
|
|
60
|
+
export interface Entity<I extends Id = Uuid> {
|
|
61
|
+
id?: I;
|
|
62
|
+
}
|
|
63
|
+
export interface Pair<I extends Id = Uuid> extends Entity<I> {
|
|
64
|
+
name?: string;
|
|
65
|
+
}
|
|
66
|
+
export type TypeOfMethod<T, M extends keyof T> = T[M] extends Function ? T[M] : never;
|
|
67
|
+
export type KeyOf<T> = keyof T;
|
|
68
|
+
export type Keys<T> = Array<keyof T>;
|
|
69
|
+
export type ValueOf<T> = T[KeyOf<T>];
|
|
70
|
+
export type Values<T> = Array<T[KeyOf<T>]>;
|
|
71
|
+
export type MaximumOneOf<T, K extends keyof T = keyof T> = K extends keyof T ? {
|
|
72
|
+
[P in K]: T[K];
|
|
73
|
+
} & Partial<Record<Exclude<keyof T, K>, never>> : never;
|
|
74
|
+
export type OneOf<Obj> = ValueOf<OneOfByKey<Obj>>;
|
|
75
|
+
export type Xor<A, B> = XorIn<A & {
|
|
76
|
+
[K in keyof B]?: undefined;
|
|
77
|
+
}> | XorIn<B & {
|
|
78
|
+
[K in keyof A]?: undefined;
|
|
79
|
+
}>;
|
|
80
|
+
export type Mutable<A> = {
|
|
81
|
+
-readonly [K in keyof A]: A[K];
|
|
82
|
+
};
|
|
83
|
+
export type OneOrMore<T> = T | Array<T>;
|
|
84
|
+
export type ValueOrCallback<T> = T | ValueCallback<T>;
|
|
85
|
+
type ValueCallback<T> = () => T;
|
|
86
|
+
export type SameType<A, T> = {
|
|
87
|
+
[K in keyof A]: T;
|
|
88
|
+
};
|
|
89
|
+
type OneOnly<T, K extends keyof T> = Omit<T, Exclude<keyof T, K>> | Pick<T, K>;
|
|
90
|
+
type OneOfByKey<T> = {
|
|
91
|
+
[key in keyof T]: OneOnly<T, key>;
|
|
92
|
+
};
|
|
93
|
+
type XorIn<T> = {
|
|
94
|
+
[K in keyof T]: T[K];
|
|
95
|
+
} & unknown;
|
|
110
96
|
/**
|
|
111
|
-
*
|
|
97
|
+
* An interface which contains secure mode members and provides to shift to main mode
|
|
112
98
|
* */
|
|
113
|
-
export
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
export type ToTypeFnLambda<T = unknown, O extends ToTypeOpt = ToTypeOpt> = (value: unknown, opt?: O) => T;
|
|
119
|
-
export interface ToTypeChildOpt<T = unknown> extends ToTypeOpt {
|
|
120
|
-
fn?: ToTypeFnLambda<T>;
|
|
121
|
-
}
|
|
122
|
-
export interface ToTypeArrayChildOpt<V extends ToTypeChildOpt = ToTypeChildOpt> extends Dict<ToTypeChildOpt> {
|
|
123
|
-
value?: V;
|
|
99
|
+
export interface ShiftSecure<S extends ShiftMain<any>> {
|
|
100
|
+
/**
|
|
101
|
+
* Shifts to secure mode
|
|
102
|
+
* */
|
|
103
|
+
get $secure(): S;
|
|
124
104
|
}
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
105
|
+
/**
|
|
106
|
+
* An interface which contains main mode members and provides to shift to secure mode
|
|
107
|
+
*
|
|
108
|
+
* IT's so useful to hide some public members
|
|
109
|
+
* - to see clean auto-completed members in IDE
|
|
110
|
+
* - to indicated that secure mode members should be used in special cases
|
|
111
|
+
* */
|
|
112
|
+
export interface ShiftMain<M extends ShiftSecure<any>> {
|
|
113
|
+
/**
|
|
114
|
+
* Shifts to main mode
|
|
115
|
+
* */
|
|
116
|
+
get $back(): M;
|
|
131
117
|
}
|
|
132
|
-
|
|
133
|
-
|
|
118
|
+
/**
|
|
119
|
+
* An interface which provides to flat generic interfaces/classes to prevent verbose casting commands
|
|
120
|
+
* */
|
|
121
|
+
export interface ShiftFlat<D> {
|
|
122
|
+
/**
|
|
123
|
+
* Flats current classes, or eliminate generic parameters
|
|
124
|
+
* */
|
|
125
|
+
get $flat(): D;
|
|
134
126
|
}
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
127
|
+
/**
|
|
128
|
+
* Useful interface which provides initialization state for instances
|
|
129
|
+
* */
|
|
130
|
+
export interface InitLike {
|
|
131
|
+
/**
|
|
132
|
+
* Initializes the instance
|
|
133
|
+
* */
|
|
134
|
+
$init(...args: Arr): void;
|
|
138
135
|
}
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
136
|
+
/**
|
|
137
|
+
* JSON Object
|
|
138
|
+
*/
|
|
139
|
+
export type JsonObject = {
|
|
140
|
+
[K in string]?: JsonValue;
|
|
141
|
+
};
|
|
142
|
+
/**
|
|
143
|
+
* JSON Array
|
|
144
|
+
*/
|
|
145
|
+
export type JsonArray = Array<JsonValue>;
|
|
146
|
+
/**
|
|
147
|
+
* JSON Primitives
|
|
148
|
+
*/
|
|
149
|
+
export type JsonPrimitive = string | number | boolean | null;
|
|
150
|
+
/**
|
|
151
|
+
* JSON Values
|
|
152
|
+
*/
|
|
153
|
+
export type JsonValue = JsonPrimitive | JsonObject | JsonArray;
|
|
154
|
+
/**
|
|
155
|
+
* Primitive language key
|
|
156
|
+
*
|
|
157
|
+
* It can be language (xx), local (xx-xx) or string (not preferred)
|
|
158
|
+
* */
|
|
159
|
+
export type I18nKey = LanguageCode | LocaleCode | string;
|
|
160
|
+
/**
|
|
161
|
+
* Language map
|
|
162
|
+
*
|
|
163
|
+
* @example
|
|
164
|
+
* const name = {en: "Apple", tr: "Elma"};
|
|
165
|
+
*
|
|
166
|
+
* */
|
|
167
|
+
export type I18nRaw<V = unknown> = Dict<V>;
|
|
168
|
+
export type I18nAny<V = unknown> = I18nRaw<V> | V;
|
|
169
|
+
export type EnumMap<E extends KeyValue = KeyValue> = Dict<E>;
|
|
170
|
+
export type EnumAlt<E extends KeyValue = KeyValue> = Dict<E>;
|
|
171
|
+
export type EnumLiteral<E extends KeyValue = KeyValue> = Array<E>;
|
|
142
172
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-types.js","sourceRoot":"","sources":["../../src/shared/index-types.ts"],"names":[],"mappings":";AAAA,qCAAqC"}
|
package/dist/shared/index.d.ts
CHANGED
package/dist/shared/index.js
CHANGED
|
@@ -14,8 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./index-aliases"), exports);
|
|
18
|
-
__exportStar(require("./index-constants"), exports);
|
|
19
17
|
__exportStar(require("./index-types"), exports);
|
|
20
|
-
|
|
21
|
-
__exportStar(require("./list"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/shared/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CommonSystemLike, CommonSystemSecure } from "./index-types";
|
|
2
|
+
import { LeyyoLike } from "../leyyo";
|
|
3
|
+
export declare class CommonSystem implements CommonSystemLike, CommonSystemSecure {
|
|
4
|
+
constructor();
|
|
5
|
+
get $back(): CommonSystemLike;
|
|
6
|
+
$init(leyyo: LeyyoLike): void;
|
|
7
|
+
get $secure(): CommonSystemSecure;
|
|
8
|
+
isSysFunction(method: string): boolean;
|
|
9
|
+
isSysClass(clazz: string | Function): boolean;
|
|
10
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CommonSystem = void 0;
|
|
4
|
+
const leyyo_1 = require("../leyyo");
|
|
5
|
+
const internal_1 = require("../internal");
|
|
6
|
+
const http_method_1 = require("./http-method");
|
|
7
|
+
const http_place_1 = require("./http-place");
|
|
8
|
+
const environment_1 = require("./environment");
|
|
9
|
+
const country_code_1 = require("./country-code");
|
|
10
|
+
const language_code_1 = require("./language-code");
|
|
11
|
+
const locale_code_1 = require("./locale-code");
|
|
12
|
+
const sys_class_1 = require("./sys-class");
|
|
13
|
+
const sys_function_1 = require("./sys-function");
|
|
14
|
+
// noinspection JSUnusedLocalSymbols,JSUnusedGlobalSymbols
|
|
15
|
+
class CommonSystem {
|
|
16
|
+
constructor() {
|
|
17
|
+
}
|
|
18
|
+
get $back() {
|
|
19
|
+
return this;
|
|
20
|
+
}
|
|
21
|
+
$init(leyyo) {
|
|
22
|
+
leyyo.$secure.$lazyRun(() => {
|
|
23
|
+
leyyo.fqn.register(null, CommonSystem, 'class', internal_1.FQN_PCK);
|
|
24
|
+
}).$lazyRun(() => {
|
|
25
|
+
const enumMap = {
|
|
26
|
+
HttpMethod: http_method_1.HttpMethodItems,
|
|
27
|
+
HttpPlace: http_place_1.HttpPlaceItems,
|
|
28
|
+
Environment: environment_1.EnvironmentItems,
|
|
29
|
+
CountryCode: country_code_1.CountryCodeItems,
|
|
30
|
+
LanguageCode: language_code_1.LanguageCodeItems,
|
|
31
|
+
LocaleCode: locale_code_1.LocaleCodeItems,
|
|
32
|
+
SysClass: sys_class_1.SysClassItems,
|
|
33
|
+
SysFunction: sys_function_1.SysFunctionItems,
|
|
34
|
+
};
|
|
35
|
+
for (const [name, value] of Object.entries(enumMap)) {
|
|
36
|
+
leyyo.fqn.register(name, value, 'enum', internal_1.FQN_PCK);
|
|
37
|
+
leyyo.hook.queueForCallback(leyyo_1.LeyyoCommonHook.enumPendingRegister, value);
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
get $secure() {
|
|
42
|
+
return this;
|
|
43
|
+
}
|
|
44
|
+
isSysFunction(method) {
|
|
45
|
+
if (typeof method !== 'string') {
|
|
46
|
+
return false;
|
|
47
|
+
}
|
|
48
|
+
return sys_function_1.SysFunctionItems.includes(method);
|
|
49
|
+
}
|
|
50
|
+
isSysClass(clazz) {
|
|
51
|
+
let name;
|
|
52
|
+
if (typeof clazz === 'function') {
|
|
53
|
+
name = clazz.name;
|
|
54
|
+
}
|
|
55
|
+
else if (typeof clazz === 'string') {
|
|
56
|
+
name = clazz;
|
|
57
|
+
}
|
|
58
|
+
if (!name) {
|
|
59
|
+
return false;
|
|
60
|
+
}
|
|
61
|
+
return sys_class_1.SysClassItems.includes(name);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
exports.CommonSystem = CommonSystem;
|
|
65
|
+
//# sourceMappingURL=common-system.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common-system.js","sourceRoot":"","sources":["../../src/system/common-system.ts"],"names":[],"mappings":";;;AACA,oCAAoD;AACpD,0CAAoC;AACpC,+CAA8C;AAC9C,6CAA4C;AAC5C,+CAA+C;AAC/C,iDAAgD;AAChD,mDAAkD;AAClD,+CAA8C;AAC9C,2CAAoD;AACpD,iDAA6D;AAE7D,0DAA0D;AAC1D,MAAa,YAAY;IAErB;IACA,CAAC;IAED,IAAI,KAAK;QACL,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,KAAK,CAAC,KAAgB;QAClB,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,EAAE;YACxB,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,kBAAO,CAAC,CAAC;QAC7D,CAAC,CAAC,CAAC,QAAQ,CAAC,GAAG,EAAE;YACb,MAAM,OAAO,GAAG;gBACZ,UAAU,EAAE,6BAAe;gBAC3B,SAAS,EAAE,2BAAc;gBACzB,WAAW,EAAE,8BAAgB;gBAC7B,WAAW,EAAE,+BAAgB;gBAC7B,YAAY,EAAE,iCAAiB;gBAC/B,UAAU,EAAE,6BAAe;gBAC3B,QAAQ,EA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E', 'SG', 'SH', 'SI', 'SJ', 'SK', 'SL', 'SM',
|
|
16
16
|
'SN', 'SO', 'SR', 'ST', 'SV', 'SY', 'SZ', 'TC', 'TD', 'TF', 'TG', 'TH', 'TJ', 'TK', 'TL', 'TM', 'TN', 'TO', 'TR', 'TT', 'TV', 'TW', 'TZ',
|
|
17
17
|
'UA', 'UG', 'UM', 'US', 'UY', 'UZ', 'VA', 'VC', 'VE', 'VG', 'VI', 'VN', 'VU', 'WF', 'WS', 'YE', 'YT', 'ZA', 'ZM', 'ZW'];
|
|
18
|
+
//# sourceMappingURL=country-code.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"country-code.js","sourceRoot":"","sources":["../../src/system/country-code.ts"],"names":[],"mappings":";;;AAAA;;KAEK;AACQ,QAAA,gBAAgB,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI;IAC3H,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI;IACxI,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE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 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http-method.js","sourceRoot":"","sources":["../../src/system/http-method.ts"],"names":[],"mappings":";;;AAAA;;KAEK;AACQ,QAAA,eAAe,GAAG,CAAC,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,CAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http-place.js","sourceRoot":"","sources":["../../src/system/http-place.ts"],"names":[],"mappings":";;;AAAA;;KAEK;AACQ,QAAA,cAAc,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAU,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { InitLike, ShiftMain, ShiftSecure } from "../shared";
|
|
2
|
+
export interface CommonSystemLike extends ShiftSecure<CommonSystemSecure> {
|
|
3
|
+
isSysFunction(method: string): boolean;
|
|
4
|
+
isSysClass(clazz: string | Function): boolean;
|
|
5
|
+
}
|
|
6
|
+
export type CommonSystemSecure = ShiftMain<CommonSystemLike> & InitLike;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-types.js","sourceRoot":"","sources":["../../src/system/index-types.ts"],"names":[],"mappings":""}
|
|
@@ -1,16 +1,9 @@
|
|
|
1
|
+
export * from './index-types';
|
|
1
2
|
export * from './country-code';
|
|
2
3
|
export * from './environment';
|
|
3
4
|
export * from './http-method';
|
|
4
5
|
export * from './http-place';
|
|
5
|
-
export * from './key-value';
|
|
6
6
|
export * from './language-code';
|
|
7
7
|
export * from './locale-code';
|
|
8
|
-
export * from './primitive';
|
|
9
|
-
export * from './real-value';
|
|
10
|
-
export * from './severity';
|
|
11
|
-
export * from './storage-type';
|
|
12
8
|
export * from './sys-class';
|
|
13
9
|
export * from './sys-function';
|
|
14
|
-
export * from './weak-false';
|
|
15
|
-
export * from './weak-true';
|
|
16
|
-
export * from './index-types';
|
|
@@ -14,19 +14,13 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./index-types"), exports);
|
|
17
18
|
__exportStar(require("./country-code"), exports);
|
|
18
19
|
__exportStar(require("./environment"), exports);
|
|
19
20
|
__exportStar(require("./http-method"), exports);
|
|
20
21
|
__exportStar(require("./http-place"), exports);
|
|
21
|
-
__exportStar(require("./key-value"), exports);
|
|
22
22
|
__exportStar(require("./language-code"), exports);
|
|
23
23
|
__exportStar(require("./locale-code"), exports);
|
|
24
|
-
__exportStar(require("./primitive"), exports);
|
|
25
|
-
__exportStar(require("./real-value"), exports);
|
|
26
|
-
__exportStar(require("./severity"), exports);
|
|
27
|
-
__exportStar(require("./storage-type"), exports);
|
|
28
24
|
__exportStar(require("./sys-class"), exports);
|
|
29
25
|
__exportStar(require("./sys-function"), exports);
|
|
30
|
-
|
|
31
|
-
__exportStar(require("./weak-true"), exports);
|
|
32
|
-
__exportStar(require("./index-types"), exports);
|
|
26
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/system/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B;AAE9B,iDAA+B;AAC/B,gDAA8B;AAC9B,gDAA8B;AAC9B,+CAA6B;AAC7B,kDAAgC;AAChC,gDAA8B;AAC9B,8CAA4B;AAC5B,iDAA+B"}
|
|
@@ -10,3 +10,4 @@ exports.LanguageCodeItems = ['af', 'an', 'ar', 'as', 'ast', 'az', 'be', 'bg', 'b
|
|
|
10
10
|
'mk', 'ml', 'mo', 'mr', 'ms', 'mt', 'my', 'nb', 'ne', 'ng', 'nl', 'nn', 'no', 'nv', 'oc', 'om', 'or', 'pa', 'pl', 'pt', 'qu', 'rm', 'ro',
|
|
11
11
|
'ru', 'sa', 'sb', 'sc', 'sd', 'sg', 'si', 'sk', 'sl', 'so', 'sq', 'sr', 'sv', 'sw', 'sx', 'sz', 'ta', 'te', 'th', 'tig', 'tk', 'tlh',
|
|
12
12
|
'tn', 'tr', 'ts', 'tt', 'uk', 'ur', 've', 'vi', 'vo', 'wa', 'xh', 'zh', 'zu'];
|
|
13
|
+
//# sourceMappingURL=language-code.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"language-code.js","sourceRoot":"","sources":["../../src/system/language-code.ts"],"names":[],"mappings":";;;AAAA;;KAEK;AACQ,QAAA,iBAAiB,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI;IACnI,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI;IACzI,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI;IACzI,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI;IACxI,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK;IACpI,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAU,CAAC"}
|
|
@@ -15,3 +15,4 @@ exports.LocaleCodeItems = ['af', 'an', 'ar', 'ar-ae', 'ar-bh', 'ar-dz', 'ar-eg',
|
|
|
15
15
|
'nl-be', 'nn', 'no', 'nv', 'oc', 'om', 'or', 'pa', 'pa-in', 'pa-pk', 'pl', 'pt', 'pt-br', 'qu', 'rm', 'ro', 'ro-mo', 'ru', 'ru-mo',
|
|
16
16
|
'sa', 'sb', 'sc', 'sd', 'sg', 'si', 'sk', 'sl', 'so', 'sq', 'sr', 'sv', 'sv-fi', 'sv-sv', 'sw', 'sx', 'sz', 'ta', 'te', 'th', 'tig',
|
|
17
17
|
'tk', 'tlh', 'tn', 'tr', 'ts', 'tt', 'uk', 'ur', 've', 'vi', 'vo', 'wa', 'xh', 'zh', 'zh-cn', 'zh-hk', 'zh-sg', 'zh-tw', 'zu'];
|
|
18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EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,CAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sys-class.js","sourceRoot":"","sources":["../../src/system/sys-class.ts"],"names":[],"mappings":";;;AAAa,QAAA,aAAa,GAAG;IACzB,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ;IACzC,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,eAAe,EAAE,YAAY,EAAE,gBAAgB,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU;IAC/H,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM;IAClC,QAAQ,EAAE,QAAQ;IAClB,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,mBAAmB,EAAE,YAAY;IACrE,aAAa,EAAE,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,gBAAgB;IAC7G,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS;IAElC,aAAa,EAAE,mBAAmB,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM;IAEjE,SAAS,EAAE,WAAW,EAAE,mBAAmB,EAAE,eAAe,EAAE,gBAAgB,EAAE,wBAAwB;IACxG,SAAS,EAAE,OAAO;IAElB,MAAM,EAAE,eAAe,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,mBAAmB;IACtF,kBAAkB,EAAE,yBAAyB,EAAE,aAAa;IAE5D,aAAa,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,mBAAmB;IACtG,0BAA0B,EAAE,uBAAuB,EAAE,0BAA0B;CACzE,CAAC"}
|
|
@@ -4,3 +4,4 @@ exports.SysFunctionItems = void 0;
|
|
|
4
4
|
exports.SysFunctionItems = ['constructor', '__defineGetter__', '__defineSetter__', 'hasOwnProperty',
|
|
5
5
|
'__lookupGetter__', '__lookupSetter__', 'isPrototypeOf', 'propertyIsEnumerable',
|
|
6
6
|
'toString', 'valueOf', '__proto__', 'toLocaleString', 'toJSON', '__esModule'];
|
|
7
|
+
//# sourceMappingURL=sys-function.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sys-function.js","sourceRoot":"","sources":["../../src/system/sys-function.ts"],"names":[],"mappings":";;;AAAa,QAAA,gBAAgB,GAAG,CAAC,aAAa,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,gBAAgB;IACpG,kBAAkB,EAAE,kBAAkB,EAAE,eAAe,EAAE,sBAAsB;IAC/E,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,gBAAgB,EAAE,QAAQ,EAAE,YAAY,CAAU,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { CommonToLike, CommonToSecure, ToOpt, ToOptAny, ToSubIndexFnLambda, ToSubKeyFnLambda } from "./index-types";
|
|
2
|
+
import { Dict, EnumAlt, EnumLiteral, EnumMap, Func, KeyValue, Obj } from "../shared";
|
|
3
|
+
import { LeyyoLike } from "../leyyo";
|
|
4
|
+
import { List } from "./list";
|
|
5
|
+
export declare class CommonTo implements CommonToLike, CommonToSecure {
|
|
6
|
+
private readonly _EMPTY;
|
|
7
|
+
private readonly _EXPECTED_ANY;
|
|
8
|
+
private readonly _EXPECTED_ARRAY;
|
|
9
|
+
private readonly _EXPECTED_BOOL;
|
|
10
|
+
private readonly _EXPECTED_DATE;
|
|
11
|
+
private readonly _EXPECTED_ENUM;
|
|
12
|
+
private readonly _EXPECTED_NUMBER;
|
|
13
|
+
private readonly _EXPECTED_STRING;
|
|
14
|
+
private readonly _EXPECTED_OBJECT;
|
|
15
|
+
private is;
|
|
16
|
+
private dev;
|
|
17
|
+
private wrapper;
|
|
18
|
+
private _enumInMap;
|
|
19
|
+
private _enumInArray;
|
|
20
|
+
private _enumInAlteration;
|
|
21
|
+
$init(leyyo: LeyyoLike): void;
|
|
22
|
+
get $back(): CommonToLike;
|
|
23
|
+
get $secure(): CommonToSecure;
|
|
24
|
+
$runOpt(opt: ToOptAny): ToOpt;
|
|
25
|
+
$runFn<T = any>(fn: Func, value: Func, opt?: ToOpt): T;
|
|
26
|
+
$errorOrLog(opt: ToOptAny, extra: ToOpt, e?: Error): any;
|
|
27
|
+
$unexpectedError<T = any>(value: unknown, expected: Array<string>, opt?: ToOpt): T;
|
|
28
|
+
realNumber(value: number, opt?: ToOpt): number;
|
|
29
|
+
any<T = any>(value: any, opt?: ToOptAny): T;
|
|
30
|
+
list<T = any>(value: any, opt?: ToOptAny, itemFn?: ToSubIndexFnLambda<T>): List<T>;
|
|
31
|
+
set<V = any>(value: any, opt?: ToOptAny, itemFn?: ToSubIndexFnLambda<V>): Set<V>;
|
|
32
|
+
array<V = any>(value: any, opt?: ToOptAny, itemFn?: ToSubIndexFnLambda<V>): Array<V>;
|
|
33
|
+
boolean(value: any, opt?: ToOptAny): boolean;
|
|
34
|
+
date(value: any, opt?: ToOptAny): Date;
|
|
35
|
+
enumeration<E extends KeyValue = KeyValue>(value: any, map: EnumMap<E>, opt?: ToOpt, alt?: EnumAlt<E>): E;
|
|
36
|
+
literal<E extends KeyValue = KeyValue>(value: any, items: EnumLiteral<E> | any, opt?: ToOpt, alt?: EnumAlt<E>): E;
|
|
37
|
+
float(value: any, opt?: ToOptAny): number;
|
|
38
|
+
func<F extends Func = Func>(value: any, opt?: ToOptAny): F;
|
|
39
|
+
integer(value: any, opt?: ToOptAny): number;
|
|
40
|
+
object<O extends Obj = Obj>(value: any, opt?: ToOptAny): O;
|
|
41
|
+
map<K = any, V = any>(value: any, opt?: ToOptAny, valueFn?: ToSubKeyFnLambda<V>, keyFn?: ToSubIndexFnLambda<K>): Map<K, V>;
|
|
42
|
+
dict<V = any>(value: any, opt?: ToOptAny, valueFn?: ToSubKeyFnLambda<V>, keyFn?: ToSubIndexFnLambda<string>): Dict<V>;
|
|
43
|
+
string(value: any, opt?: ToOptAny): string;
|
|
44
|
+
text(value: any, opt?: ToOptAny): string;
|
|
45
|
+
}
|