koatty_container
Advanced tools
Comparing version 1.6.12 to 1.6.14
@@ -5,2 +5,4 @@ # Changelog | ||
### [1.6.14](https://github.com/koatty/koatty_container/compare/v1.6.12...v1.6.14) (2021-12-21) | ||
### [1.6.12](https://github.com/koatty/koatty_container/compare/v1.6.12-1...v1.6.12) (2021-12-18) | ||
@@ -7,0 +9,0 @@ |
/*! | ||
* @Author: richen | ||
* @Date: 2021-12-18 12:13:33 | ||
* @Date: 2021-12-21 16:53:06 | ||
* @License: BSD (3-Clause) | ||
@@ -342,2 +342,12 @@ * @Copyright (c) - <richenlin(at)gmail.com> | ||
/** | ||
* | ||
* | ||
* @param {(string | symbol)} metadataKey | ||
* @param {*} target | ||
* @param {(string | symbol)} [propertyKey] | ||
* @returns | ||
*/ | ||
export declare function getOriginMetadata(metadataKey: string | symbol, target: any, propertyKey?: string | symbol): any; | ||
/** | ||
* Find all property on a given ES6 class | ||
@@ -344,0 +354,0 @@ * |
/*! | ||
* @Author: richen | ||
* @Date: 2021-12-18 12:13:22 | ||
* @Date: 2021-12-21 16:52:54 | ||
* @License: BSD (3-Clause) | ||
@@ -50,3 +50,3 @@ * @Copyright (c) - <richenlin(at)gmail.com> | ||
* @LastEditors: Please set LastEditors | ||
* @LastEditTime: 2021-12-18 02:58:21 | ||
* @LastEditTime: 2021-12-21 16:50:52 | ||
* @License: BSD (3-Clause) | ||
@@ -120,2 +120,30 @@ * @Copyright (c) - <richenlin(at)gmail.com> | ||
/** | ||
* | ||
* | ||
* @param {(string | symbol)} metadataKey | ||
* @param {*} target | ||
* @param {(string | symbol)} [propertyKey] | ||
* @returns | ||
*/ | ||
function getOriginMetadata(metadataKey, target, propertyKey) { | ||
// filter Object.create(null) | ||
if (typeof target === "object" && target.constructor) { | ||
target = target.constructor; | ||
} | ||
if (propertyKey) { | ||
// for property or method | ||
if (!Reflect.hasMetadata(metadataKey, target, propertyKey)) { | ||
Reflect.defineMetadata(metadataKey, new Map(), target, propertyKey); | ||
} | ||
return Reflect.getMetadata(metadataKey, target, propertyKey); | ||
} | ||
else { | ||
// for class | ||
if (!Reflect.hasMetadata(metadataKey, target)) { | ||
Reflect.defineMetadata(metadataKey, new Map(), target); | ||
} | ||
return Reflect.getMetadata(metadataKey, target); | ||
} | ||
} | ||
/** | ||
* Find all methods on a given ES6 class | ||
@@ -1086,2 +1114,3 @@ * | ||
exports.getMethodNames = getMethodNames; | ||
exports.getOriginMetadata = getOriginMetadata; | ||
exports.getPropertyNames = getPropertyNames; |
{ | ||
"name": "koatty_container", | ||
"version": "1.6.12", | ||
"version": "1.6.14", | ||
"description": "IOC Container for Koatty.", | ||
@@ -10,3 +10,3 @@ "scripts": { | ||
"build:doc": "del-cli --force docs/api && npx api-documenter markdown --input temp --output docs/api", | ||
"build:dts": "del-cli --force lib && npx tsc && npx api-extractor run --local --verbose && del-cli --force lib", | ||
"build:dts": "del-cli --force temp && npx tsc && npx api-extractor run --local --verbose", | ||
"eslint": "eslint --ext .ts,.js ./", | ||
@@ -20,3 +20,2 @@ "prepublishOnly": "npm test && npm run build", | ||
"pub": "git push --follow-tags origin && npm publish", | ||
"pub:pre": "git push --follow-tags origin && npm publish --tag prerelease", | ||
"test": "npm run eslint && jest --passWithNoTests", | ||
@@ -27,2 +26,6 @@ "test:cov": "jest --collectCoverage --detectOpenHandles", | ||
"main": "./dist/index.js", | ||
"exports": { | ||
"require": "./dist/index.js", | ||
"import": "./dist/index.mjs" | ||
}, | ||
"repository": { | ||
@@ -29,0 +32,0 @@ "type": "git", |
{ | ||
"name": "koatty_container", | ||
"version": "1.6.12", | ||
"version": "1.6.14", | ||
"description": "IOC Container for Koatty.", | ||
@@ -10,3 +10,3 @@ "scripts": { | ||
"build:doc": "del-cli --force docs/api && npx api-documenter markdown --input temp --output docs/api", | ||
"build:dts": "del-cli --force lib && npx tsc && npx api-extractor run --local --verbose && del-cli --force lib", | ||
"build:dts": "del-cli --force temp && npx tsc && npx api-extractor run --local --verbose", | ||
"eslint": "eslint --ext .ts,.js ./", | ||
@@ -20,3 +20,2 @@ "prepublishOnly": "npm test && npm run build", | ||
"pub": "git push --follow-tags origin && npm publish", | ||
"pub:pre": "git push --follow-tags origin && npm publish --tag prerelease", | ||
"test": "npm run eslint && jest --passWithNoTests", | ||
@@ -27,2 +26,6 @@ "test:cov": "jest --collectCoverage --detectOpenHandles", | ||
"main": "./dist/index.js", | ||
"exports": { | ||
"require": "./dist/index.js", | ||
"import": "./dist/index.mjs" | ||
}, | ||
"repository": { | ||
@@ -29,0 +32,0 @@ "type": "git", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
0
123368
10
2619