@leyyo/common 1.0.6 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assertion/common-assertion.d.ts +151 -22
- package/dist/assertion/common-assertion.js +573 -90
- package/dist/assertion/common-assertion.js.map +1 -1
- package/dist/assertion/index.d.ts +1 -1
- package/dist/assertion/index.js +1 -1
- package/dist/assertion/index.types.d.ts +661 -0
- package/dist/{descriptor/index-types.js → assertion/index.types.js} +1 -1
- package/dist/assertion/index.types.js.map +1 -0
- package/dist/assets/.gitkeep +0 -0
- package/dist/config/common-config.d.ts +16 -0
- package/dist/config/common-config.js +81 -0
- package/dist/config/common-config.js.map +1 -0
- package/dist/config/index.d.ts +1 -0
- package/dist/config/index.js +18 -0
- package/dist/config/index.js.map +1 -0
- package/dist/config/index.types.d.ts +13 -0
- package/dist/{assertion/index-types.js → config/index.types.js} +1 -1
- package/dist/config/index.types.js.map +1 -0
- package/dist/deploy/common-deploy.d.ts +29 -0
- package/dist/deploy/common-deploy.js +106 -0
- package/dist/deploy/common-deploy.js.map +1 -0
- package/dist/deploy/index.d.ts +1 -0
- package/dist/deploy/index.js +18 -0
- package/dist/deploy/index.js.map +1 -0
- package/dist/deploy/index.types.d.ts +25 -0
- package/dist/{developer/index-types.js → deploy/index.types.js} +1 -1
- package/dist/deploy/index.types.js.map +1 -0
- package/dist/descriptor/common-descriptor.d.ts +17 -14
- package/dist/descriptor/common-descriptor.js +45 -20
- package/dist/descriptor/common-descriptor.js.map +1 -1
- package/dist/descriptor/index.d.ts +1 -1
- package/dist/descriptor/index.js +1 -1
- package/dist/descriptor/index.types.d.ts +23 -0
- package/dist/{error/index-types.js → descriptor/index.types.js} +1 -1
- package/dist/descriptor/index.types.js.map +1 -0
- package/dist/developer/common-developer.d.ts +13 -10
- package/dist/developer/common-developer.js +81 -102
- package/dist/developer/common-developer.js.map +1 -1
- package/dist/developer/index.d.ts +2 -1
- package/dist/developer/index.errors.d.ts +13 -0
- package/dist/developer/index.errors.js +24 -0
- package/dist/developer/index.errors.js.map +1 -0
- package/dist/developer/index.js +2 -1
- package/dist/developer/index.js.map +1 -1
- package/dist/developer/{index-types.d.ts → index.types.d.ts} +20 -12
- package/dist/developer/index.types.js +3 -0
- package/dist/developer/index.types.js.map +1 -0
- package/dist/error/common-error.d.ts +4 -3
- package/dist/error/common-error.js +17 -12
- package/dist/error/common-error.js.map +1 -1
- package/dist/error/index.d.ts +1 -1
- package/dist/error/index.js +1 -1
- package/dist/error/index.types.js +3 -0
- package/dist/error/index.types.js.map +1 -0
- package/dist/exception/exception.d.ts +3 -7
- package/dist/exception/exception.js +17 -34
- package/dist/exception/exception.js.map +1 -1
- package/dist/exception/index.d.ts +1 -1
- package/dist/exception/index.js +1 -1
- package/dist/exception/index.types.js +3 -0
- package/dist/exception/index.types.js.map +1 -0
- package/dist/exception/multiple-exception.d.ts +1 -1
- package/dist/fqn/common-fqn.d.ts +8 -8
- package/dist/fqn/common-fqn.js +23 -16
- package/dist/fqn/common-fqn.js.map +1 -1
- package/dist/fqn/index.d.ts +1 -1
- package/dist/fqn/index.js +1 -1
- package/dist/fqn/{index-types.d.ts → index.types.d.ts} +2 -2
- package/dist/fqn/index.types.js +3 -0
- package/dist/fqn/index.types.js.map +1 -0
- package/dist/hook/common-hook.d.ts +6 -13
- package/dist/hook/common-hook.js +18 -40
- package/dist/hook/common-hook.js.map +1 -1
- package/dist/hook/index.d.ts +1 -1
- package/dist/hook/index.js +1 -1
- package/dist/hook/{index-types.d.ts → index.types.d.ts} +6 -5
- package/dist/hook/index.types.js +3 -0
- package/dist/hook/index.types.js.map +1 -0
- package/dist/index.d.ts +12 -2
- package/dist/index.js +22 -4
- package/dist/index.js.map +1 -1
- package/dist/internal.d.ts +1 -3
- package/dist/internal.js +2 -4
- package/dist/internal.js.map +1 -1
- package/dist/is/common-is.d.ts +18 -4
- package/dist/is/common-is.js +53 -12
- package/dist/is/common-is.js.map +1 -1
- package/dist/is/index.d.ts +1 -1
- package/dist/is/index.js +1 -1
- package/dist/is/{index-types.d.ts → index.types.d.ts} +56 -5
- package/dist/is/index.types.js +3 -0
- package/dist/is/index.types.js.map +1 -0
- package/dist/leyyo/index.d.ts +1 -1
- package/dist/leyyo/index.js +1 -1
- package/dist/leyyo/{index-types.d.ts → index.types.d.ts} +13 -3
- package/dist/leyyo/index.types.js +3 -0
- package/dist/leyyo/index.types.js.map +1 -0
- package/dist/leyyo/leyyo-common-hook.js +7 -7
- package/dist/leyyo/leyyo-common-hook.js.map +1 -1
- package/dist/leyyo/leyyo.d.ts +14 -4
- package/dist/leyyo/leyyo.js +34 -19
- package/dist/leyyo/leyyo.js.map +1 -1
- package/dist/log/common-log.d.ts +6 -5
- package/dist/log/common-log.js +90 -22
- package/dist/log/common-log.js.map +1 -1
- package/dist/log/index.d.ts +1 -1
- package/dist/log/index.js +1 -1
- package/dist/log/{index-types.d.ts → index.types.d.ts} +18 -23
- package/dist/log/index.types.js +3 -0
- package/dist/log/index.types.js.map +1 -0
- package/dist/log/logger-instance.d.ts +12 -17
- package/dist/log/logger-instance.js +86 -51
- package/dist/log/logger-instance.js.map +1 -1
- package/dist/log/severity.d.ts +1 -1
- package/dist/log/severity.js +1 -1
- package/dist/log/severity.js.map +1 -1
- package/dist/mixin/common-mixin.d.ts +23 -0
- package/dist/mixin/common-mixin.js +165 -0
- package/dist/mixin/common-mixin.js.map +1 -0
- package/dist/mixin/index.d.ts +1 -0
- package/dist/mixin/index.js +18 -0
- package/dist/mixin/index.js.map +1 -0
- package/dist/mixin/index.types.d.ts +19 -0
- package/dist/mixin/index.types.js +3 -0
- package/dist/mixin/index.types.js.map +1 -0
- package/dist/name/common-name.d.ts +16 -0
- package/dist/name/common-name.js +82 -0
- package/dist/name/common-name.js.map +1 -0
- package/dist/name/index.d.ts +1 -0
- package/dist/name/index.js +18 -0
- package/dist/name/index.js.map +1 -0
- package/dist/name/index.types.d.ts +21 -0
- package/dist/name/index.types.js +3 -0
- package/dist/name/index.types.js.map +1 -0
- package/dist/repo/common-repo.d.ts +14 -11
- package/dist/repo/common-repo.js +64 -78
- package/dist/repo/common-repo.js.map +1 -1
- package/dist/repo/index.d.ts +1 -2
- package/dist/repo/index.js +1 -2
- package/dist/repo/index.js.map +1 -1
- package/dist/repo/{index-types.d.ts → index.types.d.ts} +27 -9
- package/dist/repo/index.types.js +3 -0
- package/dist/repo/index.types.js.map +1 -0
- package/dist/server.js +1 -1
- package/dist/server.js.map +1 -1
- package/dist/shared/index.d.ts +1 -1
- package/dist/shared/index.js +1 -1
- package/dist/shared/{index-types.d.ts → index.types.d.ts} +21 -9
- package/dist/shared/{index-types.js → index.types.js} +1 -1
- package/dist/shared/index.types.js.map +1 -0
- package/dist/system/common-system.d.ts +4 -3
- package/dist/system/common-system.js +10 -11
- package/dist/system/common-system.js.map +1 -1
- package/dist/system/index.d.ts +1 -3
- package/dist/system/index.js +1 -3
- package/dist/system/index.js.map +1 -1
- package/dist/system/index.types.js +3 -0
- package/dist/system/index.types.js.map +1 -0
- package/dist/test/common-test.d.ts +14 -0
- package/dist/test/common-test.js +48 -0
- package/dist/test/common-test.js.map +1 -0
- package/dist/test/index.d.ts +2 -0
- package/dist/test/index.js +19 -0
- package/dist/test/index.js.map +1 -0
- package/dist/test/index.types.d.ts +9 -0
- package/dist/test/index.types.js +3 -0
- package/dist/test/index.types.js.map +1 -0
- package/dist/test/tested.d.ts +1 -0
- package/dist/test/tested.js +9 -0
- package/dist/test/tested.js.map +1 -0
- package/dist/to/common-to.d.ts +55 -27
- package/dist/to/common-to.js +554 -381
- package/dist/to/common-to.js.map +1 -1
- package/dist/to/index.d.ts +1 -1
- package/dist/to/index.js +1 -1
- package/dist/to/index.types.d.ts +72 -0
- package/dist/to/index.types.js +3 -0
- package/dist/to/index.types.js.map +1 -0
- package/dist/to/list.d.ts +10 -0
- package/dist/to/list.js +18 -0
- package/dist/to/list.js.map +1 -1
- package/dist/wrapper/common-wrapper.d.ts +9 -9
- package/dist/wrapper/common-wrapper.js +11 -10
- package/dist/wrapper/common-wrapper.js.map +1 -1
- package/dist/wrapper/index.d.ts +1 -1
- package/dist/wrapper/index.js +1 -1
- package/dist/wrapper/{index-types.d.ts → index.types.d.ts} +6 -6
- package/dist/wrapper/index.types.js +3 -0
- package/dist/wrapper/index.types.js.map +1 -0
- package/dist/wrapper/wrap.d.ts +3 -3
- package/package.json +6 -3
- package/dist/assertion/index-types.d.ts +0 -465
- package/dist/assertion/index-types.js.map +0 -1
- package/dist/descriptor/index-types.d.ts +0 -21
- package/dist/descriptor/index-types.js.map +0 -1
- package/dist/developer/index-types.js.map +0 -1
- package/dist/error/index-types.js.map +0 -1
- package/dist/exception/index-types.js +0 -3
- package/dist/exception/index-types.js.map +0 -1
- package/dist/fqn/index-types.js +0 -3
- package/dist/fqn/index-types.js.map +0 -1
- package/dist/hook/index-types.js +0 -3
- package/dist/hook/index-types.js.map +0 -1
- package/dist/is/index-types.js +0 -3
- package/dist/is/index-types.js.map +0 -1
- package/dist/leyyo/index-types.js +0 -3
- package/dist/leyyo/index-types.js.map +0 -1
- package/dist/log/index-types.js +0 -3
- package/dist/log/index-types.js.map +0 -1
- package/dist/repo/index-types.js +0 -3
- package/dist/repo/index-types.js.map +0 -1
- package/dist/repo/repo-type.d.ts +0 -8
- package/dist/repo/repo-type.js +0 -8
- package/dist/repo/repo-type.js.map +0 -1
- package/dist/shared/index-types.js.map +0 -1
- package/dist/system/http-method.d.ts +0 -8
- package/dist/system/http-method.js +0 -8
- package/dist/system/http-method.js.map +0 -1
- package/dist/system/http-place.d.ts +0 -8
- package/dist/system/http-place.js +0 -8
- package/dist/system/http-place.js.map +0 -1
- package/dist/system/index-types.js +0 -3
- package/dist/system/index-types.js.map +0 -1
- package/dist/to/index-types.d.ts +0 -40
- package/dist/to/index-types.js +0 -3
- package/dist/to/index-types.js.map +0 -1
- package/dist/wrapper/index-types.js +0 -3
- package/dist/wrapper/index-types.js.map +0 -1
- /package/dist/error/{index-types.d.ts → index.types.d.ts} +0 -0
- /package/dist/exception/{index-types.d.ts → index.types.d.ts} +0 -0
- /package/dist/system/{index-types.d.ts → index.types.d.ts} +0 -0
package/dist/repo/common-repo.js
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CommonRepo = void 0;
|
|
4
|
-
const leyyo_1 = require("../leyyo");
|
|
5
4
|
const internal_1 = require("../internal");
|
|
6
|
-
const repo_type_1 = require("./repo-type");
|
|
7
5
|
const to_1 = require("../to");
|
|
8
6
|
// noinspection JSUnusedLocalSymbols,JSUnusedGlobalSymbols
|
|
9
7
|
/** @inheritDoc */
|
|
@@ -14,42 +12,53 @@ class CommonRepo {
|
|
|
14
12
|
* Responsibilities
|
|
15
13
|
* - Create repositories => ie: lists, arrays, maps, sets
|
|
16
14
|
* */
|
|
17
|
-
constructor() {
|
|
15
|
+
constructor(lyy) {
|
|
16
|
+
this.lyy = lyy;
|
|
18
17
|
this._lists = new Map();
|
|
19
18
|
this._arrays = new Map();
|
|
20
19
|
this._maps = new Map();
|
|
21
20
|
this._sets = new Map();
|
|
21
|
+
this._records = new Map();
|
|
22
22
|
}
|
|
23
|
-
$init(
|
|
24
|
-
this.
|
|
25
|
-
|
|
26
|
-
leyyo.$secure.$lazyRun(() => {
|
|
27
|
-
leyyo.fqn.register(null, CommonRepo, 'class', internal_1.FQN_PCK);
|
|
28
|
-
}).$lazyRun(() => {
|
|
29
|
-
const enumMap = {
|
|
30
|
-
RepoType: repo_type_1.RepoTypeItems,
|
|
31
|
-
};
|
|
32
|
-
for (const [name, value] of Object.entries(enumMap)) {
|
|
33
|
-
leyyo.fqn.register(name, value, 'enum', internal_1.FQN_PCK);
|
|
34
|
-
leyyo.hook.queueForCallback(leyyo_1.LeyyoCommonHook.enumPendingRegister, value);
|
|
35
|
-
}
|
|
23
|
+
$init() {
|
|
24
|
+
this.lyy.$secure.$lazyRun(() => {
|
|
25
|
+
this.lyy.fqn.register(null, CommonRepo, 'class', internal_1.FQN);
|
|
36
26
|
});
|
|
37
27
|
}
|
|
38
|
-
|
|
39
|
-
if (
|
|
40
|
-
|
|
41
|
-
|
|
28
|
+
_addDetail(map, result, collection, fn) {
|
|
29
|
+
if (!map) {
|
|
30
|
+
if (collection) {
|
|
31
|
+
result[collection.description] = -1;
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
result['*'] = -1;
|
|
35
|
+
}
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
if (collection) {
|
|
39
|
+
if (map.has(collection)) {
|
|
40
|
+
result[collection.description] = map.get(collection).length;
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
result[collection.description] = -1;
|
|
45
|
+
}
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
for (const [key, list] of map.entries()) {
|
|
49
|
+
if (result[key.description] === undefined) {
|
|
50
|
+
result[key.description] = fn(list);
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
result[key.description + '##' + Date.now()] = fn(list);
|
|
54
|
+
}
|
|
42
55
|
}
|
|
43
|
-
duplicated++;
|
|
44
|
-
result[collection.description + '##' + duplicated] = size;
|
|
45
|
-
return duplicated;
|
|
46
56
|
}
|
|
47
57
|
// region list
|
|
48
58
|
/** @inheritDoc */
|
|
49
|
-
newList(
|
|
50
|
-
this.assertion.sym(collection, () => this.dev.opt({ where: 'leyyo.common.CommonRepo', method: 'newList' }));
|
|
59
|
+
newList(...names) {
|
|
51
60
|
const list = new to_1.List();
|
|
52
|
-
this._lists.set(
|
|
61
|
+
this._lists.set(Symbol.for(names.join('/')), list);
|
|
53
62
|
return list;
|
|
54
63
|
}
|
|
55
64
|
/** @inheritDoc */
|
|
@@ -59,10 +68,9 @@ class CommonRepo {
|
|
|
59
68
|
// endregion list
|
|
60
69
|
// region array
|
|
61
70
|
/** @inheritDoc */
|
|
62
|
-
newArray(
|
|
63
|
-
this.assertion.sym(collection, () => this.dev.opt({ where: 'leyyo.common.CommonRepo', method: 'newArray' }));
|
|
71
|
+
newArray(...names) {
|
|
64
72
|
const arr = [];
|
|
65
|
-
this._arrays.set(
|
|
73
|
+
this._arrays.set(Symbol.for(names.join('/')), arr);
|
|
66
74
|
return arr;
|
|
67
75
|
}
|
|
68
76
|
/** @inheritDoc */
|
|
@@ -72,10 +80,9 @@ class CommonRepo {
|
|
|
72
80
|
// endregion array
|
|
73
81
|
// region map
|
|
74
82
|
/** @inheritDoc */
|
|
75
|
-
newMap(
|
|
76
|
-
this.assertion.sym(collection, () => this.dev.opt({ where: 'leyyo.common.CommonRepo', method: 'newMap' }));
|
|
83
|
+
newMap(...names) {
|
|
77
84
|
const map = new Map;
|
|
78
|
-
this._maps.set(
|
|
85
|
+
this._maps.set(Symbol.for(names.join('/')), map);
|
|
79
86
|
return map;
|
|
80
87
|
}
|
|
81
88
|
/** @inheritDoc */
|
|
@@ -85,10 +92,9 @@ class CommonRepo {
|
|
|
85
92
|
// endregion map
|
|
86
93
|
// region set
|
|
87
94
|
/** @inheritDoc */
|
|
88
|
-
newSet(
|
|
89
|
-
this.assertion.sym(collection, () => this.dev.opt({ where: 'leyyo.common.CommonRepo', method: 'newSet' }));
|
|
95
|
+
newSet(...names) {
|
|
90
96
|
const set = new Set;
|
|
91
|
-
this._sets.set(
|
|
97
|
+
this._sets.set(Symbol.for(names.join('/')), set);
|
|
92
98
|
return set;
|
|
93
99
|
}
|
|
94
100
|
/** @inheritDoc */
|
|
@@ -96,61 +102,41 @@ class CommonRepo {
|
|
|
96
102
|
return this._sets.get(collection);
|
|
97
103
|
}
|
|
98
104
|
// endregion set
|
|
105
|
+
// region record
|
|
106
|
+
/** @inheritDoc */
|
|
107
|
+
newRecord(...names) {
|
|
108
|
+
const rec = {};
|
|
109
|
+
this._records.set(Symbol.for(names.join('/')), rec);
|
|
110
|
+
return rec;
|
|
111
|
+
}
|
|
112
|
+
/** @inheritDoc */
|
|
113
|
+
getRecord(collection) {
|
|
114
|
+
return this._records.get(collection);
|
|
115
|
+
}
|
|
116
|
+
// endregion record
|
|
99
117
|
// region detail
|
|
100
118
|
/** @inheritDoc */
|
|
101
119
|
detailItem(type, collection) {
|
|
102
120
|
const result = {};
|
|
103
|
-
let duplicated = 0;
|
|
104
121
|
switch (type) {
|
|
105
122
|
case "array":
|
|
106
|
-
|
|
107
|
-
if (this._arrays.has(collection)) {
|
|
108
|
-
return { [collection.description]: this._arrays.get(collection).length };
|
|
109
|
-
}
|
|
110
|
-
return { [collection.description]: -1 };
|
|
111
|
-
}
|
|
112
|
-
for (const [key, list] of this._arrays.entries()) {
|
|
113
|
-
duplicated = this._appendDetail(result, key, list.length, duplicated);
|
|
114
|
-
}
|
|
123
|
+
this._addDetail(this._arrays, result, collection, (v) => v.length);
|
|
115
124
|
return result;
|
|
116
125
|
case "list":
|
|
117
|
-
|
|
118
|
-
if (this._lists.has(collection)) {
|
|
119
|
-
return { [collection.description]: this._lists.get(collection).length };
|
|
120
|
-
}
|
|
121
|
-
return { [collection.description]: -1 };
|
|
122
|
-
}
|
|
123
|
-
for (const [key, list] of this._lists.entries()) {
|
|
124
|
-
duplicated = this._appendDetail(result, key, list.length, duplicated);
|
|
125
|
-
}
|
|
126
|
+
this._addDetail(this._lists, result, collection, (v) => v.length);
|
|
126
127
|
return result;
|
|
127
128
|
case "map":
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
return { [collection.description]: -1 };
|
|
133
|
-
}
|
|
134
|
-
for (const [key, map] of this._maps.entries()) {
|
|
135
|
-
duplicated = this._appendDetail(result, key, map.size, duplicated);
|
|
136
|
-
}
|
|
129
|
+
this._addDetail(this._maps, result, collection, (v) => v.size);
|
|
130
|
+
return result;
|
|
131
|
+
case "record":
|
|
132
|
+
this._addDetail(this._records, result, collection, (v) => (v && typeof v === 'object') ? Object.keys(v).length : -2);
|
|
137
133
|
return result;
|
|
138
134
|
case "set":
|
|
139
|
-
|
|
140
|
-
if (this._sets.has(collection)) {
|
|
141
|
-
return { [collection.description]: this._sets.get(collection).size };
|
|
142
|
-
}
|
|
143
|
-
return { [collection.description]: -1 };
|
|
144
|
-
}
|
|
145
|
-
for (const [key, set] of this._sets.entries()) {
|
|
146
|
-
duplicated = this._appendDetail(result, key, set.size, duplicated);
|
|
147
|
-
}
|
|
135
|
+
this._addDetail(this._sets, result, collection, (v) => v.size);
|
|
148
136
|
return result;
|
|
149
137
|
default:
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
}
|
|
153
|
-
return { ['*']: -1 };
|
|
138
|
+
this._addDetail(undefined, result, collection, (_v) => -2);
|
|
139
|
+
return result;
|
|
154
140
|
}
|
|
155
141
|
}
|
|
156
142
|
/** @inheritDoc */
|
|
@@ -158,15 +144,15 @@ class CommonRepo {
|
|
|
158
144
|
const result = {};
|
|
159
145
|
if (type) {
|
|
160
146
|
result[type] = this.detailItem(type, collection);
|
|
161
|
-
return result;
|
|
162
147
|
}
|
|
163
148
|
else {
|
|
164
149
|
result['array'] = this.detailItem('array', collection);
|
|
165
150
|
result['list'] = this.detailItem('list', collection);
|
|
166
151
|
result['map'] = this.detailItem('map', collection);
|
|
167
152
|
result['set'] = this.detailItem('set', collection);
|
|
168
|
-
|
|
153
|
+
result['record'] = this.detailItem('record', collection);
|
|
169
154
|
}
|
|
155
|
+
return result;
|
|
170
156
|
}
|
|
171
157
|
// endregion detail
|
|
172
158
|
get $back() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common-repo.js","sourceRoot":"","sources":["../../src/repo/common-repo.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"common-repo.js","sourceRoot":"","sources":["../../src/repo/common-repo.ts"],"names":[],"mappings":";;;AASA,0CAAgC;AAChC,8BAA2B;AAG3B,0DAA0D;AAC1D,kBAAkB;AAClB,MAAa,UAAU;IAOnB;;;;;SAKK;IACL,YAAoB,GAAc;QAAd,QAAG,GAAH,G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B;QACxC,MAAM,MAAM,GAAG,EAAsB,CAAC;QACtC,IAAI,IAAI,EAAE,CAAC;YACP,MAAM,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;QACrD,CAAC;aAAM,CAAC;YACJ,MAAM,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;YACvD,MAAM,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;YACrD,MAAM,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;YACnD,MAAM,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;YACnD,MAAM,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;QAC7D,CAAC;QACD,OAAO,MAAM,CAAC;IAClB,CAAC;IACD,mBAAmB;IAEnB,IAAI,KAAK;QACL,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,IAAI,OAAO;QACP,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ;AAjLD,gCAiLC"}
|
package/dist/repo/index.d.ts
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export * from './index
|
|
2
|
-
export * from './repo-type';
|
|
1
|
+
export * from './index.types';
|
package/dist/repo/index.js
CHANGED
|
@@ -14,6 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./index
|
|
18
|
-
__exportStar(require("./repo-type"), exports);
|
|
17
|
+
__exportStar(require("./index.types"), exports);
|
|
19
18
|
//# sourceMappingURL=index.js.map
|
package/dist/repo/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/repo/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/repo/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Dict, InitLike, ShiftMain, ShiftSecure } from "../shared";
|
|
2
|
-
import { RepoType } from "./repo-type";
|
|
3
2
|
import { List } from "../to";
|
|
4
3
|
/**
|
|
5
4
|
* Common Repository factory
|
|
@@ -10,10 +9,10 @@ export interface CommonRepoLike extends ShiftSecure<CommonRepoSecure> {
|
|
|
10
9
|
/**
|
|
11
10
|
* Creates new array with given collection
|
|
12
11
|
*
|
|
13
|
-
* @param {
|
|
12
|
+
* @param {Array<string>} names
|
|
14
13
|
* @return {Array<any>}
|
|
15
14
|
* */
|
|
16
|
-
newArray<V>(
|
|
15
|
+
newArray<V>(...names: Array<string>): Array<V>;
|
|
17
16
|
/**
|
|
18
17
|
* Returns an array by given collection
|
|
19
18
|
*
|
|
@@ -27,10 +26,10 @@ export interface CommonRepoLike extends ShiftSecure<CommonRepoSecure> {
|
|
|
27
26
|
/**
|
|
28
27
|
* Creates new list with given collection
|
|
29
28
|
*
|
|
30
|
-
* @param {
|
|
29
|
+
* @param {Array<string>} names
|
|
31
30
|
* @return {List<any>}
|
|
32
31
|
* */
|
|
33
|
-
newList<V>(
|
|
32
|
+
newList<V>(...names: Array<string>): List<V>;
|
|
34
33
|
/**
|
|
35
34
|
* Returns a list by given collection
|
|
36
35
|
*
|
|
@@ -44,10 +43,10 @@ export interface CommonRepoLike extends ShiftSecure<CommonRepoSecure> {
|
|
|
44
43
|
/**
|
|
45
44
|
* Creates new map with given collection
|
|
46
45
|
*
|
|
47
|
-
* @param {
|
|
46
|
+
* @param {Array<string>} names
|
|
48
47
|
* @return {Map<any, any>}
|
|
49
48
|
* */
|
|
50
|
-
newMap<K, V>(
|
|
49
|
+
newMap<K, V>(...names: Array<string>): Map<K, V>;
|
|
51
50
|
/**
|
|
52
51
|
* Returns a map by given collection
|
|
53
52
|
*
|
|
@@ -61,10 +60,10 @@ export interface CommonRepoLike extends ShiftSecure<CommonRepoSecure> {
|
|
|
61
60
|
/**
|
|
62
61
|
* Creates new set with given collection
|
|
63
62
|
*
|
|
64
|
-
* @param {
|
|
63
|
+
* @param {Array<string>} names
|
|
65
64
|
* @return {Set<any>}
|
|
66
65
|
* */
|
|
67
|
-
newSet<V>(
|
|
66
|
+
newSet<V>(...names: Array<string>): Set<V>;
|
|
68
67
|
/**
|
|
69
68
|
* Returns a set by given collection
|
|
70
69
|
*
|
|
@@ -75,6 +74,23 @@ export interface CommonRepoLike extends ShiftSecure<CommonRepoSecure> {
|
|
|
75
74
|
* If the set does not exist than it returns null
|
|
76
75
|
* */
|
|
77
76
|
getSet<V>(collection: symbol): Set<V>;
|
|
77
|
+
/**
|
|
78
|
+
* Creates new record with given collection
|
|
79
|
+
*
|
|
80
|
+
* @param {Array<string>} names
|
|
81
|
+
* @return {Record<any, any>}
|
|
82
|
+
* */
|
|
83
|
+
newRecord<K extends string | symbol, V>(...names: Array<string>): Record<K, V>;
|
|
84
|
+
/**
|
|
85
|
+
* Returns a record by given collection
|
|
86
|
+
*
|
|
87
|
+
* @param {symbol} collection
|
|
88
|
+
* @return {Record<any, any>}
|
|
89
|
+
*
|
|
90
|
+
* Note:
|
|
91
|
+
* If the record does not exist than it returns null
|
|
92
|
+
* */
|
|
93
|
+
getRecord<K extends string | symbol, V>(collection: symbol): Record<K, V>;
|
|
78
94
|
/**
|
|
79
95
|
* Get sizes of each repository by given type and collection (optional)
|
|
80
96
|
*
|
|
@@ -102,3 +118,5 @@ export type CommonRepoItem = Dict<number>;
|
|
|
102
118
|
* Repo export dictionary which includes items
|
|
103
119
|
* */
|
|
104
120
|
export type CommonRepoDetail = Record<RepoType, CommonRepoItem>;
|
|
121
|
+
export type RepoType = 'array' | 'list' | 'map' | 'set' | 'record';
|
|
122
|
+
export type RepoLengthLambda = (obj: unknown) => number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.types.js","sourceRoot":"","sources":["../../src/repo/index.types.ts"],"names":[],"mappings":""}
|
package/dist/server.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const index_1 = require("./index");
|
|
4
|
-
index_1.leyyo.log.apply({ severity: '
|
|
4
|
+
index_1.leyyo.log.apply({ severity: 'info', message: 'message' });
|
|
5
5
|
//# sourceMappingURL=server.js.map
|
package/dist/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":";;AAAA,mCAA8B;AAE9B,aAAK,CAAC,GAAG,CAAC,KAAK,CAAC,EAAC,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":";;AAAA,mCAA8B;AAE9B,aAAK,CAAC,GAAG,CAAC,KAAK,CAAC,EAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAC,CAAC,CAAC"}
|
package/dist/shared/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './index
|
|
1
|
+
export * from './index.types';
|
package/dist/shared/index.js
CHANGED
|
@@ -14,5 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./index
|
|
17
|
+
__exportStar(require("./index.types"), exports);
|
|
18
18
|
//# sourceMappingURL=index.js.map
|
|
@@ -24,23 +24,33 @@ export type Timestamp = number;
|
|
|
24
24
|
export type IsoDatetime = string;
|
|
25
25
|
export type IsoDate = string;
|
|
26
26
|
export type IsoTime = string;
|
|
27
|
-
interface
|
|
27
|
+
interface _BaseFunc {
|
|
28
28
|
readonly name?: string;
|
|
29
29
|
readonly length?: number;
|
|
30
30
|
bind(thisArg: any, ...args: Array<any>): any;
|
|
31
31
|
apply(thisArg: any, args: Array<any>): any;
|
|
32
32
|
call(thisArg: any, ...args: Array<any>): any;
|
|
33
33
|
}
|
|
34
|
-
|
|
34
|
+
interface _SyncFnc<R> extends _BaseFunc {
|
|
35
35
|
(...args: Array<any>): R;
|
|
36
36
|
}
|
|
37
|
-
|
|
37
|
+
interface _AsyncFnc<R> extends _BaseFunc {
|
|
38
38
|
(...args: Array<any>): Promise<R>;
|
|
39
39
|
}
|
|
40
|
-
export type
|
|
41
|
-
export type Async<R = any> =
|
|
42
|
-
export
|
|
40
|
+
export type Fnc<R = any> = _SyncFnc<R> & Function;
|
|
41
|
+
export type Async<R = any> = _AsyncFnc<R> & AsyncGeneratorFunction;
|
|
42
|
+
export type AnyFnc<R = any> = Fnc<R> | Async<R>;
|
|
43
|
+
export type _Type<T> = {
|
|
43
44
|
new (...args: Array<any>): T;
|
|
45
|
+
prototype?: any;
|
|
46
|
+
};
|
|
47
|
+
export type ClassLike<T = {}> = (_BaseFunc & _Type<T>) | _SyncFnc<T>;
|
|
48
|
+
export type TypeOf<C = ClassLike> = C extends ClassLike<infer T> ? T : C;
|
|
49
|
+
export interface Describable {
|
|
50
|
+
description: string;
|
|
51
|
+
}
|
|
52
|
+
export interface Nameable {
|
|
53
|
+
name: string;
|
|
44
54
|
}
|
|
45
55
|
/**
|
|
46
56
|
* Serialized version of another type
|
|
@@ -50,6 +60,7 @@ export type Serialized<T> = {
|
|
|
50
60
|
};
|
|
51
61
|
export type ClassOrName = ClassLike | string;
|
|
52
62
|
export type FuncOrName = Function | string;
|
|
63
|
+
export type ClassOrFuncOrName = ClassLike | Function | string;
|
|
53
64
|
/**
|
|
54
65
|
* Referenced from Object
|
|
55
66
|
* */
|
|
@@ -81,8 +92,9 @@ export type Mutable<A> = {
|
|
|
81
92
|
-readonly [K in keyof A]: A[K];
|
|
82
93
|
};
|
|
83
94
|
export type OneOrMore<T> = T | Array<T>;
|
|
84
|
-
export type ValueOrCallback<T> = T | ValueCallback<T>;
|
|
85
|
-
type ValueCallback<T> = () => T;
|
|
95
|
+
export type ValueOrCallback<T> = T | ValueCallback<T> | ValueCallbackAsync<T>;
|
|
96
|
+
export type ValueCallback<T> = () => T;
|
|
97
|
+
export type ValueCallbackAsync<T> = () => Promise<T>;
|
|
86
98
|
export type SameType<A, T> = {
|
|
87
99
|
[K in keyof A]: T;
|
|
88
100
|
};
|
|
@@ -168,5 +180,5 @@ export type I18nRaw<V = unknown> = Dict<V>;
|
|
|
168
180
|
export type I18nAny<V = unknown> = I18nRaw<V> | V;
|
|
169
181
|
export type EnumMap<E extends KeyValue = KeyValue> = Dict<E>;
|
|
170
182
|
export type EnumAlt<E extends KeyValue = KeyValue> = Dict<E>;
|
|
171
|
-
export type EnumLiteral<E extends KeyValue = KeyValue> = Array<E
|
|
183
|
+
export type EnumLiteral<E extends KeyValue = KeyValue> = Array<E> | any;
|
|
172
184
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.types.js","sourceRoot":"","sources":["../../src/shared/index.types.ts"],"names":[],"mappings":";AAAA,qCAAqC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { CommonSystemLike, CommonSystemSecure } from "./index
|
|
1
|
+
import { CommonSystemLike, CommonSystemSecure } from "./index.types";
|
|
2
2
|
import { LeyyoLike } from "../leyyo";
|
|
3
3
|
export declare class CommonSystem implements CommonSystemLike, CommonSystemSecure {
|
|
4
|
-
|
|
4
|
+
private lyy;
|
|
5
|
+
constructor(lyy: LeyyoLike);
|
|
5
6
|
get $back(): CommonSystemLike;
|
|
6
|
-
$init(
|
|
7
|
+
$init(): void;
|
|
7
8
|
get $secure(): CommonSystemSecure;
|
|
8
9
|
isSysFunction(method: string): boolean;
|
|
9
10
|
isSysClass(clazz: string | Function): boolean;
|
|
@@ -3,8 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.CommonSystem = void 0;
|
|
4
4
|
const leyyo_1 = require("../leyyo");
|
|
5
5
|
const internal_1 = require("../internal");
|
|
6
|
-
const http_method_1 = require("./http-method");
|
|
7
|
-
const http_place_1 = require("./http-place");
|
|
8
6
|
const environment_1 = require("./environment");
|
|
9
7
|
const country_code_1 = require("./country-code");
|
|
10
8
|
const language_code_1 = require("./language-code");
|
|
@@ -13,18 +11,19 @@ const sys_class_1 = require("./sys-class");
|
|
|
13
11
|
const sys_function_1 = require("./sys-function");
|
|
14
12
|
// noinspection JSUnusedLocalSymbols,JSUnusedGlobalSymbols
|
|
15
13
|
class CommonSystem {
|
|
16
|
-
constructor() {
|
|
14
|
+
constructor(lyy) {
|
|
15
|
+
this.lyy = lyy;
|
|
17
16
|
}
|
|
18
17
|
get $back() {
|
|
19
18
|
return this;
|
|
20
19
|
}
|
|
21
|
-
$init(
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
$init() {
|
|
21
|
+
this.lyy.$secure
|
|
22
|
+
.$lazyRun(() => {
|
|
23
|
+
this.lyy.fqn.register(null, CommonSystem, 'class', internal_1.FQN);
|
|
24
|
+
})
|
|
25
|
+
.$lazyRun(() => {
|
|
25
26
|
const enumMap = {
|
|
26
|
-
HttpMethod: http_method_1.HttpMethodItems,
|
|
27
|
-
HttpPlace: http_place_1.HttpPlaceItems,
|
|
28
27
|
Environment: environment_1.EnvironmentItems,
|
|
29
28
|
CountryCode: country_code_1.CountryCodeItems,
|
|
30
29
|
LanguageCode: language_code_1.LanguageCodeItems,
|
|
@@ -33,8 +32,8 @@ class CommonSystem {
|
|
|
33
32
|
SysFunction: sys_function_1.SysFunctionItems,
|
|
34
33
|
};
|
|
35
34
|
for (const [name, value] of Object.entries(enumMap)) {
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
this.lyy.fqn.register(name, value, 'enum', internal_1.FQN);
|
|
36
|
+
this.lyy.hook.queueForCallback(leyyo_1.LeyyoCommonHook.enumPendingRegister, value);
|
|
38
37
|
}
|
|
39
38
|
});
|
|
40
39
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common-system.js","sourceRoot":"","sources":["../../src/system/common-system.ts"],"names":[],"mappings":";;;AACA,oCAAoD;AACpD,
|
|
1
|
+
{"version":3,"file":"common-system.js","sourceRoot":"","sources":["../../src/system/common-system.ts"],"names":[],"mappings":";;;AACA,oCAAoD;AACpD,0CAAgC;AAChC,+CAA+C;AAC/C,iDAAgD;AAChD,mDAAkD;AAClD,+CAA8C;AAC9C,2CAAoD;AACpD,iDAA6D;AAE7D,0DAA0D;AAC1D,MAAa,YAAY;IAErB,YAAoB,GAAc;QAAd,QAAG,GAAH,GAAG,CAAW;IAClC,CAAC;IAED,IAAI,KAAK;QACL,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,KAAK;QACD,IAAI,CAAC,GAAG,CAAC,OAAO;aACX,QAAQ,CAAC,GAAG,EAAE;YACX,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,cAAG,CAAC,CAAC;QAChE,CAAC,CAAC;aACG,QAAQ,CAAC,GAAG,EAAE;YACf,MAAM,OAAO,GAAG;gBACZ,WAAW,EAAE,8BAAgB;gBAC7B,WAAW,EAAE,+BAAgB;gBAC7B,YAAY,EAAE,iCAAiB;gBAC/B,UAAU,EAAE,6BAAe;gBAC3B,QAAQ,EAAE,yBAAa;gBACvB,WAAW,EAAE,+BAAgB;aAChC,CAAC;YACF,KAAK,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;gBAClD,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,cAAG,CAAC,CAAC;gBAChD,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,gBAAgB,CAAC,uBAAe,CAAC,mBAAmB,EAAE,KAAK,CAAC,CAAC;YAC/E,CAAC;QACL,CAAC,CAAC,CAAC;IACP,CAAC;IAED,IAAI,OAAO;QACP,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,aAAa,CAAC,MAAc;QACxB,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;YAC7B,OAAO,KAAK,CAAC;QACjB,CAAC;QACD,OAAO,+BAAgB,CAAC,QAAQ,CAAC,MAAqB,CAAC,CAAC;IAC5D,CAAC;IAED,UAAU,CAAC,KAAwB;QAC/B,IAAI,IAAY,CAAC;QACjB,IAAI,OAAO,KAAK,KAAK,UAAU,EAAE,CAAC;YAC9B,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;QACtB,CAAC;aAAM,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YACnC,IAAI,GAAG,KAAK,CAAC;QACjB,CAAC;QACD,IAAI,CAAC,IAAI,EAAE,CAAC;YACR,OAAO,KAAK,CAAC;QACjB,CAAC;QACD,OAAO,yBAAa,CAAC,QAAQ,CAAC,IAAgB,CAAC,CAAC;IACpD,CAAC;CAEJ;AAtDD,oCAsDC"}
|
package/dist/system/index.d.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
export * from './index
|
|
1
|
+
export * from './index.types';
|
|
2
2
|
export * from './country-code';
|
|
3
3
|
export * from './environment';
|
|
4
|
-
export * from './http-method';
|
|
5
|
-
export * from './http-place';
|
|
6
4
|
export * from './language-code';
|
|
7
5
|
export * from './locale-code';
|
|
8
6
|
export * from './sys-class';
|
package/dist/system/index.js
CHANGED
|
@@ -14,11 +14,9 @@ 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
|
|
17
|
+
__exportStar(require("./index.types"), exports);
|
|
18
18
|
__exportStar(require("./country-code"), exports);
|
|
19
19
|
__exportStar(require("./environment"), exports);
|
|
20
|
-
__exportStar(require("./http-method"), exports);
|
|
21
|
-
__exportStar(require("./http-place"), exports);
|
|
22
20
|
__exportStar(require("./language-code"), exports);
|
|
23
21
|
__exportStar(require("./locale-code"), exports);
|
|
24
22
|
__exportStar(require("./sys-class"), exports);
|
package/dist/system/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/system/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B;AAE9B,iDAA+B;AAC/B,gDAA8B;AAC9B,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/system/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B;AAE9B,iDAA+B;AAC/B,gDAA8B;AAC9B,kDAAgC;AAChC,gDAA8B;AAC9B,8CAA4B;AAC5B,iDAA+B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.types.js","sourceRoot":"","sources":["../../src/system/index.types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { CommonTestLike, CommonTestSecure } from "./index.types";
|
|
2
|
+
import { LeyyoLike } from "../leyyo";
|
|
3
|
+
export declare class CommonTest implements CommonTestLike, CommonTestSecure {
|
|
4
|
+
private lyy;
|
|
5
|
+
private _is;
|
|
6
|
+
constructor(lyy: LeyyoLike);
|
|
7
|
+
get $back(): CommonTestLike;
|
|
8
|
+
$init(): void;
|
|
9
|
+
get $secure(): CommonTestSecure;
|
|
10
|
+
title(testCase: string | number, title: string): string;
|
|
11
|
+
code(pck: string, testCase: string | number): string;
|
|
12
|
+
get is(): boolean;
|
|
13
|
+
$ok(): void;
|
|
14
|
+
}
|