@tsed/core 8.0.0-beta.5 → 8.0.0-beta.7
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/lib/browser/core.umd.min.js +1 -1
- package/lib/browser/core.umd.min.js.map +1 -1
- package/lib/esm/index.js +1 -10
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/utils/objects/uniq.js.map +1 -0
- package/lib/types/index.d.ts +1 -10
- package/package.json +9 -4
- package/lib/esm/decorators/configurable.js +0 -10
- package/lib/esm/decorators/configurable.js.map +0 -1
- package/lib/esm/decorators/deprecated.js +0 -67
- package/lib/esm/decorators/deprecated.js.map +0 -1
- package/lib/esm/decorators/enumerable.js +0 -10
- package/lib/esm/decorators/enumerable.js.map +0 -1
- package/lib/esm/decorators/notConfigurable.js +0 -5
- package/lib/esm/decorators/notConfigurable.js.map +0 -1
- package/lib/esm/decorators/notEnumerable.js +0 -5
- package/lib/esm/decorators/notEnumerable.js.map +0 -1
- package/lib/esm/decorators/readOnly.js +0 -5
- package/lib/esm/decorators/readOnly.js.map +0 -1
- package/lib/esm/decorators/writable.js +0 -10
- package/lib/esm/decorators/writable.js.map +0 -1
- package/lib/esm/utils/objects/getEnumerableKeys.js +0 -16
- package/lib/esm/utils/objects/getEnumerableKeys.js.map +0 -1
- package/lib/esm/utils/proxyDelegation.js +0 -50
- package/lib/esm/utils/proxyDelegation.js.map +0 -1
- package/lib/esm/utils/uniq.js.map +0 -1
- package/lib/types/decorators/configurable.d.ts +0 -1
- package/lib/types/decorators/deprecated.d.ts +0 -32
- package/lib/types/decorators/enumerable.d.ts +0 -1
- package/lib/types/decorators/notConfigurable.d.ts +0 -1
- package/lib/types/decorators/notEnumerable.d.ts +0 -1
- package/lib/types/decorators/readOnly.d.ts +0 -1
- package/lib/types/decorators/writable.d.ts +0 -1
- package/lib/types/utils/objects/getEnumerableKeys.d.ts +0 -5
- package/lib/types/utils/proxyDelegation.d.ts +0 -33
- /package/lib/esm/utils/{uniq.js → objects/uniq.js} +0 -0
- /package/lib/types/utils/{uniq.d.ts → objects/uniq.d.ts} +0 -0
package/lib/esm/index.js
CHANGED
|
@@ -1,16 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file Automatically generated by @tsed/barrels.
|
|
3
3
|
*/
|
|
4
|
-
export * from "./decorators/configurable.js";
|
|
5
|
-
export * from "./decorators/deprecated.js";
|
|
6
|
-
export * from "./decorators/enumerable.js";
|
|
7
|
-
export * from "./decorators/notConfigurable.js";
|
|
8
|
-
export * from "./decorators/notEnumerable.js";
|
|
9
|
-
export * from "./decorators/readOnly.js";
|
|
10
4
|
export * from "./decorators/storeFn.js";
|
|
11
5
|
export * from "./decorators/storeMerge.js";
|
|
12
6
|
export * from "./decorators/storeSet.js";
|
|
13
|
-
export * from "./decorators/writable.js";
|
|
14
7
|
export * from "./domain/AnyToPromise.js";
|
|
15
8
|
export * from "./domain/DecoratorTypes.js";
|
|
16
9
|
export * from "./domain/Env.js";
|
|
@@ -45,7 +38,6 @@ export * from "./utils/objects/deepMerge.js";
|
|
|
45
38
|
export * from "./utils/objects/descriptorOf.js";
|
|
46
39
|
export * from "./utils/objects/getClassOrSymbol.js";
|
|
47
40
|
export * from "./utils/objects/getConstructorArgNames.js";
|
|
48
|
-
export * from "./utils/objects/getEnumerableKeys.js";
|
|
49
41
|
export * from "./utils/objects/getValue.js";
|
|
50
42
|
export * from "./utils/objects/hasJsonMethod.js";
|
|
51
43
|
export * from "./utils/objects/isArray.js";
|
|
@@ -82,6 +74,5 @@ export * from "./utils/objects/prototypeOf.js";
|
|
|
82
74
|
export * from "./utils/objects/setValue.js";
|
|
83
75
|
export * from "./utils/objects/toMap.js";
|
|
84
76
|
export * from "./utils/objects/toStringConstructor.js";
|
|
85
|
-
export * from "./utils/
|
|
86
|
-
export * from "./utils/uniq.js";
|
|
77
|
+
export * from "./utils/objects/uniq.js";
|
|
87
78
|
//# sourceMappingURL=index.js.map
|
package/lib/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sCAAsC,CAAC;AACrD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,qCAAqC,CAAC;AACpD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yCAAyC,CAAC;AACxD,cAAc,qCAAqC,CAAC;AACpD,cAAc,uCAAuC,CAAC;AACtD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,qCAAqC,CAAC;AACpD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,wBAAwB,CAAC;AACvC,cAAc,qCAAqC,CAAC;AACpD,cAAc,kCAAkC,CAAC;AACjD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kCAAkC,CAAC;AACjD,cAAc,mCAAmC,CAAC;AAClD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,iCAAiC,CAAC;AAChD,cAAc,qCAAqC,CAAC;AACpD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,6BAA6B,CAAC;AAC5C,cA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,CAAC;AAED,MAAM,UAAU,MAAM,CAAU,IAAS,EAAE,GAAG,GAAG,IAAI;IACnD,MAAM,GAAG,GAAG,IAAI,GAAG,EAAE,CAAC;IAEtB,IAAI,CAAC,OAAO,CAAC,CAAC,IAAS,EAAE,EAAE;QACzB,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,CAAC;IAC3B,CAAC,CAAC,CAAC;IAEH,OAAO,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC;AAClC,CAAC"}
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,16 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file Automatically generated by @tsed/barrels.
|
|
3
3
|
*/
|
|
4
|
-
export * from "./decorators/configurable.js";
|
|
5
|
-
export * from "./decorators/deprecated.js";
|
|
6
|
-
export * from "./decorators/enumerable.js";
|
|
7
|
-
export * from "./decorators/notConfigurable.js";
|
|
8
|
-
export * from "./decorators/notEnumerable.js";
|
|
9
|
-
export * from "./decorators/readOnly.js";
|
|
10
4
|
export * from "./decorators/storeFn.js";
|
|
11
5
|
export * from "./decorators/storeMerge.js";
|
|
12
6
|
export * from "./decorators/storeSet.js";
|
|
13
|
-
export * from "./decorators/writable.js";
|
|
14
7
|
export * from "./domain/AnyToPromise.js";
|
|
15
8
|
export * from "./domain/DecoratorTypes.js";
|
|
16
9
|
export * from "./domain/Env.js";
|
|
@@ -45,7 +38,6 @@ export * from "./utils/objects/deepMerge.js";
|
|
|
45
38
|
export * from "./utils/objects/descriptorOf.js";
|
|
46
39
|
export * from "./utils/objects/getClassOrSymbol.js";
|
|
47
40
|
export * from "./utils/objects/getConstructorArgNames.js";
|
|
48
|
-
export * from "./utils/objects/getEnumerableKeys.js";
|
|
49
41
|
export * from "./utils/objects/getValue.js";
|
|
50
42
|
export * from "./utils/objects/hasJsonMethod.js";
|
|
51
43
|
export * from "./utils/objects/isArray.js";
|
|
@@ -82,5 +74,4 @@ export * from "./utils/objects/prototypeOf.js";
|
|
|
82
74
|
export * from "./utils/objects/setValue.js";
|
|
83
75
|
export * from "./utils/objects/toMap.js";
|
|
84
76
|
export * from "./utils/objects/toStringConstructor.js";
|
|
85
|
-
export * from "./utils/
|
|
86
|
-
export * from "./utils/uniq.js";
|
|
77
|
+
export * from "./utils/objects/uniq.js";
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@tsed/core",
|
|
3
3
|
"description": "Core module for Ts.ED Framework",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"version": "8.0.0-beta.
|
|
5
|
+
"version": "8.0.0-beta.7",
|
|
6
6
|
"source": "./src/index.ts",
|
|
7
7
|
"main": "./lib/esm/index.js",
|
|
8
8
|
"module": "./lib/esm/index.js",
|
|
@@ -14,6 +14,11 @@
|
|
|
14
14
|
"browser": "./lib/browser/core.umd.min.js",
|
|
15
15
|
"import": "./lib/esm/index.js",
|
|
16
16
|
"default": "./lib/esm/index.js"
|
|
17
|
+
},
|
|
18
|
+
"./**/*.js": {
|
|
19
|
+
"types": "./lib/types/**/*.d.ts",
|
|
20
|
+
"import": "./lib/esm/**/*.js",
|
|
21
|
+
"default": "./lib/esm/**/*.js"
|
|
17
22
|
}
|
|
18
23
|
},
|
|
19
24
|
"scripts": {
|
|
@@ -29,10 +34,10 @@
|
|
|
29
34
|
"tslib": "2.7.0"
|
|
30
35
|
},
|
|
31
36
|
"devDependencies": {
|
|
32
|
-
"@tsed/barrels": "8.0.0-beta.
|
|
37
|
+
"@tsed/barrels": "8.0.0-beta.7",
|
|
33
38
|
"@tsed/monorepo-utils": "2.3.5",
|
|
34
|
-
"@tsed/typescript": "8.0.0-beta.
|
|
35
|
-
"@tsed/vitest": "8.0.0-beta.
|
|
39
|
+
"@tsed/typescript": "8.0.0-beta.7",
|
|
40
|
+
"@tsed/vitest": "8.0.0-beta.7",
|
|
36
41
|
"@vitest/coverage-v8": "^2.1.2",
|
|
37
42
|
"eslint": "9.12.0",
|
|
38
43
|
"typescript": "5.4.5",
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { descriptorOf } from "../utils/objects/descriptorOf.js";
|
|
2
|
-
export function Configurable(value = true) {
|
|
3
|
-
return (target, propertyKey) => {
|
|
4
|
-
const descriptor = descriptorOf(target, propertyKey) || { writable: true, enumerable: true };
|
|
5
|
-
descriptor.configurable = value;
|
|
6
|
-
Object.defineProperty((target && target.prototype) || target, propertyKey, descriptor);
|
|
7
|
-
return descriptor;
|
|
8
|
-
};
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=configurable.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"configurable.js","sourceRoot":"","sources":["../../../src/decorators/configurable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,kCAAkC,CAAC;AAE9D,MAAM,UAAU,YAAY,CAAC,QAAiB,IAAI;IAChD,OAAO,CAAC,MAAW,EAAE,WAAmB,EAAE,EAAE;QAC1C,MAAM,UAAU,GAAG,YAAY,CAAC,MAAM,EAAE,WAAW,CAAC,IAAI,EAAC,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAC,CAAC;QAC3F,UAAU,CAAC,YAAY,GAAG,KAAK,CAAC;QAChC,MAAM,CAAC,cAAc,CAAC,CAAC,MAAM,IAAI,MAAM,CAAC,SAAS,CAAC,IAAI,MAAM,EAAE,WAAW,EAAE,UAAU,CAAC,CAAC;QAEvF,OAAO,UAAU,CAAC;IACpB,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
function deprecate(fn, msg) {
|
|
2
|
-
if (typeof process !== "undefined" && process.noDeprecation === true) {
|
|
3
|
-
return fn;
|
|
4
|
-
}
|
|
5
|
-
// Allow for deprecating things in the process of starting up.
|
|
6
|
-
if (typeof process === "undefined") {
|
|
7
|
-
return function (...args) {
|
|
8
|
-
return deprecate(fn, msg).apply(this, args);
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
let warned = false;
|
|
12
|
-
function deprecated(...args) {
|
|
13
|
-
if (!warned) {
|
|
14
|
-
if (process.throwDeprecation) {
|
|
15
|
-
throw new Error(msg);
|
|
16
|
-
}
|
|
17
|
-
else if (process.traceDeprecation) {
|
|
18
|
-
console.trace(msg);
|
|
19
|
-
}
|
|
20
|
-
else {
|
|
21
|
-
console.error(msg);
|
|
22
|
-
}
|
|
23
|
-
warned = true;
|
|
24
|
-
}
|
|
25
|
-
return fn.apply(this, args);
|
|
26
|
-
}
|
|
27
|
-
return deprecated;
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* The `@Deprecated()` decorators wraps the given method in such a way that it is marked as deprecated.
|
|
31
|
-
*
|
|
32
|
-
* ```typescript
|
|
33
|
-
* provide Foo {
|
|
34
|
-
*
|
|
35
|
-
* @Deprecated("Foo.method: Use Foo.method2 instead")
|
|
36
|
-
* public method() {
|
|
37
|
-
*
|
|
38
|
-
* }
|
|
39
|
-
* ```
|
|
40
|
-
*
|
|
41
|
-
* When called, @Deprecated() will return a function that will emit a `DeprecationWarning` using the `process.on('warning')` event.
|
|
42
|
-
* By default, this warning will be emitted and printed to `stderr` exactly once, the first time it is called. After the warning is emitted, the wrapped method is called.
|
|
43
|
-
*
|
|
44
|
-
* If either the `--no-deprecation` or `--no-warnings` command line flags are used, or if the `process.noDeprecation`
|
|
45
|
-
* property is set to `true` prior to the first deprecation warning, the `@Deprecated()` decorators does nothing.
|
|
46
|
-
*
|
|
47
|
-
* If the `--trace-deprecation` or `--trace-warnings` command line flags are set, or the `process.traceDeprecation`
|
|
48
|
-
* property is set to `true`, a warning and a stack trace are printed to stderr the first time the deprecated function is called.
|
|
49
|
-
*
|
|
50
|
-
* If the `--throw-deprecation` command line flag is set, or the `process.throwDeprecation` property is set to `true`,
|
|
51
|
-
* then an exception will be thrown when the deprecated function is called.
|
|
52
|
-
*
|
|
53
|
-
* The `--throw-deprecation` command line flag and `process.throwDeprecation` property take precedence over `--trace-deprecation`
|
|
54
|
-
* and `process.traceDeprecation`.
|
|
55
|
-
*
|
|
56
|
-
* @param message
|
|
57
|
-
* @returns {Function}
|
|
58
|
-
* @decorator
|
|
59
|
-
*/
|
|
60
|
-
export function Deprecated(message) {
|
|
61
|
-
return (target, targetKey, descriptor) => {
|
|
62
|
-
const originalMethod = descriptor.value;
|
|
63
|
-
descriptor.value = deprecate(originalMethod, message);
|
|
64
|
-
return descriptor;
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
//# sourceMappingURL=deprecated.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"deprecated.js","sourceRoot":"","sources":["../../../src/decorators/deprecated.ts"],"names":[],"mappings":"AAEA,SAAS,SAAS,CAAC,EAAO,EAAE,GAAW;IACrC,IAAI,OAAO,OAAO,KAAK,WAAW,IAAK,OAAe,CAAC,aAAa,KAAK,IAAI,EAAE,CAAC;QAC9E,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,8DAA8D;IAC9D,IAAI,OAAO,OAAO,KAAK,WAAW,EAAE,CAAC;QACnC,OAAO,UAAU,GAAG,IAAW;YAC7B,OAAO,SAAS,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAC9C,CAAC,CAAC;IACJ,CAAC;IAED,IAAI,MAAM,GAAG,KAAK,CAAC;IAEnB,SAAS,UAAU,CAAC,GAAG,IAAW;QAChC,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,IAAK,OAAe,CAAC,gBAAgB,EAAE,CAAC;gBACtC,MAAM,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC;YACvB,CAAC;iBAAM,IAAI,OAAO,CAAC,gBAAgB,EAAE,CAAC;gBACpC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YACrB,CAAC;iBAAM,CAAC;gBACN,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YACrB,CAAC;YACD,MAAM,GAAG,IAAI,CAAC;QAChB,CAAC;QACD,OAAO,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;IAED,OAAO,UAAU,CAAC;AACpB,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,MAAM,UAAU,UAAU,CAAC,OAAe;IACxC,OAAO,CAAC,MAAiB,EAAE,SAAiB,EAAE,UAAwC,EAAE,EAAE;QACxF,MAAM,cAAc,GAAG,UAAU,CAAC,KAAK,CAAC;QAExC,UAAU,CAAC,KAAK,GAAG,SAAS,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;QAEtD,OAAO,UAAU,CAAC;IACpB,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { descriptorOf } from "../utils/objects/descriptorOf.js";
|
|
2
|
-
export function Enumerable(value = true) {
|
|
3
|
-
return (target, propertyKey) => {
|
|
4
|
-
const descriptor = descriptorOf(target, propertyKey) || { writable: true, configurable: true };
|
|
5
|
-
descriptor.enumerable = value;
|
|
6
|
-
Object.defineProperty((target && target.prototype) || target, propertyKey, descriptor);
|
|
7
|
-
return descriptor;
|
|
8
|
-
};
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=enumerable.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"enumerable.js","sourceRoot":"","sources":["../../../src/decorators/enumerable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,kCAAkC,CAAC;AAE9D,MAAM,UAAU,UAAU,CAAC,QAAiB,IAAI;IAC9C,OAAO,CAAC,MAAW,EAAE,WAAmB,EAAE,EAAE;QAC1C,MAAM,UAAU,GAAG,YAAY,CAAC,MAAM,EAAE,WAAW,CAAC,IAAI,EAAC,QAAQ,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAC,CAAC;QAC7F,UAAU,CAAC,UAAU,GAAG,KAAK,CAAC;QAC9B,MAAM,CAAC,cAAc,CAAC,CAAC,MAAM,IAAI,MAAM,CAAC,SAAS,CAAC,IAAI,MAAM,EAAE,WAAW,EAAE,UAAU,CAAC,CAAC;QAEvF,OAAO,UAAU,CAAC;IACpB,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"notConfigurable.js","sourceRoot":"","sources":["../../../src/decorators/notConfigurable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,mBAAmB,CAAC;AAE/C,MAAM,UAAU,eAAe;IAC7B,OAAO,YAAY,CAAC,KAAK,CAAC,CAAC;AAC7B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"notEnumerable.js","sourceRoot":"","sources":["../../../src/decorators/notEnumerable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,iBAAiB,CAAC;AAE3C,MAAM,UAAU,aAAa;IAC3B,OAAO,UAAU,CAAC,KAAK,CAAC,CAAC;AAC3B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"readOnly.js","sourceRoot":"","sources":["../../../src/decorators/readOnly.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,eAAe,CAAC;AAEvC,MAAM,UAAU,QAAQ;IACtB,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAC;AACzB,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { descriptorOf } from "../utils/objects/descriptorOf.js";
|
|
2
|
-
export function Writable(value = true) {
|
|
3
|
-
return (target, propertyKey) => {
|
|
4
|
-
const descriptor = descriptorOf(target, propertyKey) || { configurable: true, enumerable: true };
|
|
5
|
-
descriptor.writable = value;
|
|
6
|
-
Object.defineProperty((target && target.prototype) || target, propertyKey, descriptor);
|
|
7
|
-
return descriptor;
|
|
8
|
-
};
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=writable.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"writable.js","sourceRoot":"","sources":["../../../src/decorators/writable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,kCAAkC,CAAC;AAE9D,MAAM,UAAU,QAAQ,CAAC,QAAiB,IAAI;IAC5C,OAAO,CAAC,MAAW,EAAE,WAAmB,EAAE,EAAE;QAC1C,MAAM,UAAU,GAAG,YAAY,CAAC,MAAM,EAAE,WAAW,CAAC,IAAI,EAAC,YAAY,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAC,CAAC;QAC/F,UAAU,CAAC,QAAQ,GAAG,KAAK,CAAC;QAC5B,MAAM,CAAC,cAAc,CAAC,CAAC,MAAM,IAAI,MAAM,CAAC,SAAS,CAAC,IAAI,MAAM,EAAE,WAAW,EAAE,UAAU,CAAC,CAAC;QAEvF,OAAO,UAAU,CAAC;IACpB,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { isEnumerable } from "./isEnumerable.js";
|
|
2
|
-
import { isProtectedKey } from "./isProtectedKey.js";
|
|
3
|
-
/**
|
|
4
|
-
* Return all enumerable keys of the given object
|
|
5
|
-
* @param obj
|
|
6
|
-
*/
|
|
7
|
-
export function getEnumerableKeys(obj) {
|
|
8
|
-
const keys = [];
|
|
9
|
-
for (const key in obj) {
|
|
10
|
-
if (!isProtectedKey(key) && isEnumerable(obj, key)) {
|
|
11
|
-
keys.push(key);
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
return keys;
|
|
15
|
-
}
|
|
16
|
-
//# sourceMappingURL=getEnumerableKeys.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getEnumerableKeys.js","sourceRoot":"","sources":["../../../../src/utils/objects/getEnumerableKeys.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAC,cAAc,EAAC,MAAM,qBAAqB,CAAC;AAEnD;;;GAGG;AACH,MAAM,UAAU,iBAAiB,CAAC,GAAQ;IACxC,MAAM,IAAI,GAAa,EAAE,CAAC;IAE1B,KAAK,MAAM,GAAG,IAAI,GAAG,EAAE,CAAC;QACtB,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,IAAI,YAAY,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC;YACnD,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACjB,CAAC;IACH,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { uniq } from "./uniq.js";
|
|
2
|
-
/**
|
|
3
|
-
* Create a complete and iterable trap.
|
|
4
|
-
* @param self
|
|
5
|
-
* @param options
|
|
6
|
-
* @ignore
|
|
7
|
-
*/
|
|
8
|
-
export function proxyDelegation(self, options = {}) {
|
|
9
|
-
const { handlers = {}, remove, ownKeys } = options;
|
|
10
|
-
const get = options.getter || ((target, propertyKey) => target.get(propertyKey));
|
|
11
|
-
const set = options.setter || ((target, propertyKey, value) => !!target.set(propertyKey, value));
|
|
12
|
-
const itsOwnProp = (target, p) => Reflect.has(target, p) || typeof p === "symbol";
|
|
13
|
-
return new Proxy(self, {
|
|
14
|
-
getOwnPropertyDescriptor(target, p) {
|
|
15
|
-
return Reflect.getOwnPropertyDescriptor(target, p);
|
|
16
|
-
},
|
|
17
|
-
has(target, p) {
|
|
18
|
-
if (itsOwnProp(target, p)) {
|
|
19
|
-
return Reflect.has(target, p);
|
|
20
|
-
}
|
|
21
|
-
return get(target, p) !== undefined;
|
|
22
|
-
},
|
|
23
|
-
get(target, p, receiver) {
|
|
24
|
-
if (itsOwnProp(target, p)) {
|
|
25
|
-
return Reflect.get(target, p, receiver);
|
|
26
|
-
}
|
|
27
|
-
return get(target, p);
|
|
28
|
-
},
|
|
29
|
-
set(target, p, value, receiver) {
|
|
30
|
-
if (itsOwnProp(target, p)) {
|
|
31
|
-
return Reflect.set(target, p, value, receiver);
|
|
32
|
-
}
|
|
33
|
-
return !!set(target, p, value, receiver);
|
|
34
|
-
},
|
|
35
|
-
deleteProperty(target, p) {
|
|
36
|
-
if (itsOwnProp(target, p) || !remove) {
|
|
37
|
-
return Reflect.deleteProperty(target, p);
|
|
38
|
-
}
|
|
39
|
-
return remove(target, p);
|
|
40
|
-
},
|
|
41
|
-
defineProperty(target, p, attributes) {
|
|
42
|
-
return Reflect.defineProperty(target, p, attributes);
|
|
43
|
-
},
|
|
44
|
-
ownKeys(target) {
|
|
45
|
-
return uniq(Reflect.ownKeys(target).concat((ownKeys && ownKeys(target)) || []));
|
|
46
|
-
},
|
|
47
|
-
...handlers
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
//# sourceMappingURL=proxyDelegation.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"proxyDelegation.js","sourceRoot":"","sources":["../../../src/utils/proxyDelegation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAC,MAAM,WAAW,CAAC;AA8B/B;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAAyB,IAAS,EAAE,UAA8B,EAAE;IACjG,MAAM,EAAC,QAAQ,GAAG,EAAE,EAAE,MAAM,EAAE,OAAO,EAAC,GAAG,OAAO,CAAC;IACjD,MAAM,GAAG,GAA0B,OAAO,CAAC,MAAM,IAAI,CAAC,CAAC,MAAW,EAAE,WAAwB,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC;IAC1H,MAAM,GAAG,GACP,OAAO,CAAC,MAAM,IAAI,CAAC,CAAC,MAAW,EAAE,WAAwB,EAAE,KAAU,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,WAAW,EAAE,KAAK,C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1
|
-
export declare function Configurable(value?: boolean): Function;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The `@Deprecated()` decorators wraps the given method in such a way that it is marked as deprecated.
|
|
3
|
-
*
|
|
4
|
-
* ```typescript
|
|
5
|
-
* provide Foo {
|
|
6
|
-
*
|
|
7
|
-
* @Deprecated("Foo.method: Use Foo.method2 instead")
|
|
8
|
-
* public method() {
|
|
9
|
-
*
|
|
10
|
-
* }
|
|
11
|
-
* ```
|
|
12
|
-
*
|
|
13
|
-
* When called, @Deprecated() will return a function that will emit a `DeprecationWarning` using the `process.on('warning')` event.
|
|
14
|
-
* By default, this warning will be emitted and printed to `stderr` exactly once, the first time it is called. After the warning is emitted, the wrapped method is called.
|
|
15
|
-
*
|
|
16
|
-
* If either the `--no-deprecation` or `--no-warnings` command line flags are used, or if the `process.noDeprecation`
|
|
17
|
-
* property is set to `true` prior to the first deprecation warning, the `@Deprecated()` decorators does nothing.
|
|
18
|
-
*
|
|
19
|
-
* If the `--trace-deprecation` or `--trace-warnings` command line flags are set, or the `process.traceDeprecation`
|
|
20
|
-
* property is set to `true`, a warning and a stack trace are printed to stderr the first time the deprecated function is called.
|
|
21
|
-
*
|
|
22
|
-
* If the `--throw-deprecation` command line flag is set, or the `process.throwDeprecation` property is set to `true`,
|
|
23
|
-
* then an exception will be thrown when the deprecated function is called.
|
|
24
|
-
*
|
|
25
|
-
* The `--throw-deprecation` command line flag and `process.throwDeprecation` property take precedence over `--trace-deprecation`
|
|
26
|
-
* and `process.traceDeprecation`.
|
|
27
|
-
*
|
|
28
|
-
* @param message
|
|
29
|
-
* @returns {Function}
|
|
30
|
-
* @decorator
|
|
31
|
-
*/
|
|
32
|
-
export declare function Deprecated(message: string): Function;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function Enumerable(value?: boolean): Function;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function NotConfigurable(): Function;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function NotEnumerable(): Function;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function Readonly(): Function;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function Writable(value?: boolean): Function;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @ignore
|
|
3
|
-
*/
|
|
4
|
-
export type ProxyDelegationGetter<T = any> = (target: T, property: PropertyKey) => any | undefined;
|
|
5
|
-
/**
|
|
6
|
-
* @ignore
|
|
7
|
-
*/
|
|
8
|
-
export type ProxyDelegationRemove<T = any> = (target: T, property: PropertyKey) => any;
|
|
9
|
-
/**
|
|
10
|
-
* @ignore
|
|
11
|
-
*/
|
|
12
|
-
export type ProxyDelegationSetter<T = any> = (target: T, property: PropertyKey, value: any, receiver: any) => any;
|
|
13
|
-
/**
|
|
14
|
-
* @ignore
|
|
15
|
-
*/
|
|
16
|
-
export type ProxyDelegationOwnKeys<T = any> = (target: T) => (string | symbol)[];
|
|
17
|
-
/**
|
|
18
|
-
* @ignore
|
|
19
|
-
*/
|
|
20
|
-
export interface ProxyDelegation<T extends object> {
|
|
21
|
-
handlers?: ProxyHandler<T>;
|
|
22
|
-
getter?: ProxyDelegationGetter<T>;
|
|
23
|
-
setter?: ProxyDelegationSetter<T>;
|
|
24
|
-
remove?: ProxyDelegationRemove<T>;
|
|
25
|
-
ownKeys?: ProxyDelegationOwnKeys<T>;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Create a complete and iterable trap.
|
|
29
|
-
* @param self
|
|
30
|
-
* @param options
|
|
31
|
-
* @ignore
|
|
32
|
-
*/
|
|
33
|
-
export declare function proxyDelegation<T extends object = any>(self: any, options?: ProxyDelegation<T>): T;
|
|
File without changes
|
|
File without changes
|