react-obsidian 2.20.1 → 2.21.0
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/babel.config.legacy.js +13 -0
- package/dist/src/decorators/Graph.d.ts +2 -2
- package/dist/src/decorators/Graph.d.ts.map +1 -1
- package/dist/src/decorators/Graph.js +3 -3
- package/dist/src/decorators/Graph.js.map +1 -1
- package/dist/src/decorators/inject/Inject.d.ts +1 -1
- package/dist/src/decorators/inject/Inject.d.ts.map +1 -1
- package/dist/src/decorators/inject/Inject.js +7 -7
- package/dist/src/decorators/inject/Inject.js.map +1 -1
- package/dist/src/decorators/inject/inject.legacy.d.ts +2 -0
- package/dist/src/decorators/inject/inject.legacy.d.ts.map +1 -0
- package/dist/src/decorators/inject/inject.legacy.js +12 -0
- package/dist/src/decorators/inject/inject.legacy.js.map +1 -0
- package/dist/src/decorators/inject/inject.modern.d.ts +5 -0
- package/dist/src/decorators/inject/inject.modern.d.ts.map +1 -0
- package/dist/src/decorators/inject/{LateInject.js → inject.modern.js} +6 -6
- package/dist/src/decorators/inject/inject.modern.js.map +1 -0
- package/dist/src/decorators/injectable/Injectable.d.ts.map +1 -0
- package/dist/src/decorators/injectable/Injectable.js.map +1 -0
- package/dist/src/decorators/lateInject/LateInject.d.ts.map +1 -0
- package/dist/src/decorators/lateInject/LateInject.js +14 -0
- package/dist/src/decorators/lateInject/LateInject.js.map +1 -0
- package/dist/src/decorators/lateInject/lateInject.legacy.d.ts +2 -0
- package/dist/src/decorators/lateInject/lateInject.legacy.d.ts.map +1 -0
- package/dist/src/decorators/lateInject/lateInject.legacy.js +12 -0
- package/dist/src/decorators/lateInject/lateInject.legacy.js.map +1 -0
- package/dist/src/decorators/lateInject/lateInject.modern.d.ts +5 -0
- package/dist/src/decorators/lateInject/lateInject.modern.d.ts.map +1 -0
- package/dist/src/decorators/lateInject/lateInject.modern.js +14 -0
- package/dist/src/decorators/lateInject/lateInject.modern.js.map +1 -0
- package/dist/src/decorators/provides/Provides.d.ts +1 -2
- package/dist/src/decorators/provides/Provides.d.ts.map +1 -1
- package/dist/src/decorators/provides/Provides.js +7 -8
- package/dist/src/decorators/provides/Provides.js.map +1 -1
- package/dist/src/decorators/provides/provides.legacy.d.ts +3 -0
- package/dist/src/decorators/provides/provides.legacy.d.ts.map +1 -0
- package/dist/src/decorators/provides/provides.legacy.js +13 -0
- package/dist/src/decorators/provides/provides.legacy.js.map +1 -0
- package/dist/src/decorators/provides/provides.modern.d.ts +2 -0
- package/dist/src/decorators/provides/provides.modern.d.ts.map +1 -0
- package/dist/src/decorators/provides/provides.modern.js +34 -0
- package/dist/src/decorators/provides/provides.modern.js.map +1 -0
- package/dist/src/decorators/singleton/Singleton.d.ts +2 -0
- package/dist/src/decorators/singleton/Singleton.d.ts.map +1 -0
- package/dist/src/decorators/singleton/Singleton.js +14 -0
- package/dist/src/decorators/singleton/Singleton.js.map +1 -0
- package/dist/src/decorators/singleton/singleton.legacy.d.ts +4 -0
- package/dist/src/decorators/singleton/singleton.legacy.d.ts.map +1 -0
- package/dist/src/decorators/singleton/singleton.legacy.js +10 -0
- package/dist/src/decorators/singleton/singleton.legacy.js.map +1 -0
- package/dist/src/decorators/singleton/singleton.modern.d.ts +2 -0
- package/dist/src/decorators/singleton/singleton.modern.d.ts.map +1 -0
- package/dist/src/decorators/singleton/singleton.modern.js +9 -0
- package/dist/src/decorators/singleton/singleton.modern.js.map +1 -0
- package/dist/src/index.d.ts +6 -6
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +6 -6
- package/dist/src/index.js.map +1 -1
- package/dist/src/utils/decorators.d.ts +2 -0
- package/dist/src/utils/decorators.d.ts.map +1 -0
- package/dist/src/utils/decorators.js +7 -0
- package/dist/src/utils/decorators.js.map +1 -0
- package/dist/test/fixtures/CircularDependencyFromSubgraph.js +66 -21
- package/dist/test/fixtures/CircularDependencyFromSubgraph.js.map +1 -1
- package/dist/test/fixtures/CircularDependencyGraph.js +66 -21
- package/dist/test/fixtures/CircularDependencyGraph.js.map +1 -1
- package/dist/test/fixtures/CircularDependencyGraph2.js +78 -39
- package/dist/test/fixtures/CircularDependencyGraph2.js.map +1 -1
- package/dist/test/fixtures/GraphWithMultipleDependencies.js +84 -48
- package/dist/test/fixtures/GraphWithMultipleDependencies.js.map +1 -1
- package/dist/test/fixtures/GraphWithOnBind.js +69 -24
- package/dist/test/fixtures/GraphWithOnBind.js.map +1 -1
- package/dist/test/fixtures/LifecycleBoundGraph.js +79 -41
- package/dist/test/fixtures/LifecycleBoundGraph.js.map +1 -1
- package/dist/test/fixtures/LifecycleBoundWithLifecycleBoundSubgraph.js +66 -22
- package/dist/test/fixtures/LifecycleBoundWithLifecycleBoundSubgraph.js.map +1 -1
- package/dist/test/fixtures/MainGraph.js +72 -31
- package/dist/test/fixtures/MainGraph.js.map +1 -1
- package/dist/test/fixtures/ScopedLifecycleBoundGraph.js +56 -11
- package/dist/test/fixtures/ScopedLifecycleBoundGraph.js.map +1 -1
- package/dist/test/fixtures/SingletonGraph.js +67 -27
- package/dist/test/fixtures/SingletonGraph.js.map +1 -1
- package/dist/test/fixtures/Subgraph.js +84 -48
- package/dist/test/fixtures/Subgraph.js.map +1 -1
- package/dist/test/fixtures/SubgraphWithCircularDependency.js +72 -31
- package/dist/test/fixtures/SubgraphWithCircularDependency.js.map +1 -1
- package/dist/test/fixtures/ThrowingMainGraph.js +66 -21
- package/dist/test/fixtures/ThrowingMainGraph.js.map +1 -1
- package/dist/test/fixtures/UniqueNumberGraph.js +73 -37
- package/dist/test/fixtures/UniqueNumberGraph.js.map +1 -1
- package/jest.config.legacy.js +26 -0
- package/package.json +21 -17
- package/src/decorators/Graph.ts +5 -5
- package/src/decorators/inject/Inject.ts +7 -8
- package/src/decorators/inject/inject.legacy.ts +11 -0
- package/src/decorators/inject/inject.modern.ts +12 -0
- package/src/decorators/lateInject/LateInject.ts +11 -0
- package/src/decorators/lateInject/lateInject.legacy.ts +11 -0
- package/src/decorators/lateInject/lateInject.modern.ts +12 -0
- package/src/decorators/provides/Provides.ts +8 -7
- package/src/decorators/provides/provides.legacy.ts +13 -0
- package/src/decorators/provides/provides.modern.ts +36 -0
- package/src/decorators/singleton/Singleton.ts +11 -0
- package/src/decorators/singleton/singleton.legacy.ts +13 -0
- package/src/decorators/singleton/singleton.modern.ts +8 -0
- package/src/index.ts +6 -6
- package/src/utils/decorators.ts +3 -0
- package/wallaby.legacy.js +9 -0
- package/dist/src/decorators/Singleton.d.ts +0 -4
- package/dist/src/decorators/Singleton.d.ts.map +0 -1
- package/dist/src/decorators/Singleton.js +0 -12
- package/dist/src/decorators/Singleton.js.map +0 -1
- package/dist/src/decorators/inject/Injectable.d.ts.map +0 -1
- package/dist/src/decorators/inject/Injectable.js.map +0 -1
- package/dist/src/decorators/inject/LateInject.d.ts.map +0 -1
- package/dist/src/decorators/inject/LateInject.js.map +0 -1
- package/src/decorators/Singleton.ts +0 -15
- package/src/decorators/inject/LateInject.ts +0 -8
- /package/dist/src/decorators/{inject → injectable}/Injectable.d.ts +0 -0
- /package/dist/src/decorators/{inject → injectable}/Injectable.js +0 -0
- /package/dist/src/decorators/{inject → lateInject}/LateInject.d.ts +0 -0
- /package/src/decorators/{inject → injectable}/Injectable.ts +0 -0
|
@@ -1,49 +1,87 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
|
|
3
|
+
var useValue = arguments.length > 2;
|
|
4
|
+
for (var i = 0; i < initializers.length; i++) {
|
|
5
|
+
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
6
|
+
}
|
|
7
|
+
return useValue ? value : void 0;
|
|
8
|
+
};
|
|
9
|
+
var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
10
|
+
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
|
|
11
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
12
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
13
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
14
|
+
var _, done = false;
|
|
15
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
16
|
+
var context = {};
|
|
17
|
+
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
18
|
+
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
19
|
+
context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
|
|
20
|
+
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
21
|
+
if (kind === "accessor") {
|
|
22
|
+
if (result === void 0) continue;
|
|
23
|
+
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
24
|
+
if (_ = accept(result.get)) descriptor.get = _;
|
|
25
|
+
if (_ = accept(result.set)) descriptor.set = _;
|
|
26
|
+
if (_ = accept(result.init)) initializers.unshift(_);
|
|
27
|
+
}
|
|
28
|
+
else if (_ = accept(result)) {
|
|
29
|
+
if (kind === "field") initializers.unshift(_);
|
|
30
|
+
else descriptor[key] = _;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
34
|
+
done = true;
|
|
7
35
|
};
|
|
8
|
-
var
|
|
9
|
-
if (typeof
|
|
36
|
+
var __setFunctionName = (this && this.__setFunctionName) || function (f, name, prefix) {
|
|
37
|
+
if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
|
|
38
|
+
return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
|
|
10
39
|
};
|
|
11
|
-
var LifecycleBoundGraph_1;
|
|
12
40
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
41
|
exports.LifecycleBoundGraph = void 0;
|
|
14
42
|
const src_1 = require("../../src");
|
|
15
|
-
let LifecycleBoundGraph =
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
43
|
+
let LifecycleBoundGraph = (() => {
|
|
44
|
+
let _classDecorators = [(0, src_1.lifecycleBound)(), (0, src_1.graph)()];
|
|
45
|
+
let _classDescriptor;
|
|
46
|
+
let _classExtraInitializers = [];
|
|
47
|
+
let _classThis;
|
|
48
|
+
let _classSuper = src_1.ObjectGraph;
|
|
49
|
+
let _instanceExtraInitializers = [];
|
|
50
|
+
let _computedFromProps_decorators;
|
|
51
|
+
let _doesNotRequireProps_decorators;
|
|
52
|
+
var LifecycleBoundGraph = _classThis = class extends _classSuper {
|
|
53
|
+
constructor(props) {
|
|
54
|
+
super(props);
|
|
55
|
+
this.props = __runInitializers(this, _instanceExtraInitializers);
|
|
56
|
+
this.props = props;
|
|
57
|
+
LifecycleBoundGraph.timesCreated++;
|
|
58
|
+
}
|
|
59
|
+
computedFromProps() {
|
|
60
|
+
return this.props.stringFromProps
|
|
61
|
+
? `A string passed via props: ${this.props.stringFromProps}`
|
|
62
|
+
: 'stringFromProps does not exist';
|
|
63
|
+
}
|
|
64
|
+
doesNotRequireProps() {
|
|
65
|
+
return 'A string that does not require props';
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
__setFunctionName(_classThis, "LifecycleBoundGraph");
|
|
69
|
+
(() => {
|
|
70
|
+
var _a;
|
|
71
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create((_a = _classSuper[Symbol.metadata]) !== null && _a !== void 0 ? _a : null) : void 0;
|
|
72
|
+
_computedFromProps_decorators = [(0, src_1.provides)()];
|
|
73
|
+
_doesNotRequireProps_decorators = [(0, src_1.provides)()];
|
|
74
|
+
__esDecorate(_classThis, null, _computedFromProps_decorators, { kind: "method", name: "computedFromProps", static: false, private: false, access: { has: obj => "computedFromProps" in obj, get: obj => obj.computedFromProps }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
75
|
+
__esDecorate(_classThis, null, _doesNotRequireProps_decorators, { kind: "method", name: "doesNotRequireProps", static: false, private: false, access: { has: obj => "doesNotRequireProps" in obj, get: obj => obj.doesNotRequireProps }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
76
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
77
|
+
LifecycleBoundGraph = _classThis = _classDescriptor.value;
|
|
78
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
79
|
+
})();
|
|
80
|
+
_classThis.timesCreated = 0;
|
|
81
|
+
(() => {
|
|
82
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
83
|
+
})();
|
|
84
|
+
return LifecycleBoundGraph = _classThis;
|
|
85
|
+
})();
|
|
30
86
|
exports.LifecycleBoundGraph = LifecycleBoundGraph;
|
|
31
|
-
LifecycleBoundGraph.timesCreated = 0;
|
|
32
|
-
__decorate([
|
|
33
|
-
(0, src_1.provides)(),
|
|
34
|
-
__metadata("design:type", Function),
|
|
35
|
-
__metadata("design:paramtypes", []),
|
|
36
|
-
__metadata("design:returntype", String)
|
|
37
|
-
], LifecycleBoundGraph.prototype, "computedFromProps", null);
|
|
38
|
-
__decorate([
|
|
39
|
-
(0, src_1.provides)(),
|
|
40
|
-
__metadata("design:type", Function),
|
|
41
|
-
__metadata("design:paramtypes", []),
|
|
42
|
-
__metadata("design:returntype", String)
|
|
43
|
-
], LifecycleBoundGraph.prototype, "doesNotRequireProps", null);
|
|
44
|
-
exports.LifecycleBoundGraph = LifecycleBoundGraph = LifecycleBoundGraph_1 = __decorate([
|
|
45
|
-
(0, src_1.lifecycleBound)(),
|
|
46
|
-
(0, src_1.graph)(),
|
|
47
|
-
__metadata("design:paramtypes", [Object])
|
|
48
|
-
], LifecycleBoundGraph);
|
|
49
87
|
//# sourceMappingURL=LifecycleBoundGraph.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LifecycleBoundGraph.js","sourceRoot":"","sources":["../../../test/fixtures/LifecycleBoundGraph.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LifecycleBoundGraph.js","sourceRoot":"","sources":["../../../test/fixtures/LifecycleBoundGraph.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mCAKmB;IAKN,mBAAmB;4BAD/B,IAAA,oBAAc,GAAE,EAAE,IAAA,WAAK,GAAE;;;;sBACe,iBAAW;;;;gDAAnB,SAAQ,WAAkB;QAIzD,YAAY,KAAY;YACtB,KAAK,CAAC,KAAK,CAAC,CAAC;YAHP,UAAK,GAFF,mDAAmB,CAET;YAInB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;YACnB,mBAAmB,CAAC,YAAY,EAAE,CAAC;QACrC,CAAC;QAGD,iBAAiB;YACf,OAAO,IAAI,CAAC,KAAK,CAAC,eAAe;gBAC/B,CAAC,CAAC,8BAA8B,IAAI,CAAC,KAAK,CAAC,eAAe,EAAE;gBAC5D,CAAC,CAAC,gCAAgC,CAAC;QACvC,CAAC;QAGD,mBAAmB;YACjB,OAAO,sCAAsC,CAAC;QAChD,CAAC;;;;;;yCAVA,IAAA,cAAQ,GAAE;2CAOV,IAAA,cAAQ,GAAE;QANX,4MAAA,iBAAiB,6DAIhB;QAGD,kNAAA,mBAAmB,6DAElB;QApBH,6KAqBC;;;;IApBQ,uBAAY,GAAG,CAAC,AAAJ,CAAK;;QADb,uDAAmB;;;;AAAnB,kDAAmB"}
|
|
@@ -1,31 +1,75 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
|
|
3
|
+
var useValue = arguments.length > 2;
|
|
4
|
+
for (var i = 0; i < initializers.length; i++) {
|
|
5
|
+
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
6
|
+
}
|
|
7
|
+
return useValue ? value : void 0;
|
|
8
|
+
};
|
|
9
|
+
var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
10
|
+
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
|
|
11
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
12
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
13
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
14
|
+
var _, done = false;
|
|
15
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
16
|
+
var context = {};
|
|
17
|
+
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
18
|
+
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
19
|
+
context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
|
|
20
|
+
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
21
|
+
if (kind === "accessor") {
|
|
22
|
+
if (result === void 0) continue;
|
|
23
|
+
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
24
|
+
if (_ = accept(result.get)) descriptor.get = _;
|
|
25
|
+
if (_ = accept(result.set)) descriptor.set = _;
|
|
26
|
+
if (_ = accept(result.init)) initializers.unshift(_);
|
|
27
|
+
}
|
|
28
|
+
else if (_ = accept(result)) {
|
|
29
|
+
if (kind === "field") initializers.unshift(_);
|
|
30
|
+
else descriptor[key] = _;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
34
|
+
done = true;
|
|
7
35
|
};
|
|
8
|
-
var
|
|
9
|
-
if (typeof
|
|
36
|
+
var __setFunctionName = (this && this.__setFunctionName) || function (f, name, prefix) {
|
|
37
|
+
if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
|
|
38
|
+
return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
|
|
10
39
|
};
|
|
11
40
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
41
|
exports.LifecycleBoundGraphWithLifecycleBoundSubgraph = void 0;
|
|
13
42
|
const src_1 = require("../../src");
|
|
14
43
|
const LifecycleBoundGraph_1 = require("./LifecycleBoundGraph");
|
|
15
|
-
let LifecycleBoundGraphWithLifecycleBoundSubgraph =
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
44
|
+
let LifecycleBoundGraphWithLifecycleBoundSubgraph = (() => {
|
|
45
|
+
let _classDecorators = [(0, src_1.lifecycleBound)(), (0, src_1.graph)({ subgraphs: [LifecycleBoundGraph_1.LifecycleBoundGraph] })];
|
|
46
|
+
let _classDescriptor;
|
|
47
|
+
let _classExtraInitializers = [];
|
|
48
|
+
let _classThis;
|
|
49
|
+
let _classSuper = src_1.ObjectGraph;
|
|
50
|
+
let _instanceExtraInitializers = [];
|
|
51
|
+
let _aString_decorators;
|
|
52
|
+
var LifecycleBoundGraphWithLifecycleBoundSubgraph = _classThis = class extends _classSuper {
|
|
53
|
+
aString(computedFromProps) {
|
|
54
|
+
return `A string that requires props from a lifecycle bound subgraph: ${computedFromProps}`;
|
|
55
|
+
}
|
|
56
|
+
constructor() {
|
|
57
|
+
super(...arguments);
|
|
58
|
+
__runInitializers(this, _instanceExtraInitializers);
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
__setFunctionName(_classThis, "LifecycleBoundGraphWithLifecycleBoundSubgraph");
|
|
62
|
+
(() => {
|
|
63
|
+
var _a;
|
|
64
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create((_a = _classSuper[Symbol.metadata]) !== null && _a !== void 0 ? _a : null) : void 0;
|
|
65
|
+
_aString_decorators = [(0, src_1.provides)()];
|
|
66
|
+
__esDecorate(_classThis, null, _aString_decorators, { kind: "method", name: "aString", static: false, private: false, access: { has: obj => "aString" in obj, get: obj => obj.aString }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
67
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
68
|
+
LifecycleBoundGraphWithLifecycleBoundSubgraph = _classThis = _classDescriptor.value;
|
|
69
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
70
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
71
|
+
})();
|
|
72
|
+
return LifecycleBoundGraphWithLifecycleBoundSubgraph = _classThis;
|
|
73
|
+
})();
|
|
20
74
|
exports.LifecycleBoundGraphWithLifecycleBoundSubgraph = LifecycleBoundGraphWithLifecycleBoundSubgraph;
|
|
21
|
-
__decorate([
|
|
22
|
-
(0, src_1.provides)(),
|
|
23
|
-
__metadata("design:type", Function),
|
|
24
|
-
__metadata("design:paramtypes", [String]),
|
|
25
|
-
__metadata("design:returntype", String)
|
|
26
|
-
], LifecycleBoundGraphWithLifecycleBoundSubgraph.prototype, "aString", null);
|
|
27
|
-
exports.LifecycleBoundGraphWithLifecycleBoundSubgraph = LifecycleBoundGraphWithLifecycleBoundSubgraph = __decorate([
|
|
28
|
-
(0, src_1.lifecycleBound)(),
|
|
29
|
-
(0, src_1.graph)({ subgraphs: [LifecycleBoundGraph_1.LifecycleBoundGraph] })
|
|
30
|
-
], LifecycleBoundGraphWithLifecycleBoundSubgraph);
|
|
31
75
|
//# sourceMappingURL=LifecycleBoundWithLifecycleBoundSubgraph.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LifecycleBoundWithLifecycleBoundSubgraph.js","sourceRoot":"","sources":["../../../test/fixtures/LifecycleBoundWithLifecycleBoundSubgraph.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LifecycleBoundWithLifecycleBoundSubgraph.js","sourceRoot":"","sources":["../../../test/fixtures/LifecycleBoundWithLifecycleBoundSubgraph.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mCAKmB;AACnB,+DAA4D;IAK/C,6CAA6C;4BADzD,IAAA,oBAAc,GAAE,EAAE,IAAA,WAAK,EAAC,EAAE,SAAS,EAAE,CAAC,yCAAmB,CAAC,EAAE,CAAC;;;;sBACK,iBAAW;;;0EAAnB,SAAQ,WAAW;QAG5E,OAAO,CAAC,iBAAyB;YAC/B,OAAO,iEAAiE,iBAAiB,EAAE,CAAC;QAC9F,CAAC;;;YALU,mDAA6C;;;;;;;+BAEvD,IAAA,cAAQ,GAAE;QACX,8KAAA,OAAO,6DAEN;QALH,6KAMC;;;QANY,uDAA6C;;;;AAA7C,sGAA6C"}
|
|
@@ -1,12 +1,41 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
|
|
3
|
+
var useValue = arguments.length > 2;
|
|
4
|
+
for (var i = 0; i < initializers.length; i++) {
|
|
5
|
+
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
6
|
+
}
|
|
7
|
+
return useValue ? value : void 0;
|
|
8
|
+
};
|
|
9
|
+
var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
10
|
+
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
|
|
11
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
12
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
13
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
14
|
+
var _, done = false;
|
|
15
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
16
|
+
var context = {};
|
|
17
|
+
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
18
|
+
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
19
|
+
context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
|
|
20
|
+
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
21
|
+
if (kind === "accessor") {
|
|
22
|
+
if (result === void 0) continue;
|
|
23
|
+
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
24
|
+
if (_ = accept(result.get)) descriptor.get = _;
|
|
25
|
+
if (_ = accept(result.set)) descriptor.set = _;
|
|
26
|
+
if (_ = accept(result.init)) initializers.unshift(_);
|
|
27
|
+
}
|
|
28
|
+
else if (_ = accept(result)) {
|
|
29
|
+
if (kind === "field") initializers.unshift(_);
|
|
30
|
+
else descriptor[key] = _;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
34
|
+
done = true;
|
|
7
35
|
};
|
|
8
|
-
var
|
|
9
|
-
if (typeof
|
|
36
|
+
var __setFunctionName = (this && this.__setFunctionName) || function (f, name, prefix) {
|
|
37
|
+
if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
|
|
38
|
+
return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
|
|
10
39
|
};
|
|
11
40
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
41
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
@@ -14,30 +43,42 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
14
43
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
44
|
const src_1 = require("../../src");
|
|
16
45
|
const injectedValues_1 = __importDefault(require("./injectedValues"));
|
|
17
|
-
const StringProvider_1 = __importDefault(require("./StringProvider"));
|
|
18
46
|
const Subgraph_1 = __importDefault(require("./Subgraph"));
|
|
19
|
-
let MainGraph =
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
(
|
|
41
|
-
|
|
47
|
+
let MainGraph = (() => {
|
|
48
|
+
let _classDecorators = [(0, src_1.Graph)({ subgraphs: [Subgraph_1.default] })];
|
|
49
|
+
let _classDescriptor;
|
|
50
|
+
let _classExtraInitializers = [];
|
|
51
|
+
let _classThis;
|
|
52
|
+
let _classSuper = src_1.ObjectGraph;
|
|
53
|
+
let _instanceExtraInitializers = [];
|
|
54
|
+
let _someString_decorators;
|
|
55
|
+
let _anotherString_decorators;
|
|
56
|
+
var MainGraph = _classThis = class extends _classSuper {
|
|
57
|
+
someString(stringProvider) {
|
|
58
|
+
return stringProvider.theString;
|
|
59
|
+
}
|
|
60
|
+
anotherString() {
|
|
61
|
+
return injectedValues_1.default.anotherString;
|
|
62
|
+
}
|
|
63
|
+
constructor() {
|
|
64
|
+
super(...arguments);
|
|
65
|
+
__runInitializers(this, _instanceExtraInitializers);
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
__setFunctionName(_classThis, "MainGraph");
|
|
69
|
+
(() => {
|
|
70
|
+
var _a;
|
|
71
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create((_a = _classSuper[Symbol.metadata]) !== null && _a !== void 0 ? _a : null) : void 0;
|
|
72
|
+
_someString_decorators = [(0, src_1.Provides)()];
|
|
73
|
+
_anotherString_decorators = [(0, src_1.Provides)()];
|
|
74
|
+
__esDecorate(_classThis, null, _someString_decorators, { kind: "method", name: "someString", static: false, private: false, access: { has: obj => "someString" in obj, get: obj => obj.someString }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
75
|
+
__esDecorate(_classThis, null, _anotherString_decorators, { kind: "method", name: "anotherString", static: false, private: false, access: { has: obj => "anotherString" in obj, get: obj => obj.anotherString }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
76
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
77
|
+
MainGraph = _classThis = _classDescriptor.value;
|
|
78
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
79
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
80
|
+
})();
|
|
81
|
+
return MainGraph = _classThis;
|
|
82
|
+
})();
|
|
42
83
|
exports.default = MainGraph;
|
|
43
84
|
//# sourceMappingURL=MainGraph.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MainGraph.js","sourceRoot":"","sources":["../../../test/fixtures/MainGraph.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MainGraph.js","sourceRoot":"","sources":["../../../test/fixtures/MainGraph.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mCAKmB;AACnB,sEAA8C;AAE9C,0DAAkC;;4BAIjC,IAAA,WAAK,EAAC,EAAE,SAAS,EAAE,CAAC,kBAAQ,CAAC,EAAE,CAAC;;;;sBACM,iBAAW;;;;sCAAnB,SAAQ,WAAW;QAEhD,UAAU,CAAC,cAA8B;YACvC,OAAO,cAAc,CAAC,SAAS,CAAC;QAClC,CAAC;QAGD,aAAa;YACX,OAAO,wBAAc,CAAC,aAAa,CAAC;QACtC,CAAC;;;YATkB,mDAAS;;;;;;;kCAC3B,IAAA,cAAQ,GAAE;qCAKV,IAAA,cAAQ,GAAE;QAJX,uLAAA,UAAU,6DAET;QAGD,gMAAA,aAAa,6DAEZ;QATH,6KAUC;;;QAVoB,uDAAS"}
|
|
@@ -1,18 +1,63 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
3
|
+
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
|
|
4
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
5
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
6
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
7
|
+
var _, done = false;
|
|
8
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
9
|
+
var context = {};
|
|
10
|
+
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
11
|
+
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
12
|
+
context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
|
|
13
|
+
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
14
|
+
if (kind === "accessor") {
|
|
15
|
+
if (result === void 0) continue;
|
|
16
|
+
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
17
|
+
if (_ = accept(result.get)) descriptor.get = _;
|
|
18
|
+
if (_ = accept(result.set)) descriptor.set = _;
|
|
19
|
+
if (_ = accept(result.init)) initializers.unshift(_);
|
|
20
|
+
}
|
|
21
|
+
else if (_ = accept(result)) {
|
|
22
|
+
if (kind === "field") initializers.unshift(_);
|
|
23
|
+
else descriptor[key] = _;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
27
|
+
done = true;
|
|
28
|
+
};
|
|
29
|
+
var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
|
|
30
|
+
var useValue = arguments.length > 2;
|
|
31
|
+
for (var i = 0; i < initializers.length; i++) {
|
|
32
|
+
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
33
|
+
}
|
|
34
|
+
return useValue ? value : void 0;
|
|
35
|
+
};
|
|
36
|
+
var __setFunctionName = (this && this.__setFunctionName) || function (f, name, prefix) {
|
|
37
|
+
if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
|
|
38
|
+
return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
|
|
7
39
|
};
|
|
8
40
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
41
|
exports.ScopedLifecycleBoundGraph = void 0;
|
|
10
42
|
const src_1 = require("../../src");
|
|
11
|
-
let ScopedLifecycleBoundGraph =
|
|
12
|
-
};
|
|
43
|
+
let ScopedLifecycleBoundGraph = (() => {
|
|
44
|
+
let _classDecorators = [(0, src_1.lifecycleBound)({ scope: 'component' }), (0, src_1.graph)()];
|
|
45
|
+
let _classDescriptor;
|
|
46
|
+
let _classExtraInitializers = [];
|
|
47
|
+
let _classThis;
|
|
48
|
+
let _classSuper = src_1.ObjectGraph;
|
|
49
|
+
var ScopedLifecycleBoundGraph = _classThis = class extends _classSuper {
|
|
50
|
+
};
|
|
51
|
+
__setFunctionName(_classThis, "ScopedLifecycleBoundGraph");
|
|
52
|
+
(() => {
|
|
53
|
+
var _a;
|
|
54
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create((_a = _classSuper[Symbol.metadata]) !== null && _a !== void 0 ? _a : null) : void 0;
|
|
55
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
56
|
+
ScopedLifecycleBoundGraph = _classThis = _classDescriptor.value;
|
|
57
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
58
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
59
|
+
})();
|
|
60
|
+
return ScopedLifecycleBoundGraph = _classThis;
|
|
61
|
+
})();
|
|
13
62
|
exports.ScopedLifecycleBoundGraph = ScopedLifecycleBoundGraph;
|
|
14
|
-
exports.ScopedLifecycleBoundGraph = ScopedLifecycleBoundGraph = __decorate([
|
|
15
|
-
(0, src_1.lifecycleBound)({ scope: 'component' }),
|
|
16
|
-
(0, src_1.graph)()
|
|
17
|
-
], ScopedLifecycleBoundGraph);
|
|
18
63
|
//# sourceMappingURL=ScopedLifecycleBoundGraph.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScopedLifecycleBoundGraph.js","sourceRoot":"","sources":["../../../test/fixtures/ScopedLifecycleBoundGraph.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ScopedLifecycleBoundGraph.js","sourceRoot":"","sources":["../../../test/fixtures/ScopedLifecycleBoundGraph.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mCAA+D;IAKlD,yBAAyB;4BADrC,IAAA,oBAAc,EAAC,EAAC,KAAK,EAAE,WAAW,EAAC,CAAC,EAAE,IAAA,WAAK,GAAE;;;;sBACC,iBAAW;sDAAnB,SAAQ,WAAkB;;;;;;QAAjE,6KAEC;;;QAFY,uDAAyB;;;;AAAzB,8DAAyB"}
|
|
@@ -1,35 +1,75 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
|
|
3
|
+
var useValue = arguments.length > 2;
|
|
4
|
+
for (var i = 0; i < initializers.length; i++) {
|
|
5
|
+
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
6
|
+
}
|
|
7
|
+
return useValue ? value : void 0;
|
|
8
|
+
};
|
|
9
|
+
var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
10
|
+
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
|
|
11
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
12
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
13
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
14
|
+
var _, done = false;
|
|
15
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
16
|
+
var context = {};
|
|
17
|
+
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
18
|
+
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
19
|
+
context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
|
|
20
|
+
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
21
|
+
if (kind === "accessor") {
|
|
22
|
+
if (result === void 0) continue;
|
|
23
|
+
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
24
|
+
if (_ = accept(result.get)) descriptor.get = _;
|
|
25
|
+
if (_ = accept(result.set)) descriptor.set = _;
|
|
26
|
+
if (_ = accept(result.init)) initializers.unshift(_);
|
|
27
|
+
}
|
|
28
|
+
else if (_ = accept(result)) {
|
|
29
|
+
if (kind === "field") initializers.unshift(_);
|
|
30
|
+
else descriptor[key] = _;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
34
|
+
done = true;
|
|
7
35
|
};
|
|
8
|
-
var
|
|
9
|
-
if (typeof
|
|
36
|
+
var __setFunctionName = (this && this.__setFunctionName) || function (f, name, prefix) {
|
|
37
|
+
if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
|
|
38
|
+
return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
|
|
10
39
|
};
|
|
11
40
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
41
|
const lodash_1 = require("lodash");
|
|
13
|
-
const Singleton_1 = require("../../src/decorators/Singleton");
|
|
42
|
+
const Singleton_1 = require("../../src/decorators/singleton/Singleton");
|
|
14
43
|
const src_1 = require("../../src");
|
|
15
|
-
let SingletonGraph =
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
(
|
|
33
|
-
|
|
44
|
+
let SingletonGraph = (() => {
|
|
45
|
+
let _classDecorators = [(0, Singleton_1.singleton)(), (0, src_1.graph)()];
|
|
46
|
+
let _classDescriptor;
|
|
47
|
+
let _classExtraInitializers = [];
|
|
48
|
+
let _classThis;
|
|
49
|
+
let _classSuper = src_1.ObjectGraph;
|
|
50
|
+
let _instanceExtraInitializers = [];
|
|
51
|
+
let _instanceId_decorators;
|
|
52
|
+
var SingletonGraph = _classThis = class extends _classSuper {
|
|
53
|
+
constructor() {
|
|
54
|
+
super(...arguments);
|
|
55
|
+
this.id = (__runInitializers(this, _instanceExtraInitializers), (0, lodash_1.uniqueId)());
|
|
56
|
+
}
|
|
57
|
+
instanceId() {
|
|
58
|
+
return `graph${this.id}`;
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
__setFunctionName(_classThis, "SingletonGraph");
|
|
62
|
+
(() => {
|
|
63
|
+
var _a;
|
|
64
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create((_a = _classSuper[Symbol.metadata]) !== null && _a !== void 0 ? _a : null) : void 0;
|
|
65
|
+
_instanceId_decorators = [(0, src_1.provides)()];
|
|
66
|
+
__esDecorate(_classThis, null, _instanceId_decorators, { kind: "method", name: "instanceId", static: false, private: false, access: { has: obj => "instanceId" in obj, get: obj => obj.instanceId }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
67
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
68
|
+
SingletonGraph = _classThis = _classDescriptor.value;
|
|
69
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
70
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
71
|
+
})();
|
|
72
|
+
return SingletonGraph = _classThis;
|
|
73
|
+
})();
|
|
34
74
|
exports.default = SingletonGraph;
|
|
35
75
|
//# sourceMappingURL=SingletonGraph.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SingletonGraph.js","sourceRoot":"","sources":["../../../test/fixtures/SingletonGraph.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SingletonGraph.js","sourceRoot":"","sources":["../../../test/fixtures/SingletonGraph.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mCAAkC;AAClC,wEAAqE;AACrE,mCAAyD;;4BAExD,IAAA,qBAAS,GAAE,EAAE,IAAA,WAAK,GAAE;;;;sBACuB,iBAAW;;;2CAAnB,SAAQ,WAAW;;;YAC7C,OAAE,IADS,mDAAc,EACpB,IAAA,iBAAQ,GAAE,EAAC;QAM1B,CAAC;QAHC,UAAU;YACR,OAAO,QAAQ,IAAI,CAAC,EAAE,EAAE,CAAC;QAC3B,CAAC;;;;;;kCAHA,IAAA,cAAQ,GAAE;QACX,uLAAA,UAAU,6DAET;QANH,6KAOC;;;QAPoB,uDAAc"}
|