@rsdk/decorators 2.4.0 → 2.4.1-next.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [2.4.1-next.2](https://github.com/R-Vision/rsdk/compare/v2.4.1-next.1...v2.4.1-next.2) (2023-06-15)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @rsdk/decorators
|
|
9
|
+
|
|
10
|
+
## [2.4.1-next.0](https://github.com/R-Vision/rsdk/compare/v2.4.0...v2.4.1-next.0) (2023-06-15)
|
|
11
|
+
|
|
12
|
+
**Note:** Version bump only for package @rsdk/decorators
|
|
13
|
+
|
|
6
14
|
# [2.4.0](https://github.com/R-Vision/rsdk/compare/v2.3.1...v2.4.0) (2023-06-15)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @rsdk/decorators
|
|
@@ -13,7 +13,7 @@ const logger = logging_1.LoggerFactory.create('LogTime');
|
|
|
13
13
|
function LogTime(level) {
|
|
14
14
|
return function (target, methodName, descriptor) {
|
|
15
15
|
if (typeof methodName === 'symbol') {
|
|
16
|
-
throw new
|
|
16
|
+
throw new TypeError("Can't decorate methods with symbol key");
|
|
17
17
|
}
|
|
18
18
|
// get original method
|
|
19
19
|
const original = descriptor.value;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log-time.decorator.js","sourceRoot":"","sources":["../src/log-time.decorator.ts"],"names":[],"mappings":";AAAA,wDAAwD;AACxD,uDAAuD;AACvD,sCAAsC;AACtC,+BAA+B;;;AAE/B,yCAA+C;AAC/C,2CAAwD;AAExD,4BAA0B;AAE1B,yDAAgD;AAEhD,MAAM,MAAM,GAAG,uBAAa,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;AA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OAAO,EAAE;oBAC7B,OAAO,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC;iBAC7C;gBAED,UAAU,CAAC,EAAE,CAAC,CAAC;gBAEf,OAAO,MAAM,CAAC;YAChB,CAAC;SACF,CAAC,UAAU,CAAC,CAAC;QAEd,IAAA,6BAAU,EAAC,QAAQ,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC;IACzC,CAAC,CAAC;AACJ,CAAC;AAtCD,0BAsCC"}
|
package/dist/metadata.helpers.js
CHANGED
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.redecorate = void 0;
|
|
7
|
-
const
|
|
7
|
+
const node_assert_1 = __importDefault(require("node:assert"));
|
|
8
8
|
require("reflect-metadata");
|
|
9
9
|
/**
|
|
10
10
|
* When wrapping method it is often nesessary
|
|
@@ -12,8 +12,8 @@ require("reflect-metadata");
|
|
|
12
12
|
* the wrapped one. Redecorate() does exaclty this.
|
|
13
13
|
*/
|
|
14
14
|
const redecorate = (source, destination) => {
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
node_assert_1.default.ok(source);
|
|
16
|
+
node_assert_1.default.ok(destination);
|
|
17
17
|
const keys = Reflect.getMetadataKeys(source);
|
|
18
18
|
for (const key of keys) {
|
|
19
19
|
const meta = Reflect.getMetadata(key, source);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metadata.helpers.js","sourceRoot":"","sources":["../src/metadata.helpers.ts"],"names":[],"mappings":";;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"metadata.helpers.js","sourceRoot":"","sources":["../src/metadata.helpers.ts"],"names":[],"mappings":";;;;;;AAAA,8DAAiC;AAEjC,4BAA0B;AAI1B;;;;GAIG;AACI,MAAM,UAAU,GAAG,CAAC,MAAc,EAAE,WAAmB,EAAQ,EAAE;IACtE,qBAAM,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC;IAClB,qBAAM,CAAC,EAAE,CAAC,WAAW,CAAC,CAAC;IAEvB,MAAM,IAAI,GAAG,OAAO,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;IAE7C,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE;QACtB,MAAM,IAAI,GAAG,OAAO,CAAC,WAAW,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;QAE9C,OAAO,CAAC,cAAc,CAAC,GAAG,EAAE,IAAI,EAAE,WAAW,CAAC,CAAC;KAChD;AACH,CAAC,CAAC;AAXW,QAAA,UAAU,cAWrB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsdk/decorators",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.1-next.2",
|
|
4
4
|
"description": "Useful built in decorators and tools for creating custom",
|
|
5
5
|
"license": "Apache License 2.0",
|
|
6
6
|
"publishConfig": {
|
|
@@ -11,10 +11,10 @@
|
|
|
11
11
|
},
|
|
12
12
|
"main": "dist/index.js",
|
|
13
13
|
"peerDependencies": {
|
|
14
|
-
"@rsdk/common": "^2.4.
|
|
15
|
-
"@rsdk/logging": "^2.4.
|
|
14
|
+
"@rsdk/common": "^2.4.1-next.2",
|
|
15
|
+
"@rsdk/logging": "^2.4.1-next.2",
|
|
16
16
|
"eslint-formatter-codeframe": "^7.32.1",
|
|
17
17
|
"reflect-metadata": "^0.1.13"
|
|
18
18
|
},
|
|
19
|
-
"gitHead": "
|
|
19
|
+
"gitHead": "f21a068dec8a1542cce73139c7a77dedbdd596d5"
|
|
20
20
|
}
|
|
@@ -15,7 +15,7 @@ const logger = LoggerFactory.create('LogTime');
|
|
|
15
15
|
export function LogTime(level?: LogLevel): MethodDecorator {
|
|
16
16
|
return function (target, methodName, descriptor: PropertyDescriptor) {
|
|
17
17
|
if (typeof methodName === 'symbol') {
|
|
18
|
-
throw new
|
|
18
|
+
throw new TypeError("Can't decorate methods with symbol key");
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
// get original method
|
package/src/metadata.helpers.ts
CHANGED