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.
Files changed (122) hide show
  1. package/babel.config.legacy.js +13 -0
  2. package/dist/src/decorators/Graph.d.ts +2 -2
  3. package/dist/src/decorators/Graph.d.ts.map +1 -1
  4. package/dist/src/decorators/Graph.js +3 -3
  5. package/dist/src/decorators/Graph.js.map +1 -1
  6. package/dist/src/decorators/inject/Inject.d.ts +1 -1
  7. package/dist/src/decorators/inject/Inject.d.ts.map +1 -1
  8. package/dist/src/decorators/inject/Inject.js +7 -7
  9. package/dist/src/decorators/inject/Inject.js.map +1 -1
  10. package/dist/src/decorators/inject/inject.legacy.d.ts +2 -0
  11. package/dist/src/decorators/inject/inject.legacy.d.ts.map +1 -0
  12. package/dist/src/decorators/inject/inject.legacy.js +12 -0
  13. package/dist/src/decorators/inject/inject.legacy.js.map +1 -0
  14. package/dist/src/decorators/inject/inject.modern.d.ts +5 -0
  15. package/dist/src/decorators/inject/inject.modern.d.ts.map +1 -0
  16. package/dist/src/decorators/inject/{LateInject.js → inject.modern.js} +6 -6
  17. package/dist/src/decorators/inject/inject.modern.js.map +1 -0
  18. package/dist/src/decorators/injectable/Injectable.d.ts.map +1 -0
  19. package/dist/src/decorators/injectable/Injectable.js.map +1 -0
  20. package/dist/src/decorators/lateInject/LateInject.d.ts.map +1 -0
  21. package/dist/src/decorators/lateInject/LateInject.js +14 -0
  22. package/dist/src/decorators/lateInject/LateInject.js.map +1 -0
  23. package/dist/src/decorators/lateInject/lateInject.legacy.d.ts +2 -0
  24. package/dist/src/decorators/lateInject/lateInject.legacy.d.ts.map +1 -0
  25. package/dist/src/decorators/lateInject/lateInject.legacy.js +12 -0
  26. package/dist/src/decorators/lateInject/lateInject.legacy.js.map +1 -0
  27. package/dist/src/decorators/lateInject/lateInject.modern.d.ts +5 -0
  28. package/dist/src/decorators/lateInject/lateInject.modern.d.ts.map +1 -0
  29. package/dist/src/decorators/lateInject/lateInject.modern.js +14 -0
  30. package/dist/src/decorators/lateInject/lateInject.modern.js.map +1 -0
  31. package/dist/src/decorators/provides/Provides.d.ts +1 -2
  32. package/dist/src/decorators/provides/Provides.d.ts.map +1 -1
  33. package/dist/src/decorators/provides/Provides.js +7 -8
  34. package/dist/src/decorators/provides/Provides.js.map +1 -1
  35. package/dist/src/decorators/provides/provides.legacy.d.ts +3 -0
  36. package/dist/src/decorators/provides/provides.legacy.d.ts.map +1 -0
  37. package/dist/src/decorators/provides/provides.legacy.js +13 -0
  38. package/dist/src/decorators/provides/provides.legacy.js.map +1 -0
  39. package/dist/src/decorators/provides/provides.modern.d.ts +2 -0
  40. package/dist/src/decorators/provides/provides.modern.d.ts.map +1 -0
  41. package/dist/src/decorators/provides/provides.modern.js +34 -0
  42. package/dist/src/decorators/provides/provides.modern.js.map +1 -0
  43. package/dist/src/decorators/singleton/Singleton.d.ts +2 -0
  44. package/dist/src/decorators/singleton/Singleton.d.ts.map +1 -0
  45. package/dist/src/decorators/singleton/Singleton.js +14 -0
  46. package/dist/src/decorators/singleton/Singleton.js.map +1 -0
  47. package/dist/src/decorators/singleton/singleton.legacy.d.ts +4 -0
  48. package/dist/src/decorators/singleton/singleton.legacy.d.ts.map +1 -0
  49. package/dist/src/decorators/singleton/singleton.legacy.js +10 -0
  50. package/dist/src/decorators/singleton/singleton.legacy.js.map +1 -0
  51. package/dist/src/decorators/singleton/singleton.modern.d.ts +2 -0
  52. package/dist/src/decorators/singleton/singleton.modern.d.ts.map +1 -0
  53. package/dist/src/decorators/singleton/singleton.modern.js +9 -0
  54. package/dist/src/decorators/singleton/singleton.modern.js.map +1 -0
  55. package/dist/src/index.d.ts +6 -6
  56. package/dist/src/index.d.ts.map +1 -1
  57. package/dist/src/index.js +6 -6
  58. package/dist/src/index.js.map +1 -1
  59. package/dist/src/utils/decorators.d.ts +2 -0
  60. package/dist/src/utils/decorators.d.ts.map +1 -0
  61. package/dist/src/utils/decorators.js +7 -0
  62. package/dist/src/utils/decorators.js.map +1 -0
  63. package/dist/test/fixtures/CircularDependencyFromSubgraph.js +66 -21
  64. package/dist/test/fixtures/CircularDependencyFromSubgraph.js.map +1 -1
  65. package/dist/test/fixtures/CircularDependencyGraph.js +66 -21
  66. package/dist/test/fixtures/CircularDependencyGraph.js.map +1 -1
  67. package/dist/test/fixtures/CircularDependencyGraph2.js +78 -39
  68. package/dist/test/fixtures/CircularDependencyGraph2.js.map +1 -1
  69. package/dist/test/fixtures/GraphWithMultipleDependencies.js +84 -48
  70. package/dist/test/fixtures/GraphWithMultipleDependencies.js.map +1 -1
  71. package/dist/test/fixtures/GraphWithOnBind.js +69 -24
  72. package/dist/test/fixtures/GraphWithOnBind.js.map +1 -1
  73. package/dist/test/fixtures/LifecycleBoundGraph.js +79 -41
  74. package/dist/test/fixtures/LifecycleBoundGraph.js.map +1 -1
  75. package/dist/test/fixtures/LifecycleBoundWithLifecycleBoundSubgraph.js +66 -22
  76. package/dist/test/fixtures/LifecycleBoundWithLifecycleBoundSubgraph.js.map +1 -1
  77. package/dist/test/fixtures/MainGraph.js +72 -31
  78. package/dist/test/fixtures/MainGraph.js.map +1 -1
  79. package/dist/test/fixtures/ScopedLifecycleBoundGraph.js +56 -11
  80. package/dist/test/fixtures/ScopedLifecycleBoundGraph.js.map +1 -1
  81. package/dist/test/fixtures/SingletonGraph.js +67 -27
  82. package/dist/test/fixtures/SingletonGraph.js.map +1 -1
  83. package/dist/test/fixtures/Subgraph.js +84 -48
  84. package/dist/test/fixtures/Subgraph.js.map +1 -1
  85. package/dist/test/fixtures/SubgraphWithCircularDependency.js +72 -31
  86. package/dist/test/fixtures/SubgraphWithCircularDependency.js.map +1 -1
  87. package/dist/test/fixtures/ThrowingMainGraph.js +66 -21
  88. package/dist/test/fixtures/ThrowingMainGraph.js.map +1 -1
  89. package/dist/test/fixtures/UniqueNumberGraph.js +73 -37
  90. package/dist/test/fixtures/UniqueNumberGraph.js.map +1 -1
  91. package/jest.config.legacy.js +26 -0
  92. package/package.json +21 -17
  93. package/src/decorators/Graph.ts +5 -5
  94. package/src/decorators/inject/Inject.ts +7 -8
  95. package/src/decorators/inject/inject.legacy.ts +11 -0
  96. package/src/decorators/inject/inject.modern.ts +12 -0
  97. package/src/decorators/lateInject/LateInject.ts +11 -0
  98. package/src/decorators/lateInject/lateInject.legacy.ts +11 -0
  99. package/src/decorators/lateInject/lateInject.modern.ts +12 -0
  100. package/src/decorators/provides/Provides.ts +8 -7
  101. package/src/decorators/provides/provides.legacy.ts +13 -0
  102. package/src/decorators/provides/provides.modern.ts +36 -0
  103. package/src/decorators/singleton/Singleton.ts +11 -0
  104. package/src/decorators/singleton/singleton.legacy.ts +13 -0
  105. package/src/decorators/singleton/singleton.modern.ts +8 -0
  106. package/src/index.ts +6 -6
  107. package/src/utils/decorators.ts +3 -0
  108. package/wallaby.legacy.js +9 -0
  109. package/dist/src/decorators/Singleton.d.ts +0 -4
  110. package/dist/src/decorators/Singleton.d.ts.map +0 -1
  111. package/dist/src/decorators/Singleton.js +0 -12
  112. package/dist/src/decorators/Singleton.js.map +0 -1
  113. package/dist/src/decorators/inject/Injectable.d.ts.map +0 -1
  114. package/dist/src/decorators/inject/Injectable.js.map +0 -1
  115. package/dist/src/decorators/inject/LateInject.d.ts.map +0 -1
  116. package/dist/src/decorators/inject/LateInject.js.map +0 -1
  117. package/src/decorators/Singleton.ts +0 -15
  118. package/src/decorators/inject/LateInject.ts +0 -8
  119. /package/dist/src/decorators/{inject → injectable}/Injectable.d.ts +0 -0
  120. /package/dist/src/decorators/{inject → injectable}/Injectable.js +0 -0
  121. /package/dist/src/decorators/{inject → lateInject}/LateInject.d.ts +0 -0
  122. /package/src/decorators/{inject → injectable}/Injectable.ts +0 -0
@@ -1,49 +1,87 @@
1
1
  "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
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 __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
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 = LifecycleBoundGraph_1 = class LifecycleBoundGraph extends src_1.ObjectGraph {
16
- constructor(props) {
17
- super(props);
18
- this.props = props;
19
- LifecycleBoundGraph_1.timesCreated++;
20
- }
21
- computedFromProps() {
22
- return this.props.stringFromProps
23
- ? `A string passed via props: ${this.props.stringFromProps}`
24
- : 'stringFromProps does not exist';
25
- }
26
- doesNotRequireProps() {
27
- return 'A string that does not require props';
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":";;;;;;;;;;;;;AAAA,mCAKmB;AAKZ,IAAM,mBAAmB,2BAAzB,MAAM,mBAAoB,SAAQ,iBAAkB;IAIzD,YAAY,KAAY;QACtB,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,qBAAmB,CAAC,YAAY,EAAE,CAAC;IACrC,CAAC;IAGD,iBAAiB;QACf,OAAO,IAAI,CAAC,KAAK,CAAC,eAAe;YAC/B,CAAC,CAAC,8BAA8B,IAAI,CAAC,KAAK,CAAC,eAAe,EAAE;YAC5D,CAAC,CAAC,gCAAgC,CAAC;IACvC,CAAC;IAGD,mBAAmB;QACjB,OAAO,sCAAsC,CAAC;IAChD,CAAC;;AApBU,kDAAmB;AACvB,gCAAY,GAAG,CAAC,AAAJ,CAAK;AAUxB;IADC,IAAA,cAAQ,GAAE;;;;4DAKV;AAGD;IADC,IAAA,cAAQ,GAAE;;;;8DAGV;8BApBU,mBAAmB;IAD/B,IAAA,oBAAc,GAAE;IAAE,IAAA,WAAK,GAAE;;GACb,mBAAmB,CAqB/B"}
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 __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
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 __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
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 = class LifecycleBoundGraphWithLifecycleBoundSubgraph extends src_1.ObjectGraph {
16
- aString(computedFromProps) {
17
- return `A string that requires props from a lifecycle bound subgraph: ${computedFromProps}`;
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":";;;;;;;;;;;;AAAA,mCAKmB;AACnB,+DAA4D;AAKrD,IAAM,6CAA6C,GAAnD,MAAM,6CAA8C,SAAQ,iBAAW;IAG5E,OAAO,CAAC,iBAAyB;QAC/B,OAAO,iEAAiE,iBAAiB,EAAE,CAAC;IAC9F,CAAC;CACF,CAAA;AANY,sGAA6C;AAGxD;IADC,IAAA,cAAQ,GAAE;;;;4EAGV;wDALU,6CAA6C;IADzD,IAAA,oBAAc,GAAE;IAAE,IAAA,WAAK,EAAC,EAAE,SAAS,EAAE,CAAC,yCAAmB,CAAC,EAAE,CAAC;GACjD,6CAA6C,CAMzD"}
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 __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
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 __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
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 = class MainGraph extends src_1.ObjectGraph {
20
- someString(stringProvider) {
21
- return stringProvider.theString;
22
- }
23
- anotherString() {
24
- return injectedValues_1.default.anotherString;
25
- }
26
- };
27
- __decorate([
28
- (0, src_1.Provides)(),
29
- __metadata("design:type", Function),
30
- __metadata("design:paramtypes", [StringProvider_1.default]),
31
- __metadata("design:returntype", String)
32
- ], MainGraph.prototype, "someString", null);
33
- __decorate([
34
- (0, src_1.Provides)(),
35
- __metadata("design:type", Function),
36
- __metadata("design:paramtypes", []),
37
- __metadata("design:returntype", String)
38
- ], MainGraph.prototype, "anotherString", null);
39
- MainGraph = __decorate([
40
- (0, src_1.Graph)({ subgraphs: [Subgraph_1.default] })
41
- ], MainGraph);
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":";;;;;;;;;;;;;;AAAA,mCAKmB;AACnB,sEAA8C;AAC9C,sEAA8C;AAC9C,0DAAkC;AAKnB,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,iBAAW;IAEhD,UAAU,CAAC,cAA8B;QACvC,OAAO,cAAc,CAAC,SAAS,CAAC;IAClC,CAAC;IAGD,aAAa;QACX,OAAO,wBAAc,CAAC,aAAa,CAAC;IACtC,CAAC;CACF,CAAA;AARC;IADC,IAAA,cAAQ,GAAE;;qCACgB,wBAAc;;2CAExC;AAGD;IADC,IAAA,cAAQ,GAAE;;;;8CAGV;AATkB,SAAS;IAD7B,IAAA,WAAK,EAAC,EAAE,SAAS,EAAE,CAAC,kBAAQ,CAAC,EAAE,CAAC;GACZ,SAAS,CAU7B;kBAVoB,SAAS"}
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 __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
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 = class ScopedLifecycleBoundGraph extends src_1.ObjectGraph {
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":";;;;;;;;;AAAA,mCAA+D;AAKxD,IAAM,yBAAyB,GAA/B,MAAM,yBAA0B,SAAQ,iBAAkB;CAEhE,CAAA;AAFY,8DAAyB;oCAAzB,yBAAyB;IADrC,IAAA,oBAAc,EAAC,EAAC,KAAK,EAAE,WAAW,EAAC,CAAC;IAAE,IAAA,WAAK,GAAE;GACjC,yBAAyB,CAErC"}
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 __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
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 __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
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 = class SingletonGraph extends src_1.ObjectGraph {
16
- constructor() {
17
- super(...arguments);
18
- this.id = (0, lodash_1.uniqueId)();
19
- }
20
- instanceId() {
21
- return `graph${this.id}`;
22
- }
23
- };
24
- __decorate([
25
- (0, src_1.provides)(),
26
- __metadata("design:type", Function),
27
- __metadata("design:paramtypes", []),
28
- __metadata("design:returntype", String)
29
- ], SingletonGraph.prototype, "instanceId", null);
30
- SingletonGraph = __decorate([
31
- (0, Singleton_1.singleton)(),
32
- (0, src_1.graph)()
33
- ], SingletonGraph);
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":";;;;;;;;;;;AAAA,mCAAkC;AAClC,8DAA2D;AAC3D,mCAAyD;AAG1C,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,iBAAW;IAAxC;;QACL,OAAE,GAAG,IAAA,iBAAQ,GAAE,CAAC;IAM1B,CAAC;IAHC,UAAU;QACR,OAAO,QAAQ,IAAI,CAAC,EAAE,EAAE,CAAC;IAC3B,CAAC;CACF,CAAA;AAHC;IADC,IAAA,cAAQ,GAAE;;;;gDAGV;AANkB,cAAc;IADlC,IAAA,qBAAS,GAAE;IAAE,IAAA,WAAK,GAAE;GACA,cAAc,CAOlC;kBAPoB,cAAc"}
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"}