@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.
- package/build/browser/pulsar.js +141629 -0
- package/build/browser/pulsar.min.js +270 -0
- package/build/main/browser-bundle.d.ts +1 -0
- package/build/main/browser-bundle.js +16 -0
- package/build/main/browser-bundle.js.map +1 -0
- package/build/main/engine/ExportEngine.d.ts +17 -0
- package/build/main/engine/ExportEngine.js +122 -0
- package/build/main/engine/ExportEngine.js.map +1 -0
- package/build/main/engine/configuration/ExportConfiguration.d.ts +18 -0
- package/build/main/engine/configuration/ExportConfiguration.js +47 -0
- package/build/main/engine/configuration/ExportConfiguration.js.map +1 -0
- package/build/main/engine/generation/ExportDataProducer.d.ts +15 -0
- package/build/main/engine/generation/ExportDataProducer.js +100 -0
- package/build/main/engine/generation/ExportDataProducer.js.map +1 -0
- package/build/main/engine/generation/queue/ExportDataQueue.d.ts +16 -0
- package/build/main/engine/generation/queue/ExportDataQueue.js +72 -0
- package/build/main/engine/generation/queue/ExportDataQueue.js.map +1 -0
- package/build/main/engine/generation/queue/ExportDataQueueOperation.d.ts +6 -0
- package/build/main/engine/generation/queue/ExportDataQueueOperation.js +36 -0
- package/build/main/engine/generation/queue/ExportDataQueueOperation.js.map +1 -0
- package/build/main/engine/generation/requests/ExportDataEmittedResponseProducer.d.ts +7 -0
- package/build/main/engine/generation/requests/ExportDataEmittedResponseProducer.js +54 -0
- package/build/main/engine/generation/requests/ExportDataEmittedResponseProducer.js.map +1 -0
- package/build/main/engine/generation/requests/ExportDataPrimaryResponseProducer.d.ts +7 -0
- package/build/main/engine/generation/requests/ExportDataPrimaryResponseProducer.js +40 -0
- package/build/main/engine/generation/requests/ExportDataPrimaryResponseProducer.js.map +1 -0
- package/build/main/engine/generation/requests/ExportDataRequest.d.ts +19 -0
- package/build/main/engine/generation/requests/ExportDataRequest.js +55 -0
- package/build/main/engine/generation/requests/ExportDataRequest.js.map +1 -0
- package/build/main/engine/generation/requests/ExportDataRequestDataStore.d.ts +16 -0
- package/build/main/engine/generation/requests/ExportDataRequestDataStore.js +57 -0
- package/build/main/engine/generation/requests/ExportDataRequestDataStore.js.map +1 -0
- package/build/main/engine/generation/requests/ExportDataRequestNameStore.d.ts +22 -0
- package/build/main/engine/generation/requests/ExportDataRequestNameStore.js +86 -0
- package/build/main/engine/generation/requests/ExportDataRequestNameStore.js.map +1 -0
- package/build/main/engine/generation/requests/ExportDataRequestProducer.d.ts +16 -0
- package/build/main/engine/generation/requests/ExportDataRequestProducer.js +149 -0
- package/build/main/engine/generation/requests/ExportDataRequestProducer.js.map +1 -0
- package/build/main/engine/generation/requests/ExportDataResponse.d.ts +13 -0
- package/build/main/engine/generation/requests/ExportDataResponse.js +30 -0
- package/build/main/engine/generation/requests/ExportDataResponse.js.map +1 -0
- package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestBlueprint.d.ts +14 -0
- package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestBlueprint.js +76 -0
- package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestBlueprint.js.map +1 -0
- package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestDSMComponent.d.ts +13 -0
- package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestDSMComponent.js +47 -0
- package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestDSMComponent.js.map +1 -0
- package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestDSMComponentGroup.d.ts +13 -0
- package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestDSMComponentGroup.js +47 -0
- package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestDSMComponentGroup.js.map +1 -0
- package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestDSMGeneric.d.ts +11 -0
- package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestDSMGeneric.js +43 -0
- package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestDSMGeneric.js.map +1 -0
- package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestDSMTheme.d.ts +13 -0
- package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestDSMTheme.js +47 -0
- package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestDSMTheme.js.map +1 -0
- package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestDSMTokenGroup.d.ts +13 -0
- package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestDSMTokenGroup.js +47 -0
- package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestDSMTokenGroup.js.map +1 -0
- package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestDSMTokenType.d.ts +13 -0
- package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestDSMTokenType.js +47 -0
- package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestDSMTokenType.js.map +1 -0
- package/build/main/engine/items/ExportItemProducer.d.ts +14 -0
- package/build/main/engine/items/ExportItemProducer.js +70 -0
- package/build/main/engine/items/ExportItemProducer.js.map +1 -0
- package/build/main/engine/items/construction/ExportItem.d.ts +8 -0
- package/build/main/engine/items/construction/ExportItem.js +25 -0
- package/build/main/engine/items/construction/ExportItem.js.map +1 -0
- package/build/main/engine/items/construction/ExportItemBuilder.d.ts +9 -0
- package/build/main/engine/items/construction/ExportItemBuilder.js +43 -0
- package/build/main/engine/items/construction/ExportItemBuilder.js.map +1 -0
- package/build/main/engine/items/queue/ExportItemQueue.d.ts +16 -0
- package/build/main/engine/items/queue/ExportItemQueue.js +70 -0
- package/build/main/engine/items/queue/ExportItemQueue.js.map +1 -0
- package/build/main/engine/items/queue/ExportItemQueueOperation.d.ts +6 -0
- package/build/main/engine/items/queue/ExportItemQueueOperation.js +36 -0
- package/build/main/engine/items/queue/ExportItemQueueOperation.js.map +1 -0
- package/build/main/engine/items/requests/ExportItemRequest.d.ts +16 -0
- package/build/main/engine/items/requests/ExportItemRequest.js +68 -0
- package/build/main/engine/items/requests/ExportItemRequest.js.map +1 -0
- package/build/main/engine/items/requests/ExportItemRequestProducer.d.ts +8 -0
- package/build/main/engine/items/requests/ExportItemRequestProducer.js +24 -0
- package/build/main/engine/items/requests/ExportItemRequestProducer.js.map +1 -0
- package/build/main/engine/items/requests/ExportItemResponse.d.ts +9 -0
- package/build/main/engine/items/requests/ExportItemResponse.js +25 -0
- package/build/main/engine/items/requests/ExportItemResponse.js.map +1 -0
- package/build/main/engine/items/requests/ExportItemResponseProducer.d.ts +7 -0
- package/build/main/engine/items/requests/ExportItemResponseProducer.js +45 -0
- package/build/main/engine/items/requests/ExportItemResponseProducer.js.map +1 -0
- package/build/main/engine/loaders/BlueprintLoader.d.ts +9 -0
- package/build/main/engine/loaders/BlueprintLoader.js +55 -0
- package/build/main/engine/loaders/BlueprintLoader.js.map +1 -0
- package/build/main/engine/writing/queue/ExportWriterQueue.d.ts +16 -0
- package/build/main/engine/writing/queue/ExportWriterQueue.js +70 -0
- package/build/main/engine/writing/queue/ExportWriterQueue.js.map +1 -0
- package/build/main/engine/writing/queue/ExportWriterQueueOperation.d.ts +6 -0
- package/build/main/engine/writing/queue/ExportWriterQueueOperation.js +36 -0
- package/build/main/engine/writing/queue/ExportWriterQueueOperation.js.map +1 -0
- package/build/main/engine/writing/requests/ExportWriterRequest.d.ts +14 -0
- package/build/main/engine/writing/requests/ExportWriterRequest.js +40 -0
- package/build/main/engine/writing/requests/ExportWriterRequest.js.map +1 -0
- package/build/main/engine/writing/requests/ExportWriterRequestProducer.d.ts +8 -0
- package/build/main/engine/writing/requests/ExportWriterRequestProducer.js +30 -0
- package/build/main/engine/writing/requests/ExportWriterRequestProducer.js.map +1 -0
- package/build/main/engine/writing/requests/ExportWriterResponse.d.ts +9 -0
- package/build/main/engine/writing/requests/ExportWriterResponse.js +25 -0
- package/build/main/engine/writing/requests/ExportWriterResponse.js.map +1 -0
- package/build/main/engine/writing/requests/ExportWriterResponseProducer.d.ts +7 -0
- package/build/main/engine/writing/requests/ExportWriterResponseProducer.js +40 -0
- package/build/main/engine/writing/requests/ExportWriterResponseProducer.js.map +1 -0
- package/build/main/engine/writing/writers/ExportItemWriter.d.ts +14 -0
- package/build/main/engine/writing/writers/ExportItemWriter.js +70 -0
- package/build/main/engine/writing/writers/ExportItemWriter.js.map +1 -0
- package/build/main/engine/writing/writers/ExportWriterRuleProcessor.d.ts +9 -0
- package/build/main/engine/writing/writers/ExportWriterRuleProcessor.js +63 -0
- package/build/main/engine/writing/writers/ExportWriterRuleProcessor.js.map +1 -0
- package/build/main/engine/writing/writers/memory/ExportWriterMemory.d.ts +4 -0
- package/build/main/engine/writing/writers/memory/ExportWriterMemory.js +29 -0
- package/build/main/engine/writing/writers/memory/ExportWriterMemory.js.map +1 -0
- package/build/main/engine/writing/writers/memory/ExportWriterMemoryRequest.d.ts +5 -0
- package/build/main/engine/writing/writers/memory/ExportWriterMemoryRequest.js +59 -0
- package/build/main/engine/writing/writers/memory/ExportWriterMemoryRequest.js.map +1 -0
- package/build/main/engine/writing/writers/memory/ExportWriterStore.d.ts +5 -0
- package/build/main/engine/writing/writers/memory/ExportWriterStore.js +33 -0
- package/build/main/engine/writing/writers/memory/ExportWriterStore.js.map +1 -0
- package/build/main/exports.d.ts +4 -0
- package/build/main/exports.js +13 -0
- package/build/main/exports.js.map +1 -0
- package/build/main/index.d.ts +1 -0
- package/build/main/index.js +14 -0
- package/build/main/index.js.map +1 -0
- package/build/main/model/dsm/DSMReferenceStore.d.ts +28 -0
- package/build/main/model/dsm/DSMReferenceStore.js +100 -0
- package/build/main/model/dsm/DSMReferenceStore.js.map +1 -0
- package/build/main/model/exporters/Exporter.d.ts +51 -0
- package/build/main/model/exporters/Exporter.js +98 -0
- package/build/main/model/exporters/Exporter.js.map +1 -0
- package/build/main/model/maps/ExporterMapBlueprint.d.ts +12 -0
- package/build/main/model/maps/ExporterMapBlueprint.js +39 -0
- package/build/main/model/maps/ExporterMapBlueprint.js.map +1 -0
- package/build/main/model/sources/ExporterSource.d.ts +25 -0
- package/build/main/model/sources/ExporterSource.js +58 -0
- package/build/main/model/sources/ExporterSource.js.map +1 -0
- package/build/main/pulsar/Pulsar.d.ts +105 -0
- package/build/main/pulsar/Pulsar.js +351 -0
- package/build/main/pulsar/Pulsar.js.map +1 -0
- package/build/main/pulsar/PulsarInterface.d.ts +152 -0
- package/build/main/pulsar/PulsarInterface.js +37 -0
- package/build/main/pulsar/PulsarInterface.js.map +1 -0
- package/build/main/pulsar/PulsarStaticAnalysis.d.ts +23 -0
- package/build/main/pulsar/PulsarStaticAnalysis.js +47 -0
- package/build/main/pulsar/PulsarStaticAnalysis.js.map +1 -0
- package/build/main/pulsar/PulsarStaticAnalysisInterface.d.ts +10 -0
- package/build/main/pulsar/PulsarStaticAnalysisInterface.js +10 -0
- package/build/main/pulsar/PulsarStaticAnalysisInterface.js.map +1 -0
- package/build/main/pulsar/managers/PulsarBlueprintManager.d.ts +16 -0
- package/build/main/pulsar/managers/PulsarBlueprintManager.js +76 -0
- package/build/main/pulsar/managers/PulsarBlueprintManager.js.map +1 -0
- package/build/main/pulsar/managers/PulsarCIManager.d.ts +25 -0
- package/build/main/pulsar/managers/PulsarCIManager.js +220 -0
- package/build/main/pulsar/managers/PulsarCIManager.js.map +1 -0
- package/build/main/pulsar/managers/PulsarCodeManager.d.ts +24 -0
- package/build/main/pulsar/managers/PulsarCodeManager.js +180 -0
- package/build/main/pulsar/managers/PulsarCodeManager.js.map +1 -0
- package/build/main/pulsar/managers/PulsarConfigurationManager.d.ts +16 -0
- package/build/main/pulsar/managers/PulsarConfigurationManager.js +48 -0
- package/build/main/pulsar/managers/PulsarConfigurationManager.js.map +1 -0
- package/build/main/pulsar/managers/PulsarExporterManager.d.ts +25 -0
- package/build/main/pulsar/managers/PulsarExporterManager.js +121 -0
- package/build/main/pulsar/managers/PulsarExporterManager.js.map +1 -0
- package/build/main/pulsar/managers/generators/PulsarExporterJSONGenerator.d.ts +16 -0
- package/build/main/pulsar/managers/generators/PulsarExporterJSONGenerator.js +272 -0
- package/build/main/pulsar/managers/generators/PulsarExporterJSONGenerator.js.map +1 -0
- package/build/main/pulsar/managers/generators/PulsarExporterZIPGenerator.d.ts +7 -0
- package/build/main/pulsar/managers/generators/PulsarExporterZIPGenerator.js +63 -0
- package/build/main/pulsar/managers/generators/PulsarExporterZIPGenerator.js.map +1 -0
- package/build/main/pulsar/managers/loaders/PulsarBaseLoader.d.ts +5 -0
- package/build/main/pulsar/managers/loaders/PulsarBaseLoader.js +28 -0
- package/build/main/pulsar/managers/loaders/PulsarBaseLoader.js.map +1 -0
- package/build/main/pulsar/managers/loaders/local/PulsarFSLoader.d.ts +11 -0
- package/build/main/pulsar/managers/loaders/local/PulsarFSLoader.js +97 -0
- package/build/main/pulsar/managers/loaders/local/PulsarFSLoader.js.map +1 -0
- package/build/main/pulsar/managers/loaders/memory/PulsarExporterJSONLoader.d.ts +9 -0
- package/build/main/pulsar/managers/loaders/memory/PulsarExporterJSONLoader.js +81 -0
- package/build/main/pulsar/managers/loaders/memory/PulsarExporterJSONLoader.js.map +1 -0
- package/build/main/pulsar/managers/loaders/memory/PulsarExporterMemoryLoader.d.ts +20 -0
- package/build/main/pulsar/managers/loaders/memory/PulsarExporterMemoryLoader.js +183 -0
- package/build/main/pulsar/managers/loaders/memory/PulsarExporterMemoryLoader.js.map +1 -0
- package/build/main/pulsar/managers/loaders/remote/PulsarExporterGitHubLoader.d.ts +12 -0
- package/build/main/pulsar/managers/loaders/remote/PulsarExporterGitHubLoader.js +143 -0
- package/build/main/pulsar/managers/loaders/remote/PulsarExporterGitHubLoader.js.map +1 -0
- package/build/main/pulsar/managers/loaders/remote/PulsarExporterZIPLoader.d.ts +12 -0
- package/build/main/pulsar/managers/loaders/remote/PulsarExporterZIPLoader.js +115 -0
- package/build/main/pulsar/managers/loaders/remote/PulsarExporterZIPLoader.js.map +1 -0
- package/build/main/tests/TestConfiguration.d.ts +9 -0
- package/build/main/tests/TestConfiguration.js +25 -0
- package/build/main/tests/TestConfiguration.js.map +1 -0
- package/build/main/tests/casebuilders/ci.d.ts +12 -0
- package/build/main/tests/casebuilders/ci.js +38 -0
- package/build/main/tests/casebuilders/ci.js.map +1 -0
- package/build/main/tests/casebuilders/configuration.d.ts +5 -0
- package/build/main/tests/casebuilders/configuration.js +25 -0
- package/build/main/tests/casebuilders/configuration.js.map +1 -0
- package/build/main/tests/casebuilders/dsm.d.ts +7 -0
- package/build/main/tests/casebuilders/dsm.js +57 -0
- package/build/main/tests/casebuilders/dsm.js.map +1 -0
- package/build/main/tests/casebuilders/modelObjects.d.ts +13 -0
- package/build/main/tests/casebuilders/modelObjects.js +120 -0
- package/build/main/tests/casebuilders/modelObjects.js.map +1 -0
- package/build/main/tools/Logger.d.ts +27 -0
- package/build/main/tools/Logger.js +98 -0
- package/build/main/tools/Logger.js.map +1 -0
- package/build/main/tools/LoggerDefaultMessages.d.ts +13 -0
- package/build/main/tools/LoggerDefaultMessages.js +41 -0
- package/build/main/tools/LoggerDefaultMessages.js.map +1 -0
- package/build/tsconfig.tsbuildinfo +2829 -0
- package/package.json +9 -3
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
//
|
|
3
|
+
// PCExportItemQueue.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.PCExportItemQueue = void 0;
|
|
11
|
+
const ExportItemQueueOperation_1 = require("./ExportItemQueueOperation");
|
|
12
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
13
|
+
// MARK: - Definitions
|
|
14
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
15
|
+
// MARK: - Object definition
|
|
16
|
+
class PCExportItemQueue {
|
|
17
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
18
|
+
// MARK: - Init
|
|
19
|
+
constructor(configuration) {
|
|
20
|
+
this.isLockedForChanges = false;
|
|
21
|
+
this.isFinished = false;
|
|
22
|
+
this.configuration = configuration;
|
|
23
|
+
this.waitingOperations = new Array();
|
|
24
|
+
this.requests = new Array();
|
|
25
|
+
this.requestsCompleted = 0;
|
|
26
|
+
}
|
|
27
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
28
|
+
// MARK: - Queue management
|
|
29
|
+
addQueuedRequest(request) {
|
|
30
|
+
// Create operation
|
|
31
|
+
let operation = new ExportItemQueueOperation_1.PCExportItemQueueOperation(request);
|
|
32
|
+
// Add operation to queue
|
|
33
|
+
this.requests.push(request);
|
|
34
|
+
this.waitingOperations.push(operation);
|
|
35
|
+
}
|
|
36
|
+
addQueuedRequests(requests) {
|
|
37
|
+
requests.forEach(r => {
|
|
38
|
+
this.addQueuedRequest(r);
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
clearQueue() {
|
|
42
|
+
this.requestsCompleted = 0;
|
|
43
|
+
this.waitingOperations = [];
|
|
44
|
+
}
|
|
45
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
46
|
+
// MARK: - Processing
|
|
47
|
+
processQueue() {
|
|
48
|
+
// Sort the files and add them to export buffer
|
|
49
|
+
this.isLockedForChanges = true;
|
|
50
|
+
this.requestsCompleted = 0;
|
|
51
|
+
// Create new queue promise, processing all items at once
|
|
52
|
+
return new Promise((resolve, reject) => {
|
|
53
|
+
let queue = new Array();
|
|
54
|
+
for (let operation of this.waitingOperations) {
|
|
55
|
+
let promise = operation.processOperation();
|
|
56
|
+
queue.push(promise);
|
|
57
|
+
}
|
|
58
|
+
// When one queue item fails, immediately cancel
|
|
59
|
+
Promise.all(queue)
|
|
60
|
+
.then(_ => {
|
|
61
|
+
resolve(this.requests);
|
|
62
|
+
})
|
|
63
|
+
.catch(error => {
|
|
64
|
+
reject(error);
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
exports.PCExportItemQueue = PCExportItemQueue;
|
|
70
|
+
//# sourceMappingURL=ExportItemQueue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExportItemQueue.js","sourceRoot":"","sources":["../../../../../src/engine/items/queue/ExportItemQueue.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,wBAAwB;AACxB,aAAa;AACb,EAAE;AACF,2BAA2B;AAC3B,sDAAsD;AACtD,EAAE;;;AAMF,yEAAuE;AAGvE,8GAA8G;AAC9G,sBAAsB;AAEtB,8GAA8G;AAC9G,4BAA4B;AAE5B,MAAa,iBAAiB;IAgB5B,8GAA8G;IAC9G,eAAe;IAEf,YAAY,aAAoC;QAVhD,uBAAkB,GAAY,KAAK,CAAA;QACnC,eAAU,GAAY,KAAK,CAAA;QAUzB,IAAI,CAAC,aAAa,GAAG,aAAa,CAAA;QAClC,IAAI,CAAC,iBAAiB,GAAG,IAAI,KAAK,EAA8B,CAAA;QAChE,IAAI,CAAC,QAAQ,GAAG,IAAI,KAAK,EAAuB,CAAA;QAChD,IAAI,CAAC,iBAAiB,GAAG,CAAC,CAAA;IAC5B,CAAC;IAED,8GAA8G;IAC9G,2BAA2B;IAE3B,gBAAgB,CAAC,OAA4B;QAC3C,mBAAmB;QACnB,IAAI,SAAS,GAAG,IAAI,qDAA0B,CAAC,OAAO,CAAC,CAAA;QAEvD,yBAAyB;QACzB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;QAC3B,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;IACxC,CAAC;IAED,iBAAiB,CAAC,QAAoC;QACpD,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;YACnB,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAA;QAC1B,CAAC,CAAC,CAAA;IACJ,CAAC;IAED,UAAU;QACR,IAAI,CAAC,iBAAiB,GAAG,CAAC,CAAA;QAC1B,IAAI,CAAC,iBAAiB,GAAG,EAAE,CAAA;IAC7B,CAAC;IAED,8GAA8G;IAC9G,qBAAqB;IAErB,YAAY;QACV,+CAA+C;QAC/C,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAA;QAC9B,IAAI,CAAC,iBAAiB,GAAG,CAAC,CAAA;QAE1B,yDAAyD;QACzD,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACrC,IAAI,KAAK,GAAG,IAAI,KAAK,EAAgC,CAAA;YACrD,KAAK,IAAI,SAAS,IAAI,IAAI,CAAC,iBAAiB,EAAE;gBAC5C,IAAI,OAAO,GAAG,SAAS,CAAC,gBAAgB,EAAE,CAAA;gBAC1C,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;aACpB;YAED,gDAAgD;YAChD,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC;iBACf,IAAI,CAAC,CAAC,CAAC,EAAE;gBACR,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;YACxB,CAAC,CAAC;iBACD,KAAK,CAAC,KAAK,CAAC,EAAE;gBACb,MAAM,CAAC,KAAK,CAAC,CAAA;YACf,CAAC,CAAC,CAAA;QACN,CAAC,CAAC,CAAA;IACJ,CAAC;CACF;AA3ED,8CA2EC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
//
|
|
3
|
+
// ExportItemQueueOperation.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.PCExportItemQueueOperation = void 0;
|
|
11
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
12
|
+
// MARK: - Definitions
|
|
13
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
14
|
+
// MARK: - Object definition
|
|
15
|
+
class PCExportItemQueueOperation {
|
|
16
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
17
|
+
// MARK: - Init
|
|
18
|
+
constructor(request) {
|
|
19
|
+
this.request = request;
|
|
20
|
+
}
|
|
21
|
+
processOperation() {
|
|
22
|
+
return new Promise((respond, reject) => {
|
|
23
|
+
// Generate request data, then resolve the promise
|
|
24
|
+
this.request
|
|
25
|
+
.produceItem()
|
|
26
|
+
.then(_ => {
|
|
27
|
+
respond(this.request);
|
|
28
|
+
})
|
|
29
|
+
.catch(error => {
|
|
30
|
+
reject(error);
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.PCExportItemQueueOperation = PCExportItemQueueOperation;
|
|
36
|
+
//# sourceMappingURL=ExportItemQueueOperation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExportItemQueueOperation.js","sourceRoot":"","sources":["../../../../../src/engine/items/queue/ExportItemQueueOperation.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,+BAA+B;AAC/B,aAAa;AACb,EAAE;AACF,2BAA2B;AAC3B,sDAAsD;AACtD,EAAE;;;AAOF,8GAA8G;AAC9G,sBAAsB;AAEtB,8GAA8G;AAC9G,4BAA4B;AAE5B,MAAa,0BAA0B;IAOrC,8GAA8G;IAC9G,eAAe;IAEf,YAAY,OAA4B;QACtC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;IACxB,CAAC;IAED,gBAAgB;QACd,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACrC,kDAAkD;YAClD,IAAI,CAAC,OAAO;iBACT,WAAW,EAAE;iBACb,IAAI,CAAC,CAAC,CAAC,EAAE;gBACR,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;YACvB,CAAC,CAAC;iBACD,KAAK,CAAC,KAAK,CAAC,EAAE;gBACb,MAAM,CAAC,KAAK,CAAC,CAAA;YACf,CAAC,CAAC,CAAA;QACN,CAAC,CAAC,CAAA;IACJ,CAAC;CACF;AA3BD,gEA2BC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { PCExportConfiguration } from './../../configuration/ExportConfiguration';
|
|
2
|
+
import { PCExportDataResponse } from './../../generation/requests/ExportDataResponse';
|
|
3
|
+
import { PCExportItem } from './../construction/ExportItem';
|
|
4
|
+
export declare class PCExportItemRequest {
|
|
5
|
+
items: Array<PCExportItem> | null;
|
|
6
|
+
error: Error | null;
|
|
7
|
+
dataResponse: PCExportDataResponse;
|
|
8
|
+
configuration: PCExportConfiguration;
|
|
9
|
+
processingError: Error | null;
|
|
10
|
+
processingFinished: boolean;
|
|
11
|
+
constructor(configuration: PCExportConfiguration, dataResponse: PCExportDataResponse);
|
|
12
|
+
produceItem(): Promise<Array<PCExportItem>>;
|
|
13
|
+
cancel(): void;
|
|
14
|
+
requestSuccessful(items: Array<PCExportItem>): void;
|
|
15
|
+
requestFailed(error: Error): void;
|
|
16
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
//
|
|
3
|
+
// PCExportItemRequest.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.PCExportItemRequest = void 0;
|
|
11
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
12
|
+
// MARK: - Imports
|
|
13
|
+
const ExportItemBuilder_1 = require("./../construction/ExportItemBuilder");
|
|
14
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
15
|
+
// MARK: - Definitions
|
|
16
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
17
|
+
// MARK: - Object definition
|
|
18
|
+
class PCExportItemRequest {
|
|
19
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
20
|
+
// MARK: - Init
|
|
21
|
+
constructor(configuration, dataResponse) {
|
|
22
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
23
|
+
// MARK: - Properties
|
|
24
|
+
// Data
|
|
25
|
+
this.items = null;
|
|
26
|
+
this.error = null;
|
|
27
|
+
// States
|
|
28
|
+
this.processingError = null;
|
|
29
|
+
this.processingFinished = false;
|
|
30
|
+
this.dataResponse = dataResponse;
|
|
31
|
+
this.configuration = configuration;
|
|
32
|
+
}
|
|
33
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
34
|
+
// MARK: - Content production
|
|
35
|
+
produceItem() {
|
|
36
|
+
// Create the items
|
|
37
|
+
return new Promise((resolve, reject) => {
|
|
38
|
+
try {
|
|
39
|
+
// Create the item
|
|
40
|
+
let builder = new ExportItemBuilder_1.PCExportItemBuilder();
|
|
41
|
+
let items = builder.buildItemsUsingResponse(this.dataResponse);
|
|
42
|
+
// Request successful
|
|
43
|
+
this.requestSuccessful(items);
|
|
44
|
+
resolve(items);
|
|
45
|
+
}
|
|
46
|
+
catch (error) {
|
|
47
|
+
// Request successful
|
|
48
|
+
this.requestFailed(error);
|
|
49
|
+
reject(error);
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
cancel() {
|
|
54
|
+
// Doesn't support cancellation
|
|
55
|
+
}
|
|
56
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
57
|
+
// MARK: - Request handling
|
|
58
|
+
requestSuccessful(items) {
|
|
59
|
+
this.processingFinished = true;
|
|
60
|
+
this.items = items;
|
|
61
|
+
}
|
|
62
|
+
requestFailed(error) {
|
|
63
|
+
this.processingFinished = true;
|
|
64
|
+
this.processingError = error;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
exports.PCExportItemRequest = PCExportItemRequest;
|
|
68
|
+
//# sourceMappingURL=ExportItemRequest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExportItemRequest.js","sourceRoot":"","sources":["../../../../../src/engine/items/requests/ExportItemRequest.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,aAAa;AACb,EAAE;AACF,2BAA2B;AAC3B,sDAAsD;AACtD,EAAE;;;AAEF,8GAA8G;AAC9G,kBAAkB;AAElB,2EAAyE;AAKzE,8GAA8G;AAC9G,sBAAsB;AAEtB,8GAA8G;AAC9G,4BAA4B;AAE5B,MAAa,mBAAmB;IAgB9B,8GAA8G;IAC9G,eAAe;IAEf,YAAY,aAAoC,EAAE,YAAkC;QAlBpF,8GAA8G;QAC9G,qBAAqB;QAErB,OAAO;QACP,UAAK,GAA+B,IAAI,CAAA;QACxC,UAAK,GAAiB,IAAI,CAAA;QAM1B,SAAS;QACT,oBAAe,GAAiB,IAAI,CAAA;QACpC,uBAAkB,GAAY,KAAK,CAAA;QAMjC,IAAI,CAAC,YAAY,GAAG,YAAY,CAAA;QAChC,IAAI,CAAC,aAAa,GAAG,aAAa,CAAA;IACpC,CAAC;IAED,8GAA8G;IAC9G,6BAA6B;IAE7B,WAAW;QACT,mBAAmB;QACnB,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACrC,IAAI;gBACF,kBAAkB;gBAClB,IAAI,OAAO,GAAG,IAAI,uCAAmB,EAAE,CAAA;gBACvC,IAAI,KAAK,GAAG,OAAO,CAAC,uBAAuB,CAAC,IAAI,CAAC,YAAY,CAAC,CAAA;gBAE9D,qBAAqB;gBACrB,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAA;gBAC7B,OAAO,CAAC,KAAK,CAAC,CAAA;aACf;YAAC,OAAO,KAAK,EAAE;gBACd,qBAAqB;gBACrB,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAA;gBACzB,MAAM,CAAC,KAAK,CAAC,CAAA;aACd;QACH,CAAC,CAAC,CAAA;IACJ,CAAC;IAED,MAAM;QACJ,+BAA+B;IACjC,CAAC;IAED,8GAA8G;IAC9G,2BAA2B;IAE3B,iBAAiB,CAAC,KAA0B;QAC1C,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAA;QAC9B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;IACpB,CAAC;IAED,aAAa,CAAC,KAAY;QACxB,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAA;QAC9B,IAAI,CAAC,eAAe,GAAG,KAAK,CAAA;IAC9B,CAAC;CACF;AA9DD,kDA8DC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PCExportDataResponse } from './../../generation/requests/ExportDataResponse';
|
|
2
|
+
import { PCExportConfiguration } from './../../configuration/ExportConfiguration';
|
|
3
|
+
import { PCExportItemRequest } from './ExportItemRequest';
|
|
4
|
+
export declare class PCExportItemRequestProducer {
|
|
5
|
+
configuration: PCExportConfiguration;
|
|
6
|
+
constructor(exportConfiguration: PCExportConfiguration);
|
|
7
|
+
produceRequestsForDataResponse(dataResponse: PCExportDataResponse): Array<PCExportItemRequest>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PCExportItemRequestProducer = void 0;
|
|
4
|
+
const ExportItemRequest_1 = require("./ExportItemRequest");
|
|
5
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
6
|
+
// MARK: - Definitions
|
|
7
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
8
|
+
// MARK: - Object definition
|
|
9
|
+
class PCExportItemRequestProducer {
|
|
10
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
11
|
+
// MARK: - Init
|
|
12
|
+
constructor(exportConfiguration) {
|
|
13
|
+
this.configuration = exportConfiguration;
|
|
14
|
+
}
|
|
15
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
16
|
+
// MARK: - Request creation
|
|
17
|
+
produceRequestsForDataResponse(dataResponse) {
|
|
18
|
+
// For now, only create one item request per one data response
|
|
19
|
+
let request = new ExportItemRequest_1.PCExportItemRequest(this.configuration, dataResponse);
|
|
20
|
+
return [request];
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
exports.PCExportItemRequestProducer = PCExportItemRequestProducer;
|
|
24
|
+
//# sourceMappingURL=ExportItemRequestProducer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExportItemRequestProducer.js","sourceRoot":"","sources":["../../../../../src/engine/items/requests/ExportItemRequestProducer.ts"],"names":[],"mappings":";;;AAaA,2DAAyD;AAEzD,8GAA8G;AAC9G,sBAAsB;AAEtB,8GAA8G;AAC9G,4BAA4B;AAE5B,MAAa,2BAA2B;IAMtC,8GAA8G;IAC9G,eAAe;IAEf,YAAY,mBAA0C;QACpD,IAAI,CAAC,aAAa,GAAG,mBAAmB,CAAA;IAC1C,CAAC;IAED,8GAA8G;IAC9G,2BAA2B;IAE3B,8BAA8B,CAAC,YAAkC;QAC/D,8DAA8D;QAC9D,IAAI,OAAO,GAAG,IAAI,uCAAmB,CAAC,IAAI,CAAC,aAAa,EAAE,YAAY,CAAC,CAAA;QACvE,OAAO,CAAC,OAAO,CAAC,CAAA;IAClB,CAAC;CACF;AArBD,kEAqBC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PCExporterMapBlueprint } from './../../../model/maps/ExporterMapBlueprint';
|
|
2
|
+
import { PCExportItem } from './../construction/ExportItem';
|
|
3
|
+
import { PCExportItemRequest } from './ExportItemRequest';
|
|
4
|
+
export declare class PCExportItemResponse {
|
|
5
|
+
item: PCExportItem;
|
|
6
|
+
map: PCExporterMapBlueprint;
|
|
7
|
+
request: PCExportItemRequest;
|
|
8
|
+
constructor(item: PCExportItem, map: PCExporterMapBlueprint, request: PCExportItemRequest);
|
|
9
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
//
|
|
3
|
+
// PCExportItemResponse.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.PCExportItemResponse = void 0;
|
|
11
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
12
|
+
// MARK: - Definitions
|
|
13
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
14
|
+
// MARK: - Object definition
|
|
15
|
+
class PCExportItemResponse {
|
|
16
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
17
|
+
// MARK: - Init
|
|
18
|
+
constructor(item, map, request) {
|
|
19
|
+
this.item = item;
|
|
20
|
+
this.map = map;
|
|
21
|
+
this.request = request;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
exports.PCExportItemResponse = PCExportItemResponse;
|
|
25
|
+
//# sourceMappingURL=ExportItemResponse.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExportItemResponse.js","sourceRoot":"","sources":["../../../../../src/engine/items/requests/ExportItemResponse.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,2BAA2B;AAC3B,aAAa;AACb,EAAE;AACF,2BAA2B;AAC3B,sDAAsD;AACtD,EAAE;;;AASF,8GAA8G;AAC9G,sBAAsB;AAEtB,8GAA8G;AAC9G,4BAA4B;AAE5B,MAAa,oBAAoB;IAS/B,8GAA8G;IAC9G,eAAe;IAEf,YAAY,IAAkB,EAAE,GAA2B,EAAE,OAA4B;QACvF,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAChB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAA;QACd,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;IACxB,CAAC;CACF;AAjBD,oDAiBC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PCExportItemRequest } from './ExportItemRequest';
|
|
2
|
+
import { PCExportItemResponse } from './ExportItemResponse';
|
|
3
|
+
export declare class PCExportItemResponseProducer {
|
|
4
|
+
constructor();
|
|
5
|
+
produceResponsesFromRequests(requests: Array<PCExportItemRequest>): Array<PCExportItemResponse>;
|
|
6
|
+
produceResponseFromRequest(request: PCExportItemRequest): Array<PCExportItemResponse>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
//
|
|
3
|
+
// PCExportItemResponseProducer.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.PCExportItemResponseProducer = void 0;
|
|
11
|
+
const ExportItemResponse_1 = require("./ExportItemResponse");
|
|
12
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
13
|
+
// MARK: - Definitions
|
|
14
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
15
|
+
// MARK: - Object definition
|
|
16
|
+
class PCExportItemResponseProducer {
|
|
17
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
18
|
+
// MARK: - Properties
|
|
19
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
20
|
+
// MARK: - Init
|
|
21
|
+
constructor() { }
|
|
22
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
23
|
+
// MARK: - Response production
|
|
24
|
+
produceResponsesFromRequests(requests) {
|
|
25
|
+
let responses = [];
|
|
26
|
+
for (let request of requests) {
|
|
27
|
+
let requestResponses = this.produceResponseFromRequest(request);
|
|
28
|
+
for (let response of requestResponses) {
|
|
29
|
+
responses.push(response);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return responses;
|
|
33
|
+
}
|
|
34
|
+
produceResponseFromRequest(request) {
|
|
35
|
+
var _a;
|
|
36
|
+
let responses = [];
|
|
37
|
+
for (let item of (_a = request.items) !== null && _a !== void 0 ? _a : []) {
|
|
38
|
+
let response = new ExportItemResponse_1.PCExportItemResponse(item, item.map, request);
|
|
39
|
+
responses.push(response);
|
|
40
|
+
}
|
|
41
|
+
return responses;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
exports.PCExportItemResponseProducer = PCExportItemResponseProducer;
|
|
45
|
+
//# sourceMappingURL=ExportItemResponseProducer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExportItemResponseProducer.js","sourceRoot":"","sources":["../../../../../src/engine/items/requests/ExportItemResponseProducer.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,mCAAmC;AACnC,aAAa;AACb,EAAE;AACF,2BAA2B;AAC3B,sDAAsD;AACtD,EAAE;;;AAMF,6DAA2D;AAE3D,8GAA8G;AAC9G,sBAAsB;AAEtB,8GAA8G;AAC9G,4BAA4B;AAE5B,MAAa,4BAA4B;IACvC,8GAA8G;IAC9G,qBAAqB;IAErB,8GAA8G;IAC9G,eAAe;IAEf,gBAAe,CAAC;IAEhB,8GAA8G;IAC9G,8BAA8B;IAE9B,4BAA4B,CAAC,QAAoC;QAC/D,IAAI,SAAS,GAAgC,EAAE,CAAA;QAC/C,KAAK,IAAI,OAAO,IAAI,QAAQ,EAAE;YAC5B,IAAI,gBAAgB,GAAG,IAAI,CAAC,0BAA0B,CAAC,OAAO,CAAC,CAAA;YAC/D,KAAK,IAAI,QAAQ,IAAI,gBAAgB,EAAE;gBACrC,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;aACzB;SACF;QAED,OAAO,SAAS,CAAA;IAClB,CAAC;IAED,0BAA0B,CAAC,OAA4B;;QACrD,IAAI,SAAS,GAAgC,EAAE,CAAA;QAC/C,KAAK,IAAI,IAAI,UAAI,OAAO,CAAC,KAAK,mCAAI,EAAE,EAAE;YACpC,IAAI,QAAQ,GAAG,IAAI,yCAAoB,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,EAAE,OAAO,CAAC,CAAA;YAChE,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;SACzB;QAED,OAAO,SAAS,CAAA;IAClB,CAAC;CACF;AAjCD,oEAiCC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PCExporter } from './../../model/exporters/Exporter';
|
|
2
|
+
import { PLBlueprintLoader } from '@supernova-studio/pulsar-language/build/main/interpreter/loaders/BlueprintLoader';
|
|
3
|
+
import { PLExecutionContext, PLBlueprintConfiguration, PLBlueprint } from '@supernova-studio/pulsar-language';
|
|
4
|
+
export declare class PCBlueprintLoader extends PLBlueprintLoader {
|
|
5
|
+
exporter: PCExporter;
|
|
6
|
+
constructor(exporter: PCExporter);
|
|
7
|
+
loadBlueprint(blueprintId: string, executionContext: PLExecutionContext, configuration: PLBlueprintConfiguration): PLBlueprint;
|
|
8
|
+
loadSourceForSourceId(sourceId: string, executionContext: PLExecutionContext, configuration: PLBlueprintConfiguration): PLBlueprint;
|
|
9
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
//
|
|
3
|
+
// BlueprintLoader.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.PCBlueprintLoader = void 0;
|
|
11
|
+
const BlueprintLoader_1 = require("@supernova-studio/pulsar-language/build/main/interpreter/loaders/BlueprintLoader");
|
|
12
|
+
const pulsar_language_1 = require("@supernova-studio/pulsar-language");
|
|
13
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
14
|
+
// MARK: - Class
|
|
15
|
+
class PCBlueprintLoader extends BlueprintLoader_1.PLBlueprintLoader {
|
|
16
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
17
|
+
// MARK: - Setup
|
|
18
|
+
constructor(exporter) {
|
|
19
|
+
super();
|
|
20
|
+
this.exporter = exporter;
|
|
21
|
+
}
|
|
22
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
23
|
+
// MARK: - Blueprint Loading
|
|
24
|
+
loadBlueprint(blueprintId, executionContext, configuration) {
|
|
25
|
+
let cachedBlueprint = this.cachedBlueprint(blueprintId);
|
|
26
|
+
let containedBlueprint = this.exporter.sourceByIdIgnoringExecutableExtension(blueprintId);
|
|
27
|
+
if (!cachedBlueprint && !containedBlueprint) {
|
|
28
|
+
for (const bp of this.exporter.sources.values()) {
|
|
29
|
+
if (bp.id === blueprintId) {
|
|
30
|
+
blueprintId = bp.id;
|
|
31
|
+
break;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return this.loadSourceForSourceId(blueprintId, executionContext, configuration);
|
|
36
|
+
}
|
|
37
|
+
loadSourceForSourceId(sourceId, executionContext, configuration) {
|
|
38
|
+
// Use cached source if exists
|
|
39
|
+
let cachedBlueprint = this.cachedBlueprint(sourceId);
|
|
40
|
+
if (cachedBlueprint) {
|
|
41
|
+
return cachedBlueprint;
|
|
42
|
+
}
|
|
43
|
+
// Blueprint must be present in loader scope
|
|
44
|
+
let containedBlueprint = this.exporter.sourceByIdIgnoringExecutableExtension(sourceId);
|
|
45
|
+
if (!containedBlueprint) {
|
|
46
|
+
throw Error(`Undefined source ${sourceId}`);
|
|
47
|
+
}
|
|
48
|
+
// Create new source, cache it and retrieve
|
|
49
|
+
let source = pulsar_language_1.PLBlueprintFactory.blueprint(containedBlueprint.content, sourceId, executionContext, configuration);
|
|
50
|
+
this.cache(source, sourceId);
|
|
51
|
+
return source;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
exports.PCBlueprintLoader = PCBlueprintLoader;
|
|
55
|
+
//# sourceMappingURL=BlueprintLoader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BlueprintLoader.js","sourceRoot":"","sources":["../../../../src/engine/loaders/BlueprintLoader.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,sBAAsB;AACtB,aAAa;AACb,EAAE;AACF,2BAA2B;AAC3B,sDAAsD;AACtD,EAAE;;;AAMF,sHAAoH;AACpH,uEAK0C;AAE1C,8GAA8G;AAC9G,gBAAgB;AAEhB,MAAa,iBAAkB,SAAQ,mCAAiB;IAMtD,8GAA8G;IAC9G,gBAAgB;IAEhB,YAAY,QAAoB;QAC9B,KAAK,EAAE,CAAA;QACP,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;IAC1B,CAAC;IAED,8GAA8G;IAC9G,4BAA4B;IAE5B,aAAa,CACX,WAAmB,EACnB,gBAAoC,EACpC,aAAuC;QAEvC,IAAI,eAAe,GAAG,IAAI,CAAC,eAAe,CAAC,WAAW,CAAC,CAAA;QACvD,IAAI,kBAAkB,GAAG,IAAI,CAAC,QAAQ,CAAC,qCAAqC,CAAC,WAAW,CAAC,CAAA;QAEzF,IAAI,CAAC,eAAe,IAAI,CAAC,kBAAkB,EAAE;YAC3C,KAAK,MAAM,EAAE,IAAI,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE;gBAC/C,IAAI,EAAE,CAAC,EAAE,KAAK,WAAW,EAAE;oBACzB,WAAW,GAAG,EAAE,CAAC,EAAE,CAAA;oBACnB,MAAK;iBACN;aACF;SACF;QAED,OAAO,IAAI,CAAC,qBAAqB,CAAC,WAAW,EAAE,gBAAgB,EAAE,aAAa,CAAC,CAAA;IACjF,CAAC;IAED,qBAAqB,CACnB,QAAgB,EAChB,gBAAoC,EACpC,aAAuC;QAEvC,8BAA8B;QAC9B,IAAI,eAAe,GAAG,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAA;QACpD,IAAI,eAAe,EAAE;YACnB,OAAO,eAAe,CAAA;SACvB;QAED,4CAA4C;QAC5C,IAAI,kBAAkB,GAAG,IAAI,CAAC,QAAQ,CAAC,qCAAqC,CAAC,QAAQ,CAAC,CAAA;QACtF,IAAI,CAAC,kBAAkB,EAAE;YACvB,MAAM,KAAK,CAAC,oBAAoB,QAAQ,EAAE,CAAC,CAAA;SAC5C;QAED,2CAA2C;QAC3C,IAAI,MAAM,GAAG,oCAAkB,CAAC,SAAS,CAAC,kBAAkB,CAAC,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,aAAa,CAAC,CAAA;QAChH,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;QAC5B,OAAO,MAAM,CAAA;IACf,CAAC;CACF;AA3DD,8CA2DC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { PCExportConfiguration } from './../../configuration/ExportConfiguration';
|
|
2
|
+
import { PCExportWriterQueueOperation } from './ExportWriterQueueOperation';
|
|
3
|
+
import { PCExportWriterRequest } from './../requests/ExportWriterRequest';
|
|
4
|
+
export declare class PCExportWriterQueue {
|
|
5
|
+
configuration: PCExportConfiguration;
|
|
6
|
+
waitingOperations: Array<PCExportWriterQueueOperation>;
|
|
7
|
+
isLockedForChanges: boolean;
|
|
8
|
+
isFinished: boolean;
|
|
9
|
+
requests: Array<PCExportWriterRequest>;
|
|
10
|
+
requestsCompleted: number;
|
|
11
|
+
constructor(configuration: PCExportConfiguration);
|
|
12
|
+
addQueuedRequest(request: PCExportWriterRequest): void;
|
|
13
|
+
addQueuedRequests(requests: Array<PCExportWriterRequest>): void;
|
|
14
|
+
clearQueue(): void;
|
|
15
|
+
processQueue(): Promise<Array<PCExportWriterRequest>>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
//
|
|
3
|
+
// PCExportWriterQueue.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.PCExportWriterQueue = void 0;
|
|
11
|
+
const ExportWriterQueueOperation_1 = require("./ExportWriterQueueOperation");
|
|
12
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
13
|
+
// MARK: - Definitions
|
|
14
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
15
|
+
// MARK: - Object definition
|
|
16
|
+
class PCExportWriterQueue {
|
|
17
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
18
|
+
// MARK: - Init
|
|
19
|
+
constructor(configuration) {
|
|
20
|
+
this.isLockedForChanges = false;
|
|
21
|
+
this.isFinished = false;
|
|
22
|
+
this.configuration = configuration;
|
|
23
|
+
this.waitingOperations = new Array();
|
|
24
|
+
this.requests = new Array();
|
|
25
|
+
this.requestsCompleted = 0;
|
|
26
|
+
}
|
|
27
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
28
|
+
// MARK: - Queue management
|
|
29
|
+
addQueuedRequest(request) {
|
|
30
|
+
// Create operation
|
|
31
|
+
let operation = new ExportWriterQueueOperation_1.PCExportWriterQueueOperation(request);
|
|
32
|
+
// Add operation to queue
|
|
33
|
+
this.requests.push(request);
|
|
34
|
+
this.waitingOperations.push(operation);
|
|
35
|
+
}
|
|
36
|
+
addQueuedRequests(requests) {
|
|
37
|
+
requests.forEach(r => {
|
|
38
|
+
this.addQueuedRequest(r);
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
clearQueue() {
|
|
42
|
+
this.requestsCompleted = 0;
|
|
43
|
+
this.waitingOperations = [];
|
|
44
|
+
}
|
|
45
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
46
|
+
// MARK: - Processing
|
|
47
|
+
processQueue() {
|
|
48
|
+
// Sort the files and add them to export buffer
|
|
49
|
+
this.isLockedForChanges = true;
|
|
50
|
+
this.requestsCompleted = 0;
|
|
51
|
+
// Create new queue promise, processing all items at once
|
|
52
|
+
return new Promise((resolve, reject) => {
|
|
53
|
+
let queue = new Array();
|
|
54
|
+
for (let operation of this.waitingOperations) {
|
|
55
|
+
let promise = operation.processOperation();
|
|
56
|
+
queue.push(promise);
|
|
57
|
+
}
|
|
58
|
+
// When one queue item fails, immediately cancel
|
|
59
|
+
Promise.all(queue)
|
|
60
|
+
.then(_ => {
|
|
61
|
+
resolve(this.requests);
|
|
62
|
+
})
|
|
63
|
+
.catch(error => {
|
|
64
|
+
reject(error);
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
exports.PCExportWriterQueue = PCExportWriterQueue;
|
|
70
|
+
//# sourceMappingURL=ExportWriterQueue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExportWriterQueue.js","sourceRoot":"","sources":["../../../../../src/engine/writing/queue/ExportWriterQueue.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,aAAa;AACb,EAAE;AACF,2BAA2B;AAC3B,sDAAsD;AACtD,EAAE;;;AAMF,6EAA2E;AAG3E,8GAA8G;AAC9G,sBAAsB;AAEtB,8GAA8G;AAC9G,4BAA4B;AAE5B,MAAa,mBAAmB;IAgB9B,8GAA8G;IAC9G,eAAe;IAEf,YAAY,aAAoC;QAVhD,uBAAkB,GAAY,KAAK,CAAA;QACnC,eAAU,GAAY,KAAK,CAAA;QAUzB,IAAI,CAAC,aAAa,GAAG,aAAa,CAAA;QAElC,IAAI,CAAC,iBAAiB,GAAG,IAAI,KAAK,EAAgC,CAAA;QAClE,IAAI,CAAC,QAAQ,GAAG,IAAI,KAAK,EAAyB,CAAA;QAClD,IAAI,CAAC,iBAAiB,GAAG,CAAC,CAAA;IAC5B,CAAC;IAED,8GAA8G;IAC9G,2BAA2B;IAE3B,gBAAgB,CAAC,OAA8B;QAC7C,mBAAmB;QACnB,IAAI,SAAS,GAAG,IAAI,yDAA4B,CAAC,OAAO,CAAC,CAAA;QAEzD,yBAAyB;QACzB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;QAC3B,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;IACxC,CAAC;IAED,iBAAiB,CAAC,QAAsC;QACtD,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;YACnB,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAA;QAC1B,CAAC,CAAC,CAAA;IACJ,CAAC;IAED,UAAU;QACR,IAAI,CAAC,iBAAiB,GAAG,CAAC,CAAA;QAC1B,IAAI,CAAC,iBAAiB,GAAG,EAAE,CAAA;IAC7B,CAAC;IAED,8GAA8G;IAC9G,qBAAqB;IAErB,YAAY;QACV,+CAA+C;QAC/C,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAA;QAC9B,IAAI,CAAC,iBAAiB,GAAG,CAAC,CAAA;QAE1B,yDAAyD;QACzD,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACrC,IAAI,KAAK,GAAG,IAAI,KAAK,EAAkC,CAAA;YACvD,KAAK,IAAI,SAAS,IAAI,IAAI,CAAC,iBAAiB,EAAE;gBAC5C,IAAI,OAAO,GAAG,SAAS,CAAC,gBAAgB,EAAE,CAAA;gBAC1C,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;aACpB;YAED,gDAAgD;YAChD,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC;iBACf,IAAI,CAAC,CAAC,CAAC,EAAE;gBACR,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;YACxB,CAAC,CAAC;iBACD,KAAK,CAAC,KAAK,CAAC,EAAE;gBACb,MAAM,CAAC,KAAK,CAAC,CAAA;YACf,CAAC,CAAC,CAAA;QACN,CAAC,CAAC,CAAA;IACJ,CAAC;CACF;AA5ED,kDA4EC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
//
|
|
3
|
+
// PCExportWriterQueueOperation.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.PCExportWriterQueueOperation = void 0;
|
|
11
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
12
|
+
// MARK: - Definitions
|
|
13
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
14
|
+
// MARK: - Object definition
|
|
15
|
+
class PCExportWriterQueueOperation {
|
|
16
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
17
|
+
// MARK: - Init
|
|
18
|
+
constructor(request) {
|
|
19
|
+
this.request = request;
|
|
20
|
+
}
|
|
21
|
+
processOperation() {
|
|
22
|
+
return new Promise((respond, reject) => {
|
|
23
|
+
// Generate request data, then resolve the promise
|
|
24
|
+
this.request
|
|
25
|
+
.writeItem()
|
|
26
|
+
.then(_ => {
|
|
27
|
+
respond(this.request);
|
|
28
|
+
})
|
|
29
|
+
.catch(error => {
|
|
30
|
+
reject(error);
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.PCExportWriterQueueOperation = PCExportWriterQueueOperation;
|
|
36
|
+
//# sourceMappingURL=ExportWriterQueueOperation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExportWriterQueueOperation.js","sourceRoot":"","sources":["../../../../../src/engine/writing/queue/ExportWriterQueueOperation.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,mCAAmC;AACnC,aAAa;AACb,EAAE;AACF,2BAA2B;AAC3B,sDAAsD;AACtD,EAAE;;;AAOF,8GAA8G;AAC9G,sBAAsB;AAEtB,8GAA8G;AAC9G,4BAA4B;AAE5B,MAAa,4BAA4B;IAOvC,8GAA8G;IAC9G,eAAe;IAEf,YAAY,OAA8B;QACxC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;IACxB,CAAC;IAED,gBAAgB;QACd,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACrC,kDAAkD;YAClD,IAAI,CAAC,OAAO;iBACT,SAAS,EAAE;iBACX,IAAI,CAAC,CAAC,CAAC,EAAE;gBACR,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;YACvB,CAAC,CAAC;iBACD,KAAK,CAAC,KAAK,CAAC,EAAE;gBACb,MAAM,CAAC,KAAK,CAAC,CAAA;YACf,CAAC,CAAC,CAAA;QACN,CAAC,CAAC,CAAA;IACJ,CAAC;CACF;AA3BD,oEA2BC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { PCExporterMapBlueprint } from './../../../model/maps/ExporterMapBlueprint';
|
|
2
|
+
import { PCExportConfiguration } from './../../configuration/ExportConfiguration';
|
|
3
|
+
import { PCExportItem } from './../../items/construction/ExportItem';
|
|
4
|
+
export declare class PCExportWriterRequest {
|
|
5
|
+
item: PCExportItem;
|
|
6
|
+
map: PCExporterMapBlueprint;
|
|
7
|
+
configuration: PCExportConfiguration;
|
|
8
|
+
processingError: Error | null;
|
|
9
|
+
processingFinished: boolean;
|
|
10
|
+
constructor(configuration: PCExportConfiguration, item: PCExportItem, map: PCExporterMapBlueprint);
|
|
11
|
+
writeItem(): Promise<PCExportItem>;
|
|
12
|
+
requestSuccesful(_: PCExportItem): void;
|
|
13
|
+
requestFailed(error: Error): void;
|
|
14
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
//
|
|
3
|
+
// PCExportWriterRequest.ts
|
|
4
|
+
// Pulsar
|
|
5
|
+
//
|
|
6
|
+
// Created by Jiri Trecak.
|
|
7
|
+
// Copyright © 2020 Jiri Trecak. All rights reserved.
|
|
8
|
+
//
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.PCExportWriterRequest = void 0;
|
|
11
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
12
|
+
// MARK: - Definitions
|
|
13
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
14
|
+
// MARK: - Object definition
|
|
15
|
+
class PCExportWriterRequest {
|
|
16
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
17
|
+
// MARK: - Init
|
|
18
|
+
constructor(configuration, item, map) {
|
|
19
|
+
// States
|
|
20
|
+
this.processingError = null;
|
|
21
|
+
this.processingFinished = false;
|
|
22
|
+
this.item = item;
|
|
23
|
+
this.map = map;
|
|
24
|
+
this.configuration = configuration;
|
|
25
|
+
}
|
|
26
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
27
|
+
// MARK: - Content production
|
|
28
|
+
writeItem() {
|
|
29
|
+
throw Error('Content must be written by each individual subclass');
|
|
30
|
+
}
|
|
31
|
+
requestSuccesful(_) {
|
|
32
|
+
this.processingFinished = true;
|
|
33
|
+
}
|
|
34
|
+
requestFailed(error) {
|
|
35
|
+
this.processingFinished = true;
|
|
36
|
+
this.processingError = error;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
exports.PCExportWriterRequest = PCExportWriterRequest;
|
|
40
|
+
//# sourceMappingURL=ExportWriterRequest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExportWriterRequest.js","sourceRoot":"","sources":["../../../../../src/engine/writing/requests/ExportWriterRequest.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,4BAA4B;AAC5B,UAAU;AACV,EAAE;AACF,2BAA2B;AAC3B,sDAAsD;AACtD,EAAE;;;AASF,8GAA8G;AAC9G,sBAAsB;AAEtB,8GAA8G;AAC9G,4BAA4B;AAE5B,MAAa,qBAAqB;IAehC,8GAA8G;IAC9G,eAAe;IAEf,YAAY,aAAoC,EAAE,IAAkB,EAAE,GAA2B;QAPjG,SAAS;QACT,oBAAe,GAAiB,IAAI,CAAA;QACpC,uBAAkB,GAAY,KAAK,CAAA;QAMjC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAChB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAA;QACd,IAAI,CAAC,aAAa,GAAG,aAAa,CAAA;IACpC,CAAC;IAED,8GAA8G;IAC9G,6BAA6B;IAE7B,SAAS;QACP,MAAM,KAAK,CAAC,qDAAqD,CAAC,CAAA;IACpE,CAAC;IAED,gBAAgB,CAAC,CAAe;QAC9B,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAA;IAChC,CAAC;IAED,aAAa,CAAC,KAAY;QACxB,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAA;QAC9B,IAAI,CAAC,eAAe,GAAG,KAAK,CAAA;IAC9B,CAAC;CACF;AAvCD,sDAuCC"}
|