Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

koatty_container

Package Overview
Dependencies
Maintainers
1
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

koatty_container - npm Package Compare versions

Comparing version 1.7.4 to 1.7.5

2

CHANGELOG.md

@@ -5,2 +5,4 @@ # Changelog

### [1.7.5](https://github.com/koatty/koatty_container/compare/v1.7.4...v1.7.5) (2022-02-22)
### [1.7.4](https://github.com/koatty/koatty_container/compare/v1.7.4-0...v1.7.4) (2022-02-21)

@@ -7,0 +9,0 @@

2

dist/index.d.ts
/*!
* @Author: richen
* @Date: 2022-02-21 17:03:24
* @Date: 2022-02-22 12:10:36
* @License: BSD (3-Clause)

@@ -5,0 +5,0 @@ * @Copyright (c) - <richenlin(at)gmail.com>

/*!
* @Author: richen
* @Date: 2022-02-21 17:03:11
* @Date: 2022-02-22 12:10:26
* @License: BSD (3-Clause)

@@ -310,3 +310,3 @@ * @Copyright (c) - <richenlin(at)gmail.com>

// tslint:disable-next-line: no-unused-expression
if (app && app.once) {
if (app === null || app === void 0 ? void 0 : app.once) {
app.once("appReady", () => {

@@ -492,23 +492,22 @@ // lazy inject autowired

const allMethods = getMethodNames(target);
const methods = allMethods.filter((m) => !["constructor", "init", "__before", "__after"].includes(m) && target.prototype.hasOwnProperty(m));
if (allMethods.includes("__before") || allMethods.includes("__after")) {
const methods = allMethods.filter((m) => !['constructor', 'init', '__before', '__after'].includes(m));
let hasDefault = false;
if (allMethods.includes('__before') || allMethods.includes('__after')) {
// inject default AOP method
injectDefaultAOP(target, instance, methods);
hasDefault = true;
}
else {
const classMetaData = container.getClassMetadata(TAGGED_CLS, TAGGED_AOP, target);
if (classMetaData) {
const { type, name, method } = classMetaData;
if (name && [exports.AOPType.Before, exports.AOPType.BeforeEach, exports.AOPType.After, exports.AOPType.AfterEach].includes(type)) {
methods.forEach((element) => {
if ([exports.AOPType.Before, exports.AOPType.After].includes(type) && method === element) {
// Logger.Debug(`Register inject AOP ${target.name} method: ${element} => ${type}`);
defineAOPProperty(target, element, name, type);
const { type, name, method } = classMetaData || {};
if (name && [exports.AOPType.Before, exports.AOPType.BeforeEach, exports.AOPType.After, exports.AOPType.AfterEach].includes(type)) {
methods.forEach((element) => {
if (element === method) {
if (hasDefault && (type === exports.AOPType.BeforeEach || type === exports.AOPType.AfterEach)) {
return;
}
else {
// Logger.Debug(`Register inject AOP ${target.name} method: ${element} => ${type}`);
defineAOPProperty(target, element, name, type);
}
});
}
// Logger.Debug(`Register inject AOP ${target.name} method: ${element} => ${type}`);
defineAOPProperty(target, element, name, type);
}
});
}

@@ -515,0 +514,0 @@ }

{
"name": "koatty_container",
"version": "1.7.4",
"version": "1.7.5",
"description": "IOC Container for Koatty.",

@@ -5,0 +5,0 @@ "scripts": {

{
"name": "koatty_container",
"version": "1.7.4",
"version": "1.7.5",
"description": "IOC Container for Koatty.",

@@ -5,0 +5,0 @@ "scripts": {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc