@leyyo/common 1.0.0 → 1.0.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/assertion/common-assertion-impl.d.ts +38 -7
- package/dist/assertion/common-assertion-impl.js +64 -26
- package/dist/assertion/index-types.d.ts +466 -75
- package/dist/assertion/index.d.ts +0 -1
- package/dist/assertion/index.js +0 -1
- package/dist/error/common-error-impl.d.ts +6 -4
- package/dist/error/common-error-impl.js +8 -4
- package/dist/error/index-types.d.ts +5 -54
- package/dist/error/index.d.ts +0 -5
- package/dist/error/index.js +0 -5
- package/dist/{error → exception}/assertion-exception.d.ts +1 -1
- package/dist/{error → exception}/caused-exception.d.ts +1 -1
- package/dist/{error → exception}/developer-exception.d.ts +1 -1
- package/dist/{error → exception}/exception.d.ts +4 -3
- package/dist/{error → exception}/exception.js +4 -4
- package/dist/exception/index-types.d.ts +30 -0
- package/dist/exception/index.d.ts +6 -0
- package/dist/exception/index.js +22 -0
- package/dist/fqn/common-fqn-impl.d.ts +11 -0
- package/dist/fqn/common-fqn-impl.js +47 -0
- package/dist/fqn/index-types.d.ts +6 -0
- package/dist/fqn/index-types.js +2 -0
- package/dist/fqn/index.d.ts +2 -0
- package/dist/{callback → fqn}/index.js +1 -1
- package/dist/hook/common-hook-impl.d.ts +30 -0
- package/dist/hook/common-hook-impl.js +111 -0
- package/dist/hook/index-types.d.ts +56 -0
- package/dist/hook/index-types.js +2 -0
- package/dist/hook/index.d.ts +2 -0
- package/dist/hook/index.js +18 -0
- package/dist/index.d.ts +11 -5
- package/dist/index.js +19 -6
- package/dist/is/common-is-impl.d.ts +36 -15
- package/dist/is/common-is-impl.js +35 -10
- package/dist/is/index-types.d.ts +142 -20
- package/dist/leyyo/index-types.d.ts +4 -2
- package/dist/leyyo/leyyo-impl.d.ts +4 -2
- package/dist/leyyo/leyyo-impl.js +37 -29
- package/dist/literal/country-code.d.ts +8 -0
- package/dist/literal/country-code.js +17 -0
- package/dist/literal/environment.d.ts +8 -0
- package/dist/literal/environment.js +7 -0
- package/dist/literal/http-method.d.ts +8 -0
- package/dist/literal/http-method.js +7 -0
- package/dist/literal/http-place.d.ts +8 -0
- package/dist/literal/http-place.js +7 -0
- package/dist/literal/index-types.d.ts +6 -0
- package/dist/literal/index-types.js +2 -0
- package/dist/literal/index.d.ts +14 -0
- package/dist/literal/index.js +30 -0
- package/dist/literal/key-value.d.ts +4 -0
- package/dist/literal/key-value.js +7 -0
- package/dist/literal/language-code.d.ts +8 -0
- package/dist/literal/language-code.js +12 -0
- package/dist/literal/locale-code.d.ts +10 -0
- package/dist/literal/locale-code.js +17 -0
- package/dist/literal/primitive.d.ts +8 -0
- package/dist/literal/primitive.js +7 -0
- package/dist/literal/real-value.d.ts +8 -0
- package/dist/literal/real-value.js +7 -0
- package/dist/literal/severity.d.ts +8 -0
- package/dist/literal/severity.js +7 -0
- package/dist/literal/storage-type.d.ts +8 -0
- package/dist/literal/storage-type.js +7 -0
- package/dist/literal/weak-false.d.ts +8 -0
- package/dist/literal/weak-false.js +7 -0
- package/dist/literal/weak-true.d.ts +8 -0
- package/dist/literal/weak-true.js +7 -0
- package/dist/log/common-log-impl.d.ts +3 -2
- package/dist/log/common-log-impl.js +6 -6
- package/dist/log/index-types.d.ts +2 -55
- package/dist/log/index-types.js +0 -1
- package/dist/log/index.d.ts +1 -1
- package/dist/log/index.js +1 -1
- package/dist/log/logger-impl.d.ts +4 -3
- package/dist/log/logger-impl.js +7 -6
- package/dist/{assertion → shared}/assert.js +1 -0
- package/dist/{aliases.d.ts → shared/index-aliases.d.ts} +32 -4
- package/dist/shared/index-types.d.ts +141 -0
- package/dist/shared/index-types.js +3 -0
- package/dist/shared/index.d.ts +5 -0
- package/dist/shared/index.js +21 -0
- package/dist/storage/common-storage-impl.d.ts +3 -2
- package/dist/storage/common-storage-impl.js +3 -3
- package/dist/storage/index-types.d.ts +3 -18
- package/dist/storage/index.d.ts +0 -1
- package/dist/storage/index.js +0 -1
- package/dist/to/common-to-impl.d.ts +19 -19
- package/dist/to/common-to-impl.js +11 -11
- package/dist/to/index-types.d.ts +18 -48
- package/package.json +1 -1
- package/dist/callback/common-callback-impl.d.ts +0 -31
- package/dist/callback/common-callback-impl.js +0 -134
- package/dist/callback/index-types.d.ts +0 -75
- package/dist/callback/index.d.ts +0 -2
- package/dist/literals.d.ts +0 -98
- package/dist/literals.js +0 -77
- package/dist/{error → exception}/assertion-exception.js +0 -0
- package/dist/{error → exception}/caused-exception.js +0 -0
- package/dist/{error → exception}/developer-exception.js +0 -0
- package/dist/{callback → exception}/index-types.js +0 -0
- package/dist/{error → exception}/multiple-exception.d.ts +1 -1
- package/dist/{error → exception}/multiple-exception.js +0 -0
- package/dist/{assertion → shared}/assert.d.ts +1 -1
- /package/dist/{aliases.js → shared/index-aliases.js} +0 -0
- /package/dist/{constants.d.ts → shared/index-constants.d.ts} +0 -0
- /package/dist/{constants.js → shared/index-constants.js} +0 -0
- /package/dist/{storage → shared}/list.d.ts +0 -0
- /package/dist/{storage → shared}/list.js +0 -0
|
@@ -1,64 +1,89 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CommonIsImpl = void 0;
|
|
4
|
-
const
|
|
4
|
+
const literal_1 = require("../literal");
|
|
5
5
|
// noinspection JSUnusedGlobalSymbols, JSUnusedLocalSymbols
|
|
6
|
+
/** @inheritDoc */
|
|
6
7
|
class CommonIsImpl {
|
|
7
|
-
$init(leyyo) {
|
|
8
|
-
}
|
|
9
8
|
// region is
|
|
9
|
+
/** @inheritDoc */
|
|
10
10
|
empty(value) {
|
|
11
|
-
return (value === undefined || value === null);
|
|
11
|
+
return (value === undefined || value === null || (typeof value === 'string' && value.trim() === ''));
|
|
12
12
|
}
|
|
13
|
+
/** @inheritDoc */
|
|
13
14
|
primitive(value) {
|
|
14
|
-
return
|
|
15
|
+
return literal_1.PrimitiveItems.includes((typeof value));
|
|
15
16
|
}
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
/** @inheritDoc */
|
|
18
|
+
realValue(value) {
|
|
19
|
+
return literal_1.RealValueItems.includes((typeof value));
|
|
18
20
|
}
|
|
21
|
+
/** @inheritDoc */
|
|
19
22
|
key(value) {
|
|
20
|
-
return
|
|
23
|
+
return literal_1.KeyValueItems.includes((typeof value));
|
|
21
24
|
}
|
|
25
|
+
/** @inheritDoc */
|
|
22
26
|
object(value) {
|
|
23
27
|
return value && typeof value === 'object' && !Array.isArray(value);
|
|
24
28
|
}
|
|
29
|
+
/** @inheritDoc */
|
|
25
30
|
array(value) {
|
|
26
31
|
return value && typeof value === 'object' && Array.isArray(value);
|
|
27
32
|
}
|
|
33
|
+
/** @inheritDoc */
|
|
28
34
|
func(value) {
|
|
29
35
|
return typeof value === 'function';
|
|
30
36
|
}
|
|
37
|
+
/** @inheritDoc */
|
|
31
38
|
number(value) {
|
|
32
39
|
return (typeof value === 'number') && !isNaN(value) && isFinite(value);
|
|
33
40
|
}
|
|
41
|
+
/** @inheritDoc */
|
|
34
42
|
integer(value) {
|
|
43
|
+
return this.number(value) && Number.isInteger(value);
|
|
44
|
+
}
|
|
45
|
+
/** @inheritDoc */
|
|
46
|
+
safeInteger(value) {
|
|
35
47
|
return this.number(value) && Number.isSafeInteger(value);
|
|
36
48
|
}
|
|
49
|
+
/** @inheritDoc */
|
|
37
50
|
string(value) {
|
|
38
51
|
return typeof value === 'string';
|
|
39
52
|
}
|
|
53
|
+
/** @inheritDoc */
|
|
40
54
|
text(value) {
|
|
41
55
|
return this.string(value) && value.trim() !== '';
|
|
42
56
|
}
|
|
57
|
+
/** @inheritDoc */
|
|
43
58
|
clazz(value) {
|
|
44
59
|
return this.text(value) || this.func(value) || this.object(value);
|
|
45
60
|
}
|
|
61
|
+
/** @inheritDoc */
|
|
46
62
|
boolean(value) {
|
|
47
63
|
return (typeof value === 'boolean');
|
|
48
64
|
}
|
|
65
|
+
/** @inheritDoc */
|
|
49
66
|
true(value) {
|
|
50
67
|
return (value === true) ||
|
|
51
|
-
(this.text(value) &&
|
|
68
|
+
(this.text(value) && literal_1.WeakTrueItems.includes(value.toLowerCase())) ||
|
|
52
69
|
(this.number(value) && value > 0);
|
|
53
70
|
}
|
|
71
|
+
/** @inheritDoc */
|
|
54
72
|
false(value) {
|
|
55
73
|
return (value === false) ||
|
|
56
|
-
(this.text(value) &&
|
|
74
|
+
(this.text(value) && literal_1.WeakFalseItems.includes(value.toLowerCase())) ||
|
|
57
75
|
(this.number(value) && value <= 0);
|
|
58
76
|
}
|
|
77
|
+
// endregion is
|
|
78
|
+
// region secure
|
|
79
|
+
/** @inheritDoc */
|
|
80
|
+
$init(leyyo) {
|
|
81
|
+
}
|
|
82
|
+
/** @inheritDoc */
|
|
59
83
|
get $back() {
|
|
60
84
|
return this;
|
|
61
85
|
}
|
|
86
|
+
/** @inheritDoc */
|
|
62
87
|
get $secure() {
|
|
63
88
|
return this;
|
|
64
89
|
}
|
package/dist/is/index-types.d.ts
CHANGED
|
@@ -1,22 +1,144 @@
|
|
|
1
|
-
import { ShiftMain, ShiftSecure } from "../
|
|
2
|
-
|
|
1
|
+
import { InitLike, ShiftMain, ShiftSecure } from "../shared";
|
|
2
|
+
/**
|
|
3
|
+
* Basic is commands to easy use
|
|
4
|
+
* */
|
|
3
5
|
export interface CommonIs extends ShiftSecure<CommonIsSecure> {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Checks value is empty or not?
|
|
8
|
+
* Empty means: `undefined`, `null` or `empty string` after trimming
|
|
9
|
+
*
|
|
10
|
+
* @param {any} value
|
|
11
|
+
* @returns {boolean}
|
|
12
|
+
* */
|
|
13
|
+
empty(value: any): boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Checks value is primitive or not?
|
|
16
|
+
* Primitive means: `string`, `number`, `boolean`
|
|
17
|
+
*
|
|
18
|
+
* @param {any} value
|
|
19
|
+
* @returns {boolean}
|
|
20
|
+
* */
|
|
21
|
+
primitive(value: any): boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Checks value is real value or not?
|
|
24
|
+
* Real value means: `string`, `number`, `bigint`, `boolean`, `object`, `function`
|
|
25
|
+
* So `symbol` is not a real value
|
|
26
|
+
*
|
|
27
|
+
* @param {any} value
|
|
28
|
+
* @returns {boolean}
|
|
29
|
+
* */
|
|
30
|
+
realValue(value: any): boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Checks value is key or not?
|
|
33
|
+
* Key means: `string`, `number`
|
|
34
|
+
*
|
|
35
|
+
* @param {any} value
|
|
36
|
+
* @returns {boolean}
|
|
37
|
+
* */
|
|
38
|
+
key(value: any): boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Checks value is object or not?
|
|
41
|
+
*
|
|
42
|
+
* @param {any} value
|
|
43
|
+
* @returns {boolean}
|
|
44
|
+
* */
|
|
45
|
+
object(value: any): boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Checks value is array or not?
|
|
48
|
+
*
|
|
49
|
+
* @param {any} value
|
|
50
|
+
* @returns {boolean}
|
|
51
|
+
* */
|
|
52
|
+
array(value: any): boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Checks value is function or not?
|
|
55
|
+
*
|
|
56
|
+
* @param {any} value
|
|
57
|
+
* @returns {boolean}
|
|
58
|
+
* */
|
|
59
|
+
func(value: any): boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Checks value is number (float or integer) or not?
|
|
62
|
+
*
|
|
63
|
+
* @param {any} value
|
|
64
|
+
* @returns {boolean}
|
|
65
|
+
*
|
|
66
|
+
* Note: NaN and infinite values are not evaluated as a number
|
|
67
|
+
* */
|
|
68
|
+
number(value: any): boolean;
|
|
69
|
+
/**
|
|
70
|
+
* Checks value is integer or not?
|
|
71
|
+
*
|
|
72
|
+
* @param {any} value
|
|
73
|
+
* @returns {boolean}
|
|
74
|
+
*
|
|
75
|
+
* Note: NaN and infinite values are not evaluated as a number
|
|
76
|
+
* */
|
|
77
|
+
integer(value: any): boolean;
|
|
78
|
+
/**
|
|
79
|
+
* Checks value is safe integer or not?
|
|
80
|
+
* Safe integer means: an integer can not be outside the bigint range
|
|
81
|
+
*
|
|
82
|
+
* @param {any} value
|
|
83
|
+
* @returns {boolean}
|
|
84
|
+
*
|
|
85
|
+
* Note: NaN and infinite values are not evaluated as a number
|
|
86
|
+
* */
|
|
87
|
+
safeInteger(value: any): boolean;
|
|
88
|
+
/**
|
|
89
|
+
* Checks value is string or not?
|
|
90
|
+
* Empty string or space values are also string, if you want different behaviour, please check {@link #text}
|
|
91
|
+
*
|
|
92
|
+
* @param {any} value
|
|
93
|
+
* @returns {boolean}
|
|
94
|
+
* */
|
|
95
|
+
string(value: any): boolean;
|
|
96
|
+
/**
|
|
97
|
+
* Checks value is string which is can not be empty and spaced?
|
|
98
|
+
* Empty string or space values are not a text, if you want different behaviour, please check {@link #string}
|
|
99
|
+
*
|
|
100
|
+
* @param {any} value
|
|
101
|
+
* @returns {boolean}
|
|
102
|
+
* */
|
|
103
|
+
text(value: any): boolean;
|
|
104
|
+
/**
|
|
105
|
+
* Checks value is possible class?
|
|
106
|
+
* Possible class means: object as instance, string as function name, or function
|
|
107
|
+
*
|
|
108
|
+
* @param {any} value
|
|
109
|
+
* @returns {boolean}
|
|
110
|
+
* */
|
|
111
|
+
clazz(value: any): boolean;
|
|
112
|
+
/**
|
|
113
|
+
* Checks value is boolean?
|
|
114
|
+
*
|
|
115
|
+
* @param {any} value
|
|
116
|
+
* @returns {boolean}
|
|
117
|
+
* */
|
|
118
|
+
boolean(value: any): boolean;
|
|
119
|
+
/**
|
|
120
|
+
* Checks value is possible true?
|
|
121
|
+
*
|
|
122
|
+
* Possible true means:
|
|
123
|
+
* - boolean: true
|
|
124
|
+
* - string: `1`, `true`, `t`, `yes`, `y`, `on`
|
|
125
|
+
* - number: > 0 (positive)
|
|
126
|
+
*
|
|
127
|
+
* @param {any} value
|
|
128
|
+
* @returns {boolean}
|
|
129
|
+
* */
|
|
130
|
+
true(value: any): boolean;
|
|
131
|
+
/**
|
|
132
|
+
* Checks value is possible false?
|
|
133
|
+
*
|
|
134
|
+
* Possible false means:
|
|
135
|
+
* - boolean: false
|
|
136
|
+
* - string: `0`, `-1`, `false`, `f`, `no`, `n`, `off`
|
|
137
|
+
* - number: <= 0 (zero or negative)
|
|
138
|
+
*
|
|
139
|
+
* @param {any} value
|
|
140
|
+
* @returns {boolean}
|
|
141
|
+
* */
|
|
142
|
+
false(value: any): boolean;
|
|
22
143
|
}
|
|
144
|
+
export type CommonIsSecure = ShiftMain<CommonIs> & InitLike;
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CommonHook } from "../hook";
|
|
2
2
|
import { CommonIs } from "../is";
|
|
3
3
|
import { CommonAssertion } from "../assertion";
|
|
4
4
|
import { CommonError } from "../error";
|
|
5
5
|
import { CommonLog } from "../log";
|
|
6
6
|
import { CommonStorage } from "../storage";
|
|
7
7
|
import { CommonTo } from "../to";
|
|
8
|
+
import { CommonFqn } from "../fqn";
|
|
8
9
|
export interface Leyyo {
|
|
9
10
|
readonly is: CommonIs;
|
|
10
|
-
readonly
|
|
11
|
+
readonly hook: CommonHook;
|
|
11
12
|
readonly assertion: CommonAssertion;
|
|
12
13
|
readonly error: CommonError;
|
|
13
14
|
readonly log: CommonLog;
|
|
14
15
|
readonly storage: CommonStorage;
|
|
15
16
|
readonly to: CommonTo;
|
|
17
|
+
readonly fqn: CommonFqn;
|
|
16
18
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CommonHook } from "../hook";
|
|
2
2
|
import { Leyyo } from "./index-types";
|
|
3
3
|
import { CommonIs } from "../is";
|
|
4
4
|
import { CommonAssertion } from "../assertion";
|
|
@@ -6,14 +6,16 @@ import { CommonError } from "../error";
|
|
|
6
6
|
import { CommonLog } from "../log";
|
|
7
7
|
import { CommonStorage } from "../storage";
|
|
8
8
|
import { CommonTo } from "../to";
|
|
9
|
+
import { CommonFqn } from "../fqn";
|
|
9
10
|
export declare class LeyyoImpl implements Leyyo {
|
|
10
|
-
readonly
|
|
11
|
+
readonly hook: CommonHook;
|
|
11
12
|
readonly is: CommonIs;
|
|
12
13
|
readonly assertion: CommonAssertion;
|
|
13
14
|
readonly error: CommonError;
|
|
14
15
|
readonly log: CommonLog;
|
|
15
16
|
readonly storage: CommonStorage;
|
|
16
17
|
readonly to: CommonTo;
|
|
18
|
+
readonly fqn: CommonFqn;
|
|
17
19
|
constructor();
|
|
18
20
|
private init;
|
|
19
21
|
private postInit;
|
package/dist/leyyo/leyyo-impl.js
CHANGED
|
@@ -1,25 +1,32 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.leyyo = exports.LeyyoImpl = void 0;
|
|
4
|
-
const
|
|
7
|
+
const hook_1 = require("../hook");
|
|
5
8
|
const is_1 = require("../is");
|
|
6
9
|
const assertion_1 = require("../assertion");
|
|
7
10
|
const error_1 = require("../error");
|
|
8
11
|
const log_1 = require("../log");
|
|
9
12
|
const storage_1 = require("../storage");
|
|
10
13
|
const to_1 = require("../to");
|
|
11
|
-
const
|
|
14
|
+
const shared_1 = require("../shared");
|
|
12
15
|
const internal_1 = require("../internal");
|
|
13
|
-
const
|
|
16
|
+
const literal_1 = require("../literal");
|
|
17
|
+
const exception_1 = require("../exception");
|
|
18
|
+
const node_assert_1 = __importDefault(require("node:assert"));
|
|
19
|
+
const fqn_1 = require("../fqn");
|
|
14
20
|
class LeyyoImpl {
|
|
15
21
|
constructor() {
|
|
16
22
|
this.is = new is_1.CommonIsImpl();
|
|
17
23
|
this.storage = new storage_1.CommonStorageImpl();
|
|
18
|
-
this.
|
|
19
|
-
this.log = new log_1.CommonLogImpl(); //
|
|
20
|
-
this.error = new error_1.CommonErrorImpl(); //
|
|
21
|
-
this.assertion = new assertion_1.CommonAssertionImpl(); // is,
|
|
22
|
-
this.to = new to_1.CommonToImpl(); // is,
|
|
24
|
+
this.hook = new hook_1.CommonHookImpl(); // storage
|
|
25
|
+
this.log = new log_1.CommonLogImpl(); // hook
|
|
26
|
+
this.error = new error_1.CommonErrorImpl(); // hook
|
|
27
|
+
this.assertion = new assertion_1.CommonAssertionImpl(); // is, hook
|
|
28
|
+
this.to = new to_1.CommonToImpl(); // is, hook, assertion
|
|
29
|
+
this.fqn = new fqn_1.CommonFqnImpl(); // hook
|
|
23
30
|
this.init();
|
|
24
31
|
this.postInit();
|
|
25
32
|
this.initFqnRegister();
|
|
@@ -29,41 +36,42 @@ class LeyyoImpl {
|
|
|
29
36
|
init() {
|
|
30
37
|
this.is.$secure.$init(this);
|
|
31
38
|
this.storage.$secure.$init(this);
|
|
32
|
-
this.
|
|
39
|
+
this.hook.$secure.$init(this);
|
|
33
40
|
this.log.$secure.$init(this);
|
|
34
41
|
this.error.$secure.$init(this);
|
|
35
42
|
this.assertion.$secure.$init(this);
|
|
36
43
|
this.to.$secure.$init(this);
|
|
37
44
|
}
|
|
38
45
|
postInit() {
|
|
39
|
-
(0,
|
|
46
|
+
(0, shared_1.$$setLeyyo)(this);
|
|
40
47
|
log_1.LoggerImpl.$setLeyyo(this);
|
|
41
|
-
|
|
48
|
+
exception_1.Exception.$setLeyyo(this);
|
|
42
49
|
}
|
|
43
50
|
initFqnRegister() {
|
|
44
|
-
this.
|
|
45
|
-
this.
|
|
46
|
-
this.
|
|
47
|
-
this.
|
|
48
|
-
this.
|
|
49
|
-
this.
|
|
50
|
-
this.
|
|
51
|
-
this.
|
|
52
|
-
this.
|
|
53
|
-
this.
|
|
51
|
+
this.fqn.register(is_1.CommonIsImpl, 'class', internal_1.FQN_PCK);
|
|
52
|
+
this.fqn.register(storage_1.CommonStorageImpl, 'class', internal_1.FQN_PCK);
|
|
53
|
+
this.fqn.register(hook_1.CommonHookImpl, 'class', internal_1.FQN_PCK);
|
|
54
|
+
this.fqn.register(fqn_1.CommonFqnImpl, 'class', internal_1.FQN_PCK);
|
|
55
|
+
this.fqn.register(log_1.CommonLogImpl, 'class', internal_1.FQN_PCK);
|
|
56
|
+
this.fqn.register(error_1.CommonErrorImpl, 'class', internal_1.FQN_PCK);
|
|
57
|
+
this.fqn.register(assertion_1.CommonAssertionImpl, 'class', internal_1.FQN_PCK);
|
|
58
|
+
this.fqn.register(to_1.CommonToImpl, 'class', internal_1.FQN_PCK);
|
|
59
|
+
this.fqn.register(shared_1.List, 'class', internal_1.FQN_PCK);
|
|
60
|
+
this.fqn.register(log_1.LoggerImpl, 'class', internal_1.FQN_PCK);
|
|
61
|
+
this.fqn.register(node_assert_1.default, 'function', internal_1.FQN_PCK);
|
|
54
62
|
}
|
|
55
63
|
initErrorRegister() {
|
|
56
|
-
[
|
|
57
|
-
this.
|
|
58
|
-
this.
|
|
64
|
+
[exception_1.Exception, exception_1.AssertionException, exception_1.CausedException, exception_1.DeveloperException, exception_1.MultipleException].forEach(cls => {
|
|
65
|
+
this.fqn.register(cls, 'class', internal_1.FQN_PCK);
|
|
66
|
+
this.error.register(cls);
|
|
59
67
|
});
|
|
60
68
|
}
|
|
61
69
|
initEnumRegister() {
|
|
62
|
-
[
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
this.
|
|
66
|
-
this.
|
|
70
|
+
[literal_1.PrimitiveItems, literal_1.StorageTypeItems, literal_1.RealValueItems, literal_1.KeyValueItems, literal_1.WeakTrueItems, literal_1.WeakFalseItems,
|
|
71
|
+
literal_1.HttpMethodItems, literal_1.HttpPlaceItems, literal_1.SeverityItems, literal_1.EnvironmentItems,
|
|
72
|
+
literal_1.CountryCodeItems, literal_1.LanguageCodeItems, literal_1.LocaleCodeItems].forEach(enm => {
|
|
73
|
+
this.fqn.register(enm, 'enum', internal_1.FQN_PCK);
|
|
74
|
+
this.hook.queueForCallback(shared_1.LY_PENDING_ENUM_REGISTER, enm);
|
|
67
75
|
});
|
|
68
76
|
}
|
|
69
77
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Country code items
|
|
3
|
+
* */
|
|
4
|
+
export declare const CountryCodeItems: readonly ["AD", "AE", "AF", "AG", "AI", "AL", "AM", "AN", "AO", "AQ", "AR", "AS", "AT", "AU", "AW", "AX", "AZ", "BA", "BB", "BD", "BE", "BF", "BG", "BH", "BI", "BJ", "BM", "BN", "BO", "BR", "BS", "BT", "BV", "BW", "BY", "BZ", "CA", "CC", "CD", "CF", "CG", "CH", "CI", "CK", "CL", "CM", "CN", "CO", "CR", "CS", "CU", "CV", "CX", "CY", "CZ", "DE", "DJ", "DK", "DM", "DO", "DZ", "EC", "EE", "EG", "EH", "ER", "ES", "ET", "FI", "FJ", "FK", "FM", "FO", "FR", "GA", "GB", "GD", "GE", "GF", "GG", "GH", "GI", "GL", "GM", "GN", "GP", "GQ", "GR", "GS", "GT", "GU", "GW", "GY", "HK", "HM", "HN", "HR", "HT", "HU", "ID", "IE", "IL", "IM", "IN", "IO", "IQ", "IR", "IS", "IT", "JE", "JM", "JO", "JP", "KE", "KG", "KH", "KI", "KM", "KN", "KP", "KR", "KW", "KY", "KZ", "LA", "LB", "LC", "LI", "LK", "LR", "LS", "LT", "LU", "LV", "LY", "MA", "MC", "MD", "MG", "MH", "MK", "ML", "MM", "MN", "MO", "MP", "MQ", "MR", "MS", "MT", "MU", "MV", "MW", "MX", "MY", "MZ", "NA", "NC", "NE", "NF", "NG", "NI", "NL", "NO", "NP", "NR", "NU", "NZ", "OM", "PA", "PE", "PF", "PG", "PH", "PK", "PL", "PM", "PN", "PR", "PS", "PT", "PW", "PY", "QA", "RE", "RO", "RU", "RW", "SA", "SB", "SC", "SD", "SE", "SG", "SH", "SI", "SJ", "SK", "SL", "SM", "SN", "SO", "SR", "ST", "SV", "SY", "SZ", "TC", "TD", "TF", "TG", "TH", "TJ", "TK", "TL", "TM", "TN", "TO", "TR", "TT", "TV", "TW", "TZ", "UA", "UG", "UM", "US", "UY", "UZ", "VA", "VC", "VE", "VG", "VI", "VN", "VU", "WF", "WS", "YE", "YT", "ZA", "ZM", "ZW"];
|
|
5
|
+
/**
|
|
6
|
+
* Country code
|
|
7
|
+
* */
|
|
8
|
+
export type CountryCode = typeof CountryCodeItems[number];
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CountryCodeItems = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Country code items
|
|
6
|
+
* */
|
|
7
|
+
exports.CountryCodeItems = ['AD', 'AE', 'AF', 'AG', 'AI', 'AL', 'AM', 'AN', 'AO', 'AQ', 'AR', 'AS', 'AT', 'AU', 'AW', 'AX',
|
|
8
|
+
'AZ', 'BA', 'BB', 'BD', 'BE', 'BF', 'BG', 'BH', 'BI', 'BJ', 'BM', 'BN', 'BO', 'BR', 'BS', 'BT', 'BV', 'BW', 'BY', 'BZ', 'CA', 'CC', 'CD',
|
|
9
|
+
'CF', 'CG', 'CH', 'CI', 'CK', 'CL', 'CM', 'CN', 'CO', 'CR', 'CS', 'CU', 'CV', 'CX', 'CY', 'CZ', 'DE', 'DJ', 'DK', 'DM', 'DO', 'DZ', 'EC',
|
|
10
|
+
'EE', 'EG', 'EH', 'ER', 'ES', 'ET', 'FI', 'FJ', 'FK', 'FM', 'FO', 'FR', 'GA', 'GB', 'GD', 'GE', 'GF', 'GG', 'GH', 'GI', 'GL', 'GM', 'GN',
|
|
11
|
+
'GP', 'GQ', 'GR', 'GS', 'GT', 'GU', 'GW', 'GY', 'HK', 'HM', 'HN', 'HR', 'HT', 'HU', 'ID', 'IE', 'IL', 'IM', 'IN', 'IO', 'IQ', 'IR', 'IS',
|
|
12
|
+
'IT', 'JE', 'JM', 'JO', 'JP', 'KE', 'KG', 'KH', 'KI', 'KM', 'KN', 'KP', 'KR', 'KW', 'KY', 'KZ', 'LA', 'LB', 'LC', 'LI', 'LK', 'LR', 'LS',
|
|
13
|
+
'LT', 'LU', 'LV', 'LY', 'MA', 'MC', 'MD', 'MG', 'MH', 'MK', 'ML', 'MM', 'MN', 'MO', 'MP', 'MQ', 'MR', 'MS', 'MT', 'MU', 'MV', 'MW', 'MX',
|
|
14
|
+
'MY', 'MZ', 'NA', 'NC', 'NE', 'NF', 'NG', 'NI', 'NL', 'NO', 'NP', 'NR', 'NU', 'NZ', 'OM', 'PA', 'PE', 'PF', 'PG', 'PH', 'PK', 'PL', 'PM',
|
|
15
|
+
'PN', 'PR', 'PS', 'PT', 'PW', 'PY', 'QA', 'RE', 'RO', 'RU', 'RW', 'SA', 'SB', 'SC', 'SD', 'SE', 'SG', 'SH', 'SI', 'SJ', 'SK', 'SL', 'SM',
|
|
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
|
+
'UA', 'UG', 'UM', 'US', 'UY', 'UZ', 'VA', 'VC', 'VE', 'VG', 'VI', 'VN', 'VU', 'WF', 'WS', 'YE', 'YT', 'ZA', 'ZM', 'ZW'];
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export * from './country-code';
|
|
2
|
+
export * from './environment';
|
|
3
|
+
export * from './http-method';
|
|
4
|
+
export * from './http-place';
|
|
5
|
+
export * from './key-value';
|
|
6
|
+
export * from './language-code';
|
|
7
|
+
export * from './locale-code';
|
|
8
|
+
export * from './primitive';
|
|
9
|
+
export * from './real-value';
|
|
10
|
+
export * from './severity';
|
|
11
|
+
export * from './storage-type';
|
|
12
|
+
export * from './weak-false';
|
|
13
|
+
export * from './weak-true';
|
|
14
|
+
export * from './index-types';
|
|
@@ -0,0 +1,30 @@
|
|
|
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("./country-code"), exports);
|
|
18
|
+
__exportStar(require("./environment"), exports);
|
|
19
|
+
__exportStar(require("./http-method"), exports);
|
|
20
|
+
__exportStar(require("./http-place"), exports);
|
|
21
|
+
__exportStar(require("./key-value"), exports);
|
|
22
|
+
__exportStar(require("./language-code"), exports);
|
|
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
|
+
__exportStar(require("./weak-false"), exports);
|
|
29
|
+
__exportStar(require("./weak-true"), exports);
|
|
30
|
+
__exportStar(require("./index-types"), exports);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Language code items
|
|
3
|
+
* */
|
|
4
|
+
export declare const LanguageCodeItems: readonly ["af", "an", "ar", "as", "ast", "az", "be", "bg", "bn", "br", "bs", "ca", "ce", "ch", "co", "cr", "cs", "cv", "cy", "da", "de", "el", "en", "eo", "es", "et", "eu", "fa", "fi", "fj", "fo", "fr", "fur", "fy", "ga", "gd", "gl", "gu", "he", "hi", "hr", "hsb", "ht", "hu", "hy", "id", "is", "it", "iu", "ja", "ji", "ka", "kk", "km", "kn", "ko", "ks", "ky", "la", "lb", "lt", "lv", "mi", "mk", "ml", "mo", "mr", "ms", "mt", "my", "nb", "ne", "ng", "nl", "nn", "no", "nv", "oc", "om", "or", "pa", "pl", "pt", "qu", "rm", "ro", "ru", "sa", "sb", "sc", "sd", "sg", "si", "sk", "sl", "so", "sq", "sr", "sv", "sw", "sx", "sz", "ta", "te", "th", "tig", "tk", "tlh", "tn", "tr", "ts", "tt", "uk", "ur", "ve", "vi", "vo", "wa", "xh", "zh", "zu"];
|
|
5
|
+
/**
|
|
6
|
+
* Language codes
|
|
7
|
+
* */
|
|
8
|
+
export type LanguageCode = typeof LanguageCodeItems[number];
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LanguageCodeItems = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Language code items
|
|
6
|
+
* */
|
|
7
|
+
exports.LanguageCodeItems = ['af', 'an', 'ar', 'as', 'ast', 'az', 'be', 'bg', 'bn', 'br', 'bs', 'ca', 'ce', 'ch', 'co', 'cr', 'cs',
|
|
8
|
+
'cv', 'cy', 'da', 'de', 'el', 'en', 'eo', 'es', 'et', 'eu', 'fa', 'fi', 'fj', 'fo', 'fr', 'fur', 'fy', 'ga', 'gd', 'gl', 'gu', 'he', 'hi',
|
|
9
|
+
'hr', 'hsb', 'ht', 'hu', 'hy', 'id', 'is', 'it', 'iu', 'ja', 'ji', 'ka', 'kk', 'km', 'kn', 'ko', 'ks', 'ky', 'la', 'lb', 'lt', 'lv', 'mi',
|
|
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
|
+
'ru', 'sa', 'sb', 'sc', 'sd', 'sg', 'si', 'sk', 'sl', 'so', 'sq', 'sr', 'sv', 'sw', 'sx', 'sz', 'ta', 'te', 'th', 'tig', 'tk', 'tlh',
|
|
12
|
+
'tn', 'tr', 'ts', 'tt', 'uk', 'ur', 've', 'vi', 'vo', 'wa', 'xh', 'zh', 'zu'];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Locale code items
|
|
3
|
+
* */
|
|
4
|
+
export declare const LocaleCodeItems: readonly ["af", "an", "ar", "ar-ae", "ar-bh", "ar-dz", "ar-eg", "ar-iq", "ar-jo", "ar-kw", "ar-lb", "ar-ly", "ar-ma", "ar-om", "ar-qa", "ar-sa", "ar-sy", "ar-tn", "ar-ye", "as", "ast", "az", "be", "bg", "bn", "br", "bs", "ca", "ce", "ch", "co", "cr", "cs", "cv", "cy", "da", "de", "de-at", "de-ch", "de-de", "de-li", "de-lu", "el", "en", "en-au", "en-bz", "en-ca", "en-gb", "en-ie", "en-jm", "en-nz", "en-ph", "en-tt", "en-us", "en-za", "en-zw", "eo", "es", "es-ar", "es-bo", "es-cl", "es-co", "es-cr", "es-do", "es-ec", "es-es", "es-gt", "es-hn", "es-mx", "es-ni", "es-pa", "es-pe", "es-pr", "es-py", "es-sv", "es-uy", "es-ve", "et", "eu", "fa", "fa-ir", "fi", "fj", "fo", "fr", "fr-be", "fr-ca", "fr-ch", "fr-fr", "fr-lu", "fr-mc", "fur", "fy", "ga", "gd", "gd-ie", "gl", "gu", "he", "hi", "hr", "hsb", "ht", "hu", "hy", "id", "is", "it", "it-ch", "iu", "ja", "ji", "ka", "kk", "km", "kn", "ko", "ko-kp", "ko-kr", "ks", "ky", "la", "lb", "lt", "lv", "mi", "mk", "ml", "mo", "mr", "ms", "mt", "my", "nb", "ne", "ng", "nl", "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", "sa", "sb", "sc", "sd", "sg", "si", "sk", "sl", "so", "sq", "sr", "sv", "sv-fi", "sv-sv", "sw", "sx", "sz", "ta", "te", "th", "tig", "tk", "tlh", "tn", "tr", "ts", "tt", "uk", "ur", "ve", "vi", "vo", "wa", "xh", "zh", "zh-cn", "zh-hk", "zh-sg", "zh-tw", "zu"];
|
|
5
|
+
/**
|
|
6
|
+
* Locale codes
|
|
7
|
+
*
|
|
8
|
+
* Pattern: [Language Code]-[Country Code]
|
|
9
|
+
* */
|
|
10
|
+
export type LocaleCode = typeof LocaleCodeItems[number];
|