@leyyo/common 1.0.13 → 1.2.2
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/deploy/deploy.common.d.ts +12 -7
- package/dist/deploy/deploy.common.js +29 -10
- package/dist/deploy/deploy.common.js.map +1 -1
- package/dist/deploy/index.types.d.ts +12 -8
- package/dist/error/error.common.d.ts +12 -20
- package/dist/error/error.common.js +151 -85
- package/dist/error/error.common.js.map +1 -1
- package/dist/error/http-error.map.d.ts +6 -0
- package/dist/error/http-error.map.js +25 -0
- package/dist/error/http-error.map.js.map +1 -0
- package/dist/error/index.d.ts +2 -0
- package/dist/error/index.js +2 -0
- package/dist/error/index.js.map +1 -1
- package/dist/error/index.types.d.ts +35 -36
- package/dist/error/items/bad-request.error.d.ts +10 -0
- package/dist/error/items/bad-request.error.js +16 -0
- package/dist/error/items/bad-request.error.js.map +1 -0
- package/dist/error/items/caused.error.d.ts +8 -0
- package/dist/error/items/caused.error.js +16 -0
- package/dist/error/items/caused.error.js.map +1 -0
- package/dist/error/items/conflict.error.d.ts +10 -0
- package/dist/error/items/conflict.error.js +16 -0
- package/dist/error/items/conflict.error.js.map +1 -0
- package/dist/error/items/content-too-large.error.d.ts +10 -0
- package/dist/error/items/content-too-large.error.js +16 -0
- package/dist/error/items/content-too-large.error.js.map +1 -0
- package/dist/error/items/developer.error.d.ts +4 -0
- package/dist/error/items/developer.error.js +9 -0
- package/dist/error/items/developer.error.js.map +1 -0
- package/dist/error/items/forbidden.error.d.ts +10 -0
- package/dist/error/items/forbidden.error.js +16 -0
- package/dist/error/items/forbidden.error.js.map +1 -0
- package/dist/error/items/gone.error.d.ts +10 -0
- package/dist/error/items/gone.error.js +16 -0
- package/dist/error/items/gone.error.js.map +1 -0
- package/dist/error/items/http.error.d.ts +15 -0
- package/dist/error/items/http.error.js +21 -0
- package/dist/error/items/http.error.js.map +1 -0
- package/dist/error/items/index.d.ts +21 -0
- package/dist/error/items/index.js +38 -0
- package/dist/error/items/index.js.map +1 -0
- package/dist/error/items/invalid-value.error.d.ts +6 -0
- package/dist/error/items/invalid-value.error.js +11 -0
- package/dist/error/items/invalid-value.error.js.map +1 -0
- package/dist/error/items/length-required.error.d.ts +10 -0
- package/dist/error/items/length-required.error.js +16 -0
- package/dist/error/items/length-required.error.js.map +1 -0
- package/dist/error/items/leyyo.error.d.ts +50 -0
- package/dist/error/items/leyyo.error.js +98 -0
- package/dist/error/items/leyyo.error.js.map +1 -0
- package/dist/error/items/method-not-allowed.error.d.ts +10 -0
- package/dist/error/items/method-not-allowed.error.js +16 -0
- package/dist/error/items/method-not-allowed.error.js.map +1 -0
- package/dist/error/items/multiple.error.d.ts +11 -0
- package/dist/error/items/multiple.error.js +34 -0
- package/dist/error/items/multiple.error.js.map +1 -0
- package/dist/error/items/not-acceptable.error.d.ts +10 -0
- package/dist/error/items/not-acceptable.error.js +16 -0
- package/dist/error/items/not-acceptable.error.js.map +1 -0
- package/dist/error/items/not-found.error.d.ts +10 -0
- package/dist/error/items/not-found.error.js +16 -0
- package/dist/error/items/not-found.error.js.map +1 -0
- package/dist/error/items/payment-required.error.d.ts +10 -0
- package/dist/error/items/payment-required.error.js +16 -0
- package/dist/error/items/payment-required.error.js.map +1 -0
- package/dist/error/items/precondition-failed.error.d.ts +10 -0
- package/dist/error/items/precondition-failed.error.js +16 -0
- package/dist/error/items/precondition-failed.error.js.map +1 -0
- package/dist/error/items/proxy-authentication-required.error.d.ts +10 -0
- package/dist/error/items/proxy-authentication-required.error.js +16 -0
- package/dist/error/items/proxy-authentication-required.error.js.map +1 -0
- package/dist/error/items/request-timeout.error.d.ts +10 -0
- package/dist/error/items/request-timeout.error.js +16 -0
- package/dist/error/items/request-timeout.error.js.map +1 -0
- package/dist/error/items/silent.error.d.ts +11 -0
- package/dist/error/items/silent.error.js +19 -0
- package/dist/error/items/silent.error.js.map +1 -0
- package/dist/error/items/unauthorized.error.d.ts +10 -0
- package/dist/error/items/unauthorized.error.js +16 -0
- package/dist/error/items/unauthorized.error.js.map +1 -0
- package/dist/event/event.common.d.ts +77 -0
- package/dist/event/event.common.js +308 -0
- package/dist/event/event.common.js.map +1 -0
- package/dist/event/event.error.d.ts +3 -0
- package/dist/event/event.error.js +8 -0
- package/dist/event/event.error.js.map +1 -0
- package/dist/event/index.js.map +1 -0
- package/dist/event/index.types.d.ts +261 -0
- package/dist/{hook → event}/index.types.js.map +1 -1
- package/dist/hub/hub.channel.d.ts +27 -0
- package/dist/hub/hub.channel.js +83 -0
- package/dist/hub/hub.channel.js.map +1 -0
- package/dist/hub/hub.common.d.ts +27 -0
- package/dist/hub/hub.common.js +92 -0
- package/dist/hub/hub.common.js.map +1 -0
- package/dist/hub/index.js.map +1 -0
- package/dist/hub/index.types.d.ts +105 -0
- package/dist/{to → hub}/index.types.js.map +1 -1
- package/dist/index.d.ts +5 -23
- package/dist/index.js +7 -25
- package/dist/index.js.map +1 -1
- package/dist/leyyo/index.d.ts +0 -1
- package/dist/leyyo/index.js +0 -1
- package/dist/leyyo/index.js.map +1 -1
- package/dist/leyyo/index.types.d.ts +4 -22
- package/dist/leyyo/leyyo.d.ts +4 -22
- package/dist/leyyo/leyyo.js +12 -39
- package/dist/leyyo/leyyo.js.map +1 -1
- package/dist/log/index.types.d.ts +19 -26
- package/dist/log/log.common.d.ts +1 -1
- package/dist/log/log.common.js +24 -49
- package/dist/log/log.common.js.map +1 -1
- package/dist/log/logger.error.d.ts +3 -0
- package/dist/log/logger.error.js +8 -0
- package/dist/log/logger.error.js.map +1 -0
- package/dist/log/logger.instance.d.ts +7 -9
- package/dist/log/logger.instance.js +40 -50
- package/dist/log/logger.instance.js.map +1 -1
- package/dist/name/index.types.d.ts +1 -1
- package/dist/name/name.common.js +64 -37
- package/dist/name/name.common.js.map +1 -1
- package/dist/name/name.error.d.ts +3 -0
- package/dist/name/name.error.js +8 -0
- package/dist/name/name.error.js.map +1 -0
- package/dist/opt/index.js.map +1 -0
- package/dist/opt/index.types.d.ts +33 -0
- package/dist/{fqn → opt}/index.types.js.map +1 -1
- package/dist/opt/opt.common.d.ts +15 -0
- package/dist/opt/opt.common.js +93 -0
- package/dist/opt/opt.common.js.map +1 -0
- package/dist/repo/index.types.d.ts +1 -19
- package/dist/repo/repo.common.d.ts +0 -6
- package/dist/repo/repo.common.js +0 -20
- package/dist/repo/repo.common.js.map +1 -1
- package/dist/shared/index.d.ts +3 -0
- package/dist/shared/index.enum.d.ts +7 -0
- package/dist/{exception/index.types.js → shared/index.enum.js} +1 -1
- package/dist/shared/index.enum.js.map +1 -0
- package/dist/shared/index.fqn.d.ts +3 -0
- package/dist/shared/index.fqn.js +3 -0
- package/dist/shared/index.fqn.js.map +1 -0
- package/dist/shared/index.js +3 -0
- package/dist/shared/index.js.map +1 -1
- package/dist/shared/index.json.d.ts +33 -0
- package/dist/shared/index.json.js +3 -0
- package/dist/shared/index.json.js.map +1 -0
- package/dist/shared/index.types.d.ts +78 -100
- package/dist/shared/index.types.js +31 -0
- package/dist/shared/index.types.js.map +1 -1
- package/dist/util/delay.d.ts +9 -0
- package/dist/util/delay.js +21 -0
- package/dist/util/delay.js.map +1 -0
- package/dist/util/empty.fn.d.ts +8 -0
- package/dist/util/empty.fn.js +11 -0
- package/dist/util/empty.fn.js.map +1 -0
- package/dist/util/index.d.ts +5 -0
- package/dist/{developer → util}/index.js +5 -2
- package/dist/util/index.js.map +1 -0
- package/dist/util/one-or-more.d.ts +8 -0
- package/dist/util/one-or-more.js +19 -0
- package/dist/util/one-or-more.js.map +1 -0
- package/dist/util/secure-clone.d.ts +3 -0
- package/dist/util/secure-clone.js +38 -0
- package/dist/util/secure-clone.js.map +1 -0
- package/dist/util/secure-json.d.ts +37 -0
- package/dist/util/secure-json.js +126 -0
- package/dist/util/secure-json.js.map +1 -0
- package/package.json +2 -2
- package/dist/assertion/assertion.common.d.ts +0 -183
- package/dist/assertion/assertion.common.js +0 -663
- package/dist/assertion/assertion.common.js.map +0 -1
- package/dist/assertion/index.js.map +0 -1
- package/dist/assertion/index.types.d.ts +0 -661
- package/dist/assertion/index.types.js.map +0 -1
- package/dist/descriptor/descriptor.common.d.ts +0 -22
- package/dist/descriptor/descriptor.common.js +0 -117
- package/dist/descriptor/descriptor.common.js.map +0 -1
- package/dist/descriptor/index.js.map +0 -1
- package/dist/descriptor/index.types.d.ts +0 -23
- package/dist/descriptor/index.types.js.map +0 -1
- package/dist/developer/developer.common.d.ts +0 -32
- package/dist/developer/developer.common.js +0 -245
- package/dist/developer/developer.common.js.map +0 -1
- package/dist/developer/index.d.ts +0 -2
- package/dist/developer/index.errors.d.ts +0 -13
- package/dist/developer/index.errors.js +0 -24
- package/dist/developer/index.errors.js.map +0 -1
- package/dist/developer/index.js.map +0 -1
- package/dist/developer/index.types.d.ts +0 -85
- package/dist/developer/index.types.js.map +0 -1
- package/dist/exception/assertion.exception.d.ts +0 -5
- package/dist/exception/assertion.exception.js +0 -12
- package/dist/exception/assertion.exception.js.map +0 -1
- package/dist/exception/caused.exception.d.ts +0 -5
- package/dist/exception/caused.exception.js +0 -13
- package/dist/exception/caused.exception.js.map +0 -1
- package/dist/exception/developer.exception.d.ts +0 -5
- package/dist/exception/developer.exception.js +0 -12
- package/dist/exception/developer.exception.js.map +0 -1
- package/dist/exception/exception.d.ts +0 -32
- package/dist/exception/exception.js +0 -117
- package/dist/exception/exception.js.map +0 -1
- package/dist/exception/index.d.ts +0 -7
- package/dist/exception/index.js +0 -24
- package/dist/exception/index.js.map +0 -1
- package/dist/exception/index.types.d.ts +0 -30
- package/dist/exception/index.types.js.map +0 -1
- package/dist/exception/invalid-value.exception.d.ts +0 -5
- package/dist/exception/invalid-value.exception.js +0 -12
- package/dist/exception/invalid-value.exception.js.map +0 -1
- package/dist/exception/multiple.exception.d.ts +0 -8
- package/dist/exception/multiple.exception.js +0 -34
- package/dist/exception/multiple.exception.js.map +0 -1
- package/dist/fqn/fqn.common.d.ts +0 -20
- package/dist/fqn/fqn.common.js +0 -123
- package/dist/fqn/fqn.common.js.map +0 -1
- package/dist/fqn/index.js.map +0 -1
- package/dist/fqn/index.types.d.ts +0 -20
- package/dist/fqn/index.types.js +0 -3
- package/dist/hook/hook.common.d.ts +0 -25
- package/dist/hook/hook.common.js +0 -95
- package/dist/hook/hook.common.js.map +0 -1
- package/dist/hook/index.d.ts +0 -1
- package/dist/hook/index.js +0 -18
- package/dist/hook/index.js.map +0 -1
- package/dist/hook/index.types.d.ts +0 -72
- package/dist/hook/index.types.js +0 -3
- package/dist/is/index.d.ts +0 -1
- package/dist/is/index.js +0 -18
- package/dist/is/index.js.map +0 -1
- package/dist/is/index.types.d.ts +0 -240
- package/dist/is/index.types.js +0 -3
- package/dist/is/index.types.js.map +0 -1
- package/dist/is/is.common.d.ts +0 -71
- package/dist/is/is.common.js +0 -177
- package/dist/is/is.common.js.map +0 -1
- package/dist/leyyo/leyyo-hook.common.d.ts +0 -10
- package/dist/leyyo/leyyo-hook.common.js +0 -18
- package/dist/leyyo/leyyo-hook.common.js.map +0 -1
- package/dist/mixin/index.d.ts +0 -1
- package/dist/mixin/index.js +0 -18
- package/dist/mixin/index.js.map +0 -1
- package/dist/mixin/index.types.d.ts +0 -19
- package/dist/mixin/index.types.js +0 -3
- package/dist/mixin/index.types.js.map +0 -1
- package/dist/mixin/mixin.common.d.ts +0 -22
- package/dist/mixin/mixin.common.js +0 -165
- package/dist/mixin/mixin.common.js.map +0 -1
- package/dist/system/country-code.d.ts +0 -10
- package/dist/system/country-code.js +0 -19
- package/dist/system/country-code.js.map +0 -1
- package/dist/system/environment.d.ts +0 -7
- package/dist/system/environment.js +0 -6
- package/dist/system/environment.js.map +0 -1
- package/dist/system/index.d.ts +0 -7
- package/dist/system/index.js +0 -24
- package/dist/system/index.js.map +0 -1
- package/dist/system/index.types.d.ts +0 -6
- package/dist/system/index.types.js +0 -3
- package/dist/system/index.types.js.map +0 -1
- package/dist/system/language-code.d.ts +0 -7
- package/dist/system/language-code.js +0 -11
- package/dist/system/language-code.js.map +0 -1
- package/dist/system/locale-code.d.ts +0 -9
- package/dist/system/locale-code.js +0 -16
- package/dist/system/locale-code.js.map +0 -1
- package/dist/system/sys-class.d.ts +0 -4
- package/dist/system/sys-class.js +0 -21
- package/dist/system/sys-class.js.map +0 -1
- package/dist/system/sys-function.d.ts +0 -4
- package/dist/system/sys-function.js +0 -8
- package/dist/system/sys-function.js.map +0 -1
- package/dist/system/system.common.d.ts +0 -11
- package/dist/system/system.common.js +0 -64
- package/dist/system/system.common.js.map +0 -1
- package/dist/test/index.d.ts +0 -2
- package/dist/test/index.js +0 -19
- package/dist/test/index.js.map +0 -1
- package/dist/test/index.types.d.ts +0 -9
- package/dist/test/index.types.js +0 -3
- package/dist/test/index.types.js.map +0 -1
- package/dist/test/test.common.d.ts +0 -14
- package/dist/test/test.common.js +0 -48
- package/dist/test/test.common.js.map +0 -1
- package/dist/test/tested.d.ts +0 -1
- package/dist/test/tested.js +0 -9
- package/dist/test/tested.js.map +0 -1
- package/dist/to/index.d.ts +0 -7
- package/dist/to/index.js +0 -24
- package/dist/to/index.js.map +0 -1
- package/dist/to/index.types.d.ts +0 -76
- package/dist/to/index.types.js +0 -3
- package/dist/to/key-value.d.ts +0 -4
- package/dist/to/key-value.js +0 -8
- package/dist/to/key-value.js.map +0 -1
- package/dist/to/list.d.ts +0 -20
- package/dist/to/list.js +0 -38
- package/dist/to/list.js.map +0 -1
- package/dist/to/primitive.d.ts +0 -7
- package/dist/to/primitive.js +0 -6
- package/dist/to/primitive.js.map +0 -1
- package/dist/to/real-value.d.ts +0 -7
- package/dist/to/real-value.js +0 -6
- package/dist/to/real-value.js.map +0 -1
- package/dist/to/to.common.d.ts +0 -77
- package/dist/to/to.common.js +0 -1079
- package/dist/to/to.common.js.map +0 -1
- package/dist/to/weak-false.d.ts +0 -7
- package/dist/to/weak-false.js +0 -6
- package/dist/to/weak-false.js.map +0 -1
- package/dist/to/weak-true.d.ts +0 -7
- package/dist/to/weak-true.js +0 -9
- package/dist/to/weak-true.js.map +0 -1
- package/dist/wrapper/index.d.ts +0 -2
- package/dist/wrapper/index.js +0 -19
- package/dist/wrapper/index.js.map +0 -1
- package/dist/wrapper/index.types.d.ts +0 -29
- package/dist/wrapper/index.types.js +0 -3
- package/dist/wrapper/index.types.js.map +0 -1
- package/dist/wrapper/wrap.d.ts +0 -7
- package/dist/wrapper/wrap.js +0 -11
- package/dist/wrapper/wrap.js.map +0 -1
- package/dist/wrapper/wrapper.common.d.ts +0 -26
- package/dist/wrapper/wrapper.common.js +0 -82
- package/dist/wrapper/wrapper.common.js.map +0 -1
- /package/dist/{assertion → event}/index.d.ts +0 -0
- /package/dist/{assertion → event}/index.js +0 -0
- /package/dist/{assertion → event}/index.types.js +0 -0
- /package/dist/{descriptor → hub}/index.d.ts +0 -0
- /package/dist/{descriptor → hub}/index.js +0 -0
- /package/dist/{descriptor → hub}/index.types.js +0 -0
- /package/dist/{fqn → opt}/index.d.ts +0 -0
- /package/dist/{fqn → opt}/index.js +0 -0
- /package/dist/{developer → opt}/index.types.js +0 -0
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { ErrorCommonLike } from "../error";
|
|
2
|
-
import type { Abstract, ClassLike, ClassOrName, Dict } from "../shared";
|
|
3
|
-
import type { LeyyoLike } from "../leyyo";
|
|
4
|
-
import type { ExceptionLike, ExceptionParamsAppend, ExceptionSecure, ExceptionStackLine } from "./index.types";
|
|
5
|
-
export declare class Exception extends Error implements ExceptionLike, ExceptionSecure {
|
|
6
|
-
private static lyy;
|
|
7
|
-
protected _params: Dict;
|
|
8
|
-
protected _parsed: Array<ExceptionStackLine>;
|
|
9
|
-
protected _holder?: ClassOrName;
|
|
10
|
-
protected _cause?: ExceptionLike;
|
|
11
|
-
protected _req?: unknown;
|
|
12
|
-
constructor(message: string, params?: Dict);
|
|
13
|
-
get params(): Dict;
|
|
14
|
-
$setName(name: string): this;
|
|
15
|
-
causedBy(e: Error | string): this;
|
|
16
|
-
with(value: ClassLike | Abstract<any> | string | any): this;
|
|
17
|
-
appendParams(params: ExceptionParamsAppend, ignoreExisting?: boolean): this;
|
|
18
|
-
log(req?: unknown): this;
|
|
19
|
-
raise(throwable?: boolean, req?: unknown): this;
|
|
20
|
-
toObject(...omittedFields: Array<string>): Dict;
|
|
21
|
-
toJSON(): Dict;
|
|
22
|
-
static cast(e: string | Error): ExceptionLike;
|
|
23
|
-
$hasSign(key: string): boolean;
|
|
24
|
-
$listSigns(): Array<string>;
|
|
25
|
-
$addSign(...keys: Array<string>): boolean;
|
|
26
|
-
$removeSign(...keys: Array<string>): boolean;
|
|
27
|
-
static $setLeyyo(lyy: LeyyoLike): void;
|
|
28
|
-
static get $error(): ErrorCommonLike;
|
|
29
|
-
get $back(): ExceptionLike;
|
|
30
|
-
get $secure(): ExceptionSecure;
|
|
31
|
-
}
|
|
32
|
-
export type ExceptionClass<E extends Exception = Exception> = ClassLike<E>;
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Exception = void 0;
|
|
4
|
-
class Exception extends Error {
|
|
5
|
-
constructor(message, params) {
|
|
6
|
-
if ((global === null || global === void 0 ? void 0 : global.leyyo_is_testing) || Exception.lyy.test.is) {
|
|
7
|
-
if (Exception.lyy.dev) {
|
|
8
|
-
message += ` => ${Exception.lyy.dev.secureJson(params, true)}`;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
super(message);
|
|
12
|
-
this.name = Exception.lyy.fqn.name(this);
|
|
13
|
-
this._params = params !== null && params !== void 0 ? params : {};
|
|
14
|
-
this._parsed = [];
|
|
15
|
-
Exception.lyy.error.afterCreate(this);
|
|
16
|
-
}
|
|
17
|
-
get params() {
|
|
18
|
-
return this._params;
|
|
19
|
-
}
|
|
20
|
-
$setName(name) {
|
|
21
|
-
if (typeof name === 'string') {
|
|
22
|
-
this.name = name;
|
|
23
|
-
}
|
|
24
|
-
return this;
|
|
25
|
-
}
|
|
26
|
-
// noinspection JSUnusedLocalSymbols
|
|
27
|
-
causedBy(e) {
|
|
28
|
-
this._cause = Exception.lyy.error.causedBy(e);
|
|
29
|
-
return this;
|
|
30
|
-
}
|
|
31
|
-
with(value) {
|
|
32
|
-
this._holder = Exception.lyy.fqn.name(value);
|
|
33
|
-
return this;
|
|
34
|
-
}
|
|
35
|
-
appendParams(params, ignoreExisting) {
|
|
36
|
-
var _a;
|
|
37
|
-
this._params = (_a = this._params) !== null && _a !== void 0 ? _a : {};
|
|
38
|
-
try {
|
|
39
|
-
for (const [k, v] of Object.entries(params)) {
|
|
40
|
-
if (!(ignoreExisting && this._params[k] !== undefined)) {
|
|
41
|
-
this._params[k] = v;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
catch (e) {
|
|
46
|
-
}
|
|
47
|
-
return this;
|
|
48
|
-
}
|
|
49
|
-
log(req) {
|
|
50
|
-
if (this.$hasSign('printed')) {
|
|
51
|
-
return this;
|
|
52
|
-
}
|
|
53
|
-
if (req) {
|
|
54
|
-
this._req = req;
|
|
55
|
-
}
|
|
56
|
-
const params = {};
|
|
57
|
-
if (this._req) {
|
|
58
|
-
params['req'] = this._req;
|
|
59
|
-
}
|
|
60
|
-
params.where = this._holder;
|
|
61
|
-
// todo collect properties
|
|
62
|
-
const line = { level: 'error', message: this, params };
|
|
63
|
-
this.$addSign('printed');
|
|
64
|
-
Exception.lyy.log.apply(line);
|
|
65
|
-
return this;
|
|
66
|
-
}
|
|
67
|
-
raise(throwable = true, req) {
|
|
68
|
-
if (!throwable) {
|
|
69
|
-
if (req) {
|
|
70
|
-
this._req = req;
|
|
71
|
-
}
|
|
72
|
-
this.log();
|
|
73
|
-
return undefined;
|
|
74
|
-
}
|
|
75
|
-
throw this;
|
|
76
|
-
}
|
|
77
|
-
toObject(...omittedFields) {
|
|
78
|
-
return Exception.lyy.error.toObject(this, ...omittedFields);
|
|
79
|
-
}
|
|
80
|
-
toJSON() {
|
|
81
|
-
try {
|
|
82
|
-
return this.toObject();
|
|
83
|
-
}
|
|
84
|
-
catch (e) {
|
|
85
|
-
return { name: this.name, message: this.message, params: this._params };
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
static cast(e) {
|
|
89
|
-
return Exception.lyy.error.build(e);
|
|
90
|
-
}
|
|
91
|
-
$hasSign(key) {
|
|
92
|
-
return Exception.lyy.error.hasSign(this, key);
|
|
93
|
-
}
|
|
94
|
-
$listSigns() {
|
|
95
|
-
return Exception.lyy.error.getSign(this);
|
|
96
|
-
}
|
|
97
|
-
$addSign(...keys) {
|
|
98
|
-
return Exception.lyy.error.addSign(this, ...keys);
|
|
99
|
-
}
|
|
100
|
-
$removeSign(...keys) {
|
|
101
|
-
return Exception.lyy.error.removeSign(this, ...keys);
|
|
102
|
-
}
|
|
103
|
-
static $setLeyyo(lyy) {
|
|
104
|
-
this.lyy = lyy;
|
|
105
|
-
}
|
|
106
|
-
static get $error() {
|
|
107
|
-
return this.lyy.error;
|
|
108
|
-
}
|
|
109
|
-
get $back() {
|
|
110
|
-
return this;
|
|
111
|
-
}
|
|
112
|
-
get $secure() {
|
|
113
|
-
return this;
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
exports.Exception = Exception;
|
|
117
|
-
//# sourceMappingURL=exception.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"exception.js","sourceRoot":"","sources":["../../src/exception/exception.ts"],"names":[],"mappings":";;;AAQA,MAAa,SAAU,SAAQ,KAAK;IAShC,YAAY,OAAe,EAAE,MAAa;QACtC,IAAI,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,gBAAgB,KAAI,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC;YACpD,IAAI,SAAS,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC;gBACpB,OAAO,IAAI,OAAO,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC,EAA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B,CAAC;CAEJ;AAxID,8BAwIC"}
|
package/dist/exception/index.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
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("./exception"), exports);
|
|
19
|
-
__exportStar(require("./caused.exception"), exports);
|
|
20
|
-
__exportStar(require("./developer.exception"), exports);
|
|
21
|
-
__exportStar(require("./assertion.exception"), exports);
|
|
22
|
-
__exportStar(require("./multiple.exception"), exports);
|
|
23
|
-
__exportStar(require("./invalid-value.exception"), exports);
|
|
24
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/exception/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B;AAC9B,8CAA4B;AAC5B,qDAAmC;AACnC,wDAAsC;AACtC,wDAAsC;AACtC,uDAAqC;AACrC,4DAA0C"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { Abstract, ClassLike, Dict, ShiftMain, ShiftSecure } from "../shared";
|
|
2
|
-
export interface ExceptionStackLine {
|
|
3
|
-
file?: string;
|
|
4
|
-
method?: string;
|
|
5
|
-
line?: number;
|
|
6
|
-
column?: number;
|
|
7
|
-
}
|
|
8
|
-
export interface ExceptionParamsAppend extends Dict {
|
|
9
|
-
issue?: string;
|
|
10
|
-
}
|
|
11
|
-
export interface ExceptionLike extends Error, ShiftSecure<ExceptionSecure> {
|
|
12
|
-
get params(): Dict;
|
|
13
|
-
causedBy(e: Error | string): this;
|
|
14
|
-
with(clazz: ClassLike): this;
|
|
15
|
-
with(instance: Abstract<any>): this;
|
|
16
|
-
with(name: string): this;
|
|
17
|
-
with(value: any): this;
|
|
18
|
-
appendParams(params: ExceptionParamsAppend, ignoreExisting?: boolean): this;
|
|
19
|
-
log(req?: unknown): this;
|
|
20
|
-
raise(throwable?: boolean, req?: unknown): this;
|
|
21
|
-
toObject(...omittedFields: Array<string>): Dict;
|
|
22
|
-
toJSON(): Dict;
|
|
23
|
-
}
|
|
24
|
-
export interface ExceptionSecure extends ShiftMain<ExceptionLike> {
|
|
25
|
-
$setName(name: string): this;
|
|
26
|
-
$hasSign(key: string): boolean;
|
|
27
|
-
$listSigns(): Array<string>;
|
|
28
|
-
$addSign(...keys: Array<string>): boolean;
|
|
29
|
-
$removeSign(...keys: Array<string>): boolean;
|
|
30
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.types.js","sourceRoot":"","sources":["../../src/exception/index.types.ts"],"names":[],"mappings":""}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.InvalidValueException = void 0;
|
|
4
|
-
const exception_1 = require("./exception");
|
|
5
|
-
// noinspection Annotator
|
|
6
|
-
class InvalidValueException extends exception_1.Exception {
|
|
7
|
-
constructor(message, params) {
|
|
8
|
-
super(message, params);
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
exports.InvalidValueException = InvalidValueException;
|
|
12
|
-
//# sourceMappingURL=invalid-value.exception.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"invalid-value.exception.js","sourceRoot":"","sources":["../../src/exception/invalid-value.exception.ts"],"names":[],"mappings":";;;AAAA,2CAAsC;AAGtC,yBAAyB;AACzB,MAAa,qBAAsB,SAAQ,qBAAS;IAChD,YAAY,OAAe,EAAE,MAAe;QACxC,KAAK,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IAC3B,CAAC;CACJ;AAJD,sDAIC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Exception } from "./exception";
|
|
2
|
-
import type { ExceptionLike } from "./index.types";
|
|
3
|
-
export declare class MultipleException extends Exception {
|
|
4
|
-
protected _errors: Array<ExceptionLike>;
|
|
5
|
-
constructor(...errors: Array<Error>);
|
|
6
|
-
push(...errors: Array<Error>): this;
|
|
7
|
-
get errors(): Array<ExceptionLike>;
|
|
8
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MultipleException = void 0;
|
|
4
|
-
const exception_1 = require("./exception");
|
|
5
|
-
// noinspection Annotator
|
|
6
|
-
class MultipleException extends exception_1.Exception {
|
|
7
|
-
constructor(...errors) {
|
|
8
|
-
var _a;
|
|
9
|
-
const first = errors[0];
|
|
10
|
-
super((_a = first === null || first === void 0 ? void 0 : first.name) !== null && _a !== void 0 ? _a : "Multiple exceptions are occurred", {});
|
|
11
|
-
this._errors = [];
|
|
12
|
-
this.push(...errors);
|
|
13
|
-
}
|
|
14
|
-
push(...errors) {
|
|
15
|
-
errors.forEach(e => {
|
|
16
|
-
if (e instanceof MultipleException) {
|
|
17
|
-
this._errors.push(...e._errors);
|
|
18
|
-
}
|
|
19
|
-
else if (e instanceof exception_1.Exception) {
|
|
20
|
-
this._errors.push(e);
|
|
21
|
-
}
|
|
22
|
-
else {
|
|
23
|
-
this._errors.push(exception_1.Exception.$error.build(e));
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
return this;
|
|
27
|
-
}
|
|
28
|
-
// noinspection JSUnusedGlobalSymbols
|
|
29
|
-
get errors() {
|
|
30
|
-
return [...this._errors]; // cloned response
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
exports.MultipleException = MultipleException;
|
|
34
|
-
//# sourceMappingURL=multiple.exception.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"multiple.exception.js","sourceRoot":"","sources":["../../src/exception/multiple.exception.ts"],"names":[],"mappings":";;;AAAA,2CAAsC;AAGtC,yBAAyB;AACzB,MAAa,iBAAkB,SAAQ,qBAAS;IAG5C,YAAY,GAAG,MAAoB;;QAC/B,MAAM,KAAK,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;QACxB,KAAK,CAAC,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,mCAAI,kCAAkC,EAAE,EAAE,CAAC,CAAC;QAC7D,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;QAClB,IAAI,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,CAAC;IACzB,CAAC;IAED,IAAI,CAAC,GAAG,MAAoB;QACxB,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;YACf,IAAI,CAAC,YAAY,iBAAiB,EAAE,CAAC;gBACjC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC;YACpC,CAAC;iBAAM,IAAI,CAAC,YAAY,qBAAS,EAAE,CAAC;gBAChC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YACzB,CAAC;iBAAM,CAAC;gBACJ,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,qBAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;YACjD,CAAC;QACL,CAAC,CAAC,CAAA;QACF,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,qCAAqC;IACrC,IAAI,MAAM;QACN,OAAO,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,kBAAkB;IAChD,CAAC;CACJ;AA3BD,8CA2BC"}
|
package/dist/fqn/fqn.common.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { FqnHookCommon, FqnCommonLike, FqnCommonSecure, FqnStereoType } from "./index.types";
|
|
2
|
-
import { type LeyyoLike } from "../leyyo";
|
|
3
|
-
import type { Fnc, Obj } from "../shared";
|
|
4
|
-
export declare class FqnCommon implements FqnCommonLike, FqnCommonSecure {
|
|
5
|
-
private lyy;
|
|
6
|
-
private proper;
|
|
7
|
-
private _pendingSign;
|
|
8
|
-
constructor(lyy: LeyyoLike);
|
|
9
|
-
private get pendingSign();
|
|
10
|
-
get $back(): FqnCommonLike;
|
|
11
|
-
$init(): void;
|
|
12
|
-
get $secure(): FqnCommonSecure;
|
|
13
|
-
name(value: any): string;
|
|
14
|
-
exists(target: any): boolean;
|
|
15
|
-
register(name: string, value: any, type: FqnStereoType, pckName: string): void;
|
|
16
|
-
get isProper(): boolean;
|
|
17
|
-
$appendHook(target: Function | Object, callback: FqnHookCommon): void;
|
|
18
|
-
$runHooks(fn: Fnc | Obj, name: string): void;
|
|
19
|
-
addHook(target: Function | Object, callback: FqnHookCommon): boolean;
|
|
20
|
-
}
|
package/dist/fqn/fqn.common.js
DELETED
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FqnCommon = void 0;
|
|
4
|
-
const leyyo_1 = require("../leyyo");
|
|
5
|
-
const internal_1 = require("../internal");
|
|
6
|
-
// noinspection JSUnusedLocalSymbols,JSUnusedGlobalSymbols
|
|
7
|
-
class FqnCommon {
|
|
8
|
-
constructor(lyy) {
|
|
9
|
-
this.lyy = lyy;
|
|
10
|
-
this.name.bind(this);
|
|
11
|
-
this.exists.bind(this);
|
|
12
|
-
this.register.bind(this);
|
|
13
|
-
}
|
|
14
|
-
get pendingSign() {
|
|
15
|
-
if (this._pendingSign) {
|
|
16
|
-
return this._pendingSign;
|
|
17
|
-
}
|
|
18
|
-
this._pendingSign = this.lyy.descriptor.sym(internal_1.FQN, 'fqnPending');
|
|
19
|
-
return this._pendingSign;
|
|
20
|
-
}
|
|
21
|
-
get $back() {
|
|
22
|
-
return this;
|
|
23
|
-
}
|
|
24
|
-
$init() {
|
|
25
|
-
this.lyy.$secure
|
|
26
|
-
.$lazyRun(() => {
|
|
27
|
-
const rec = {
|
|
28
|
-
proper: false,
|
|
29
|
-
exists: this.exists,
|
|
30
|
-
name: this.name,
|
|
31
|
-
register: this.register,
|
|
32
|
-
};
|
|
33
|
-
// define itself temporarily for fqn operations
|
|
34
|
-
this.lyy.hook.defineProvider(leyyo_1.LeyyoHookCommon.fqnAttached, FqnCommon, rec);
|
|
35
|
-
// when new fqn provider is defined, replace all common methods
|
|
36
|
-
this.lyy.hook.whenProviderDefined(leyyo_1.LeyyoHookCommon.fqnAttached, FqnCommon, (ins) => {
|
|
37
|
-
if (ins.proper) {
|
|
38
|
-
this.proper = true;
|
|
39
|
-
}
|
|
40
|
-
this.exists = ins.exists;
|
|
41
|
-
this.name = ins.name;
|
|
42
|
-
this.register = ins.register;
|
|
43
|
-
});
|
|
44
|
-
})
|
|
45
|
-
.$lazyRun(() => {
|
|
46
|
-
this.lyy.fqn.register(null, FqnCommon, 'class', internal_1.FQN);
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
get $secure() {
|
|
50
|
-
return this;
|
|
51
|
-
}
|
|
52
|
-
name(value) {
|
|
53
|
-
switch (typeof value) {
|
|
54
|
-
case "function":
|
|
55
|
-
return value.name;
|
|
56
|
-
case "object":
|
|
57
|
-
return value.constructor.name;
|
|
58
|
-
case "string":
|
|
59
|
-
return value;
|
|
60
|
-
default:
|
|
61
|
-
return null;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
exists(target) {
|
|
65
|
-
return false;
|
|
66
|
-
}
|
|
67
|
-
register(name, value, type, pckName) {
|
|
68
|
-
this.lyy.hook.queueForCallback(leyyo_1.LeyyoHookCommon.fqnPendingRegister, name, value, type, pckName);
|
|
69
|
-
}
|
|
70
|
-
get isProper() {
|
|
71
|
-
return this.proper;
|
|
72
|
-
}
|
|
73
|
-
$appendHook(target, callback) {
|
|
74
|
-
let callbacks = this.lyy.descriptor.getValue(target, this.pendingSign);
|
|
75
|
-
if (!Array.isArray(callbacks)) {
|
|
76
|
-
callbacks = [];
|
|
77
|
-
}
|
|
78
|
-
callbacks.push(callback);
|
|
79
|
-
this.lyy.descriptor.save(target, this.pendingSign, callbacks);
|
|
80
|
-
}
|
|
81
|
-
$runHooks(fn, name) {
|
|
82
|
-
const callbacks = [];
|
|
83
|
-
let exists = false;
|
|
84
|
-
const desc = this.lyy.descriptor.get(fn, this.pendingSign);
|
|
85
|
-
if (desc) {
|
|
86
|
-
exists = true;
|
|
87
|
-
if (Array.isArray(desc.value)) {
|
|
88
|
-
callbacks.push(...desc.value);
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
if (exists) {
|
|
92
|
-
callbacks.forEach(lambda => {
|
|
93
|
-
try {
|
|
94
|
-
lambda(name);
|
|
95
|
-
}
|
|
96
|
-
catch (e) {
|
|
97
|
-
this.lyy.dev.log(e, { issue: 'lambda.run', where: `${internal_1.FQN}.CommonFqn`, method: '$runHooks', name, clazz: this.name(fn) });
|
|
98
|
-
}
|
|
99
|
-
});
|
|
100
|
-
this.lyy.descriptor.remove(fn, this.pendingSign);
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
addHook(target, callback) {
|
|
104
|
-
if (typeof target === 'object') {
|
|
105
|
-
try {
|
|
106
|
-
target = target.constructor;
|
|
107
|
-
}
|
|
108
|
-
catch (e) {
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
if (typeof target !== 'function' || typeof callback !== 'function') {
|
|
112
|
-
return false;
|
|
113
|
-
}
|
|
114
|
-
if (this.proper) {
|
|
115
|
-
callback(this.name(target));
|
|
116
|
-
return true;
|
|
117
|
-
}
|
|
118
|
-
this.$appendHook(target, callback);
|
|
119
|
-
return true;
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
exports.FqnCommon = FqnCommon;
|
|
123
|
-
//# sourceMappingURL=fqn.common.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fqn.common.js","sourceRoot":"","sources":["../../src/fqn/fqn.common.ts"],"names":[],"mappings":";;;AACA,oCAAyD;AAEzD,0CAAgC;AAEhC,0DAA0D;AAC1D,MAAa,SAAS;IAKlB,YAAoB,GAAc;QAAd,QAAG,GAAH,GAAG,CAAW;QAC9B,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACrB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACvB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC7B,CAAC;IAED,IAAY,WAAW;QACnB,IAAI,IAAI,CAAC,YAAY,EAAE,CAAC;YACpB,OAAO,IAAI,CAAC,YAAY,CAAC;QAC7B,CAAC;QACD,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,cAAG,EAAE,YAAY,CAAC,CAAC;QAC/D,OAAO,IAAI,CAAC,YAAY,CAAC;IAC7B,CAAC;IAED,IAAI,KAAK;QACL,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,KAAK;QAED,IAAI,CAAC,GAAG,CAAC,OAAO;aACX,QAAQ,CAAC,GAAG,EAAE;YACf,MAAM,GAAG,GAAG;gBACR,MAAM,EAAE,KAAK;gBACb,MAAM,EAAE,IAAI,CAAC,MAAM;gBACnB,IAA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 @@
|
|
|
1
|
-
import type { Fnc, InitLike, Obj, ShiftMain, ShiftSecure } from "../shared";
|
|
2
|
-
import type { HookDefinedProvider } from "../hook";
|
|
3
|
-
export interface FqnCommonLike extends ShiftSecure<FqnCommonSecure> {
|
|
4
|
-
name(target: any): string;
|
|
5
|
-
exists(target: any): boolean;
|
|
6
|
-
register(name: string, target: any, type: FqnStereoType, pckName: string): void;
|
|
7
|
-
addHook(target: Function | Object, callback: FqnHookCommon): boolean;
|
|
8
|
-
get isProper(): boolean;
|
|
9
|
-
}
|
|
10
|
-
export interface FqnCommonSecure extends ShiftMain<FqnCommonLike>, InitLike {
|
|
11
|
-
$runHooks(fn: Fnc | Obj, name: string): void;
|
|
12
|
-
$appendHook(target: Function | Object, callback: FqnHookCommon): void;
|
|
13
|
-
}
|
|
14
|
-
export interface FqnDefinedProvider extends HookDefinedProvider {
|
|
15
|
-
exists(target: any): boolean;
|
|
16
|
-
name(target: any): string;
|
|
17
|
-
register(name: string, target: any, type: FqnStereoType, pckName: string): void;
|
|
18
|
-
}
|
|
19
|
-
export type FqnStereoType = 'class' | 'function' | 'enum' | 'literal';
|
|
20
|
-
export type FqnHookCommon = (name: string) => void;
|
package/dist/fqn/index.types.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type { Arr, ClassLike, Fnc } from "../shared";
|
|
2
|
-
import { type LeyyoLike } from "../leyyo";
|
|
3
|
-
import type { HookCommonLike, HookCommonSecure, HookDefinedProvider, HookDefinedProviderLambda } from "./index.types";
|
|
4
|
-
export declare class HookCommon implements HookCommonLike, HookCommonSecure {
|
|
5
|
-
private lyy;
|
|
6
|
-
private _waitingForCallbacks;
|
|
7
|
-
private _attachedCallbacks;
|
|
8
|
-
private _waitingForProviders;
|
|
9
|
-
private _definedProviders;
|
|
10
|
-
/**
|
|
11
|
-
* Default constructor
|
|
12
|
-
*
|
|
13
|
-
* Responsibilities
|
|
14
|
-
* - Create repositories => ie: callbacks
|
|
15
|
-
* - Trigger clear pending operation
|
|
16
|
-
* */
|
|
17
|
-
constructor(lyy: LeyyoLike);
|
|
18
|
-
$init(): void;
|
|
19
|
-
get $secure(): HookCommonSecure;
|
|
20
|
-
attachCallback(channel: symbol, fn: Fnc): void;
|
|
21
|
-
queueForCallback(channel: symbol, ...args: Arr): boolean;
|
|
22
|
-
get $back(): HookCommonLike;
|
|
23
|
-
whenProviderDefined<T extends HookDefinedProvider = HookDefinedProvider>(channel: symbol, consumer: ClassLike, callback: HookDefinedProviderLambda<T>): void;
|
|
24
|
-
defineProvider<T extends HookDefinedProvider = HookDefinedProvider>(channel: symbol, producer: ClassLike, instance: T): void;
|
|
25
|
-
}
|
package/dist/hook/hook.common.js
DELETED
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.HookCommon = void 0;
|
|
4
|
-
const leyyo_1 = require("../leyyo");
|
|
5
|
-
const internal_1 = require("../internal");
|
|
6
|
-
// noinspection JSUnusedGlobalSymbols
|
|
7
|
-
class HookCommon {
|
|
8
|
-
/**
|
|
9
|
-
* Default constructor
|
|
10
|
-
*
|
|
11
|
-
* Responsibilities
|
|
12
|
-
* - Create repositories => ie: callbacks
|
|
13
|
-
* - Trigger clear pending operation
|
|
14
|
-
* */
|
|
15
|
-
constructor(lyy) {
|
|
16
|
-
this.lyy = lyy;
|
|
17
|
-
}
|
|
18
|
-
$init() {
|
|
19
|
-
this._waitingForCallbacks = this.lyy.repo.newMap(internal_1.FQN, 'waitingForCallbacks');
|
|
20
|
-
this._attachedCallbacks = this.lyy.repo.newMap(internal_1.FQN, 'attachedCallbacks');
|
|
21
|
-
this._waitingForProviders = this.lyy.repo.newMap(internal_1.FQN, 'waitingForProviders');
|
|
22
|
-
this._definedProviders = this.lyy.repo.newMap(internal_1.FQN, 'definedProviders');
|
|
23
|
-
this.lyy.$secure.$lazyRun(() => {
|
|
24
|
-
this.lyy.fqn.register(null, HookCommon, 'class', internal_1.FQN);
|
|
25
|
-
this.lyy.fqn.register(null, leyyo_1.LeyyoHookCommon, 'class', internal_1.FQN);
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
get $secure() {
|
|
29
|
-
return this;
|
|
30
|
-
}
|
|
31
|
-
attachCallback(channel, fn) {
|
|
32
|
-
this.lyy.assertion.sym(channel, () => this.lyy.dev.opt({ field: 'channel', where: `${internal_1.FQN}.HookCommon`, method: 'attachCallback' }));
|
|
33
|
-
this.lyy.assertion.func(fn, () => this.lyy.dev.opt({ field: 'fn', where: `${internal_1.FQN}.HookCommon`, method: 'attachCallback' }));
|
|
34
|
-
// callback attached
|
|
35
|
-
this._attachedCallbacks.set(channel, { fn });
|
|
36
|
-
// check waiting records, to be called
|
|
37
|
-
if (this._waitingForCallbacks.has(channel)) {
|
|
38
|
-
this._waitingForCallbacks.get(channel).forEach(item => {
|
|
39
|
-
fn(...item);
|
|
40
|
-
});
|
|
41
|
-
this._waitingForCallbacks.delete(channel);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
queueForCallback(channel, ...args) {
|
|
45
|
-
this.lyy.assertion.sym(channel, () => this.lyy.dev.opt({ field: 'channel', where: `${internal_1.FQN}.HookCommon`, method: 'queueForCallback' }));
|
|
46
|
-
// callback already exists
|
|
47
|
-
if (this._attachedCallbacks.has(channel)) {
|
|
48
|
-
const rec = this._attachedCallbacks.get(channel);
|
|
49
|
-
rec.fn(...args);
|
|
50
|
-
return true;
|
|
51
|
-
}
|
|
52
|
-
// callback does not exist yet, so wait to be attached
|
|
53
|
-
if (this._waitingForCallbacks.has(channel)) {
|
|
54
|
-
this._waitingForCallbacks.get(channel).push(args);
|
|
55
|
-
}
|
|
56
|
-
else {
|
|
57
|
-
this._waitingForCallbacks.set(channel, [args]);
|
|
58
|
-
}
|
|
59
|
-
return false;
|
|
60
|
-
}
|
|
61
|
-
get $back() {
|
|
62
|
-
return this;
|
|
63
|
-
}
|
|
64
|
-
whenProviderDefined(channel, consumer, callback) {
|
|
65
|
-
this.lyy.assertion.sym(channel, () => this.lyy.dev.opt({ field: 'channel', where: `${internal_1.FQN}.HookCommon`, method: 'whenProviderDefined' }));
|
|
66
|
-
this.lyy.assertion.func(consumer, () => this.lyy.dev.opt({ field: 'consumer', where: `${internal_1.FQN}.HookCommon`, method: 'whenProviderDefined' }));
|
|
67
|
-
if (!this._waitingForProviders.has(channel)) {
|
|
68
|
-
this._waitingForProviders.set(channel, []);
|
|
69
|
-
}
|
|
70
|
-
if (this._definedProviders.has(channel)) {
|
|
71
|
-
const ins = this._definedProviders.get(channel);
|
|
72
|
-
if (ins.producer !== consumer) {
|
|
73
|
-
callback(ins);
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
this._waitingForProviders.get(channel).push({ consumer, callback });
|
|
77
|
-
}
|
|
78
|
-
defineProvider(channel, producer, instance) {
|
|
79
|
-
this.lyy.assertion.sym(channel, () => this.lyy.dev.opt({ field: 'channel', where: `${internal_1.FQN}.HookCommon`, method: 'defineProvider' }));
|
|
80
|
-
this.lyy.assertion.func(producer, () => this.lyy.dev.opt({ field: 'producer', where: `${internal_1.FQN}.HookCommon`, method: 'defineProvider' }));
|
|
81
|
-
const ins = Object.assign(Object.assign({}, instance), { producer });
|
|
82
|
-
this._definedProviders.set(channel, ins);
|
|
83
|
-
if (instance.proper) {
|
|
84
|
-
if (this._waitingForProviders.has(channel)) {
|
|
85
|
-
this._waitingForProviders.get(channel).forEach(item => {
|
|
86
|
-
if (item.consumer !== producer) {
|
|
87
|
-
item.callback(instance);
|
|
88
|
-
}
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
exports.HookCommon = HookCommon;
|
|
95
|
-
//# sourceMappingURL=hook.common.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hook.common.js","sourceRoot":"","sources":["../../src/hook/hook.common.ts"],"names":[],"mappings":";;;AACA,oC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AAE,CAAC;wBAC7B,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;oBAC5B,CAAC;gBACL,CAAC,CAAC,CAAC;YACP,CAAC;QACL,CAAC;IAEL,CAAC;CACJ;AAxGD,gCAwGC"}
|
package/dist/hook/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './index.types';
|
package/dist/hook/index.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
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
|
-
//# sourceMappingURL=index.js.map
|
package/dist/hook/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/hook/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B"}
|