@leyyo/common 1.3.5 → 1.3.7
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/base/index.d.ts +3 -0
- package/dist/base/index.js +20 -0
- package/dist/base/index.js.map +1 -0
- package/dist/base/index.types.d.ts +196 -0
- package/dist/{type/index.js → base/index.types.js} +2 -3
- package/dist/base/index.types.js.map +1 -0
- package/dist/base/leyyo.d.ts +5 -0
- package/dist/base/leyyo.js +85 -0
- package/dist/base/leyyo.js.map +1 -0
- package/dist/base/leyyo.types.d.ts +18 -0
- package/dist/base/leyyo.types.js +3 -0
- package/dist/base/leyyo.types.js.map +1 -0
- package/dist/class/index.d.ts +1 -1
- package/dist/class/index.js +1 -1
- package/dist/class/index.js.map +1 -1
- package/dist/class/index.types.d.ts +30 -0
- package/dist/class/index.types.js +3 -0
- package/dist/class/index.types.js.map +1 -0
- package/dist/class/list.d.ts +1 -1
- package/dist/class/logger.instance.d.ts +14 -10
- package/dist/class/logger.instance.js +34 -72
- package/dist/class/logger.instance.js.map +1 -1
- package/dist/common/deploy.common.d.ts +26 -0
- package/dist/common/deploy.common.js +74 -0
- package/dist/common/deploy.common.js.map +1 -0
- package/dist/common/enum.pool.d.ts +23 -0
- package/dist/common/enum.pool.js +100 -0
- package/dist/common/enum.pool.js.map +1 -0
- package/dist/common/error.common.d.ts +48 -0
- package/dist/common/error.common.js +328 -0
- package/dist/common/error.common.js.map +1 -0
- package/dist/common/error.pool.d.ts +20 -0
- package/dist/common/error.pool.js +54 -0
- package/dist/common/error.pool.js.map +1 -0
- package/dist/common/event.common.d.ts +24 -0
- package/dist/common/event.common.js +135 -0
- package/dist/common/event.common.js.map +1 -0
- package/dist/common/index.d.ts +11 -17
- package/dist/common/index.js +11 -17
- package/dist/common/index.js.map +1 -1
- package/dist/common/index.types.d.ts +561 -0
- package/dist/common/index.types.js +4 -0
- package/dist/common/index.types.js.map +1 -0
- package/dist/common/inert.d.ts +74 -0
- package/dist/common/inert.js +302 -0
- package/dist/common/inert.js.map +1 -0
- package/dist/common/lifecycle.common.d.ts +26 -0
- package/dist/common/lifecycle.common.js +124 -0
- package/dist/common/lifecycle.common.js.map +1 -0
- package/dist/common/literal.pool.d.ts +23 -0
- package/dist/common/literal.pool.js +100 -0
- package/dist/common/literal.pool.js.map +1 -0
- package/dist/common/log.common.d.ts +81 -0
- package/dist/common/log.common.js +375 -0
- package/dist/common/log.common.js.map +1 -0
- package/dist/common/repo.common.d.ts +225 -0
- package/dist/common/repo.common.js +474 -0
- package/dist/common/repo.common.js.map +1 -0
- package/dist/const/index.d.ts +24 -19
- package/dist/const/index.js +25 -20
- package/dist/const/index.js.map +1 -1
- package/dist/error/caused.error.d.ts +1 -1
- package/dist/error/developer.error.d.ts +7 -7
- package/dist/error/developer.error.js +11 -29
- package/dist/error/developer.error.js.map +1 -1
- package/dist/error/http.error.d.ts +1 -1
- package/dist/error/http.error.js +3 -3
- package/dist/error/http.error.js.map +1 -1
- package/dist/error/index.d.ts +1 -0
- package/dist/error/index.js +1 -0
- package/dist/error/index.js.map +1 -1
- package/dist/error/index.types.d.ts +195 -0
- package/dist/error/index.types.js +3 -0
- package/dist/error/index.types.js.map +1 -0
- package/dist/error/invalid-value.error.js +1 -1
- package/dist/error/invalid-value.error.js.map +1 -1
- package/dist/error/leyyo.error.d.ts +9 -5
- package/dist/error/leyyo.error.js +37 -32
- package/dist/error/leyyo.error.js.map +1 -1
- package/dist/error/multiple.error.d.ts +1 -1
- package/dist/error/multiple.error.js.map +1 -1
- package/dist/function/define-loader.d.ts +8 -0
- package/dist/function/define-loader.js +23 -0
- package/dist/function/define-loader.js.map +1 -0
- package/dist/function/delete-prop.d.ts +24 -0
- package/dist/function/delete-prop.js +76 -0
- package/dist/function/delete-prop.js.map +1 -0
- package/dist/function/empty.fn.d.ts +1 -2
- package/dist/function/empty.fn.js.map +1 -1
- package/dist/function/extended-type.d.ts +1 -1
- package/dist/function/extended-type.js +8 -5
- package/dist/function/extended-type.js.map +1 -1
- package/dist/function/get-fqn.d.ts +8 -0
- package/dist/function/get-fqn.js +33 -0
- package/dist/function/get-fqn.js.map +1 -0
- package/dist/function/get-prop.d.ts +24 -0
- package/dist/function/get-prop.js +63 -0
- package/dist/function/get-prop.js.map +1 -0
- package/dist/function/has-fqn.d.ts +8 -0
- package/dist/function/has-fqn.js +32 -0
- package/dist/function/has-fqn.js.map +1 -0
- package/dist/function/index.d.ts +21 -3
- package/dist/function/index.js +21 -3
- package/dist/function/index.js.map +1 -1
- package/dist/function/index.types.d.ts +35 -0
- package/dist/function/index.types.js +4 -0
- package/dist/function/index.types.js.map +1 -0
- package/dist/function/is-anonymous-name.d.ts +1 -0
- package/dist/function/is-anonymous-name.js +11 -0
- package/dist/function/is-anonymous-name.js.map +1 -0
- package/dist/function/is-test.d.ts +10 -0
- package/dist/function/is-test.js +37 -0
- package/dist/function/is-test.js.map +1 -0
- package/dist/function/{is.js → is.fn.js} +1 -1
- package/dist/function/is.fn.js.map +1 -0
- package/dist/function/leyyo-fn.d.ts +3 -0
- package/dist/function/leyyo-fn.js +14 -0
- package/dist/function/leyyo-fn.js.map +1 -0
- package/dist/function/on-fqn-set.d.ts +2 -0
- package/dist/function/on-fqn-set.js +40 -0
- package/dist/function/on-fqn-set.js.map +1 -0
- package/dist/function/one-or-more.d.ts +1 -1
- package/dist/{common → function}/opt.fn.d.ts +2 -1
- package/dist/{common → function}/opt.fn.js +15 -10
- package/dist/function/opt.fn.js.map +1 -0
- package/dist/function/random-test-no.d.ts +6 -0
- package/dist/function/random-test-no.js +12 -0
- package/dist/function/random-test-no.js.map +1 -0
- package/dist/function/remove-fqn.d.ts +10 -0
- package/dist/function/remove-fqn.js +44 -0
- package/dist/function/remove-fqn.js.map +1 -0
- package/dist/{common/exporter.fn.d.ts → function/run-exporter.d.ts} +1 -1
- package/dist/{common/exporter.fn.js → function/run-exporter.js} +7 -3
- package/dist/function/run-exporter.js.map +1 -0
- package/dist/function/secure-clone.d.ts +1 -1
- package/dist/function/set-anonymous-fqn.d.ts +2 -0
- package/dist/function/set-anonymous-fqn.js +44 -0
- package/dist/function/set-anonymous-fqn.js.map +1 -0
- package/dist/function/set-anonymous-name.d.ts +2 -0
- package/dist/function/set-anonymous-name.js +66 -0
- package/dist/function/set-anonymous-name.js.map +1 -0
- package/dist/function/set-fqn.d.ts +9 -0
- package/dist/function/set-fqn.js +69 -0
- package/dist/function/set-fqn.js.map +1 -0
- package/dist/function/set-prop.d.ts +27 -0
- package/dist/function/set-prop.js +71 -0
- package/dist/function/set-prop.js.map +1 -0
- package/dist/function/stamp-loader.d.ts +8 -0
- package/dist/function/stamp-loader.js +18 -0
- package/dist/function/stamp-loader.js.map +1 -0
- package/dist/function/test-case.d.ts +8 -0
- package/dist/function/test-case.js +27 -0
- package/dist/function/test-case.js.map +1 -0
- package/dist/function/test-name.d.ts +8 -0
- package/dist/function/test-name.js +18 -0
- package/dist/function/test-name.js.map +1 -0
- package/dist/function/trigger-fqn.d.ts +2 -0
- package/dist/function/trigger-fqn.js +25 -0
- package/dist/function/trigger-fqn.js.map +1 -0
- package/dist/index.d.ts +12 -2
- package/dist/index.foretell.js +8 -8
- package/dist/index.foretell.js.map +1 -1
- package/dist/index.js +15 -3
- package/dist/index.js.map +1 -1
- package/dist/index.loader.d.ts +1 -1
- package/dist/index.loader.js +3 -3
- package/dist/index.loader.js.map +1 -1
- package/dist/init/index.d.ts +1 -1
- package/dist/init/index.js +4 -3
- package/dist/init/index.js.map +1 -1
- package/package.json +2 -1
- package/dist/common/array.fn.d.ts +0 -46
- package/dist/common/array.fn.js +0 -131
- package/dist/common/array.fn.js.map +0 -1
- package/dist/common/deploy.fn.d.ts +0 -18
- package/dist/common/deploy.fn.js +0 -74
- package/dist/common/deploy.fn.js.map +0 -1
- package/dist/common/enum.fn.d.ts +0 -48
- package/dist/common/enum.fn.js +0 -133
- package/dist/common/enum.fn.js.map +0 -1
- package/dist/common/error.fn.d.ts +0 -100
- package/dist/common/error.fn.js +0 -401
- package/dist/common/error.fn.js.map +0 -1
- package/dist/common/event.fn.d.ts +0 -45
- package/dist/common/event.fn.js +0 -161
- package/dist/common/event.fn.js.map +0 -1
- package/dist/common/exporter.fn.js.map +0 -1
- package/dist/common/fqn.fn.d.ts +0 -31
- package/dist/common/fqn.fn.js +0 -197
- package/dist/common/fqn.fn.js.map +0 -1
- package/dist/common/inert.fn.d.ts +0 -69
- package/dist/common/inert.fn.js +0 -368
- package/dist/common/inert.fn.js.map +0 -1
- package/dist/common/lifecycle.fn.d.ts +0 -24
- package/dist/common/lifecycle.fn.js +0 -136
- package/dist/common/lifecycle.fn.js.map +0 -1
- package/dist/common/list.fn.d.ts +0 -47
- package/dist/common/list.fn.js +0 -132
- package/dist/common/list.fn.js.map +0 -1
- package/dist/common/loader.fn.d.ts +0 -15
- package/dist/common/loader.fn.js +0 -38
- package/dist/common/loader.fn.js.map +0 -1
- package/dist/common/log.fn.d.ts +0 -42
- package/dist/common/log.fn.js +0 -333
- package/dist/common/log.fn.js.map +0 -1
- package/dist/common/map.fn.d.ts +0 -46
- package/dist/common/map.fn.js +0 -131
- package/dist/common/map.fn.js.map +0 -1
- package/dist/common/name.fn.d.ts +0 -5
- package/dist/common/name.fn.js +0 -69
- package/dist/common/name.fn.js.map +0 -1
- package/dist/common/opt.fn.js.map +0 -1
- package/dist/common/set.fn.d.ts +0 -46
- package/dist/common/set.fn.js +0 -131
- package/dist/common/set.fn.js.map +0 -1
- package/dist/common/test.fn.d.ts +0 -26
- package/dist/common/test.fn.js +0 -81
- package/dist/common/test.fn.js.map +0 -1
- package/dist/function/error-obj.d.ts +0 -8
- package/dist/function/error-obj.js +0 -25
- package/dist/function/error-obj.js.map +0 -1
- package/dist/function/error-text.d.ts +0 -10
- package/dist/function/error-text.js +0 -43
- package/dist/function/error-text.js.map +0 -1
- package/dist/function/is.js.map +0 -1
- package/dist/type/index.d.ts +0 -551
- package/dist/type/index.js.map +0 -1
- /package/dist/function/{is.d.ts → is.fn.d.ts} +0 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./index.types"), exports);
|
|
18
|
+
__exportStar(require("./leyyo.types"), exports);
|
|
19
|
+
__exportStar(require("./leyyo"), exports);
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/base/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B;AAC9B,gDAA8B;AAC9B,0CAAwB"}
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
export type HttpStatus = number;
|
|
2
|
+
export type BasicType = 'undefined' | 'string' | 'object' | 'number' | 'boolean' | 'function' | 'symbol' | 'bigint';
|
|
3
|
+
export type ExtendedType = BasicType | 'array' | 'null' | 'enum-map' | 'literal-items' | 'class' | 'empty' | 'text' | 'nan' | 'integer' | 'date' | 'map' | 'set' | 'list';
|
|
4
|
+
export type KeyValue = string | number;
|
|
5
|
+
export type AnyKey = string | number | symbol;
|
|
6
|
+
export type Obj = Object & {};
|
|
7
|
+
export type Dict<T = unknown> = Record<KeyValue, T>;
|
|
8
|
+
export type Arr<T = unknown> = Array<T>;
|
|
9
|
+
export type Id = string | number;
|
|
10
|
+
export type Integer = number;
|
|
11
|
+
export type Float = number;
|
|
12
|
+
export type Alpha = string;
|
|
13
|
+
export type Text = 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
|
+
export type Fnc<R = unknown> = ((...args: Arr) => R) & Function;
|
|
28
|
+
export type Async<R = unknown> = ((...args: Arr) => Promise<R>) & AsyncGeneratorFunction;
|
|
29
|
+
export interface Abstract<T = {}> extends Function {
|
|
30
|
+
prototype: T;
|
|
31
|
+
readonly name: string;
|
|
32
|
+
readonly length: number;
|
|
33
|
+
bind(thisArg: unknown, ...args: Arr): unknown;
|
|
34
|
+
apply(thisArg: unknown, args: Arr): unknown;
|
|
35
|
+
call(thisArg: unknown, ...args: Arr): unknown;
|
|
36
|
+
}
|
|
37
|
+
export interface ClassLike<T = {}> extends Abstract<T> {
|
|
38
|
+
new (...args: Arr): T;
|
|
39
|
+
}
|
|
40
|
+
export type TypeOf<C = ClassLike> = C extends ClassLike<infer T> ? T : C;
|
|
41
|
+
export declare namespace Express {
|
|
42
|
+
interface Request {
|
|
43
|
+
custom?: Dict;
|
|
44
|
+
}
|
|
45
|
+
interface Response {
|
|
46
|
+
custom?: Dict;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
export interface Describable {
|
|
50
|
+
description: string;
|
|
51
|
+
}
|
|
52
|
+
export interface Nameable {
|
|
53
|
+
name: string;
|
|
54
|
+
}
|
|
55
|
+
export interface HasId {
|
|
56
|
+
id?: string | number;
|
|
57
|
+
}
|
|
58
|
+
export type TypeOfMethod<T, M extends keyof T> = T[M] extends Function ? T[M] : never;
|
|
59
|
+
export type TypeOfFnc<F extends Fnc> = F extends (...args: Arr) => infer R ? R : never;
|
|
60
|
+
export type TypeOfAsync<F extends Async> = TypeOfPromise<TypeOfFnc<F>>;
|
|
61
|
+
export type TypeOfPromise<P> = P extends Promise<infer R> ? R : P;
|
|
62
|
+
/**
|
|
63
|
+
* String keys of an interface
|
|
64
|
+
* - Note: keyof keywords returns string|number|symbol, but it's ignore number and symbol keys
|
|
65
|
+
* */
|
|
66
|
+
export type StrKey<T> = Extract<keyof T, string>;
|
|
67
|
+
/**
|
|
68
|
+
* Serialized version of another type
|
|
69
|
+
*/
|
|
70
|
+
export type Serialized<T> = {
|
|
71
|
+
[P in keyof T]: T[P];
|
|
72
|
+
};
|
|
73
|
+
/**
|
|
74
|
+
* Makes mutable an interface
|
|
75
|
+
*
|
|
76
|
+
* @see Readonly
|
|
77
|
+
* */
|
|
78
|
+
export type Mutable<A> = {
|
|
79
|
+
-readonly [K in keyof A]: A[K];
|
|
80
|
+
};
|
|
81
|
+
export type KeyOf<T> = keyof T;
|
|
82
|
+
export type Keys<T> = Array<keyof T>;
|
|
83
|
+
export type ValueOf<T> = T[KeyOf<T>];
|
|
84
|
+
export type Values<T> = Array<T[KeyOf<T>]>;
|
|
85
|
+
export type OneOrMore<T> = T | Array<T>;
|
|
86
|
+
export type SetOrMore<T> = T | Set<T>;
|
|
87
|
+
/**
|
|
88
|
+
* An interface which contains secure mode members and provides to shift to main mode
|
|
89
|
+
* */
|
|
90
|
+
export interface ShiftSecure<S extends ShiftMain<any>> {
|
|
91
|
+
/**
|
|
92
|
+
* Shifts to secure mode
|
|
93
|
+
* */
|
|
94
|
+
get $secure(): S;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* An interface which contains main mode members and provides to shift to secure mode
|
|
98
|
+
*
|
|
99
|
+
* IT's so useful to hide some public members
|
|
100
|
+
* - to see clean auto-completed members in IDE
|
|
101
|
+
* - to indicated that secure mode members should be used in special cases
|
|
102
|
+
* */
|
|
103
|
+
export interface ShiftMain<M extends ShiftSecure<any>> {
|
|
104
|
+
/**
|
|
105
|
+
* Shifts to main mode
|
|
106
|
+
* */
|
|
107
|
+
get $back(): M;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* An interface which provides to flat generic interfaces/classes to prevent verbose casting commands
|
|
111
|
+
* */
|
|
112
|
+
export interface ShiftFlat<D> {
|
|
113
|
+
/**
|
|
114
|
+
* Flats current classes, or eliminate generic parameters
|
|
115
|
+
* */
|
|
116
|
+
get $flat(): D;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Useful interface which provides initialization state for instances
|
|
120
|
+
* */
|
|
121
|
+
export interface InitLike {
|
|
122
|
+
/**
|
|
123
|
+
* Initializes the instance
|
|
124
|
+
* */
|
|
125
|
+
$init(...args: Arr): void;
|
|
126
|
+
}
|
|
127
|
+
export type IgnoreFieldsByType<T, I> = {
|
|
128
|
+
[K in keyof T]: T[K] extends I ? K : never;
|
|
129
|
+
}[keyof T];
|
|
130
|
+
export type ReplaceType<T, O, N> = {
|
|
131
|
+
[P in keyof T]: T[P] extends O ? N : T[P];
|
|
132
|
+
};
|
|
133
|
+
export type SameType<A, T> = {
|
|
134
|
+
[K in keyof A]: T;
|
|
135
|
+
};
|
|
136
|
+
export type PickByType<T, I> = {
|
|
137
|
+
[K in keyof T]: T[K] extends I ? K : never;
|
|
138
|
+
};
|
|
139
|
+
export type PickKeyByType<T, I> = PickByType<T, I>[keyof T];
|
|
140
|
+
export type OmitByType<T, I> = {
|
|
141
|
+
[K in keyof T]: T[K] extends I ? never : K;
|
|
142
|
+
};
|
|
143
|
+
export type OmitKeysByType<T, I> = OmitByType<T, I>[keyof T];
|
|
144
|
+
export type ValueOrCallback<T> = T | ValueCallback<T> | ValueCallbackAsync<T>;
|
|
145
|
+
export type ValueCallback<T> = () => T;
|
|
146
|
+
export type ValueCallbackAsync<T> = () => Promise<T>;
|
|
147
|
+
export type MaximumOneOf<T, K extends keyof T = keyof T> = K extends keyof T ? {
|
|
148
|
+
[P in K]: T[K];
|
|
149
|
+
} & Partial<Record<Exclude<keyof T, K>, never>> : never;
|
|
150
|
+
export type OneOf<Obj> = ValueOf<OneOfByKey<Obj>>;
|
|
151
|
+
export type Xor<A, B> = XorIn<A & {
|
|
152
|
+
[K in keyof B]?: undefined;
|
|
153
|
+
}> | XorIn<B & {
|
|
154
|
+
[K in keyof A]?: undefined;
|
|
155
|
+
}>;
|
|
156
|
+
type OneOnly<T, K extends keyof T> = Omit<T, Exclude<keyof T, K>> | Pick<T, K>;
|
|
157
|
+
type OneOfByKey<T> = {
|
|
158
|
+
[key in keyof T]: OneOnly<T, key>;
|
|
159
|
+
};
|
|
160
|
+
type XorIn<T> = {
|
|
161
|
+
[K in keyof T]: T[K];
|
|
162
|
+
} & unknown;
|
|
163
|
+
/**
|
|
164
|
+
* JSON Object, record of `JsonValue`
|
|
165
|
+
*
|
|
166
|
+
* @see #JsonValue
|
|
167
|
+
*/
|
|
168
|
+
export type JsonObject = {
|
|
169
|
+
[K in string]?: JsonValue;
|
|
170
|
+
};
|
|
171
|
+
/**
|
|
172
|
+
* JSON Array, array of `JsonValue`
|
|
173
|
+
*
|
|
174
|
+
* @see #JsonValue
|
|
175
|
+
*/
|
|
176
|
+
export type JsonArray = Array<JsonValue>;
|
|
177
|
+
/**
|
|
178
|
+
* JSON Primitive
|
|
179
|
+
*
|
|
180
|
+
* `OneOf`
|
|
181
|
+
* @see `string`
|
|
182
|
+
* @see `number`
|
|
183
|
+
* @see `boolean`
|
|
184
|
+
* @see `null`
|
|
185
|
+
*/
|
|
186
|
+
export type JsonPrimitive = string | number | boolean | null;
|
|
187
|
+
/**
|
|
188
|
+
* JSON Value
|
|
189
|
+
*
|
|
190
|
+
* `OneOf`
|
|
191
|
+
* @see #JsonPrimitive
|
|
192
|
+
* @see #JsonObject
|
|
193
|
+
* @see #JsonArray
|
|
194
|
+
*/
|
|
195
|
+
export type JsonValue = JsonPrimitive | JsonObject | JsonArray;
|
|
196
|
+
export {};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// noinspection JSUnusedGlobalSymbols
|
|
3
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
// endregion
|
|
3
|
+
// endregion json
|
|
5
4
|
/*
|
|
6
5
|
|
|
7
6
|
// export type StrObject<T> = {
|
|
@@ -33,4 +32,4 @@ interface _AsyncFnc<R> extends _BaseFunc {
|
|
|
33
32
|
// export type AnyFnc<R = unknown> = Fnc<R> | Async<R>;
|
|
34
33
|
|
|
35
34
|
*/
|
|
36
|
-
//# sourceMappingURL=index.js.map
|
|
35
|
+
//# sourceMappingURL=index.types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.types.js","sourceRoot":"","sources":["../../src/base/index.types.ts"],"names":[],"mappings":";;AA4PA,iBAAiB;AAGjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8BE"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.leyyo = void 0;
|
|
4
|
+
const common_1 = require("../common");
|
|
5
|
+
const error_1 = require("../error");
|
|
6
|
+
const logger_instance_1 = require("../class/logger.instance");
|
|
7
|
+
const const_1 = require("../const");
|
|
8
|
+
const leyyo_fn_1 = require("../function/leyyo-fn");
|
|
9
|
+
class Leyyo {
|
|
10
|
+
constructor() {
|
|
11
|
+
// region binding
|
|
12
|
+
(0, leyyo_fn_1.$$set_leyyo_fn)(this);
|
|
13
|
+
this._developerError = error_1.DeveloperError;
|
|
14
|
+
this._developerError[const_1.KEY_SECURE_1](this);
|
|
15
|
+
this._leyyoError = error_1.LeyyoError;
|
|
16
|
+
this._leyyoError[const_1.KEY_SECURE_1](this);
|
|
17
|
+
this._loggerInstance = logger_instance_1.LoggerInstance;
|
|
18
|
+
this._loggerInstance[const_1.KEY_SECURE_1](this);
|
|
19
|
+
// endregion binding
|
|
20
|
+
// region instances
|
|
21
|
+
this._repoCommon = new common_1.RepoCommon(this); // none
|
|
22
|
+
this._errorCommon = new common_1.ErrorCommon(this); // none
|
|
23
|
+
this._logCommon = new common_1.LogCommon(this); // repo
|
|
24
|
+
this._eventCommon = new common_1.EventCommon(this); // repo
|
|
25
|
+
this._deployCommon = new common_1.DeployCommon(this); // repo
|
|
26
|
+
this._lifecycleCommon = new common_1.LifecycleCommon(this); // repo
|
|
27
|
+
this._enumPool = new common_1.EnumPool(this); // complex
|
|
28
|
+
this._errorPool = new common_1.ErrorPool(this);
|
|
29
|
+
this._literalPool = new common_1.LiteralPool(this);
|
|
30
|
+
// endregion instances
|
|
31
|
+
// region instance-ops
|
|
32
|
+
this._logger = this._logCommon.of(Leyyo);
|
|
33
|
+
// endregion instance-ops
|
|
34
|
+
// region final
|
|
35
|
+
this._startToConsume();
|
|
36
|
+
// endregion final
|
|
37
|
+
}
|
|
38
|
+
_startToConsume() {
|
|
39
|
+
this.logCommon.initConsume();
|
|
40
|
+
}
|
|
41
|
+
get developerError() {
|
|
42
|
+
return this._developerError;
|
|
43
|
+
}
|
|
44
|
+
get leyyoError() {
|
|
45
|
+
return this._leyyoError;
|
|
46
|
+
}
|
|
47
|
+
get loggerInstance() {
|
|
48
|
+
return this._loggerInstance;
|
|
49
|
+
}
|
|
50
|
+
get repoCommon() {
|
|
51
|
+
return this._repoCommon;
|
|
52
|
+
}
|
|
53
|
+
get deployCommon() {
|
|
54
|
+
return this._deployCommon;
|
|
55
|
+
}
|
|
56
|
+
get enumPool() {
|
|
57
|
+
return this._enumPool;
|
|
58
|
+
}
|
|
59
|
+
get errorCommon() {
|
|
60
|
+
return this._errorCommon;
|
|
61
|
+
}
|
|
62
|
+
get errorPool() {
|
|
63
|
+
return this._errorPool;
|
|
64
|
+
}
|
|
65
|
+
get eventCommon() {
|
|
66
|
+
return this._eventCommon;
|
|
67
|
+
}
|
|
68
|
+
get lifecycleCommon() {
|
|
69
|
+
return this._lifecycleCommon;
|
|
70
|
+
}
|
|
71
|
+
get literalPool() {
|
|
72
|
+
return this._literalPool;
|
|
73
|
+
}
|
|
74
|
+
get logCommon() {
|
|
75
|
+
return this._logCommon;
|
|
76
|
+
}
|
|
77
|
+
get logger() {
|
|
78
|
+
return this._logger;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Leyyo common instance
|
|
83
|
+
* */
|
|
84
|
+
exports.leyyo = new Leyyo();
|
|
85
|
+
//# sourceMappingURL=leyyo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"leyyo.js","sourceRoot":"","sources":["../../src/base/leyyo.ts"],"names":[],"mappings":";;;AACA,sCAqBmB;AACnB,oCAAwF;AAExF,8DAAwD;AACxD,oCAAsC;AACtC,mDAAoD;AAEpD,MAAM,KAAK;IAiBP;QACI,iBAAiB;QACjB,IAAA,yBAAc,EAAC,IAAI,CAAC,CAAC;QAErB,IAAI,CAAC,eAAe,GAAG,sBAAc,CAAC;QACtC,IAAI,CAAC,eAAe,CAAC,oBAAY,CAAC,CAAC,IAAI,CAAC,CAAC;QAEzC,IAAI,CAAC,WAAW,GAAG,kBAAU,CAAC;QAC9B,IAAI,CAAC,WAAW,CAAC,oBAAY,CAAC,CAAC,IAAI,CAAC,CAAC;QAErC,IAAI,CAAC,eAAe,GAAG,gCAAc,CAAC;QACtC,IAAI,CAAC,eAAe,CAAC,oBAAY,CAAC,CAAC,IAAI,CAAC,CAAC;QACzC,oBAAoB;QAEpB,mBAAmB;QACnB,IAAI,CAAC,WAAW,GAAG,IAAI,mBAAU,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO;QAChD,IAAI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AAO,IAAI,CAAC,SAAS,CAAC;IAC1B,CAAC;IAED,IAAI,WAAW;QACX,OAAO,IAAI,CAAC,YAAY,CAAC;IAC7B,CAAC;IAED,IAAI,SAAS;QACT,OAAO,IAAI,CAAC,UAAU,CAAC;IAC3B,CAAC;IAED,IAAI,WAAW;QACX,OAAO,IAAI,CAAC,YAAY,CAAC;IAC7B,CAAC;IAED,IAAI,eAAe;QACf,OAAO,IAAI,CAAC,gBAAgB,CAAC;IACjC,CAAC;IAED,IAAI,WAAW;QACX,OAAO,IAAI,CAAC,YAAY,CAAC;IAC7B,CAAC;IAED,IAAI,SAAS;QACT,OAAO,IAAI,CAAC,UAAU,CAAC;IAC3B,CAAC;IAED,IAAI,MAAM;QACN,OAAO,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;CACJ;AAED;;KAEK;AACQ,QAAA,KAAK,GAAc,IAAI,KAAK,EAAE,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { DeveloperErrorCtor, LeyyoErrorCtor } from "../error";
|
|
2
|
+
import { LoggerInstanceCtor } from "../class";
|
|
3
|
+
import { DeployCommonLike, EnumPoolLike, ErrorCommonLike, ErrorPoolLike, EventCommonLike, EventType, LifecycleCommonLike, LiteralPoolLike, LogCommonLike, Logger, RepoCommonLike } from "../common";
|
|
4
|
+
export interface LeyyoLike {
|
|
5
|
+
get developerError(): DeveloperErrorCtor;
|
|
6
|
+
get leyyoError(): LeyyoErrorCtor;
|
|
7
|
+
get loggerInstance(): LoggerInstanceCtor;
|
|
8
|
+
get logger(): Logger;
|
|
9
|
+
get deployCommon(): DeployCommonLike;
|
|
10
|
+
get enumPool(): EnumPoolLike;
|
|
11
|
+
get errorCommon(): ErrorCommonLike;
|
|
12
|
+
get errorPool(): ErrorPoolLike;
|
|
13
|
+
get eventCommon(): EventCommonLike<EventType>;
|
|
14
|
+
get lifecycleCommon(): LifecycleCommonLike;
|
|
15
|
+
get literalPool(): LiteralPoolLike;
|
|
16
|
+
get logCommon(): LogCommonLike;
|
|
17
|
+
get repoCommon(): RepoCommonLike;
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"leyyo.types.js","sourceRoot":"","sources":["../../src/base/leyyo.types.ts"],"names":[],"mappings":""}
|
package/dist/class/index.d.ts
CHANGED
package/dist/class/index.js
CHANGED
|
@@ -14,6 +14,6 @@ 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("./list"), exports);
|
|
18
|
-
__exportStar(require("./logger.instance"), exports);
|
|
19
19
|
//# sourceMappingURL=index.js.map
|
package/dist/class/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/class/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/class/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B;AAE9B,yCAAuB"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Logger } from "../common";
|
|
2
|
+
export interface LoggerInstanceCtor {
|
|
3
|
+
new (name: string): Logger;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Extended array interface, ie: Clearable arrays
|
|
7
|
+
* */
|
|
8
|
+
export interface ListLike<T = unknown> extends Array<T> {
|
|
9
|
+
/**
|
|
10
|
+
* Clears array items, to align all iteration repositories, like Set, Map etc
|
|
11
|
+
*
|
|
12
|
+
* @return {number} - returns deleted count
|
|
13
|
+
* */
|
|
14
|
+
clear(): number;
|
|
15
|
+
/**
|
|
16
|
+
* Deletes given item
|
|
17
|
+
*
|
|
18
|
+
* @param {any} value - will be deleted record
|
|
19
|
+
* @return {boolean} - is deleted?
|
|
20
|
+
* */
|
|
21
|
+
delete(value: T): boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Deletes by given predicate
|
|
24
|
+
*
|
|
25
|
+
* @param {function} predicate - lambda expression
|
|
26
|
+
* @return {boolean} - is deleted?
|
|
27
|
+
* */
|
|
28
|
+
deleteByLambda(predicate: ListPredicate<T>): boolean;
|
|
29
|
+
}
|
|
30
|
+
export type ListPredicate<T = unknown> = (value: T, index?: number, arr?: Array<T>) => T;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.types.js","sourceRoot":"","sources":["../../src/class/index.types.ts"],"names":[],"mappings":""}
|
package/dist/class/list.d.ts
CHANGED
|
@@ -1,22 +1,26 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { LeyyoLike } from "../base";
|
|
2
2
|
import { LogLevel } from "../enum";
|
|
3
|
+
import { Opt } from "../function";
|
|
4
|
+
import { KEY_SECURE_1 } from "../const";
|
|
5
|
+
import { Logger, LoggerSecure } from "../common";
|
|
3
6
|
export declare class LoggerInstance implements Logger, LoggerSecure {
|
|
4
|
-
private
|
|
5
|
-
constructor(
|
|
6
|
-
static
|
|
7
|
-
static refresh(name: string, level: LogLevel): void;
|
|
7
|
+
private _name;
|
|
8
|
+
constructor(name: string);
|
|
9
|
+
static [KEY_SECURE_1](leyyo: LeyyoLike): void;
|
|
8
10
|
debug(message: any, params?: any | Opt): void;
|
|
9
11
|
trace(message: any, params?: any | Opt): void;
|
|
10
12
|
info(message: any, params?: any | Opt): void;
|
|
11
13
|
warn(message: any, params?: any | Opt): void;
|
|
12
14
|
error(message: any, params?: any | Opt): void;
|
|
13
15
|
fatal(message: any, params?: any | Opt): void;
|
|
16
|
+
/** @inheritDoc */
|
|
14
17
|
get $back(): Logger;
|
|
18
|
+
/** @inheritDoc */
|
|
15
19
|
get $secure(): LoggerSecure;
|
|
20
|
+
/** @inheritDoc */
|
|
16
21
|
get $name(): string;
|
|
17
|
-
|
|
22
|
+
/** @inheritDoc */
|
|
23
|
+
$refreshName(name: string): void;
|
|
24
|
+
/** @inheritDoc */
|
|
25
|
+
$refreshLevels(level: LogLevel): void;
|
|
18
26
|
}
|
|
19
|
-
/**
|
|
20
|
-
* Default logger for general purpose
|
|
21
|
-
* */
|
|
22
|
-
export declare const defLogger: Logger;
|
|
@@ -1,91 +1,71 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
const internal_1 = require("../internal");
|
|
5
|
-
const common_1 = require("../common");
|
|
6
|
-
const error_1 = require("../error");
|
|
3
|
+
exports.LoggerInstance = void 0;
|
|
7
4
|
const function_1 = require("../function");
|
|
8
|
-
const
|
|
9
|
-
|
|
5
|
+
const const_1 = require("../const");
|
|
6
|
+
// region property
|
|
7
|
+
let _leyyo;
|
|
8
|
+
// endregion property
|
|
10
9
|
// noinspection JSUnusedLocalSymbols
|
|
11
10
|
class LoggerInstance {
|
|
12
|
-
constructor(
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
this._name = checkLoggerName((0, common_1.getFqn)(value), 0);
|
|
16
|
-
break;
|
|
17
|
-
case "object":
|
|
18
|
-
this._name = checkLoggerName((0, common_1.getFqn)(value), 0);
|
|
19
|
-
break;
|
|
20
|
-
case "string":
|
|
21
|
-
this._name = checkLoggerName(value, 0);
|
|
22
|
-
break;
|
|
23
|
-
default:
|
|
24
|
-
this._name = randomLoggerName();
|
|
11
|
+
constructor(name) {
|
|
12
|
+
if (!(0, function_1.isText)(name)) {
|
|
13
|
+
name = `Logger@` + Math.round(Math.random() * Number.MAX_SAFE_INTEGER).toString(10);
|
|
25
14
|
}
|
|
15
|
+
this._name = name;
|
|
26
16
|
}
|
|
27
17
|
// region static
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
32
|
-
// noinspection JSUnusedGlobalSymbols
|
|
33
|
-
static refresh(name, level) {
|
|
34
|
-
if (!(0, function_1.isText)(name)) {
|
|
35
|
-
throw new error_1.DeveloperError('Invalid logger name!', (0, common_1.testCase)(internal_1.FQN, 162), where);
|
|
36
|
-
}
|
|
37
|
-
if (!loggerDepot.has(name)) {
|
|
38
|
-
throw new error_1.DeveloperError(`Logger could not be found! name: ${name}`, (0, common_1.testCase)(internal_1.FQN, 162), where);
|
|
39
|
-
}
|
|
40
|
-
const instance = loggerDepot.get(name);
|
|
41
|
-
if (!(0, function_1.isText)(level)) {
|
|
42
|
-
throw new error_1.DeveloperError(`Invalid logger level! name: ${name}`, (0, common_1.testCase)(internal_1.FQN, 163), where);
|
|
43
|
-
}
|
|
44
|
-
if (level.startsWith('$')) {
|
|
45
|
-
throw new error_1.DeveloperError(`Forbidden logger level! name: ${name}, level: ${level}`, (0, common_1.testCase)(internal_1.FQN, 164), where);
|
|
46
|
-
}
|
|
47
|
-
if (typeof instance[level] !== 'function') {
|
|
48
|
-
throw new error_1.DeveloperError(`Logger level could not be found! name: ${name}, level: ${level}`, (0, common_1.testCase)(internal_1.FQN, 162), where);
|
|
49
|
-
}
|
|
50
|
-
try {
|
|
51
|
-
instance.$secure.$refresh(level);
|
|
52
|
-
}
|
|
53
|
-
catch (e) {
|
|
54
|
-
new error_1.DeveloperError(`Logger refresh raises! name: ${name}, level: ${level}`, (0, common_1.testCase)(internal_1.FQN, 162), where).log(e);
|
|
18
|
+
static [const_1.KEY_SECURE_1](leyyo) {
|
|
19
|
+
if (!_leyyo) {
|
|
20
|
+
_leyyo = leyyo;
|
|
55
21
|
}
|
|
56
22
|
}
|
|
57
23
|
// endregion static
|
|
58
24
|
// region levels
|
|
59
25
|
debug(message, params) {
|
|
60
|
-
|
|
26
|
+
_leyyo.logCommon.emitLog('debug', this._name, message, params);
|
|
61
27
|
}
|
|
62
28
|
trace(message, params) {
|
|
63
|
-
|
|
29
|
+
_leyyo.logCommon.emitLog('trace', this._name, message, params);
|
|
64
30
|
}
|
|
65
31
|
info(message, params) {
|
|
66
|
-
|
|
32
|
+
_leyyo.logCommon.emitLog('info', this._name, message, params);
|
|
67
33
|
}
|
|
68
34
|
warn(message, params) {
|
|
69
|
-
|
|
35
|
+
_leyyo.logCommon.emitLog('warn', this._name, message, params);
|
|
70
36
|
}
|
|
71
37
|
error(message, params) {
|
|
72
|
-
|
|
38
|
+
_leyyo.logCommon.emitLog('error', this._name, message, params);
|
|
73
39
|
}
|
|
74
40
|
fatal(message, params) {
|
|
75
|
-
|
|
41
|
+
_leyyo.logCommon.emitLog('fatal', this._name, message, params);
|
|
76
42
|
}
|
|
77
43
|
// endregion levels
|
|
78
44
|
// region secure
|
|
45
|
+
/** @inheritDoc */
|
|
79
46
|
get $back() {
|
|
80
47
|
return this;
|
|
81
48
|
}
|
|
49
|
+
/** @inheritDoc */
|
|
82
50
|
get $secure() {
|
|
83
51
|
return this;
|
|
84
52
|
}
|
|
53
|
+
/** @inheritDoc */
|
|
85
54
|
get $name() {
|
|
86
55
|
return this._name;
|
|
87
56
|
}
|
|
88
|
-
|
|
57
|
+
/** @inheritDoc */
|
|
58
|
+
$refreshName(name) {
|
|
59
|
+
if (!(0, function_1.isText)(name)) {
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
this._name = name;
|
|
63
|
+
}
|
|
64
|
+
/** @inheritDoc */
|
|
65
|
+
$refreshLevels(level) {
|
|
66
|
+
if (!(0, function_1.isText)(level)) {
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
89
69
|
const rec = {
|
|
90
70
|
debug: false,
|
|
91
71
|
trace: false,
|
|
@@ -118,7 +98,7 @@ class LoggerInstance {
|
|
|
118
98
|
}
|
|
119
99
|
for (const [k, active] of Object.entries(rec)) {
|
|
120
100
|
if (active) {
|
|
121
|
-
this[k] = (message, params) =>
|
|
101
|
+
this[k] = (message, params) => _leyyo.logCommon.emitLog(k, this._name, message, params);
|
|
122
102
|
}
|
|
123
103
|
else {
|
|
124
104
|
this[k] = (_message, _params) => {
|
|
@@ -128,22 +108,4 @@ class LoggerInstance {
|
|
|
128
108
|
}
|
|
129
109
|
}
|
|
130
110
|
exports.LoggerInstance = LoggerInstance;
|
|
131
|
-
/**
|
|
132
|
-
* Generate random test no
|
|
133
|
-
*
|
|
134
|
-
* @return {string}
|
|
135
|
-
* */
|
|
136
|
-
function randomLoggerName() {
|
|
137
|
-
return checkLoggerName('Logger', Math.floor(Math.random() * 1000));
|
|
138
|
-
}
|
|
139
|
-
function checkLoggerName(name, index) {
|
|
140
|
-
if (loggerDepot.has(name)) {
|
|
141
|
-
return checkLoggerName(name, index + 1);
|
|
142
|
-
}
|
|
143
|
-
return name + (index === 0) ? '' : `(#${index})`;
|
|
144
|
-
}
|
|
145
|
-
/**
|
|
146
|
-
* Default logger for general purpose
|
|
147
|
-
* */
|
|
148
|
-
exports.defLogger = new LoggerInstance('*DefaultLogger');
|
|
149
111
|
//# sourceMappingURL=logger.instance.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.instance.js","sourceRoot":"","sources":["../../src/class/logger.instance.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"logger.instance.js","sourceRoot":"","sources":["../../src/class/logger.instance.ts"],"names":[],"mappings":";;;AAEA,0CAAwC;AACxC,oCAAsC;AAGtC,kBAAkB;AAClB,IAAI,MAAiB,CAAC;AACtB,qBAAqB;AAErB,oCAAoC;AACpC,MAAa,cAAc;IAGvB,YAAY,IAAY;QACpB,IAAK,CAAC,IAAA,iBAAM,EAAC,IAAI,CAAC,EAAE,CAAC;YACjB,IAAI,GAAG,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,MAAM,CAAC,gBAAgB,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;QACxF,CAAC;QACD,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;IACtB,CAAC;IAED,gBAAgB;IAEhB,MAAM,CAAC,CAA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