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.3.6 to 1.3.7

24

dist/AOP.js

@@ -215,16 +215,14 @@ "use strict";

// class methods
const methods = Util_1.getMethodNames(target, true).filter((m) => !["constructor", "init"].includes(m));
const methods = Util_1.getMethodNames(target, true).filter((m) => !["constructor", "init", "__before", "__after"].includes(m));
// tslint:disable-next-line: no-unused-expression
process.env.APP_DEBUG && koatty_logger_1.DefaultLogger.Warn(`The ${target.name} class has a default AOP method, @BeforeEach and @AfterEach maybe not take effect`);
methods.forEach((element) => {
if (element !== "__before" && element !== "__after") {
// tslint:disable-next-line: no-unused-expression
process.env.APP_DEBUG && koatty_logger_1.DefaultLogger.Custom("think", "", `Register inject default AOP ${target.name} method: ${element} => __before`);
if (helper.isFunction(instance.__before)) {
defineAOPProperty(target, element, "__before", AOPType.Before);
}
if (helper.isFunction(instance.__after)) {
defineAOPProperty(target, element, "__after", AOPType.After);
}
// tslint:disable-next-line: no-unused-expression
process.env.APP_DEBUG && koatty_logger_1.DefaultLogger.Custom("think", "", `Register inject default AOP ${target.name} method: ${element} => __before`);
if (helper.isFunction(instance.__before)) {
defineAOPProperty(target, element, "__before", AOPType.Before);
}
if (helper.isFunction(instance.__after)) {
defineAOPProperty(target, element, "__after", AOPType.After);
}
});

@@ -258,8 +256,6 @@ }

}
// tslint:disable-next-line: no-invalid-this
return Reflect.apply(oldMethod, this, props);
return oldMethod(props);
}
else {
// tslint:disable-next-line: no-invalid-this
const res = await Reflect.apply(oldMethod, this, props);
const res = await oldMethod(props);
if (aopName) {

@@ -266,0 +262,0 @@ if (aopName === "__after") {

{
"name": "koatty_container",
"version": "1.3.6",
"version": "1.3.7",
"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