lakutata
Version:
An IoC-based universal application framework.
72 lines (55 loc) • 2.21 kB
JavaScript
/* Build Date: Mon Jan 05 2026 23:52:23 GMT+0800 (China Standard Time) */
;
Object.defineProperty(exports, Symbol.toStringTag, {
value: "Module"
});
const t = require("../../../constants/DIMetadataKey.cjs");
const e = require("../../helpers/ObjectConstructor.cjs");
const r = require("../../helpers/ObjectParentConstructors.cjs");
require("../../../../vendor/Package.internal.1.cjs");
require("../../../../vendor/Package.internal.2.cjs");
require("../../helpers/As.cjs");
require("../../helpers/ObjectParentConstructor.cjs");
function a(a, c, n, o) {
let T;
if (Reflect.hasOwnMetadata(t.DI_TARGET_CONSTRUCTOR_INJECTS, e.ObjectConstructor(a))) {
T = Reflect.getOwnMetadata(t.DI_TARGET_CONSTRUCTOR_INJECTS, e.ObjectConstructor(a));
} else {
T = new Map;
const c = [];
r.ObjectParentConstructors(e.ObjectConstructor(a)).forEach(e => {
if (Reflect.hasOwnMetadata(t.DI_TARGET_CONSTRUCTOR_INJECTS, e)) c.unshift(Reflect.getOwnMetadata(t.DI_TARGET_CONSTRUCTOR_INJECTS, e));
});
c.forEach(t => t.forEach((t, e) => T.set(e, t)));
}
T.set(c, {
name: n,
transform: o
});
Reflect.defineMetadata(t.DI_TARGET_CONSTRUCTOR_INJECTS, T, e.ObjectConstructor(a));
}
function c(a) {
const c = Reflect.getOwnMetadata(t.DI_TARGET_CONSTRUCTOR_INJECTS, e.ObjectConstructor(a)) || new Map;
r.ObjectParentConstructors(e.ObjectConstructor(a)).forEach(e => {
if (Reflect.hasOwnMetadata(t.DI_TARGET_CONSTRUCTOR_INJECTS, e)) {
const r = Reflect.getOwnMetadata(t.DI_TARGET_CONSTRUCTOR_INJECTS, e);
r.forEach((t, e) => {
if (c.has(e)) return;
c.set(e, t);
});
}
});
if (c) return c;
return new Map;
}
function n(e) {
if (!Reflect.hasOwnMetadata(t.DI_TARGET_CONSTRUCTOR_AUTOLOAD, e)) Reflect.defineMetadata(t.DI_TARGET_CONSTRUCTOR_AUTOLOAD, true, e);
return e;
}
function o(e) {
return !!Reflect.getOwnMetadata(t.DI_TARGET_CONSTRUCTOR_AUTOLOAD, e);
}
exports.GetObjectInjectItemsByPrototype = c;
exports.GetObjectIsAutoload = o;
exports.MarkObjectAsAutoload = n;
exports.SetObjectInjectItem = a;