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.2 to 1.3.3

2

dist/Container.js

@@ -107,3 +107,3 @@ "use strict";

// inject value
Value_1.injectValue(target, target.prototype, this, app.config);
Value_1.injectValue(target, target.prototype, this);
// inject AOP

@@ -110,0 +110,0 @@ AOP_1.injectAOP(target, target.prototype, this);

@@ -28,2 +28,2 @@ import { Container } from "./Container";

*/
export declare function injectValue(target: any, instance: any, container: Container, bindingFunc: (key: string, type: string) => any): void;
export declare function injectValue(target: any, instance: any, container: Container): void;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.injectValue = exports.Config = exports.Value = void 0;
const tslib_1 = require("tslib");
/*
* @Author: richen
* @Date: 2020-12-18 10:37:03
* @LastEditors: linyyyang<linyyyang@tencent.com>
* @LastEditTime: 2020-12-18 15:35:12
* @License: BSD (3-Clause)
* @Copyright (c) - <richenlin(at)gmail.com>
*/
const helper = tslib_1.__importStar(require("koatty_lib"));
const koatty_logger_1 = require("koatty_logger");

@@ -58,3 +48,3 @@ const Container_1 = require("./Container");

*/
function injectValue(target, instance, container, bindingFunc) {
function injectValue(target, instance, container) {
// const componentType = IOCContainer.getType(target);

@@ -64,7 +54,7 @@ // if (componentType === "MIDDLEWARE") {

// }
if (!helper.isFunction(bindingFunc)) {
throw Error("The bindingFunc must be a function.");
const app = container.getApp();
if (!app) {
return;
}
const metaData = Util_1.RecursiveGetMetadata(IContainer_1.TAGGED_ARGS, target);
const app = container.getApp();
// tslint:disable-next-line: forin

@@ -80,3 +70,3 @@ for (const metaKey in metaData) {

writable: true,
value: bindingFunc(propKey, type)
value: app.config(propKey, type)
});

@@ -83,0 +73,0 @@ }

{
"name": "koatty_container",
"version": "1.3.2",
"version": "1.3.3",
"description": "IOC Container for Koatty.",

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

Sorry, the diff of this file is not supported yet

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