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

egg-aop

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

egg-aop - npm Package Compare versions

Comparing version 0.3.7 to 0.3.8

1

config/config.default.d.ts
declare const _default: {
aop: {
useCtxProxyForAppComponent: boolean;
autoRegisterToCtx: boolean;
};
};
export default _default;

@@ -6,3 +6,4 @@ "use strict";

useCtxProxyForAppComponent: false,
autoRegisterToCtx: false,
}
};

5

lib/decorators.js

@@ -19,6 +19,3 @@ "use strict";

const clsType = classType || target;
Object.defineProperty(clsType, getInstance_1.contextTypeSymbol, {
value: from
});
typeLoader_1.typeLoader.register(clsType, keyType || clsType, { autoNew: false });
typeLoader_1.register(clsType, keyType || clsType, from);
};

@@ -25,0 +22,0 @@ }

@@ -21,4 +21,11 @@ "use strict";

let ioc = undefined;
let useCtxProxyForAppComponent = app.config.aop.useCtxProxyForAppComponent;
const useCtxProxyForAppComponent = app.config.aop.useCtxProxyForAppComponent;
const autoRegisterToCtx = app.config.aop.autoRegisterToCtx;
if (autoRegisterToCtx && !typeLoader_1.typeLoader.has(clsType)) {
typeLoader_1.register(clsType, clsType, 'Context');
}
const targetClsType = typeLoader_1.typeLoader.get(clsType);
if (!targetClsType) {
throw new Error(`ClassType [${utils_1.getGlobalType(clsType)}] NOT found!`);
}
const from = targetClsType[exports.contextTypeSymbol];

@@ -25,0 +32,0 @@ if (from === 'Application') {

export * from './decorators';
export { getApp, getCtx } from './appctx';
export * from './getInstance';
export * from './typeLoader';
export { typeLoader } from './typeLoader';
export * from './aspect';

@@ -9,3 +9,4 @@ "use strict";

tslib_1.__exportStar(require("./getInstance"), exports);
tslib_1.__exportStar(require("./typeLoader"), exports);
var typeLoader_1 = require("./typeLoader");
exports.typeLoader = typeLoader_1.typeLoader;
tslib_1.__exportStar(require("./aspect"), exports);
import { IocContext } from 'power-di';
import { InstanceSource } from './getInstance';
export declare const typeLoader: IocContext;
export declare function register(clsType: any, keyType: any, from: InstanceSource): void;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const power_di_1 = require("power-di");
const getInstance_1 = require("./getInstance");
exports.typeLoader = new power_di_1.IocContext;
function register(clsType, keyType, from) {
Object.defineProperty(clsType, getInstance_1.contextTypeSymbol, {
value: from
});
exports.typeLoader.register(clsType, keyType, { autoNew: false });
}
exports.register = register;
{
"name": "egg-aop",
"version": "0.3.7",
"version": "0.3.8",
"description": "aop for egg.",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

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