lakutata 2.0.30 → 2.0.31
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/README.md +2 -2
- package/package.json +1 -1
- package/src/lib/base/internal/ObjectInjection.cjs +28 -19
- package/src/lib/base/internal/ObjectInjection.mjs +17 -8
- package/src/lib/core/Time.cjs +3 -0
- package/src/lib/core/Time.mjs +3 -0
- package/vendor/Package.15.cjs +348 -342
- package/vendor/Package.15.mjs +1 -1
- package/vendor/TypeDef.1.d.ts +4 -0
package/README.md
CHANGED
|
@@ -28,8 +28,8 @@ to freely encapsulate and call third-party modules using Lakutata's dependency i
|
|
|
28
28
|
|
|
29
29
|
## ✨ Getting started
|
|
30
30
|
|
|
31
|
-
- 👉
|
|
32
|
-
- 👉
|
|
31
|
+
- 👉 Check out the **[guide](https://github.com/lakutata/lakutata/blob/main/doc/en/Overview.md)**.
|
|
32
|
+
- 👉 查看 **[指南](https://github.com/lakutata/lakutata/blob/main/doc/zh/Overview.md)**。
|
|
33
33
|
|
|
34
34
|
## 🌎 License
|
|
35
35
|
|
package/package.json
CHANGED
|
@@ -4,9 +4,9 @@ Object.defineProperty(exports, Symbol.toStringTag, {
|
|
|
4
4
|
value: "Module"
|
|
5
5
|
});
|
|
6
6
|
|
|
7
|
-
const
|
|
7
|
+
const t = require("../../../constants/DIMetadataKey.cjs");
|
|
8
8
|
|
|
9
|
-
const
|
|
9
|
+
const e = require("../../helpers/ObjectConstructor.cjs");
|
|
10
10
|
|
|
11
11
|
const r = require("../../helpers/ObjectParentConstructors.cjs");
|
|
12
12
|
|
|
@@ -19,37 +19,46 @@ require("../../helpers/As.cjs");
|
|
|
19
19
|
require("../../helpers/ObjectParentConstructor.cjs");
|
|
20
20
|
|
|
21
21
|
function c(c, a, n, o) {
|
|
22
|
-
let
|
|
23
|
-
if (Reflect.hasOwnMetadata(
|
|
24
|
-
|
|
22
|
+
let T;
|
|
23
|
+
if (Reflect.hasOwnMetadata(t.DI_TARGET_CONSTRUCTOR_INJECTS, e.ObjectConstructor(c))) {
|
|
24
|
+
T = Reflect.getOwnMetadata(t.DI_TARGET_CONSTRUCTOR_INJECTS, e.ObjectConstructor(c));
|
|
25
25
|
} else {
|
|
26
|
-
|
|
26
|
+
T = new Map;
|
|
27
27
|
const a = [];
|
|
28
|
-
r.ObjectParentConstructors(
|
|
29
|
-
if (Reflect.hasOwnMetadata(
|
|
28
|
+
r.ObjectParentConstructors(e.ObjectConstructor(c)).forEach((e => {
|
|
29
|
+
if (Reflect.hasOwnMetadata(t.DI_TARGET_CONSTRUCTOR_INJECTS, e)) a.unshift(Reflect.getOwnMetadata(t.DI_TARGET_CONSTRUCTOR_INJECTS, e));
|
|
30
30
|
}));
|
|
31
|
-
a.forEach((
|
|
31
|
+
a.forEach((t => t.forEach(((t, e) => T.set(e, t)))));
|
|
32
32
|
}
|
|
33
|
-
|
|
33
|
+
T.set(a, {
|
|
34
34
|
name: n,
|
|
35
35
|
transform: o
|
|
36
36
|
});
|
|
37
|
-
Reflect.defineMetadata(
|
|
37
|
+
Reflect.defineMetadata(t.DI_TARGET_CONSTRUCTOR_INJECTS, T, e.ObjectConstructor(c));
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
function a(
|
|
41
|
-
const
|
|
42
|
-
|
|
40
|
+
function a(c) {
|
|
41
|
+
const a = Reflect.getOwnMetadata(t.DI_TARGET_CONSTRUCTOR_INJECTS, e.ObjectConstructor(c)) || new Map;
|
|
42
|
+
r.ObjectParentConstructors(e.ObjectConstructor(c)).forEach((e => {
|
|
43
|
+
if (Reflect.hasOwnMetadata(t.DI_TARGET_CONSTRUCTOR_INJECTS, e)) {
|
|
44
|
+
const r = Reflect.getOwnMetadata(t.DI_TARGET_CONSTRUCTOR_INJECTS, e);
|
|
45
|
+
r.forEach(((t, e) => {
|
|
46
|
+
if (a.has(e)) return;
|
|
47
|
+
a.set(e, t);
|
|
48
|
+
}));
|
|
49
|
+
}
|
|
50
|
+
}));
|
|
51
|
+
if (a) return a;
|
|
43
52
|
return new Map;
|
|
44
53
|
}
|
|
45
54
|
|
|
46
|
-
function n(
|
|
47
|
-
if (!Reflect.hasOwnMetadata(
|
|
48
|
-
return
|
|
55
|
+
function n(e) {
|
|
56
|
+
if (!Reflect.hasOwnMetadata(t.DI_TARGET_CONSTRUCTOR_AUTOLOAD, e)) Reflect.defineMetadata(t.DI_TARGET_CONSTRUCTOR_AUTOLOAD, true, e);
|
|
57
|
+
return e;
|
|
49
58
|
}
|
|
50
59
|
|
|
51
|
-
function o(
|
|
52
|
-
return !!Reflect.getOwnMetadata(
|
|
60
|
+
function o(e) {
|
|
61
|
+
return !!Reflect.getOwnMetadata(t.DI_TARGET_CONSTRUCTOR_AUTOLOAD, e);
|
|
53
62
|
}
|
|
54
63
|
|
|
55
64
|
exports.GetObjectInjectItemsByPrototype = a;
|
|
@@ -12,7 +12,7 @@ import "../../helpers/As.mjs";
|
|
|
12
12
|
|
|
13
13
|
import "../../helpers/ObjectParentConstructor.mjs";
|
|
14
14
|
|
|
15
|
-
function n(e, n,
|
|
15
|
+
function n(e, n, f, o) {
|
|
16
16
|
let c;
|
|
17
17
|
if (Reflect.hasOwnMetadata(t, a(e))) {
|
|
18
18
|
c = Reflect.getOwnMetadata(t, a(e));
|
|
@@ -25,19 +25,28 @@ function n(e, n, o, s) {
|
|
|
25
25
|
n.forEach((t => t.forEach(((t, e) => c.set(e, t)))));
|
|
26
26
|
}
|
|
27
27
|
c.set(n, {
|
|
28
|
-
name:
|
|
29
|
-
transform:
|
|
28
|
+
name: f,
|
|
29
|
+
transform: o
|
|
30
30
|
});
|
|
31
31
|
Reflect.defineMetadata(t, c, a(e));
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
function
|
|
35
|
-
const
|
|
36
|
-
|
|
34
|
+
function f(e) {
|
|
35
|
+
const n = Reflect.getOwnMetadata(t, a(e)) || new Map;
|
|
36
|
+
r(a(e)).forEach((e => {
|
|
37
|
+
if (Reflect.hasOwnMetadata(t, e)) {
|
|
38
|
+
const a = Reflect.getOwnMetadata(t, e);
|
|
39
|
+
a.forEach(((t, e) => {
|
|
40
|
+
if (n.has(e)) return;
|
|
41
|
+
n.set(e, t);
|
|
42
|
+
}));
|
|
43
|
+
}
|
|
44
|
+
}));
|
|
45
|
+
if (n) return n;
|
|
37
46
|
return new Map;
|
|
38
47
|
}
|
|
39
48
|
|
|
40
|
-
function
|
|
49
|
+
function o(t) {
|
|
41
50
|
if (!Reflect.hasOwnMetadata(e, t)) Reflect.defineMetadata(e, true, t);
|
|
42
51
|
return t;
|
|
43
52
|
}
|
|
@@ -46,4 +55,4 @@ function c(t) {
|
|
|
46
55
|
return !!Reflect.getOwnMetadata(e, t);
|
|
47
56
|
}
|
|
48
57
|
|
|
49
|
-
export {
|
|
58
|
+
export { f as GetObjectInjectItemsByPrototype, c as GetObjectIsAutoload, o as MarkObjectAsAutoload, n as SetObjectInjectItem };
|
package/src/lib/core/Time.cjs
CHANGED