@supernova-studio/pulsar-core 1.0.8 → 1.0.11

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 (217) hide show
  1. package/build/browser/pulsar.js +141629 -0
  2. package/build/browser/pulsar.min.js +270 -0
  3. package/build/main/browser-bundle.d.ts +1 -0
  4. package/build/main/browser-bundle.js +16 -0
  5. package/build/main/browser-bundle.js.map +1 -0
  6. package/build/main/engine/ExportEngine.d.ts +17 -0
  7. package/build/main/engine/ExportEngine.js +122 -0
  8. package/build/main/engine/ExportEngine.js.map +1 -0
  9. package/build/main/engine/configuration/ExportConfiguration.d.ts +18 -0
  10. package/build/main/engine/configuration/ExportConfiguration.js +47 -0
  11. package/build/main/engine/configuration/ExportConfiguration.js.map +1 -0
  12. package/build/main/engine/generation/ExportDataProducer.d.ts +15 -0
  13. package/build/main/engine/generation/ExportDataProducer.js +100 -0
  14. package/build/main/engine/generation/ExportDataProducer.js.map +1 -0
  15. package/build/main/engine/generation/queue/ExportDataQueue.d.ts +16 -0
  16. package/build/main/engine/generation/queue/ExportDataQueue.js +72 -0
  17. package/build/main/engine/generation/queue/ExportDataQueue.js.map +1 -0
  18. package/build/main/engine/generation/queue/ExportDataQueueOperation.d.ts +6 -0
  19. package/build/main/engine/generation/queue/ExportDataQueueOperation.js +36 -0
  20. package/build/main/engine/generation/queue/ExportDataQueueOperation.js.map +1 -0
  21. package/build/main/engine/generation/requests/ExportDataEmittedResponseProducer.d.ts +7 -0
  22. package/build/main/engine/generation/requests/ExportDataEmittedResponseProducer.js +54 -0
  23. package/build/main/engine/generation/requests/ExportDataEmittedResponseProducer.js.map +1 -0
  24. package/build/main/engine/generation/requests/ExportDataPrimaryResponseProducer.d.ts +7 -0
  25. package/build/main/engine/generation/requests/ExportDataPrimaryResponseProducer.js +40 -0
  26. package/build/main/engine/generation/requests/ExportDataPrimaryResponseProducer.js.map +1 -0
  27. package/build/main/engine/generation/requests/ExportDataRequest.d.ts +19 -0
  28. package/build/main/engine/generation/requests/ExportDataRequest.js +55 -0
  29. package/build/main/engine/generation/requests/ExportDataRequest.js.map +1 -0
  30. package/build/main/engine/generation/requests/ExportDataRequestDataStore.d.ts +16 -0
  31. package/build/main/engine/generation/requests/ExportDataRequestDataStore.js +57 -0
  32. package/build/main/engine/generation/requests/ExportDataRequestDataStore.js.map +1 -0
  33. package/build/main/engine/generation/requests/ExportDataRequestNameStore.d.ts +22 -0
  34. package/build/main/engine/generation/requests/ExportDataRequestNameStore.js +86 -0
  35. package/build/main/engine/generation/requests/ExportDataRequestNameStore.js.map +1 -0
  36. package/build/main/engine/generation/requests/ExportDataRequestProducer.d.ts +16 -0
  37. package/build/main/engine/generation/requests/ExportDataRequestProducer.js +149 -0
  38. package/build/main/engine/generation/requests/ExportDataRequestProducer.js.map +1 -0
  39. package/build/main/engine/generation/requests/ExportDataResponse.d.ts +13 -0
  40. package/build/main/engine/generation/requests/ExportDataResponse.js +30 -0
  41. package/build/main/engine/generation/requests/ExportDataResponse.js.map +1 -0
  42. package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestBlueprint.d.ts +14 -0
  43. package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestBlueprint.js +76 -0
  44. package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestBlueprint.js.map +1 -0
  45. package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestDSMComponent.d.ts +13 -0
  46. package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestDSMComponent.js +47 -0
  47. package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestDSMComponent.js.map +1 -0
  48. package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestDSMComponentGroup.d.ts +13 -0
  49. package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestDSMComponentGroup.js +47 -0
  50. package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestDSMComponentGroup.js.map +1 -0
  51. package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestDSMGeneric.d.ts +11 -0
  52. package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestDSMGeneric.js +43 -0
  53. package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestDSMGeneric.js.map +1 -0
  54. package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestDSMTheme.d.ts +13 -0
  55. package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestDSMTheme.js +47 -0
  56. package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestDSMTheme.js.map +1 -0
  57. package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestDSMTokenGroup.d.ts +13 -0
  58. package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestDSMTokenGroup.js +47 -0
  59. package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestDSMTokenGroup.js.map +1 -0
  60. package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestDSMTokenType.d.ts +13 -0
  61. package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestDSMTokenType.js +47 -0
  62. package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestDSMTokenType.js.map +1 -0
  63. package/build/main/engine/items/ExportItemProducer.d.ts +14 -0
  64. package/build/main/engine/items/ExportItemProducer.js +70 -0
  65. package/build/main/engine/items/ExportItemProducer.js.map +1 -0
  66. package/build/main/engine/items/construction/ExportItem.d.ts +8 -0
  67. package/build/main/engine/items/construction/ExportItem.js +25 -0
  68. package/build/main/engine/items/construction/ExportItem.js.map +1 -0
  69. package/build/main/engine/items/construction/ExportItemBuilder.d.ts +9 -0
  70. package/build/main/engine/items/construction/ExportItemBuilder.js +43 -0
  71. package/build/main/engine/items/construction/ExportItemBuilder.js.map +1 -0
  72. package/build/main/engine/items/queue/ExportItemQueue.d.ts +16 -0
  73. package/build/main/engine/items/queue/ExportItemQueue.js +70 -0
  74. package/build/main/engine/items/queue/ExportItemQueue.js.map +1 -0
  75. package/build/main/engine/items/queue/ExportItemQueueOperation.d.ts +6 -0
  76. package/build/main/engine/items/queue/ExportItemQueueOperation.js +36 -0
  77. package/build/main/engine/items/queue/ExportItemQueueOperation.js.map +1 -0
  78. package/build/main/engine/items/requests/ExportItemRequest.d.ts +16 -0
  79. package/build/main/engine/items/requests/ExportItemRequest.js +68 -0
  80. package/build/main/engine/items/requests/ExportItemRequest.js.map +1 -0
  81. package/build/main/engine/items/requests/ExportItemRequestProducer.d.ts +8 -0
  82. package/build/main/engine/items/requests/ExportItemRequestProducer.js +24 -0
  83. package/build/main/engine/items/requests/ExportItemRequestProducer.js.map +1 -0
  84. package/build/main/engine/items/requests/ExportItemResponse.d.ts +9 -0
  85. package/build/main/engine/items/requests/ExportItemResponse.js +25 -0
  86. package/build/main/engine/items/requests/ExportItemResponse.js.map +1 -0
  87. package/build/main/engine/items/requests/ExportItemResponseProducer.d.ts +7 -0
  88. package/build/main/engine/items/requests/ExportItemResponseProducer.js +45 -0
  89. package/build/main/engine/items/requests/ExportItemResponseProducer.js.map +1 -0
  90. package/build/main/engine/loaders/BlueprintLoader.d.ts +9 -0
  91. package/build/main/engine/loaders/BlueprintLoader.js +55 -0
  92. package/build/main/engine/loaders/BlueprintLoader.js.map +1 -0
  93. package/build/main/engine/writing/queue/ExportWriterQueue.d.ts +16 -0
  94. package/build/main/engine/writing/queue/ExportWriterQueue.js +70 -0
  95. package/build/main/engine/writing/queue/ExportWriterQueue.js.map +1 -0
  96. package/build/main/engine/writing/queue/ExportWriterQueueOperation.d.ts +6 -0
  97. package/build/main/engine/writing/queue/ExportWriterQueueOperation.js +36 -0
  98. package/build/main/engine/writing/queue/ExportWriterQueueOperation.js.map +1 -0
  99. package/build/main/engine/writing/requests/ExportWriterRequest.d.ts +14 -0
  100. package/build/main/engine/writing/requests/ExportWriterRequest.js +40 -0
  101. package/build/main/engine/writing/requests/ExportWriterRequest.js.map +1 -0
  102. package/build/main/engine/writing/requests/ExportWriterRequestProducer.d.ts +8 -0
  103. package/build/main/engine/writing/requests/ExportWriterRequestProducer.js +30 -0
  104. package/build/main/engine/writing/requests/ExportWriterRequestProducer.js.map +1 -0
  105. package/build/main/engine/writing/requests/ExportWriterResponse.d.ts +9 -0
  106. package/build/main/engine/writing/requests/ExportWriterResponse.js +25 -0
  107. package/build/main/engine/writing/requests/ExportWriterResponse.js.map +1 -0
  108. package/build/main/engine/writing/requests/ExportWriterResponseProducer.d.ts +7 -0
  109. package/build/main/engine/writing/requests/ExportWriterResponseProducer.js +40 -0
  110. package/build/main/engine/writing/requests/ExportWriterResponseProducer.js.map +1 -0
  111. package/build/main/engine/writing/writers/ExportItemWriter.d.ts +14 -0
  112. package/build/main/engine/writing/writers/ExportItemWriter.js +70 -0
  113. package/build/main/engine/writing/writers/ExportItemWriter.js.map +1 -0
  114. package/build/main/engine/writing/writers/ExportWriterRuleProcessor.d.ts +9 -0
  115. package/build/main/engine/writing/writers/ExportWriterRuleProcessor.js +63 -0
  116. package/build/main/engine/writing/writers/ExportWriterRuleProcessor.js.map +1 -0
  117. package/build/main/engine/writing/writers/memory/ExportWriterMemory.d.ts +4 -0
  118. package/build/main/engine/writing/writers/memory/ExportWriterMemory.js +29 -0
  119. package/build/main/engine/writing/writers/memory/ExportWriterMemory.js.map +1 -0
  120. package/build/main/engine/writing/writers/memory/ExportWriterMemoryRequest.d.ts +5 -0
  121. package/build/main/engine/writing/writers/memory/ExportWriterMemoryRequest.js +59 -0
  122. package/build/main/engine/writing/writers/memory/ExportWriterMemoryRequest.js.map +1 -0
  123. package/build/main/engine/writing/writers/memory/ExportWriterStore.d.ts +5 -0
  124. package/build/main/engine/writing/writers/memory/ExportWriterStore.js +33 -0
  125. package/build/main/engine/writing/writers/memory/ExportWriterStore.js.map +1 -0
  126. package/build/main/exports.d.ts +4 -0
  127. package/build/main/exports.js +13 -0
  128. package/build/main/exports.js.map +1 -0
  129. package/build/main/index.d.ts +1 -0
  130. package/build/main/index.js +14 -0
  131. package/build/main/index.js.map +1 -0
  132. package/build/main/model/dsm/DSMReferenceStore.d.ts +28 -0
  133. package/build/main/model/dsm/DSMReferenceStore.js +100 -0
  134. package/build/main/model/dsm/DSMReferenceStore.js.map +1 -0
  135. package/build/main/model/exporters/Exporter.d.ts +51 -0
  136. package/build/main/model/exporters/Exporter.js +98 -0
  137. package/build/main/model/exporters/Exporter.js.map +1 -0
  138. package/build/main/model/maps/ExporterMapBlueprint.d.ts +12 -0
  139. package/build/main/model/maps/ExporterMapBlueprint.js +39 -0
  140. package/build/main/model/maps/ExporterMapBlueprint.js.map +1 -0
  141. package/build/main/model/sources/ExporterSource.d.ts +25 -0
  142. package/build/main/model/sources/ExporterSource.js +58 -0
  143. package/build/main/model/sources/ExporterSource.js.map +1 -0
  144. package/build/main/pulsar/Pulsar.d.ts +105 -0
  145. package/build/main/pulsar/Pulsar.js +351 -0
  146. package/build/main/pulsar/Pulsar.js.map +1 -0
  147. package/build/main/pulsar/PulsarInterface.d.ts +152 -0
  148. package/build/main/pulsar/PulsarInterface.js +37 -0
  149. package/build/main/pulsar/PulsarInterface.js.map +1 -0
  150. package/build/main/pulsar/PulsarStaticAnalysis.d.ts +23 -0
  151. package/build/main/pulsar/PulsarStaticAnalysis.js +47 -0
  152. package/build/main/pulsar/PulsarStaticAnalysis.js.map +1 -0
  153. package/build/main/pulsar/PulsarStaticAnalysisInterface.d.ts +10 -0
  154. package/build/main/pulsar/PulsarStaticAnalysisInterface.js +10 -0
  155. package/build/main/pulsar/PulsarStaticAnalysisInterface.js.map +1 -0
  156. package/build/main/pulsar/managers/PulsarBlueprintManager.d.ts +16 -0
  157. package/build/main/pulsar/managers/PulsarBlueprintManager.js +76 -0
  158. package/build/main/pulsar/managers/PulsarBlueprintManager.js.map +1 -0
  159. package/build/main/pulsar/managers/PulsarCIManager.d.ts +25 -0
  160. package/build/main/pulsar/managers/PulsarCIManager.js +220 -0
  161. package/build/main/pulsar/managers/PulsarCIManager.js.map +1 -0
  162. package/build/main/pulsar/managers/PulsarCodeManager.d.ts +24 -0
  163. package/build/main/pulsar/managers/PulsarCodeManager.js +180 -0
  164. package/build/main/pulsar/managers/PulsarCodeManager.js.map +1 -0
  165. package/build/main/pulsar/managers/PulsarConfigurationManager.d.ts +16 -0
  166. package/build/main/pulsar/managers/PulsarConfigurationManager.js +48 -0
  167. package/build/main/pulsar/managers/PulsarConfigurationManager.js.map +1 -0
  168. package/build/main/pulsar/managers/PulsarExporterManager.d.ts +25 -0
  169. package/build/main/pulsar/managers/PulsarExporterManager.js +121 -0
  170. package/build/main/pulsar/managers/PulsarExporterManager.js.map +1 -0
  171. package/build/main/pulsar/managers/generators/PulsarExporterJSONGenerator.d.ts +16 -0
  172. package/build/main/pulsar/managers/generators/PulsarExporterJSONGenerator.js +272 -0
  173. package/build/main/pulsar/managers/generators/PulsarExporterJSONGenerator.js.map +1 -0
  174. package/build/main/pulsar/managers/generators/PulsarExporterZIPGenerator.d.ts +7 -0
  175. package/build/main/pulsar/managers/generators/PulsarExporterZIPGenerator.js +63 -0
  176. package/build/main/pulsar/managers/generators/PulsarExporterZIPGenerator.js.map +1 -0
  177. package/build/main/pulsar/managers/loaders/PulsarBaseLoader.d.ts +5 -0
  178. package/build/main/pulsar/managers/loaders/PulsarBaseLoader.js +28 -0
  179. package/build/main/pulsar/managers/loaders/PulsarBaseLoader.js.map +1 -0
  180. package/build/main/pulsar/managers/loaders/local/PulsarFSLoader.d.ts +11 -0
  181. package/build/main/pulsar/managers/loaders/local/PulsarFSLoader.js +97 -0
  182. package/build/main/pulsar/managers/loaders/local/PulsarFSLoader.js.map +1 -0
  183. package/build/main/pulsar/managers/loaders/memory/PulsarExporterJSONLoader.d.ts +9 -0
  184. package/build/main/pulsar/managers/loaders/memory/PulsarExporterJSONLoader.js +81 -0
  185. package/build/main/pulsar/managers/loaders/memory/PulsarExporterJSONLoader.js.map +1 -0
  186. package/build/main/pulsar/managers/loaders/memory/PulsarExporterMemoryLoader.d.ts +20 -0
  187. package/build/main/pulsar/managers/loaders/memory/PulsarExporterMemoryLoader.js +183 -0
  188. package/build/main/pulsar/managers/loaders/memory/PulsarExporterMemoryLoader.js.map +1 -0
  189. package/build/main/pulsar/managers/loaders/remote/PulsarExporterGitHubLoader.d.ts +12 -0
  190. package/build/main/pulsar/managers/loaders/remote/PulsarExporterGitHubLoader.js +143 -0
  191. package/build/main/pulsar/managers/loaders/remote/PulsarExporterGitHubLoader.js.map +1 -0
  192. package/build/main/pulsar/managers/loaders/remote/PulsarExporterZIPLoader.d.ts +12 -0
  193. package/build/main/pulsar/managers/loaders/remote/PulsarExporterZIPLoader.js +115 -0
  194. package/build/main/pulsar/managers/loaders/remote/PulsarExporterZIPLoader.js.map +1 -0
  195. package/build/main/tests/TestConfiguration.d.ts +9 -0
  196. package/build/main/tests/TestConfiguration.js +25 -0
  197. package/build/main/tests/TestConfiguration.js.map +1 -0
  198. package/build/main/tests/casebuilders/ci.d.ts +12 -0
  199. package/build/main/tests/casebuilders/ci.js +38 -0
  200. package/build/main/tests/casebuilders/ci.js.map +1 -0
  201. package/build/main/tests/casebuilders/configuration.d.ts +5 -0
  202. package/build/main/tests/casebuilders/configuration.js +25 -0
  203. package/build/main/tests/casebuilders/configuration.js.map +1 -0
  204. package/build/main/tests/casebuilders/dsm.d.ts +7 -0
  205. package/build/main/tests/casebuilders/dsm.js +57 -0
  206. package/build/main/tests/casebuilders/dsm.js.map +1 -0
  207. package/build/main/tests/casebuilders/modelObjects.d.ts +13 -0
  208. package/build/main/tests/casebuilders/modelObjects.js +120 -0
  209. package/build/main/tests/casebuilders/modelObjects.js.map +1 -0
  210. package/build/main/tools/Logger.d.ts +27 -0
  211. package/build/main/tools/Logger.js +98 -0
  212. package/build/main/tools/Logger.js.map +1 -0
  213. package/build/main/tools/LoggerDefaultMessages.d.ts +13 -0
  214. package/build/main/tools/LoggerDefaultMessages.js +41 -0
  215. package/build/main/tools/LoggerDefaultMessages.js.map +1 -0
  216. package/build/tsconfig.tsbuildinfo +2829 -0
  217. package/package.json +9 -3
@@ -0,0 +1,19 @@
1
+ import { PCExportConfiguration } from '../../configuration/ExportConfiguration';
2
+ import { PCExporterMapBlueprint } from './../../../model/maps/ExporterMapBlueprint';
3
+ import { PCExportDataRequestDataStore } from './ExportDataRequestDataStore';
4
+ import { PCExportDataRequestNameStore } from './ExportDataRequestNameStore';
5
+ import { PLEmittedContent } from '@supernova-studio/pulsar-language';
6
+ export declare class PCExportDataRequest {
7
+ dataStore: PCExportDataRequestDataStore | null;
8
+ nameStore: PCExportDataRequestNameStore | null;
9
+ emittedContent: Array<PLEmittedContent> | null;
10
+ map: PCExporterMapBlueprint;
11
+ configuration: PCExportConfiguration;
12
+ processingError: Error | null;
13
+ processingFinished: boolean;
14
+ constructor(configuration: PCExportConfiguration, map: PCExporterMapBlueprint);
15
+ produceData(): Promise<PCExportDataRequest>;
16
+ requestSuccesfullGeneratingPlainData(plainData: any, nameData: Map<string, any>, emittedContent: Array<PLEmittedContent>): void;
17
+ requestSuccessfullGeneratingMultipartData(multipartData: Map<string, any>, multipartNameData: Map<string, Map<string, any>>, emittedContent: Array<PLEmittedContent>): void;
18
+ requestFailed(error: Error): void;
19
+ }
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ //
3
+ // PCExportDataRequest.ts
4
+ // Supernova
5
+ //
6
+ // Created by Jiri Trecak.
7
+ // Copyright © 2020 Jiri Trecak. All rights reserved.
8
+ //
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.PCExportDataRequest = void 0;
11
+ const ExportDataRequestDataStore_1 = require("./ExportDataRequestDataStore");
12
+ const ExportDataRequestNameStore_1 = require("./ExportDataRequestNameStore");
13
+ // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
14
+ // MARK: - Definitions
15
+ // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
16
+ // MARK: - Object definition
17
+ class PCExportDataRequest {
18
+ // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
19
+ // MARK: - Init
20
+ constructor(configuration, map) {
21
+ // States
22
+ this.processingError = null;
23
+ this.processingFinished = false;
24
+ this.map = map;
25
+ this.configuration = configuration;
26
+ }
27
+ // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
28
+ // MARK: - Content production
29
+ produceData() {
30
+ throw Error('Content must be produced by each individual subclass');
31
+ }
32
+ // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
33
+ // MARK: - Request handling
34
+ requestSuccesfullGeneratingPlainData(plainData, nameData, emittedContent) {
35
+ this.processingFinished = true;
36
+ this.dataStore = ExportDataRequestDataStore_1.PCExportDataRequestDataStore.storeWithPlainData(plainData);
37
+ this.nameStore = ExportDataRequestNameStore_1.PCExportDataRequestNameStore.storeWithPlainData(nameData);
38
+ this.emittedContent = emittedContent;
39
+ // this.responseHandler?(true, this.dataStore, emittedContent, nil)
40
+ }
41
+ requestSuccessfullGeneratingMultipartData(multipartData, multipartNameData, emittedContent) {
42
+ this.processingFinished = true;
43
+ this.dataStore = ExportDataRequestDataStore_1.PCExportDataRequestDataStore.storeWithMultipartData(multipartData);
44
+ this.nameStore = ExportDataRequestNameStore_1.PCExportDataRequestNameStore.storeWithMultipartData(multipartNameData);
45
+ this.emittedContent = emittedContent;
46
+ // this.responseHandler?(true, this.dataStore, emittedContent, nil)
47
+ }
48
+ requestFailed(error) {
49
+ this.processingFinished = true;
50
+ this.processingError = error;
51
+ // this.responseHandler?(false, nil, [], error)
52
+ }
53
+ }
54
+ exports.PCExportDataRequest = PCExportDataRequest;
55
+ //# sourceMappingURL=ExportDataRequest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExportDataRequest.js","sourceRoot":"","sources":["../../../../../src/engine/generation/requests/ExportDataRequest.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,aAAa;AACb,EAAE;AACF,2BAA2B;AAC3B,sDAAsD;AACtD,EAAE;;;AAOF,6EAA2E;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B,+CAA+C;IACjD,CAAC;CACF;AAlED,kDAkEC"}
@@ -0,0 +1,16 @@
1
+ export declare enum PCExportDataRequestDataStoreMode {
2
+ plain = 0,
3
+ multipart = 1
4
+ }
5
+ export declare class PCExportDataRequestDataStore {
6
+ plainDataKey: string;
7
+ dataStore: Map<string, any>;
8
+ mode: PCExportDataRequestDataStoreMode;
9
+ static storeWithPlainData(data: any): PCExportDataRequestDataStore;
10
+ static storeWithMultipartData(data: Map<string, any>): PCExportDataRequestDataStore;
11
+ constructor(mode: PCExportDataRequestDataStoreMode);
12
+ /** Plain data. Note that if data was created using "multipart" mode, exception will be thrown */
13
+ plainData(): any;
14
+ /** Multipart data. Note that is data was created using "plain" mode, this will still work. Use .plainDataKey property to access the stored data in that case */
15
+ multipartData(): Map<string, any>;
16
+ }
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ //
3
+ // PCExportDataRequestDataStore.ts
4
+ // Supernova
5
+ //
6
+ // Created by Jiri Trecak.
7
+ // Copyright © 2020 Jiri Trecak. All rights reserved.
8
+ //
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.PCExportDataRequestDataStore = exports.PCExportDataRequestDataStoreMode = void 0;
11
+ // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
12
+ // MARK: - Imports
13
+ var PCExportDataRequestDataStoreMode;
14
+ (function (PCExportDataRequestDataStoreMode) {
15
+ PCExportDataRequestDataStoreMode[PCExportDataRequestDataStoreMode["plain"] = 0] = "plain";
16
+ PCExportDataRequestDataStoreMode[PCExportDataRequestDataStoreMode["multipart"] = 1] = "multipart";
17
+ })(PCExportDataRequestDataStoreMode = exports.PCExportDataRequestDataStoreMode || (exports.PCExportDataRequestDataStoreMode = {}));
18
+ // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
19
+ // MARK: - Definitions
20
+ // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
21
+ // MARK: - Object definition
22
+ class PCExportDataRequestDataStore {
23
+ constructor(mode) {
24
+ // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
25
+ // MARK: - Definitions
26
+ this.plainDataKey = '_plain_data';
27
+ this.mode = mode;
28
+ this.dataStore = new Map();
29
+ }
30
+ // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
31
+ // MARK: - Init
32
+ static storeWithPlainData(data) {
33
+ let store = new PCExportDataRequestDataStore(PCExportDataRequestDataStoreMode.plain);
34
+ store.dataStore.set(store.plainDataKey, data);
35
+ return store;
36
+ }
37
+ static storeWithMultipartData(data) {
38
+ let store = new PCExportDataRequestDataStore(PCExportDataRequestDataStoreMode.multipart);
39
+ store.dataStore = data;
40
+ return store;
41
+ }
42
+ // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
43
+ // MARK: - Data retrieval
44
+ /** Plain data. Note that if data was created using "multipart" mode, exception will be thrown */
45
+ plainData() {
46
+ if (this.mode === PCExportDataRequestDataStoreMode.multipart) {
47
+ throw Error('Using plain data in multipart store is prohibited');
48
+ }
49
+ return this.dataStore.get(this.plainDataKey);
50
+ }
51
+ /** Multipart data. Note that is data was created using "plain" mode, this will still work. Use .plainDataKey property to access the stored data in that case */
52
+ multipartData() {
53
+ return this.dataStore;
54
+ }
55
+ }
56
+ exports.PCExportDataRequestDataStore = PCExportDataRequestDataStore;
57
+ //# sourceMappingURL=ExportDataRequestDataStore.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExportDataRequestDataStore.js","sourceRoot":"","sources":["../../../../../src/engine/generation/requests/ExportDataRequestDataStore.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,mCAAmC;AACnC,aAAa;AACb,EAAE;AACF,2BAA2B;AAC3B,sDAAsD;AACtD,EAAE;;;AAEF,8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C;CACF;AAhDD,oEAgDC"}
@@ -0,0 +1,22 @@
1
+ export declare enum PCExportDataRequestNameStoreMode {
2
+ plain = 0,
3
+ multipart = 1,
4
+ resolved = 2
5
+ }
6
+ export declare class PCExportDataRequestNameStore {
7
+ plainDataKey: string;
8
+ resolvedDataKey: string;
9
+ nameStore: Map<string, Map<string, any>>;
10
+ mode: PCExportDataRequestNameStoreMode;
11
+ constructor(mode: PCExportDataRequestNameStoreMode);
12
+ static storeWithResolvedName(name: string): PCExportDataRequestNameStore;
13
+ static storeWithPlainData(data: Map<string, any>): PCExportDataRequestNameStore;
14
+ static storeWithMultipartData(data: Map<string, any>): PCExportDataRequestNameStore;
15
+ plainData(): Map<string, any>;
16
+ multipartData(): Map<string, Map<string, any>>;
17
+ resolvedData(): string;
18
+ checkInCorrectMode(mode: PCExportDataRequestNameStoreMode): boolean;
19
+ isPlain(): boolean;
20
+ isMultipart(): boolean;
21
+ isResolved(): boolean;
22
+ }
@@ -0,0 +1,86 @@
1
+ "use strict";
2
+ //
3
+ // PCExportDataRequestNameStore.ts
4
+ // Supernova
5
+ //
6
+ // Created by Jiri Trecak.
7
+ // Copyright © 2020 Jiri Trecak. All rights reserved.
8
+ //
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.PCExportDataRequestNameStore = exports.PCExportDataRequestNameStoreMode = void 0;
11
+ // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
12
+ // MARK: - Imports
13
+ var PCExportDataRequestNameStoreMode;
14
+ (function (PCExportDataRequestNameStoreMode) {
15
+ PCExportDataRequestNameStoreMode[PCExportDataRequestNameStoreMode["plain"] = 0] = "plain";
16
+ PCExportDataRequestNameStoreMode[PCExportDataRequestNameStoreMode["multipart"] = 1] = "multipart";
17
+ PCExportDataRequestNameStoreMode[PCExportDataRequestNameStoreMode["resolved"] = 2] = "resolved";
18
+ })(PCExportDataRequestNameStoreMode = exports.PCExportDataRequestNameStoreMode || (exports.PCExportDataRequestNameStoreMode = {}));
19
+ // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
20
+ // MARK: - Definitions
21
+ // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
22
+ // MARK: - Object definition
23
+ class PCExportDataRequestNameStore {
24
+ // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
25
+ // MARK: - Init
26
+ constructor(mode) {
27
+ // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
28
+ // MARK: - Definitions
29
+ this.plainDataKey = '_plain_data';
30
+ this.resolvedDataKey = '_resolved_name';
31
+ this.mode = mode;
32
+ this.nameStore = new Map();
33
+ }
34
+ static storeWithResolvedName(name) {
35
+ let store = new PCExportDataRequestNameStore(PCExportDataRequestNameStoreMode.resolved);
36
+ let data = new Map();
37
+ data.set(store.plainDataKey, name);
38
+ store.nameStore.set(store.resolvedDataKey, data);
39
+ return store;
40
+ }
41
+ static storeWithPlainData(data) {
42
+ let store = new PCExportDataRequestNameStore(PCExportDataRequestNameStoreMode.plain);
43
+ store.nameStore.set(store.plainDataKey, data);
44
+ return store;
45
+ }
46
+ static storeWithMultipartData(data) {
47
+ let store = new PCExportDataRequestNameStore(PCExportDataRequestNameStoreMode.multipart);
48
+ store.nameStore = data;
49
+ return store;
50
+ }
51
+ // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
52
+ // MARK: - Data retrieval
53
+ /// Plain data. Note that if data was created using "multipart" mode, exception will be thrown
54
+ plainData() {
55
+ this.checkInCorrectMode(PCExportDataRequestNameStoreMode.plain);
56
+ return this.nameStore.get(this.plainDataKey);
57
+ }
58
+ /// Multipart data. Note that is data was created using "plain" mode, this will still work. Use .plainDataKey property to
59
+ multipartData() {
60
+ this.checkInCorrectMode(PCExportDataRequestNameStoreMode.multipart);
61
+ return this.nameStore;
62
+ }
63
+ /// Resolved name. This is only available for mode "resolved" and signifies that store shouldn't be used for partial resolution but instead provides fully resolved data
64
+ resolvedData() {
65
+ this.checkInCorrectMode(PCExportDataRequestNameStoreMode.resolved);
66
+ let resolvedStore = this.nameStore.get(this.resolvedDataKey);
67
+ return resolvedStore.get(this.plainDataKey);
68
+ }
69
+ checkInCorrectMode(mode) {
70
+ if (this.mode !== mode) {
71
+ throw Error(`Using data mode ${mode} is prohibited in store that was created as ${this.mode}`);
72
+ }
73
+ return true;
74
+ }
75
+ isPlain() {
76
+ return this.mode === PCExportDataRequestNameStoreMode.plain;
77
+ }
78
+ isMultipart() {
79
+ return this.mode === PCExportDataRequestNameStoreMode.multipart;
80
+ }
81
+ isResolved() {
82
+ return this.mode === PCExportDataRequestNameStoreMode.resolved;
83
+ }
84
+ }
85
+ exports.PCExportDataRequestNameStore = PCExportDataRequestNameStore;
86
+ //# sourceMappingURL=ExportDataRequestNameStore.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExportDataRequestNameStore.js","sourceRoot":"","sources":["../../../../../src/engine/generation/requests/ExportDataRequestNameStore.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,mCAAmC;AACnC,aAAa;AACb,EAAE;AACF,2BAA2B;AAC3B,sDAAsD;AACtD,EAAE;;;AAEF,8GAA8G;AAC9G,kBAAkB;AAElB,IAAY,gCAIX;AAJD,WAAY,gCAAgC;IAC1C,yFAAK,CAAA;IACL,iGAAS,CAAA;IACT,+FAAQ,CAAA;AACV,CAAC,EAJW,gCAAgC,GAAhC,wCAAgC,KAAhC,wCAAgC,QAI3C;AAED,8GAA8G;AAC9G,sBAAsB;AAEtB,8GAA8G;AAC9G,4BAA4B;AAE5B,MAAa,4BAA4B;IAcvC,8GAA8G;IAC9G,eAAe;IAEf,YAAY,IAAsC;QAhBlD,8GAA8G;QAC9G,sBAAsB;QAEtB,iBAAY,GAAW,aAAa,CAAA;QACpC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nE,OAAO,IAAI,CAAC,SAAS,CAAA;IACvB,CAAC;IAED,wKAAwK;IACxK,YAAY;QACV,IAAI,CAAC,kBAAkB,CAAC,gCAAgC,CAAC,QAAQ,CAAC,CAAA;QAClE,IAAI,aAAa,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,eAAe,CAAC,CAAA;QAC5D,OAAO,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC,CAAA;IAC7C,CAAC;IAED,kBAAkB,CAAC,IAAsC;QACvD,IAAI,IAAI,CAAC,IAAI,KAAK,IAAI,EAAE;YACtB,MAAM,KAAK,CAAC,mBAAmB,IAAI,+CAA+C,IAAI,CAAC,IAAI,EAAE,CAAC,CAAA;SAC/F;QAED,OAAO,IAAI,CAAA;IACb,CAAC;IAED,OAAO;QACL,OAAO,IAAI,CAAC,IAAI,KAAK,gCAAgC,CAAC,KAAK,CAAA;IAC7D,CAAC;IAED,WAAW;QACT,OAAO,IAAI,CAAC,IAAI,KAAK,gCAAgC,CAAC,SAAS,CAAA;IACjE,CAAC;IAED,UAAU;QACR,OAAO,IAAI,CAAC,IAAI,KAAK,gCAAgC,CAAC,QAAQ,CAAA;IAChE,CAAC;CACF;AAtFD,oEAsFC"}
@@ -0,0 +1,16 @@
1
+ import { PCExportConfiguration } from '../../configuration/ExportConfiguration';
2
+ import { PCExportDataRequest } from './ExportDataRequest';
3
+ import { PCExporterSource } from '../../../model/sources/ExporterSource';
4
+ import { PCExporterMapBlueprint } from '../../../model/maps/ExporterMapBlueprint';
5
+ export declare class PCExportDataRequestProducer {
6
+ configuration: PCExportConfiguration;
7
+ constructor(exportConfiguration: PCExportConfiguration);
8
+ produceRequestsForMap(map: PCExporterMapBlueprint): Array<PCExportDataRequest>;
9
+ createExporterEntryDSMDataRequest(source: PCExporterSource, map: PCExporterMapBlueprint): Array<PCExportDataRequest>;
10
+ createExporterEntryRequestsForDSMGenericOption(source: PCExporterSource, map: PCExporterMapBlueprint): Array<PCExportDataRequest>;
11
+ createExporterEntryRequestsForDSMComponentOption(source: PCExporterSource, map: PCExporterMapBlueprint): Array<PCExportDataRequest>;
12
+ createExporterEntryRequestsForDSMComponentGroupOption(source: PCExporterSource, map: PCExporterMapBlueprint): Array<PCExportDataRequest>;
13
+ createExporterEntryRequestsForDSMTokenGroupOption(source: PCExporterSource, map: PCExporterMapBlueprint): Array<PCExportDataRequest>;
14
+ createExporterEntryRequestsForDSMThemeOption(source: PCExporterSource, map: PCExporterMapBlueprint): Array<PCExportDataRequest>;
15
+ createExporterEntryRequestsForDSMTokenTypeOption(source: PCExporterSource, map: PCExporterMapBlueprint): Array<PCExportDataRequest>;
16
+ }
@@ -0,0 +1,149 @@
1
+ "use strict";
2
+ //
3
+ // ExportDataRequestProducer.ts
4
+ // Supernova
5
+ //
6
+ // Created by Jiri Trecak.
7
+ // Copyright © 2020 Jiri Trecak. All rights reserved.
8
+ //
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.PCExportDataRequestProducer = void 0;
11
+ const ExporterSource_1 = require("../../../model/sources/ExporterSource");
12
+ const ExportDataRequestDSMComponent_1 = require("./specific/dsm/ExportDataRequestDSMComponent");
13
+ const ExportDataRequestDSMGeneric_1 = require("./specific/dsm/ExportDataRequestDSMGeneric");
14
+ const ExportDataRequestDSMTheme_1 = require("./specific/dsm/ExportDataRequestDSMTheme");
15
+ const ExportDataRequestDSMTokenGroup_1 = require("./specific/dsm/ExportDataRequestDSMTokenGroup");
16
+ const ExportDataRequestDSMComponentGroup_1 = require("./specific/dsm/ExportDataRequestDSMComponentGroup");
17
+ const ExportDataRequestDSMTokenType_1 = require("./specific/dsm/ExportDataRequestDSMTokenType");
18
+ // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
19
+ // MARK: - Definitions
20
+ // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
21
+ // MARK: - Object definition
22
+ class PCExportDataRequestProducer {
23
+ // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
24
+ // MARK: - Init
25
+ constructor(exportConfiguration) {
26
+ this.configuration = exportConfiguration;
27
+ }
28
+ // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
29
+ // MARK: - Request creation
30
+ produceRequestsForMap(map) {
31
+ var _a;
32
+ let sourceId = map.invoke;
33
+ let referencedSource = this.configuration.exporter.sourceByIdIgnoringExecutableExtension(sourceId);
34
+ if (!referencedSource) {
35
+ // throw SCPulsarExportDataProducerError.blueprintNotFound(entry.blueprintId ?? "")
36
+ throw Error(`Source ${(_a = map.write_using) !== null && _a !== void 0 ? _a : ''} defined inside output not found`);
37
+ }
38
+ switch (referencedSource.context) {
39
+ case ExporterSource_1.PCExporterSourceContextType.generic:
40
+ case ExporterSource_1.PCExporterSourceContextType.component:
41
+ case ExporterSource_1.PCExporterSourceContextType.componentGroup:
42
+ case ExporterSource_1.PCExporterSourceContextType.tokenType:
43
+ case ExporterSource_1.PCExporterSourceContextType.tokenGroup:
44
+ case ExporterSource_1.PCExporterSourceContextType.theme:
45
+ return this.createExporterEntryDSMDataRequest(referencedSource, map);
46
+ default:
47
+ return [];
48
+ }
49
+ }
50
+ // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
51
+ // MARK: - Request creation - Supernova loader
52
+ createExporterEntryDSMDataRequest(source, map) {
53
+ switch (source.context) {
54
+ case ExporterSource_1.PCExporterSourceContextType.generic:
55
+ return this.createExporterEntryRequestsForDSMGenericOption(source, map);
56
+ case ExporterSource_1.PCExporterSourceContextType.component:
57
+ return this.createExporterEntryRequestsForDSMComponentOption(source, map);
58
+ case ExporterSource_1.PCExporterSourceContextType.componentGroup:
59
+ return this.createExporterEntryRequestsForDSMComponentGroupOption(source, map);
60
+ case ExporterSource_1.PCExporterSourceContextType.tokenGroup:
61
+ return this.createExporterEntryRequestsForDSMTokenGroupOption(source, map);
62
+ case ExporterSource_1.PCExporterSourceContextType.tokenType:
63
+ return this.createExporterEntryRequestsForDSMTokenTypeOption(source, map);
64
+ case ExporterSource_1.PCExporterSourceContextType.theme:
65
+ return this.createExporterEntryRequestsForDSMThemeOption(source, map);
66
+ default:
67
+ return [];
68
+ }
69
+ }
70
+ createExporterEntryRequestsForDSMGenericOption(source, map) {
71
+ // Create new dsm-enabled execution context
72
+ let executionContext = this.configuration.newExecutionContext(); // TODO: Modify to accept DSM configuration
73
+ // Create request
74
+ let request = new ExportDataRequestDSMGeneric_1.PCExportDataRequestDSMGeneric(source, map, this.configuration, executionContext);
75
+ return [request];
76
+ }
77
+ createExporterEntryRequestsForDSMComponentOption(source, map) {
78
+ // Get configuration
79
+ let requests = [];
80
+ let components = this.configuration.dsmStore.executableComponents();
81
+ // Generate N requests per number of components in the current dsm context from the store
82
+ for (let component of components) {
83
+ // Create execution context
84
+ let executionContext = this.configuration.newExecutionContext();
85
+ // Create request for specific component
86
+ let request = new ExportDataRequestDSMComponent_1.PCExportDataRequestDSMComponent(component, source, map, this.configuration, executionContext);
87
+ requests.push(request);
88
+ }
89
+ return requests;
90
+ }
91
+ createExporterEntryRequestsForDSMComponentGroupOption(source, map) {
92
+ // Get configuration
93
+ let requests = [];
94
+ let components = this.configuration.dsmStore.executableComponentGroups();
95
+ // Generate N requests per number of components in the current dsm context from the store
96
+ for (let component of components) {
97
+ // Create execution context
98
+ let executionContext = this.configuration.newExecutionContext();
99
+ // Create request for specific component
100
+ let request = new ExportDataRequestDSMComponentGroup_1.PCExportDataRequestDSMComponentGroup(component, source, map, this.configuration, executionContext);
101
+ requests.push(request);
102
+ }
103
+ return requests;
104
+ }
105
+ createExporterEntryRequestsForDSMTokenGroupOption(source, map) {
106
+ // Get configuration
107
+ let requests = [];
108
+ let tokenGroups = this.configuration.dsmStore.executableTokenGroups();
109
+ // Generate N requests per number of components in the current dsm context from the store
110
+ for (let tokenGroup of tokenGroups) {
111
+ // Create execution context
112
+ let executionContext = this.configuration.newExecutionContext();
113
+ // Create request for specific component
114
+ let request = new ExportDataRequestDSMTokenGroup_1.PCExportDataRequestDSMTokenGroup(tokenGroup, source, map, this.configuration, executionContext);
115
+ requests.push(request);
116
+ }
117
+ return requests;
118
+ }
119
+ createExporterEntryRequestsForDSMThemeOption(source, map) {
120
+ // Get configuration
121
+ let requests = [];
122
+ let themes = this.configuration.dsmStore.executableThemes();
123
+ // Generate N requests per number of components in the current dsm context from the store
124
+ for (let theme of themes) {
125
+ // Create execution context
126
+ let executionContext = this.configuration.newExecutionContext();
127
+ // Create request for specific component
128
+ let request = new ExportDataRequestDSMTheme_1.PCExportDataRequestDSMTheme(theme, source, map, this.configuration, executionContext);
129
+ requests.push(request);
130
+ }
131
+ return requests;
132
+ }
133
+ createExporterEntryRequestsForDSMTokenTypeOption(source, map) {
134
+ // Get configuration
135
+ let requests = [];
136
+ let tokenTypes = this.configuration.dsmStore.executableTokenTypes();
137
+ // Generate N requests per number of components in the current dsm context from the store
138
+ for (let tokenType of tokenTypes) {
139
+ // Create execution context
140
+ let executionContext = this.configuration.newExecutionContext();
141
+ // Create request for specific component
142
+ let request = new ExportDataRequestDSMTokenType_1.PCExportDataRequestDSMTokenType(tokenType, source, map, this.configuration, executionContext);
143
+ requests.push(request);
144
+ }
145
+ return requests;
146
+ }
147
+ }
148
+ exports.PCExportDataRequestProducer = PCExportDataRequestProducer;
149
+ //# sourceMappingURL=ExportDataRequestProducer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExportDataRequestProducer.js","sourceRoot":"","sources":["../../../../../src/engine/generation/requests/ExportDataRequestProducer.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,gCAAgC;AAChC,aAAa;AACb,EAAE;AACF,2BAA2B;AAC3B,sDAAsD;AACtD,EAAE;;;AAOF,0EAAmF;AACnF,gGAA8F;AAC9F,4FAA0F;AAE1F,wFAAsF;AACtF,k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ps/ExporterMapBlueprint';
3
+ import { PCExportDataRequestDataStore } from './ExportDataRequestDataStore';
4
+ import { PCExportDataRequestNameStore } from './ExportDataRequestNameStore';
5
+ import { PLEmittedContent } from '@supernova-studio/pulsar-language';
6
+ export declare class PCExportDataResponse {
7
+ dataStore: PCExportDataRequestDataStore;
8
+ nameStore: PCExportDataRequestNameStore;
9
+ emittedContent: Array<PLEmittedContent>;
10
+ map: PCExporterMapBlueprint;
11
+ request: PCExportDataRequest;
12
+ constructor(request: PCExportDataRequest, map: PCExporterMapBlueprint, dataStore: PCExportDataRequestDataStore, nameStore: PCExportDataRequestNameStore, emittedContent: Array<PLEmittedContent>);
13
+ }
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ //
3
+ // PCExportDataResponse.ts
4
+ // Supernova
5
+ //
6
+ // Created by Jiri Trecak.
7
+ // Copyright © 2020 Jiri Trecak. All rights reserved.
8
+ //
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.PCExportDataResponse = void 0;
11
+ // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
12
+ // MARK: - Definitions
13
+ // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
14
+ // MARK: - Object definition
15
+ class PCExportDataResponse {
16
+ // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
17
+ // MARK: - Init
18
+ constructor(request, map, dataStore, nameStore, emittedContent) {
19
+ // Request
20
+ this.request = request;
21
+ // Data stores
22
+ this.dataStore = dataStore;
23
+ this.nameStore = nameStore;
24
+ this.emittedContent = emittedContent;
25
+ // Store entry
26
+ this.map = map;
27
+ }
28
+ }
29
+ exports.PCExportDataResponse = PCExportDataResponse;
30
+ //# sourceMappingURL=ExportDataResponse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExportDataResponse.js","sourceRoot":"","sources":["../../../../../src/engine/generation/requests/ExportDataResponse.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,2BAA2B;AAC3B,aAAa;AACb,EAAE;AACF,2BAA2B;AAC3B,sDAAsD;AACtD,EAAE;;;AAWF,8GAA8G;AAC9G,sBAAsB;AAEtB,8GAA8G;AAC9G,4BAA4B;AAE5B,MAAa,oBAAoB;IAa/B,8GAA8G;IAC9G,eAAe;IAEf,YACE,OAA4B,EAC5B,GAA2B,EAC3B,SAAuC,EACvC,SAAuC,EACvC,cAAuC;QAEvC,UAAU;QACV,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QAEtB,cAAc;QACd,IAAI,CAAC,SAAS,GAAG,SAAS,CAAA;QAC1B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAA;QAC1B,IAAI,CAAC,cAAc,GAAG,cAAc,CAAA;QAEpC,cAAc;QACd,IAAI,CAAC,GAAG,GAAG,GAAG,CAAA;IAChB,CAAC;CACF;AAlCD,oDAkCC"}
@@ -0,0 +1,14 @@
1
+ import { PCExportDataRequest } from '../../ExportDataRequest';
2
+ import { PCExportConfiguration } from '../../../../configuration/ExportConfiguration';
3
+ import { PCExporterSource } from '../../../../../model/sources/ExporterSource';
4
+ import { PLExecutionContext, PLEmittedContent } from '@supernova-studio/pulsar-language';
5
+ import { PCExporterMapBlueprint } from '../../../../../model/maps/ExporterMapBlueprint';
6
+ export declare class PCExportDataRequestBlueprint extends PCExportDataRequest {
7
+ executionContext: PLExecutionContext;
8
+ constructor(configuration: PCExportConfiguration, map: PCExporterMapBlueprint, executionContext: PLExecutionContext);
9
+ processBlueprintData(source: PCExporterSource, context: Map<string, any>, name: string | null): Promise<{
10
+ data: any;
11
+ emittedContext: Array<PLEmittedContent>;
12
+ }>;
13
+ logBlueprintProcessingFailure(error: Error, source: PCExporterSource, name: string | null): void;
14
+ }
@@ -0,0 +1,76 @@
1
+ "use strict";
2
+ //
3
+ // PCExportDataRequestBlueprint.ts
4
+ // Supernova
5
+ //
6
+ // Created by Jiri Trecak.
7
+ // Copyright © 2020 Jiri Trecak. All rights reserved.
8
+ //
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.PCExportDataRequestBlueprint = void 0;
11
+ // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
12
+ // MARK: - Imports
13
+ const ExportDataRequest_1 = require("../../ExportDataRequest");
14
+ const pulsar_language_1 = require("@supernova-studio/pulsar-language");
15
+ const pulsar_language_2 = require("@supernova-studio/pulsar-language");
16
+ const pulsar_language_3 = require("@supernova-studio/pulsar-language");
17
+ // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
18
+ // MARK: - Definitions
19
+ // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
20
+ // MARK: - Object definition
21
+ class PCExportDataRequestBlueprint extends ExportDataRequest_1.PCExportDataRequest {
22
+ // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
23
+ // MARK: - Init
24
+ constructor(configuration, map, executionContext) {
25
+ super(configuration, map);
26
+ this.executionContext = executionContext;
27
+ }
28
+ // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
29
+ // MARK: - Blueprint processing
30
+ processBlueprintData(source, context, name) {
31
+ return new Promise(async (resolve, reject) => {
32
+ try {
33
+ if (name) {
34
+ this.configuration.logger.logInfo(`Exporting source ${source.id} for ${name}`, '');
35
+ }
36
+ else {
37
+ this.configuration.logger.logInfo(`Exporting source ${source.id}`, '');
38
+ }
39
+ // Create pulsar source from definition
40
+ let definitionBlueprint = pulsar_language_1.PLBlueprintFactory.blueprint(source.content, source.id, this.executionContext);
41
+ // Render source
42
+ let interpretingContext = new pulsar_language_2.PLInterpreterContext(context);
43
+ let interpreter = new pulsar_language_3.PLInterpreter();
44
+ let result = await interpreter.interpret(definitionBlueprint, interpretingContext, this.executionContext);
45
+ // Get emitted content
46
+ let emittedContent = this.executionContext.blueprintEmitter.allEmittedContent();
47
+ if (name) {
48
+ this.configuration.logger.logInfo(`Finished exporting source ${source.id} for ${name}`, '');
49
+ }
50
+ else {
51
+ this.configuration.logger.logInfo(`Finished exporting source ${source.id}`, '');
52
+ }
53
+ resolve({
54
+ data: result,
55
+ emittedContext: emittedContent
56
+ });
57
+ }
58
+ catch (error) {
59
+ this.logBlueprintProcessingFailure(error, source, name);
60
+ reject(error);
61
+ }
62
+ });
63
+ }
64
+ logBlueprintProcessingFailure(error, source, name) {
65
+ let reason = error.message;
66
+ if (name) {
67
+ this.configuration.logger.logError(`Export of source ${source.id} for ${name} failed`, '');
68
+ }
69
+ else {
70
+ this.configuration.logger.logError(`Export of source ${source.id} failed`, '');
71
+ }
72
+ this.configuration.logger.logError(`Reason: ${reason}`, '');
73
+ }
74
+ }
75
+ exports.PCExportDataRequestBlueprint = PCExportDataRequestBlueprint;
76
+ //# sourceMappingURL=ExportDataRequestBlueprint.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExportDataRequestBlueprint.js","sourceRoot":"","sources":["../../../../../../../src/engine/generation/requests/specific/dsm/ExportDataRequestBlueprint.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,mCAAmC;AACnC,aAAa;AACb,EAAE;AACF,2BAA2B;AAC3B,sDAAsD;AACtD,EAAE;;;AAEF,8GAA8G;AAC9G,kBAAkB;AAElB,+DAA6D;AAK7D,uEAAsE;AACtE,uEAAwE;AACxE,uEAAiE;AAIjE,8GAA8G;AAC9G,sBAAsB;AAEtB,8GAA8G;AAC9G,4BAA4B;AAE5B,MAAa,4BAA6B,SAAQ,uCAAmB;IAMnE,8GAA8G;IAC9G,eAAe;IAEf,YAAY,aAAoC,EAAE,GAA2B,EAAE,gBAAoC;QACjH,KAAK,CAAC,aAAa,EAAE,GAAG,CAAC,CAAA;QACzB,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAA;IAC1C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CAAA;iBAChF;gBAED,OAAO,CAAC;oBACN,IAAI,EAAE,MAAM;oBACZ,cAAc,EAAE,cAAc;iBAC/B,CAAC,CAAA;aACH;YAAC,OAAO,KAAK,EAAE;gBACd,IAAI,CAAC,6BAA6B,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,CAAA;gBACvD,MAAM,CAAC,KAAK,CAAC,CAAA;aACd;QACH,CAAC,CAAC,CAAA;IACJ,CAAC;IAED,6BAA6B,CAAC,KAAY,EAAE,MAAwB,EAAE,IAAmB;QACvF,IAAI,MAAM,GAAW,KAAK,CAAC,OAAO,CAAA;QAElC,IAAI,IAAI,EAAE;YACR,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,QAAQ,CAAC,oBAAoB,MAAM,CAAC,EAAE,QAAQ,IAAI,SAAS,EAAE,EAAE,CAAC,CAAA;SAC3F;aAAM;YACL,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,QAAQ,CAAC,oBAAoB,MAAM,CAAC,EAAE,SAAS,EAAE,EAAE,CAAC,CAAA;SAC/E;QAED,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,QAAQ,CAAC,WAAW,MAAM,EAAE,EAAE,EAAE,CAAC,CAAA;IAC7D,CAAC;CACF;AArED,oEAqEC"}
@@ -0,0 +1,13 @@
1
+ import { PCExportDataRequestBlueprint } from './ExportDataRequestBlueprint';
2
+ import { PCExporterSource } from '../../../../../model/sources/ExporterSource';
3
+ import { PCExportConfiguration } from '../../../../configuration/ExportConfiguration';
4
+ import { PCExporterMapBlueprint } from './../../../../../model/maps/ExporterMapBlueprint';
5
+ import { PCExportDataRequest } from '../../ExportDataRequest';
6
+ import { PLExecutionContext } from '@supernova-studio/pulsar-language';
7
+ import { DSMReferenceStoreEntry } from './../../../../../model/dsm/DSMReferenceStore';
8
+ export declare class PCExportDataRequestDSMComponent extends PCExportDataRequestBlueprint {
9
+ source: PCExporterSource;
10
+ entry: DSMReferenceStoreEntry;
11
+ constructor(entry: DSMReferenceStoreEntry, source: PCExporterSource, map: PCExporterMapBlueprint, configuration: PCExportConfiguration, executionContext: PLExecutionContext);
12
+ produceData(): Promise<PCExportDataRequest>;
13
+ }