@quadnix/octo 0.0.20 → 0.0.22

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 (201) hide show
  1. package/dist/app.type.d.ts +8 -1
  2. package/dist/app.type.js +13 -7
  3. package/dist/app.type.js.map +1 -1
  4. package/dist/decorators/action.decorator.d.ts +19 -2
  5. package/dist/decorators/action.decorator.js +28 -5
  6. package/dist/decorators/action.decorator.js.map +1 -1
  7. package/dist/decorators/anchor.decorator.d.ts +13 -0
  8. package/dist/decorators/anchor.decorator.js +14 -1
  9. package/dist/decorators/anchor.decorator.js.map +1 -1
  10. package/dist/decorators/enable-hook.decorator.d.ts +14 -0
  11. package/dist/decorators/enable-hook.decorator.js +14 -0
  12. package/dist/decorators/enable-hook.decorator.js.map +1 -1
  13. package/dist/decorators/event-source.decorator.d.ts +15 -0
  14. package/dist/decorators/event-source.decorator.js +15 -0
  15. package/dist/decorators/event-source.decorator.js.map +1 -1
  16. package/dist/decorators/factory.decorator.d.ts +54 -5
  17. package/dist/decorators/factory.decorator.js +56 -3
  18. package/dist/decorators/factory.decorator.js.map +1 -1
  19. package/dist/decorators/model.decorator.d.ts +13 -0
  20. package/dist/decorators/model.decorator.js +14 -1
  21. package/dist/decorators/model.decorator.js.map +1 -1
  22. package/dist/decorators/module.decorator.d.ts +61 -5
  23. package/dist/decorators/module.decorator.js +62 -3
  24. package/dist/decorators/module.decorator.js.map +1 -1
  25. package/dist/decorators/on-event.decorator.d.ts +17 -0
  26. package/dist/decorators/on-event.decorator.js +17 -0
  27. package/dist/decorators/on-event.decorator.js.map +1 -1
  28. package/dist/decorators/overlay.decorator.d.ts +13 -0
  29. package/dist/decorators/overlay.decorator.js +14 -1
  30. package/dist/decorators/overlay.decorator.js.map +1 -1
  31. package/dist/decorators/resource.decorator.d.ts +13 -0
  32. package/dist/decorators/resource.decorator.js +14 -1
  33. package/dist/decorators/resource.decorator.js.map +1 -1
  34. package/dist/decorators/validate.decorator.d.ts +9 -0
  35. package/dist/decorators/validate.decorator.js +23 -0
  36. package/dist/decorators/validate.decorator.js.map +1 -0
  37. package/dist/events/error.event.d.ts +30 -0
  38. package/dist/events/error.event.js +30 -0
  39. package/dist/events/error.event.js.map +1 -1
  40. package/dist/events/event.model.d.ts +27 -0
  41. package/dist/events/event.model.js +27 -3
  42. package/dist/events/event.model.js.map +1 -1
  43. package/dist/events/hook.event.d.ts +167 -0
  44. package/dist/events/hook.event.js +167 -0
  45. package/dist/events/hook.event.js.map +1 -1
  46. package/dist/events/module.event.d.ts +12 -0
  47. package/dist/events/module.event.js +12 -0
  48. package/dist/events/module.event.js.map +1 -1
  49. package/dist/events/registration.event.d.ts +90 -0
  50. package/dist/events/registration.event.js +90 -0
  51. package/dist/events/registration.event.js.map +1 -1
  52. package/dist/events/serialization.event.d.ts +61 -0
  53. package/dist/events/serialization.event.js +61 -0
  54. package/dist/events/serialization.event.js.map +1 -1
  55. package/dist/events/transaction.event.d.ts +41 -0
  56. package/dist/events/transaction.event.js +41 -0
  57. package/dist/events/transaction.event.js.map +1 -1
  58. package/dist/functions/container/container.d.ts +53 -0
  59. package/dist/functions/container/container.js +102 -0
  60. package/dist/functions/container/container.js.map +1 -0
  61. package/dist/functions/container/test-container.d.ts +75 -0
  62. package/dist/functions/container/test-container.js +97 -0
  63. package/dist/functions/container/test-container.js.map +1 -0
  64. package/dist/functions/dependency/dependency.d.ts +6 -6
  65. package/dist/functions/dependency/dependency.js +1 -8
  66. package/dist/functions/dependency/dependency.js.map +1 -1
  67. package/dist/functions/diff/diff-metadata.d.ts +5 -2
  68. package/dist/functions/diff/diff-metadata.js +6 -11
  69. package/dist/functions/diff/diff-metadata.js.map +1 -1
  70. package/dist/functions/diff/diff.d.ts +6 -3
  71. package/dist/functions/diff/diff.js +8 -13
  72. package/dist/functions/diff/diff.js.map +1 -1
  73. package/dist/functions/diff/diff.utility.d.ts +38 -6
  74. package/dist/functions/diff/diff.utility.js +55 -6
  75. package/dist/functions/diff/diff.utility.js.map +1 -1
  76. package/dist/functions/hook/commit.hook.js +6 -3
  77. package/dist/functions/hook/commit.hook.js.map +1 -1
  78. package/dist/functions/hook/model-action.hook.js +7 -4
  79. package/dist/functions/hook/model-action.hook.js.map +1 -1
  80. package/dist/functions/hook/resource-action.hook.js +6 -3
  81. package/dist/functions/hook/resource-action.hook.js.map +1 -1
  82. package/dist/functions/node/node.abstract.d.ts +84 -0
  83. package/dist/functions/node/node.abstract.js +275 -0
  84. package/dist/functions/node/node.abstract.js.map +1 -0
  85. package/dist/functions/node/node.interface.d.ts +176 -0
  86. package/dist/functions/node/node.interface.js +2 -0
  87. package/dist/functions/node/node.interface.js.map +1 -0
  88. package/dist/index.d.ts +12 -12
  89. package/dist/index.js +11 -11
  90. package/dist/index.js.map +1 -1
  91. package/dist/main.d.ts +11 -10
  92. package/dist/main.js +76 -37
  93. package/dist/main.js.map +1 -1
  94. package/dist/models/app/app.interface.d.ts +5 -0
  95. package/dist/models/app/app.model.d.ts +30 -3
  96. package/dist/models/app/app.model.js +40 -6
  97. package/dist/models/app/app.model.js.map +1 -1
  98. package/dist/models/deployment/deployment.interface.d.ts +5 -0
  99. package/dist/models/deployment/deployment.model.d.ts +16 -3
  100. package/dist/models/deployment/deployment.model.js +20 -6
  101. package/dist/models/deployment/deployment.model.js.map +1 -1
  102. package/dist/models/environment/environment.interface.d.ts +5 -0
  103. package/dist/models/environment/environment.model.d.ts +19 -3
  104. package/dist/models/environment/environment.model.js +33 -8
  105. package/dist/models/environment/environment.model.js.map +1 -1
  106. package/dist/models/execution/execution.interface.d.ts +5 -0
  107. package/dist/models/execution/execution.model.d.ts +24 -3
  108. package/dist/models/execution/execution.model.js +40 -7
  109. package/dist/models/execution/execution.model.js.map +1 -1
  110. package/dist/models/image/image.interface.d.ts +5 -0
  111. package/dist/models/image/image.model.d.ts +36 -3
  112. package/dist/models/image/image.model.js +25 -9
  113. package/dist/models/image/image.model.js.map +1 -1
  114. package/dist/models/model-action.interface.d.ts +18 -1
  115. package/dist/models/model.abstract.d.ts +7 -42
  116. package/dist/models/model.abstract.js +24 -295
  117. package/dist/models/model.abstract.js.map +1 -1
  118. package/dist/models/model.interface.d.ts +51 -11
  119. package/dist/models/pipeline/pipeline.interface.d.ts +5 -0
  120. package/dist/models/pipeline/pipeline.model.d.ts +16 -3
  121. package/dist/models/pipeline/pipeline.model.js +25 -8
  122. package/dist/models/pipeline/pipeline.model.js.map +1 -1
  123. package/dist/models/region/region.interface.d.ts +5 -0
  124. package/dist/models/region/region.model.d.ts +19 -3
  125. package/dist/models/region/region.model.js +29 -6
  126. package/dist/models/region/region.model.js.map +1 -1
  127. package/dist/models/server/server.interface.d.ts +5 -0
  128. package/dist/models/server/server.model.d.ts +18 -3
  129. package/dist/models/server/server.model.js +24 -6
  130. package/dist/models/server/server.model.js.map +1 -1
  131. package/dist/models/service/service.interface.d.ts +5 -0
  132. package/dist/models/service/service.model.d.ts +16 -3
  133. package/dist/models/service/service.model.js +19 -6
  134. package/dist/models/service/service.model.js.map +1 -1
  135. package/dist/models/subnet/subnet.interface.d.ts +5 -0
  136. package/dist/models/subnet/subnet.model.d.ts +50 -3
  137. package/dist/models/subnet/subnet.model.js +58 -22
  138. package/dist/models/subnet/subnet.model.js.map +1 -1
  139. package/dist/modules/module.container.d.ts +4 -2
  140. package/dist/modules/module.container.js +17 -8
  141. package/dist/modules/module.container.js.map +1 -1
  142. package/dist/modules/test-module.container.d.ts +4 -4
  143. package/dist/modules/test-module.container.js +18 -17
  144. package/dist/modules/test-module.container.js.map +1 -1
  145. package/dist/overlays/anchor.abstract.js +0 -3
  146. package/dist/overlays/anchor.abstract.js.map +1 -1
  147. package/dist/overlays/overlay-data.repository.d.ts +2 -4
  148. package/dist/overlays/overlay-data.repository.js +8 -36
  149. package/dist/overlays/overlay-data.repository.js.map +1 -1
  150. package/dist/overlays/overlay.abstract.d.ts +6 -7
  151. package/dist/overlays/overlay.abstract.js +20 -42
  152. package/dist/overlays/overlay.abstract.js.map +1 -1
  153. package/dist/overlays/overlay.service.d.ts +0 -1
  154. package/dist/overlays/overlay.service.js +1 -7
  155. package/dist/overlays/overlay.service.js.map +1 -1
  156. package/dist/resources/resource-data.repository.d.ts +16 -6
  157. package/dist/resources/resource-data.repository.js +121 -18
  158. package/dist/resources/resource-data.repository.js.map +1 -1
  159. package/dist/resources/resource.abstract.d.ts +23 -6
  160. package/dist/resources/resource.abstract.js +147 -13
  161. package/dist/resources/resource.abstract.js.map +1 -1
  162. package/dist/resources/shared-resource.abstract.d.ts +2 -2
  163. package/dist/resources/shared-resource.abstract.js +5 -2
  164. package/dist/resources/shared-resource.abstract.js.map +1 -1
  165. package/dist/services/capture/capture.service.d.ts +1 -2
  166. package/dist/services/capture/capture.service.js +5 -4
  167. package/dist/services/capture/capture.service.js.map +1 -1
  168. package/dist/services/event/event.service.js +9 -6
  169. package/dist/services/event/event.service.js.map +1 -1
  170. package/dist/services/input/input.service.js +3 -5
  171. package/dist/services/input/input.service.js.map +1 -1
  172. package/dist/services/serialization/model/model-serialization.service.js +13 -14
  173. package/dist/services/serialization/model/model-serialization.service.js.map +1 -1
  174. package/dist/services/serialization/resource/resource-serialization.service.d.ts +4 -4
  175. package/dist/services/serialization/resource/resource-serialization.service.js +23 -13
  176. package/dist/services/serialization/resource/resource-serialization.service.js.map +1 -1
  177. package/dist/services/state-management/local.state-provider.js +0 -1
  178. package/dist/services/state-management/local.state-provider.js.map +1 -1
  179. package/dist/services/state-management/state-management.service.d.ts +1 -1
  180. package/dist/services/state-management/state-management.service.js +6 -9
  181. package/dist/services/state-management/state-management.service.js.map +1 -1
  182. package/dist/services/state-management/test.state-provider.js +3 -1
  183. package/dist/services/state-management/test.state-provider.js.map +1 -1
  184. package/dist/services/transaction/transaction.service.d.ts +5 -2
  185. package/dist/services/transaction/transaction.service.js +117 -87
  186. package/dist/services/transaction/transaction.service.js.map +1 -1
  187. package/dist/services/validation/validation.service.d.ts +19 -0
  188. package/dist/services/validation/validation.service.js +66 -0
  189. package/dist/services/validation/validation.service.js.map +1 -0
  190. package/dist/utilities/object/object.utility.js +1 -0
  191. package/dist/utilities/object/object.utility.js.map +1 -1
  192. package/dist/utilities/validation/validation.utility.d.ts +5 -0
  193. package/dist/utilities/validation/validation.utility.js +12 -0
  194. package/dist/utilities/validation/validation.utility.js.map +1 -0
  195. package/package.json +1 -1
  196. package/dist/decorators/container.d.ts +0 -24
  197. package/dist/decorators/container.js +0 -96
  198. package/dist/decorators/container.js.map +0 -1
  199. package/dist/decorators/test-container.d.ts +0 -27
  200. package/dist/decorators/test-container.js +0 -52
  201. package/dist/decorators/test-container.js.map +0 -1
@@ -1,7 +1,48 @@
1
1
  import { Event } from './event.model.js';
2
+ /**
3
+ * The TransactionEvent class is the superclass for all events in relation to transactions.
4
+ * A transaction processes actions generated from model and resource diffs.
5
+ * Thus, the events are usually in relation with these actions.
6
+ *
7
+ * :::warning Warning
8
+ * It is not a good practice to create an event from this class directly,
9
+ * but should rather create one from one of the subclasses.
10
+ * This promotes a more accurate classification of events.
11
+ * :::
12
+ *
13
+ * @example
14
+ * ```ts
15
+ * const myEvent = new TransactionEvent('MyActionName');
16
+ * EventService.getInstance().emit(myEvent);
17
+ * ```
18
+ * @group Events
19
+ * @returns The Event instance.
20
+ */
2
21
  export declare class TransactionEvent extends Event<string> {
3
22
  }
23
+ /**
24
+ * This event is emitted when a model action is done executing.
25
+ *
26
+ * @example
27
+ * ```ts
28
+ * const myEvent = new ModelActionTransactionEvent('MyActionName');
29
+ * EventService.getInstance().emit(myEvent);
30
+ * ```
31
+ * @group Events
32
+ * @returns The Event instance.
33
+ */
4
34
  export declare class ModelActionTransactionEvent extends TransactionEvent {
5
35
  }
36
+ /**
37
+ * This event is emitted when a resource action is done executing.
38
+ *
39
+ * @example
40
+ * ```ts
41
+ * const myEvent = new ResourceActionTransactionEvent('MyActionName');
42
+ * EventService.getInstance().emit(myEvent);
43
+ * ```
44
+ * @group Events
45
+ * @returns The Event instance.
46
+ */
6
47
  export declare class ResourceActionTransactionEvent extends TransactionEvent {
7
48
  }
@@ -1,8 +1,49 @@
1
1
  import { Event } from './event.model.js';
2
+ /**
3
+ * The TransactionEvent class is the superclass for all events in relation to transactions.
4
+ * A transaction processes actions generated from model and resource diffs.
5
+ * Thus, the events are usually in relation with these actions.
6
+ *
7
+ * :::warning Warning
8
+ * It is not a good practice to create an event from this class directly,
9
+ * but should rather create one from one of the subclasses.
10
+ * This promotes a more accurate classification of events.
11
+ * :::
12
+ *
13
+ * @example
14
+ * ```ts
15
+ * const myEvent = new TransactionEvent('MyActionName');
16
+ * EventService.getInstance().emit(myEvent);
17
+ * ```
18
+ * @group Events
19
+ * @returns The Event instance.
20
+ */
2
21
  export class TransactionEvent extends Event {
3
22
  }
23
+ /**
24
+ * This event is emitted when a model action is done executing.
25
+ *
26
+ * @example
27
+ * ```ts
28
+ * const myEvent = new ModelActionTransactionEvent('MyActionName');
29
+ * EventService.getInstance().emit(myEvent);
30
+ * ```
31
+ * @group Events
32
+ * @returns The Event instance.
33
+ */
4
34
  export class ModelActionTransactionEvent extends TransactionEvent {
5
35
  }
36
+ /**
37
+ * This event is emitted when a resource action is done executing.
38
+ *
39
+ * @example
40
+ * ```ts
41
+ * const myEvent = new ResourceActionTransactionEvent('MyActionName');
42
+ * EventService.getInstance().emit(myEvent);
43
+ * ```
44
+ * @group Events
45
+ * @returns The Event instance.
46
+ */
6
47
  export class ResourceActionTransactionEvent extends TransactionEvent {
7
48
  }
8
49
  //# sourceMappingURL=transaction.event.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"transaction.event.js","sourceRoot":"","sources":["../../src/events/transaction.event.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAEzC,MAAM,OAAO,gBAAiB,SAAQ,KAAa;CAAG;AAEtD,MAAM,OAAO,2BAA4B,SAAQ,gBAAgB;CAAG;AAEpE,MAAM,OAAO,8BAA+B,SAAQ,gBAAgB;CAAG"}
1
+ {"version":3,"file":"transaction.event.js","sourceRoot":"","sources":["../../src/events/transaction.event.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAEzC;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,OAAO,gBAAiB,SAAQ,KAAa;CAAG;AAEtD;;;;;;;;;;GAUG;AACH,MAAM,OAAO,2BAA4B,SAAQ,gBAAgB;CAAG;AAEpE;;;;;;;;;;GAUG;AACH,MAAM,OAAO,8BAA+B,SAAQ,gBAAgB;CAAG"}
@@ -0,0 +1,53 @@
1
+ import type { Constructable } from '../../app.type.js';
2
+ type Factory<T> = {
3
+ create: (...args: unknown[]) => Promise<T>;
4
+ };
5
+ /**
6
+ * The Container class is a box to hold all registered factories.
7
+ *
8
+ * In Octo, we minimize the use of the `new` keyword and get instance of a class using its factory.
9
+ * The factory has full control over how the instance is created.
10
+ *
11
+ * By using the Container and Factory concepts, it is possible to override internal class definitions at runtime.
12
+ * It is an incredibly powerful tool to customize implementation.
13
+ */
14
+ export declare class Container {
15
+ private static FACTORY_TIMEOUT_IN_MS;
16
+ private static readonly factories;
17
+ /**
18
+ * `Container.get()` allows to get an instance of a class using its factory.
19
+ *
20
+ * @param type The type or name of the class to get.
21
+ * @param options Allows selection of a specific factory to use to get the instance.
22
+ * - The `args` option supplies arguments to the factory.
23
+ * @returns The instance of the class.
24
+ */
25
+ static get<T>(type: Constructable<T> | string, options?: {
26
+ args?: unknown[];
27
+ }): Promise<T>;
28
+ /**
29
+ * `Container.registerFactory()` allows to register a factory for a class.
30
+ *
31
+ * @param type The type or name of the class for which the factory is registered.
32
+ * @param factory The factory class being registered.
33
+ */
34
+ static registerFactory<T>(type: Constructable<T> | string, factory: Factory<T>): void;
35
+ /**
36
+ * `Container.reset()` clears all registered factories and empties the container. This is mostly used in testing.
37
+ */
38
+ static reset(): void;
39
+ /**
40
+ * The Container, by default, will wait a maximum of 5 seconds for a factory to resolve and provide an instance.
41
+ * This method allows to change that timeout.
42
+ *
43
+ * @param timeoutInMs The timeout in milliseconds.
44
+ */
45
+ static setFactoryTimeout(timeoutInMs: number): void;
46
+ /**
47
+ * `Container.unRegisterFactory()` will unregister all factories of a class.
48
+ *
49
+ * @param type The type or name of the class for which all factory is unregistered.
50
+ */
51
+ static unRegisterFactory<T>(type: Constructable<T> | string): void;
52
+ }
53
+ export {};
@@ -0,0 +1,102 @@
1
+ /**
2
+ * The Container class is a box to hold all registered factories.
3
+ *
4
+ * In Octo, we minimize the use of the `new` keyword and get instance of a class using its factory.
5
+ * The factory has full control over how the instance is created.
6
+ *
7
+ * By using the Container and Factory concepts, it is possible to override internal class definitions at runtime.
8
+ * It is an incredibly powerful tool to customize implementation.
9
+ */
10
+ export class Container {
11
+ static { this.FACTORY_TIMEOUT_IN_MS = 5000; }
12
+ static { this.factories = {}; }
13
+ /**
14
+ * `Container.get()` allows to get an instance of a class using its factory.
15
+ *
16
+ * @param type The type or name of the class to get.
17
+ * @param options Allows selection of a specific factory to use to get the instance.
18
+ * - The `args` option supplies arguments to the factory.
19
+ * @returns The instance of the class.
20
+ */
21
+ static async get(type, options) {
22
+ const args = options?.args || [];
23
+ const name = typeof type === 'string' ? type : type.name;
24
+ const factoryContainer = this.factories[name];
25
+ if (factoryContainer?.factory) {
26
+ if (!Array.isArray(factoryContainer.factory)) {
27
+ return factoryContainer.factory.create(...args);
28
+ }
29
+ else {
30
+ const factory = await factoryContainer.factory[0];
31
+ return factory.create(...args);
32
+ }
33
+ }
34
+ const newFactoryContainer = {};
35
+ this.factories[name] = newFactoryContainer;
36
+ let promiseResolver;
37
+ let promiseTimeout;
38
+ const promise = new Promise((resolve, reject) => {
39
+ promiseTimeout = setTimeout(() => {
40
+ reject(new Error(`Timed out waiting for factory ${name} to resolve!`));
41
+ }, this.FACTORY_TIMEOUT_IN_MS);
42
+ promiseResolver = resolve;
43
+ });
44
+ newFactoryContainer.factory = [promise, promiseResolver];
45
+ const factory = await promise;
46
+ if (promiseTimeout) {
47
+ clearTimeout(promiseTimeout);
48
+ }
49
+ return factory.create(...args);
50
+ }
51
+ /**
52
+ * `Container.registerFactory()` allows to register a factory for a class.
53
+ *
54
+ * @param type The type or name of the class for which the factory is registered.
55
+ * @param factory The factory class being registered.
56
+ */
57
+ static registerFactory(type, factory) {
58
+ const name = typeof type === 'string' ? type : type.name;
59
+ const factoryContainer = this.factories[name];
60
+ if (factoryContainer?.factory) {
61
+ // If factory is not a promise set by get() above, it has already been registered.
62
+ if (!Array.isArray(factoryContainer.factory)) {
63
+ return;
64
+ }
65
+ const resolve = factoryContainer.factory[1];
66
+ resolve(factory);
67
+ factoryContainer.factory = factory;
68
+ return;
69
+ }
70
+ else {
71
+ this.factories[name] = { factory };
72
+ }
73
+ }
74
+ /**
75
+ * `Container.reset()` clears all registered factories and empties the container. This is mostly used in testing.
76
+ */
77
+ static reset() {
78
+ this.FACTORY_TIMEOUT_IN_MS = 5000;
79
+ for (const name in this.factories) {
80
+ delete this.factories[name];
81
+ }
82
+ }
83
+ /**
84
+ * The Container, by default, will wait a maximum of 5 seconds for a factory to resolve and provide an instance.
85
+ * This method allows to change that timeout.
86
+ *
87
+ * @param timeoutInMs The timeout in milliseconds.
88
+ */
89
+ static setFactoryTimeout(timeoutInMs) {
90
+ this.FACTORY_TIMEOUT_IN_MS = timeoutInMs;
91
+ }
92
+ /**
93
+ * `Container.unRegisterFactory()` will unregister all factories of a class.
94
+ *
95
+ * @param type The type or name of the class for which all factory is unregistered.
96
+ */
97
+ static unRegisterFactory(type) {
98
+ const name = typeof type === 'string' ? type : type.name;
99
+ delete this.factories[name];
100
+ }
101
+ }
102
+ //# sourceMappingURL=container.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"container.js","sourceRoot":"","sources":["../../../src/functions/container/container.ts"],"names":[],"mappings":"AAKA;;;;;;;;GAQG;AACH,MAAM,OAAO,SAAS;aACL,0BAAqB,GAAG,IAAI,CAAC;aAEpB,cAAS,GAAsD,EAAE,CAAC;IAE1F;;;;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IG;IACH,MAAM,CAAC,iBAAiB,CAAI,IAA+B;QACzD,MAAM,IAAI,GAAG,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;QACzD,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC"}
@@ -0,0 +1,75 @@
1
+ import type { Constructable } from '../../app.type.js';
2
+ type FactoryMock<T> = {
3
+ type: Constructable<T> | string;
4
+ value: T;
5
+ };
6
+ type TestContainerSubjects = {
7
+ importFrom?: Constructable<IPackageMock>[];
8
+ mocks?: FactoryMock<unknown>[];
9
+ };
10
+ type TestContainerOptions = {
11
+ factoryTimeoutInMs?: number;
12
+ };
13
+ export interface IPackageMock {
14
+ destroy: () => Promise<void>;
15
+ getMocks: () => FactoryMock<unknown>[];
16
+ init(): Promise<void>;
17
+ }
18
+ /**
19
+ * The TestContainer class is an isolated {@link Container} for tests.
20
+ *
21
+ * :::info Info
22
+ * A test framework like Jest, supports parallel test executions in different cores of the machine.
23
+ * Each test is a single test file, whose `it()` blocks are executed serially.
24
+ * :::
25
+ *
26
+ * TestContainer is created with testing framework's parallel execution in mind.
27
+ * A TestContainer should be created in the `beforeAll()` block of your test,
28
+ * which modifies the Container for the duration of the test.
29
+ * This TestContainer does not affect other tests in parallel since they are on a separate machine core.
30
+ * Once tests are done executing, the `afterAll()` block cleans up the Container.
31
+ */
32
+ export declare class TestContainer {
33
+ private static packageMocks;
34
+ private static createTestFactory;
35
+ /**
36
+ * The `TestContainer.create()` method allows you to mock factories.
37
+ *
38
+ * @example
39
+ * ```ts
40
+ * beforeAll(async () => {
41
+ * await TestContainer.create({
42
+ * importFrom: [OctoAwsCdkPackageMock],
43
+ * mocks: [
44
+ * { type: MyClass, value: jest.fn() },
45
+ * { type: AnotherClass, value: new AnotherClass() },
46
+ * ],
47
+ * }, { factoryTimeoutInMs: 500 });
48
+ * });
49
+ *
50
+ * ```
51
+ * @param subjects The subjects being mocked.
52
+ * - `importFrom` is an array of {@link IPackageMock} classes, to import custom mocks,
53
+ * such as from octo-aws-cdk package - [OctoAwsCdkPackageMock](/api/octo-aws-cdk/class/OctoAwsCdkPackageMock).
54
+ * - `mocks` is an array of objects, to override the default factories.
55
+ * - Use `type: Constructable<T> | string` to identify the class being mocked.
56
+ * - Use `value: T` to provide the mocked value.
57
+ * @param options Options to configure TestContainer.
58
+ * - `factoryTimeoutInMs?: number` is to override the default container timeout.
59
+ */
60
+ static create(subjects: TestContainerSubjects, options?: TestContainerOptions): Promise<void>;
61
+ /**
62
+ * The `TestContainer.reset()` method will completely destroy all factories from the Container.
63
+ * Because the entire Container is destroyed, and not just the mocks,
64
+ * it must always be called in your `afterAll()` block.
65
+ *
66
+ * @example
67
+ * ```ts
68
+ * afterAll(async () => {
69
+ * await TestContainer.reset();
70
+ * });
71
+ * ```
72
+ */
73
+ static reset(): Promise<void>;
74
+ }
75
+ export {};
@@ -0,0 +1,97 @@
1
+ import { Container } from './container.js';
2
+ /**
3
+ * The TestContainer class is an isolated {@link Container} for tests.
4
+ *
5
+ * :::info Info
6
+ * A test framework like Jest, supports parallel test executions in different cores of the machine.
7
+ * Each test is a single test file, whose `it()` blocks are executed serially.
8
+ * :::
9
+ *
10
+ * TestContainer is created with testing framework's parallel execution in mind.
11
+ * A TestContainer should be created in the `beforeAll()` block of your test,
12
+ * which modifies the Container for the duration of the test.
13
+ * This TestContainer does not affect other tests in parallel since they are on a separate machine core.
14
+ * Once tests are done executing, the `afterAll()` block cleans up the Container.
15
+ */
16
+ export class TestContainer {
17
+ static { this.packageMocks = []; }
18
+ static createTestFactory(mock) {
19
+ return class {
20
+ static { this.mock = mock; }
21
+ static async create() {
22
+ return this.mock.value;
23
+ }
24
+ };
25
+ }
26
+ /**
27
+ * The `TestContainer.create()` method allows you to mock factories.
28
+ *
29
+ * @example
30
+ * ```ts
31
+ * beforeAll(async () => {
32
+ * await TestContainer.create({
33
+ * importFrom: [OctoAwsCdkPackageMock],
34
+ * mocks: [
35
+ * { type: MyClass, value: jest.fn() },
36
+ * { type: AnotherClass, value: new AnotherClass() },
37
+ * ],
38
+ * }, { factoryTimeoutInMs: 500 });
39
+ * });
40
+ *
41
+ * ```
42
+ * @param subjects The subjects being mocked.
43
+ * - `importFrom` is an array of {@link IPackageMock} classes, to import custom mocks,
44
+ * such as from octo-aws-cdk package - [OctoAwsCdkPackageMock](/api/octo-aws-cdk/class/OctoAwsCdkPackageMock).
45
+ * - `mocks` is an array of objects, to override the default factories.
46
+ * - Use `type: Constructable<T> | string` to identify the class being mocked.
47
+ * - Use `value: T` to provide the mocked value.
48
+ * @param options Options to configure TestContainer.
49
+ * - `factoryTimeoutInMs?: number` is to override the default container timeout.
50
+ */
51
+ static async create(subjects, options) {
52
+ const oldFactories = { ...Container['factories'] };
53
+ Container.reset();
54
+ if (options?.factoryTimeoutInMs) {
55
+ Container.setFactoryTimeout(options.factoryTimeoutInMs);
56
+ }
57
+ const importedMocks = [];
58
+ for (const mockClass of subjects.importFrom || []) {
59
+ const mock = new mockClass();
60
+ await mock.init();
61
+ importedMocks.push(...mock.getMocks());
62
+ this.packageMocks.push(mock);
63
+ }
64
+ subjects.mocks = [...importedMocks, ...(subjects.mocks || [])];
65
+ for (const mock of subjects.mocks) {
66
+ const mockClassName = typeof mock.type === 'string' ? mock.type : mock.type.name;
67
+ if (!oldFactories[mockClassName]) {
68
+ oldFactories[mockClassName] = { factory: this.createTestFactory(mock) };
69
+ }
70
+ else {
71
+ oldFactories[mockClassName].factory = this.createTestFactory(mock);
72
+ }
73
+ }
74
+ for (const name in oldFactories) {
75
+ Container.registerFactory(name, oldFactories[name].factory);
76
+ }
77
+ }
78
+ /**
79
+ * The `TestContainer.reset()` method will completely destroy all factories from the Container.
80
+ * Because the entire Container is destroyed, and not just the mocks,
81
+ * it must always be called in your `afterAll()` block.
82
+ *
83
+ * @example
84
+ * ```ts
85
+ * afterAll(async () => {
86
+ * await TestContainer.reset();
87
+ * });
88
+ * ```
89
+ */
90
+ static async reset() {
91
+ for (const mock of this.packageMocks) {
92
+ await mock.destroy();
93
+ }
94
+ Container.reset();
95
+ }
96
+ }
97
+ //# sourceMappingURL=test-container.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test-container.js","sourceRoot":"","sources":["../../../src/functions/container/test-container.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAuB3C;;;;;;;;;;;;;GAaG;AACH,MAAM,OAAO,aAAa;aACT,iBAAY,GAAmB,EAAE,CAAC;IAEzC,MAAM,CAAC,iBAAiB,CAAI,IAAoB;QACtD,OAAO;qBACE,SAAI,GAAmB,IAAI,CAAC;YAEnC,MAAM,CAAC,KAAK,CAAC,MAAM;gBACjB,OAAO,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC;YACzB,CAAC;SACF,CAAC;IACJ,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,QAA+B,EAAE,OAA8B;QACjF,MAAM,YAAY,GAAG,EAAE,GAAG,SAAS,CAAC,WAAW,CAAC,EAAE,CAAC;QACnD,SAAS,CAAC,KAAK,EAAE,CAAC;QAElB,IAAI,OAAO,EAAE,kBAAkB,EAAE,CAAC;YAChC,SAAS,CAAC,iBAAiB,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC;QAC1D,CAAC;QAED,MAAM,aAAa,GAA2B,EAAE,CAAC;QACjD,KAAK,MAAM,SAAS,IAAI,QAAQ,CAAC,UAAU,IAAI,EAAE,EAAE,CAAC;YAClD,MAAM,IAAI,GAAG,IAAI,SAAS,EAAE,CAAC;YAC7B,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC;YAElB,aAAa,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;YACvC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC/B,CAAC;QAED,QAAQ,CAAC,KAAK,GAAG,CAAC,GAAG,aAAa,EAAE,GAAG,CAAC,QAAQ,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,CAAC;QAE/D,KAAK,MAAM,IAAI,IAAI,QAAQ,CAAC,KAAK,EAAE,CAAC;YAClC,MAAM,aAAa,GAAG,OAAO,IAAI,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;YACjF,IAAI,CAAC,YAAY,CAAC,aAAa,CAAC,EAAE,CAAC;gBACjC,YAAY,CAAC,aAAa,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,EAAE,CAAC;YAC1E,CAAC;iBAAM,CAAC;gBACN,YAAY,CAAC,aAAa,CAAC,CAAC,OAAO,GAAG,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;YACrE,CAAC;QACH,CAAC;QAED,KAAK,MAAM,IAAI,IAAI,YAAY,EAAE,CAAC;YAChC,SAAS,CAAC,eAAe,CAAC,IAAI,EAAE,YAAY,CAAC,IAAI,CAAC,CAAC,OAA2B,CAAC,CAAC;QAClF,CAAC;IACH,CAAC;IAED;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,KAAK,CAAC,KAAK;QAChB,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,YAAY,EAAE,CAAC;YACrC,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC;QACvB,CAAC;QACD,SAAS,CAAC,KAAK,EAAE,CAAC;IACpB,CAAC"}
@@ -1,5 +1,5 @@
1
- import type { UnknownModel } from '../../app.type.js';
2
- import { type DiffAction } from '../diff/diff.js';
1
+ import type { UnknownNode } from '../../app.type.js';
2
+ import type { DiffAction } from '../diff/diff.js';
3
3
  declare class DependencyBehavior {
4
4
  forAction: DiffAction;
5
5
  onAction: DiffAction;
@@ -28,10 +28,10 @@ export interface IDependency {
28
28
  }
29
29
  export declare class Dependency {
30
30
  private readonly behaviors;
31
- readonly from: UnknownModel;
31
+ readonly from: UnknownNode;
32
32
  private relationship;
33
- readonly to: UnknownModel;
34
- constructor(from: UnknownModel, to: UnknownModel);
33
+ readonly to: UnknownNode;
34
+ constructor(from: UnknownNode, to: UnknownNode);
35
35
  private getBehaviorIndex;
36
36
  addBehavior(onField: string, onAction: DiffAction, toField: string, forAction: DiffAction): void;
37
37
  addChildRelationship(onField: string, toField: string): void;
@@ -47,6 +47,6 @@ export declare class Dependency {
47
47
  } | undefined;
48
48
  removeBehavior(onField: string, onAction: DiffAction, toField: string, forAction: DiffAction): void;
49
49
  synth(): IDependency;
50
- static unSynth(from: UnknownModel, to: UnknownModel, dependency: IDependency): Dependency;
50
+ static unSynth(from: UnknownNode, to: UnknownNode, dependency: IDependency): Dependency;
51
51
  }
52
52
  export {};
@@ -1,8 +1,4 @@
1
1
  class DependencyBehavior {
2
- forAction;
3
- onAction;
4
- onField;
5
- toField;
6
2
  constructor(onField, onAction, toField, forAction) {
7
3
  this.onField = onField;
8
4
  this.onAction = onAction;
@@ -16,11 +12,8 @@ export var DependencyRelationship;
16
12
  DependencyRelationship["PARENT"] = "parent";
17
13
  })(DependencyRelationship || (DependencyRelationship = {}));
18
14
  export class Dependency {
19
- behaviors = [];
20
- from;
21
- relationship;
22
- to;
23
15
  constructor(from, to) {
16
+ this.behaviors = [];
24
17
  this.from = from;
25
18
  this.to = to;
26
19
  }
@@ -1 +1 @@
1
- {"version":3,"file":"dependency.js","sourceRoot":"","sources":["../../../src/functions/dependency/dependency.ts"],"names":[],"mappings":"AAGA,MAAM,kBAAkB;IACtB,SAAS,CAAa;IAEtB,QAAQ,CAAa;IAErB,OAAO,CAAS;IAEhB,OAAO,CAAS;IAEhB,YAAY,OAAe,EAAE,QAAoB,EAAE,OAAe,EAAE,SAAqB;QACvF,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IA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AAC,UAAU,EAAE;SACzB,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,OAAO,CAAC,IAAiB,EAAE,EAAe,EAAE,UAAuB;QACxE,MAAM,aAAa,GAAG,IAAI,UAAU,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QAE/C,UAAU,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;YACjC,aAAa,CAAC,WAAW,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC;QAC3E,CAAC,CAAC,CAAC;QAEH,IAAI,UAAU,CAAC,YAAY,EAAE,CAAC;YAC5B,aAAa,CAAC,YAAY,GAAG,EAAE,GAAG,UAAU,CAAC,YAAY,EAAE,CAAC;QAC9D,CAAC;QAED,OAAO,aAAa,CAAC;IACvB,CAAC;CACF"}
@@ -1,4 +1,4 @@
1
- import type { ActionInputs, ActionOutputs, UnknownModel, UnknownResource } from '../../app.type.js';
1
+ import type { ActionInputs, ActionOutputs, UnknownNode } from '../../app.type.js';
2
2
  import type { IModelAction } from '../../models/model-action.interface.js';
3
3
  import type { IResourceAction } from '../../resources/resource-action.interface.js';
4
4
  import type { Diff, DiffAction } from './diff.js';
@@ -9,11 +9,14 @@ export declare class DiffMetadata {
9
9
  readonly diff: Diff;
10
10
  readonly action: DiffAction;
11
11
  readonly field: string;
12
- readonly model: UnknownModel | UnknownResource;
12
+ readonly node: UnknownNode;
13
13
  readonly value: unknown;
14
14
  readonly inputs: ActionInputs;
15
15
  readonly outputs: ActionOutputs;
16
16
  constructor(diff: Diff, actions: IModelAction[] | IResourceAction[]);
17
+ /**
18
+ * Overrides JSON.serialize() to output a more succinct model of diff-metadata.
19
+ */
17
20
  toJSON(): ReturnType<Diff['toJSON']>;
18
21
  updateInputs(inputs: ActionInputs): void;
19
22
  updateOutputs(outputs: ActionOutputs): void;
@@ -1,15 +1,7 @@
1
1
  export class DiffMetadata {
2
- actions;
3
- applied;
4
- applyOrder;
5
- diff;
6
- action;
7
- field;
8
- model;
9
- value;
10
- inputs = {};
11
- outputs = {};
12
2
  constructor(diff, actions) {
3
+ this.inputs = {};
4
+ this.outputs = {};
13
5
  if (!actions?.length) {
14
6
  throw new Error('No matching action given for diff!');
15
7
  }
@@ -19,9 +11,12 @@ export class DiffMetadata {
19
11
  this.diff = diff;
20
12
  this.action = diff.action;
21
13
  this.field = diff.field;
22
- this.model = diff.model;
14
+ this.node = diff.node;
23
15
  this.value = diff.value;
24
16
  }
17
+ /**
18
+ * Overrides JSON.serialize() to output a more succinct model of diff-metadata.
19
+ */
25
20
  toJSON() {
26
21
  return this.diff.toJSON();
27
22
  }
@@ -1 +1 @@
1
- {"version":3,"file":"diff-metadata.js","sourceRoot":"","sources":["../../../src/functions/diff/diff-metadata.ts"],"names":[],"mappings":"AAKA,MAAM,OAAO,YAAY;IACd,OAAO,CAAqC;IACrD,OAAO,CAAU;IACjB,UAAU,CAAS;IAEV,IAAI,CAAO;IACX,MAAM,CAAa;IACnB,KAAK,CAAS;IACd,KAAK,CAAiC;IACtC,KAAK,CAAU;IAEf,MAAM,GAAiB,EAAE,CAAC;IAC1B,OAAO,GAAkB,EAAE,CAAC;IAErC,YAAY,IAAU,EAAE,OAA2C;QACjE,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,CAAC;YACrB,MAAM,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC;QACxD,CAAC;QAED,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QACrB,IAAI,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC;QAErB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QAC1B,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QACxB,IAAI,CAAC,KAAK,GAA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;QAC/B,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,CAAC;IAED,aAAa,CAAC,OAAsB;QAClC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IACvC,CAAC;CACF"}
@@ -1,4 +1,4 @@
1
- import type { UnknownModel } from '../../app.type.js';
1
+ import type { UnknownNode } from '../../app.type.js';
2
2
  export declare enum DiffAction {
3
3
  ADD = "add",
4
4
  DELETE = "delete",
@@ -8,8 +8,11 @@ export declare enum DiffAction {
8
8
  export declare class Diff {
9
9
  readonly action: DiffAction;
10
10
  readonly field: string;
11
- readonly model: UnknownModel;
11
+ readonly node: UnknownNode;
12
12
  readonly value: unknown;
13
- constructor(model: Diff['model'], action: Diff['action'], field: Diff['field'], value: Diff['value']);
13
+ constructor(node: Diff['node'], action: Diff['action'], field: Diff['field'], value: Diff['value']);
14
+ /**
15
+ * Overrides JSON.serialize() to output a more succinct representation of diff.
16
+ */
14
17
  toJSON(): object;
15
18
  }
@@ -1,5 +1,5 @@
1
- import { AModel } from '../../models/model.abstract.js';
2
1
  import { AAnchor } from '../../overlays/anchor.abstract.js';
2
+ import { ANode } from '../node/node.abstract.js';
3
3
  export var DiffAction;
4
4
  (function (DiffAction) {
5
5
  DiffAction["ADD"] = "add";
@@ -8,23 +8,18 @@ export var DiffAction;
8
8
  DiffAction["UPDATE"] = "update";
9
9
  })(DiffAction || (DiffAction = {}));
10
10
  export class Diff {
11
- action;
12
- field;
13
- model;
14
- value;
15
- constructor(model, action, field, value) {
16
- this.model = model;
11
+ constructor(node, action, field, value) {
12
+ this.node = node;
17
13
  this.action = action;
18
14
  this.field = field;
19
15
  this.value = value;
20
16
  }
17
+ /**
18
+ * Overrides JSON.serialize() to output a more succinct representation of diff.
19
+ */
21
20
  toJSON() {
22
- let model = this.model;
23
- if (model instanceof AModel) {
24
- model = model.getContext();
25
- }
26
21
  let value = this.value;
27
- if (value instanceof AModel) {
22
+ if (value instanceof ANode) {
28
23
  value = value.getContext();
29
24
  }
30
25
  else if (value instanceof AAnchor) {
@@ -33,7 +28,7 @@ export class Diff {
33
28
  return {
34
29
  action: this.action,
35
30
  field: this.field,
36
- model,
31
+ node: this.node.getContext(),
37
32
  value,
38
33
  };
39
34
  }
@@ -1 +1 @@
1
- {"version":3,"file":"diff.js","sourceRoot":"","sources":["../../../src/functions/diff/diff.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,mCAAmC,CAAC;AAE5D,MAAM,CAAN,IAAY,UAKX;AALD,WAAY,UAAU;IACpB,yBAAW,CAAA;IACX,+BAAiB,CAAA;IACjB,iCAAmB,CAAA;IACnB,+BAAiB,CAAA;AACnB,CAAC,EALW,UAAU,KAAV,UAAU,QAKrB;AAED,MAAM,OAAO,IAAI;IACN,MAAM,CAAa;IAEnB,KAAK,CAAS;IAEd,KAAK,CAAe;IAEpB,KAAK,CAAU;IAExB,YAAY,KAAoB,EAAE,MAAsB,EAAE,KAAoB,EAAE,KAAoB;QAClG,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IAKD,MAAM;QACJ,IAAI,KAAK,GAAY,IAAI,CAAC,KAAK,CAAC;QAChC,IAAI,KAAK,YAAY,MAAM,EAAE,CAAC;YAC5B,KAAK,GAAG,KAAK,CAAC,UAAU,EAAE,CAAC;QAC7B,CAAC;QAED,IAAI,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QACvB,IAAI,KAAK,YAAY,MAAM,EAAE,CAAC;YAC5B,KAAK,GAAG,KAAK,CAAC,UAAU,EAAE,CAAC;QAC7B,CAAC;aAAM,IAAI,KAAK,YA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