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 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
- - 👉 To check out the **[guide](http://docs.lakutata.com)**, visit **[docs.lakutata.com](http://docs.lakutata.com)**.
32
- - 👉 To see usage **[examples](http://examples.lakutata.com)**, visit **[examples.lakutata.com](http://examples.lakutata.com)**.
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lakutata",
3
- "version": "2.0.30",
3
+ "version": "2.0.31",
4
4
  "description": "An IoC-based universal application framework.",
5
5
  "exports": {
6
6
  ".": {
@@ -4,9 +4,9 @@ Object.defineProperty(exports, Symbol.toStringTag, {
4
4
  value: "Module"
5
5
  });
6
6
 
7
- const e = require("../../../constants/DIMetadataKey.cjs");
7
+ const t = require("../../../constants/DIMetadataKey.cjs");
8
8
 
9
- const t = require("../../helpers/ObjectConstructor.cjs");
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 s;
23
- if (Reflect.hasOwnMetadata(e.DI_TARGET_CONSTRUCTOR_INJECTS, t.ObjectConstructor(c))) {
24
- s = Reflect.getOwnMetadata(e.DI_TARGET_CONSTRUCTOR_INJECTS, t.ObjectConstructor(c));
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
- s = new Map;
26
+ T = new Map;
27
27
  const a = [];
28
- r.ObjectParentConstructors(t.ObjectConstructor(c)).forEach((t => {
29
- if (Reflect.hasOwnMetadata(e.DI_TARGET_CONSTRUCTOR_INJECTS, t)) a.unshift(Reflect.getOwnMetadata(e.DI_TARGET_CONSTRUCTOR_INJECTS, t));
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((e => e.forEach(((e, t) => s.set(t, e)))));
31
+ a.forEach((t => t.forEach(((t, e) => T.set(e, t)))));
32
32
  }
33
- s.set(a, {
33
+ T.set(a, {
34
34
  name: n,
35
35
  transform: o
36
36
  });
37
- Reflect.defineMetadata(e.DI_TARGET_CONSTRUCTOR_INJECTS, s, t.ObjectConstructor(c));
37
+ Reflect.defineMetadata(t.DI_TARGET_CONSTRUCTOR_INJECTS, T, e.ObjectConstructor(c));
38
38
  }
39
39
 
40
- function a(r) {
41
- const c = Reflect.getOwnMetadata(e.DI_TARGET_CONSTRUCTOR_INJECTS, t.ObjectConstructor(r));
42
- if (c) return c;
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(t) {
47
- if (!Reflect.hasOwnMetadata(e.DI_TARGET_CONSTRUCTOR_AUTOLOAD, t)) Reflect.defineMetadata(e.DI_TARGET_CONSTRUCTOR_AUTOLOAD, true, t);
48
- return t;
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(t) {
52
- return !!Reflect.getOwnMetadata(e.DI_TARGET_CONSTRUCTOR_AUTOLOAD, t);
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, o, s) {
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: o,
29
- transform: s
28
+ name: f,
29
+ transform: o
30
30
  });
31
31
  Reflect.defineMetadata(t, c, a(e));
32
32
  }
33
33
 
34
- function o(e) {
35
- const r = Reflect.getOwnMetadata(t, a(e));
36
- if (r) return r;
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 s(t) {
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 { o as GetObjectInjectItemsByPrototype, c as GetObjectIsAutoload, s as MarkObjectAsAutoload, n as SetObjectInjectItem };
58
+ export { f as GetObjectInjectItemsByPrototype, c as GetObjectIsAutoload, o as MarkObjectAsAutoload, n as SetObjectInjectItem };
@@ -149,6 +149,9 @@ class Time extends Date {
149
149
  toISOString() {
150
150
  return this.#e.toISOString();
151
151
  }
152
+ toDate() {
153
+ return this.#e.toDate();
154
+ }
152
155
  isBefore(e, t) {
153
156
  return this.#e.isBefore(new Time(e).#e, t);
154
157
  }
@@ -143,6 +143,9 @@ class Time extends Date {
143
143
  toISOString() {
144
144
  return this.#e.toISOString();
145
145
  }
146
+ toDate() {
147
+ return this.#e.toDate();
148
+ }
146
149
  isBefore(e, t) {
147
150
  return this.#e.isBefore(new Time(e).#e, t);
148
151
  }