New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

koatty_container

Package Overview
Dependencies
Maintainers
0
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.9.0 to 1.9.1

7

CHANGELOG.md

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

### [1.9.1](https://github.com/koatty/koatty_container/compare/v1.9.0...v1.9.1) (2024-11-06)
### Bug Fixes
* values ([02c30a3](https://github.com/koatty/koatty_container/commit/02c30a32c737e1ff8a5c1b14347be7fe50cd65f6))
## [1.9.0](https://github.com/koatty/koatty_container/compare/v1.8.10...v1.9.0) (2024-11-06)

@@ -7,0 +14,0 @@

42

dist/index.d.ts
/*!
* @Author: richen
* @Date: 2024-11-06 10:34:40
* @Date: 2024-11-06 13:45:52
* @License: BSD (3-Clause)

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

/**
* Base Application
* Base Application interface
*

@@ -46,5 +46,7 @@ * @export

*/
declare interface Application {
export declare interface Application {
env: string;
options: object;
use?: Function;
config?: Function;
/**

@@ -303,3 +305,3 @@ * event

/**
* Base Context.
* Base Context interface
*

@@ -404,2 +406,24 @@ * @export

/**
* Marks a constructor method's parameter as to be Inject by Koatty"s dependency injection facilities.
*
* @export
* @param {string} [identifier]
* @param {ComponentType} [cType]
* @param {any[]} [constructArgs]
* @param {boolean} [isDelay=false]
* @returns {PropertyDecorator}
*/
export declare function Inject(paramName: string, cType?: ComponentType): ParameterDecorator;
/**
* Inject class instance property
*
* @export
* @param {*} target
* @param {*} instance
* @param {Container} [_container]
*/
export declare function injectValues(target: any, instance: any, _container?: Container): void;
/**
* export Singleton.

@@ -502,2 +526,12 @@ * get the singleton instance of Container

/**
* Indicates that an decorated class instance property values.
*
* @export
* @param {unknown | Function} key
* @param {unknown} [defaultValue]
* @returns {*} {PropertyDecorator}
*/
export declare function Values(value: unknown | Function, defaultValue?: unknown): PropertyDecorator;
export { }

2

dist/package.json
{
"name": "koatty_container",
"version": "1.9.0",
"version": "1.9.1",
"description": "IOC Container for Koatty.",

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

@@ -264,2 +264,3 @@ # koatty_container

| `@Autowired()` | `identifier` 注册到IOC容器的标识,默认值为类名 <br> `cType` 注入bean的类型 <br> `constructArgs` 注入bean构造方法入参。如果传递该参数,则返回request作用域的实例 <br> `isDelay` 是否延迟加载。延迟加载主要是解决循环依赖问题 | 从IOC容器自动注入bean到当前类 ||
| `@Values()` | `val` 属性值, 值类型同属性类型一致 <br> `defaultValue` 被定义时,当val值为undefined、null、NaN时取值defaultValue型 | val值可以是一个函数,取值函数结果 ||

@@ -280,2 +281,2 @@

| ----------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------- | ---- |
| `@Inject()` | `paramName` 构造方法入参名(形参) <br> `cType` 注入bean的类型 | 该装饰器使用类构造方法入参来注入依赖, 如果和 `@Autowired()` 同时使用, 会覆盖autowired注入的相同属性 | 仅用于构造方法(constructor)的入参 |
| `@Inject()` | `paramName` 构造方法入参名(形参) <br> `cType` 注入bean的类型 | 该装饰器使用类构造方法入参来注入依赖, 如果和 `@Autowired()` 同时使用, 可能会覆盖autowired注入的相同属性 | 仅用于构造方法(constructor)的入参 |
{
"name": "koatty_container",
"version": "1.9.0",
"version": "1.9.1",
"description": "IOC Container for Koatty.",

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

@@ -264,2 +264,3 @@ # koatty_container

| `@Autowired()` | `identifier` 注册到IOC容器的标识,默认值为类名 <br> `cType` 注入bean的类型 <br> `constructArgs` 注入bean构造方法入参。如果传递该参数,则返回request作用域的实例 <br> `isDelay` 是否延迟加载。延迟加载主要是解决循环依赖问题 | 从IOC容器自动注入bean到当前类 ||
| `@Values()` | `val` 属性值, 值类型同属性类型一致 <br> `defaultValue` 被定义时,当val值为undefined、null、NaN时取值defaultValue型 | val值可以是一个函数,取值函数结果 ||

@@ -280,2 +281,2 @@

| ----------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------- | ---- |
| `@Inject()` | `paramName` 构造方法入参名(形参) <br> `cType` 注入bean的类型 | 该装饰器使用类构造方法入参来注入依赖, 如果和 `@Autowired()` 同时使用, 会覆盖autowired注入的相同属性 | 仅用于构造方法(constructor)的入参 |
| `@Inject()` | `paramName` 构造方法入参名(形参) <br> `cType` 注入bean的类型 | 该装饰器使用类构造方法入参来注入依赖, 如果和 `@Autowired()` 同时使用, 可能会覆盖autowired注入的相同属性 | 仅用于构造方法(constructor)的入参 |

Sorry, the diff of this file is too big to display

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