@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 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
// import { DSMReferenceStore } from './model/dsm/DSMReferenceStore'
|
|
4
|
+
const Pulsar_1 = require("./pulsar/Pulsar");
|
|
5
|
+
const PulsarStaticAnalysis_1 = require("./pulsar/PulsarStaticAnalysis");
|
|
6
|
+
window.PCPulsar = Pulsar_1.PCPulsar;
|
|
7
|
+
window.PCPulsarStaticAnalysis = PulsarStaticAnalysis_1.PCPulsarStaticAnalysis;
|
|
8
|
+
/*
|
|
9
|
+
(window as any).PCEngineExporterDetail = PCEngineExporterDetail;
|
|
10
|
+
(window as any).PCEngineSourceDetail = PCEngineSourceDetail;
|
|
11
|
+
(window as any).PCEngineMapDetail = PCEngineMapDetail;
|
|
12
|
+
(window as any).PCEngineBlueprintGroup = PCEngineBlueprintGroup;
|
|
13
|
+
(window as any).PCEngineMapGroup = PCEngineMapGroup;
|
|
14
|
+
(window as any).DSMReferenceStore = DSMReferenceStore;
|
|
15
|
+
*/
|
|
16
|
+
//# sourceMappingURL=browser-bundle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"browser-bundle.js","sourceRoot":"","sources":["../../src/browser-bundle.ts"],"names":[],"mappings":";;AAAA,oEAAoE;AACpE,4CAA0C;AAC1C,wEAEC;AAAC,MAAc,CAAC,QAAQ,GAAG,iBAAQ,CACnC;AAAC,MAAc,CAAC,sBAAsB,GAAG,6CAAsB,CAAA;AAChE;;;;;;;EAOE"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { PCExportConfiguration } from './configuration/ExportConfiguration';
|
|
2
|
+
import { PCExportItemWriter } from './writing/writers/ExportItemWriter';
|
|
3
|
+
import { PCExportItemProducer } from './items/ExportItemProducer';
|
|
4
|
+
import { PCExportDataProducer } from './generation/ExportDataProducer';
|
|
5
|
+
import { PCExportWriterResponse } from './writing/requests/ExportWriterResponse';
|
|
6
|
+
import { PCExportWriterMemoryStore } from './writing/writers/memory/ExportWriterStore';
|
|
7
|
+
export declare class PCExportEngine {
|
|
8
|
+
dataProducer: PCExportDataProducer;
|
|
9
|
+
itemProducer: PCExportItemProducer;
|
|
10
|
+
itemWriter: PCExportItemWriter;
|
|
11
|
+
configuration: PCExportConfiguration;
|
|
12
|
+
runId: string;
|
|
13
|
+
constructor(configuration: PCExportConfiguration);
|
|
14
|
+
processExportValidate(): Promise<boolean>;
|
|
15
|
+
processExport(): Promise<PCExportWriterMemoryStore>;
|
|
16
|
+
processExportValidated(): Promise<Array<PCExportWriterResponse>>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
//
|
|
3
|
+
// ExportEngine.ts
|
|
4
|
+
// Pulsar
|
|
5
|
+
//
|
|
6
|
+
// Created by Jiri Trecak.
|
|
7
|
+
// Copyright © 2020 Supernova. All rights reserved.
|
|
8
|
+
//
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.PCExportEngine = void 0;
|
|
11
|
+
const ExportItemWriter_1 = require("./writing/writers/ExportItemWriter");
|
|
12
|
+
const ExportItemProducer_1 = require("./items/ExportItemProducer");
|
|
13
|
+
const ExportDataProducer_1 = require("./generation/ExportDataProducer");
|
|
14
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
15
|
+
// MARK: - Definitions
|
|
16
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
17
|
+
// MARK: - Interpreter Definition
|
|
18
|
+
class PCExportEngine {
|
|
19
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
20
|
+
// MARK: - Setup
|
|
21
|
+
constructor(configuration) {
|
|
22
|
+
this.configuration = configuration;
|
|
23
|
+
// Create managers
|
|
24
|
+
this.dataProducer = new ExportDataProducer_1.PCExportDataProducer(configuration);
|
|
25
|
+
this.itemProducer = new ExportItemProducer_1.PCExportItemProducer(configuration);
|
|
26
|
+
this.itemWriter = new ExportItemWriter_1.PCExportItemWriter(configuration);
|
|
27
|
+
this.runId = 'random-id'; // TODO:
|
|
28
|
+
}
|
|
29
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
30
|
+
// MARK: - Validation
|
|
31
|
+
processExportValidate() {
|
|
32
|
+
// this.progressLogger.log(systemMessage: .validationStarted, id: "")
|
|
33
|
+
// Validate the entire procedure
|
|
34
|
+
// - It is possible to create data based on the configuration of custom exporter
|
|
35
|
+
// - It is possible to convert raw data into write requests
|
|
36
|
+
// - It is possible to write data into final destination
|
|
37
|
+
// Validate data producer
|
|
38
|
+
return new Promise((response, reject) => {
|
|
39
|
+
this.dataProducer
|
|
40
|
+
.validateCanProduceData()
|
|
41
|
+
.then(() => {
|
|
42
|
+
this.itemProducer
|
|
43
|
+
.validateCanProduceItems()
|
|
44
|
+
.then(() => {
|
|
45
|
+
this.itemWriter
|
|
46
|
+
.validateCanWriteItems()
|
|
47
|
+
.then(() => {
|
|
48
|
+
response(true);
|
|
49
|
+
})
|
|
50
|
+
.catch(error => {
|
|
51
|
+
reject(error);
|
|
52
|
+
});
|
|
53
|
+
})
|
|
54
|
+
.catch(error => {
|
|
55
|
+
reject(error);
|
|
56
|
+
});
|
|
57
|
+
})
|
|
58
|
+
.catch(error => {
|
|
59
|
+
reject(error);
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
64
|
+
// MARK: - Export
|
|
65
|
+
processExport() {
|
|
66
|
+
return new Promise((resolve, reject) => {
|
|
67
|
+
// Validate both writer, content producer and context loader whether they can produce items
|
|
68
|
+
this.processExportValidate()
|
|
69
|
+
.then(() => {
|
|
70
|
+
// this.progressLogger.log(systemMessage: .validationFinished, id: "")
|
|
71
|
+
// Validation successful, proceed with export
|
|
72
|
+
this.processExportValidated()
|
|
73
|
+
.then(() => {
|
|
74
|
+
resolve(this.configuration.outputStore);
|
|
75
|
+
})
|
|
76
|
+
.catch(error => {
|
|
77
|
+
// Export failed, error out
|
|
78
|
+
reject(error);
|
|
79
|
+
});
|
|
80
|
+
})
|
|
81
|
+
.catch(error => {
|
|
82
|
+
// Validation failed, error out
|
|
83
|
+
reject(error);
|
|
84
|
+
});
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
processExportValidated() {
|
|
88
|
+
return new Promise((resolve, reject) => {
|
|
89
|
+
// this.progressLogger.log(systemMessage: .exportStarted, id: "")
|
|
90
|
+
// Generate data pieces out of the context / configuration using content producer
|
|
91
|
+
this.dataProducer
|
|
92
|
+
.produceData()
|
|
93
|
+
.then(dataProducerResponses => {
|
|
94
|
+
// Convert responses into items that have all the information to write them into their final destination
|
|
95
|
+
this.itemProducer
|
|
96
|
+
.produceItemsFromResponses(dataProducerResponses)
|
|
97
|
+
.then(itemProducerResponses => {
|
|
98
|
+
// Write items to their final destinations using one of the writers
|
|
99
|
+
this.itemWriter
|
|
100
|
+
.write(itemProducerResponses)
|
|
101
|
+
.then(writerResponses => {
|
|
102
|
+
resolve(writerResponses);
|
|
103
|
+
})
|
|
104
|
+
.catch(error => {
|
|
105
|
+
// Write failed, reject
|
|
106
|
+
reject(error);
|
|
107
|
+
});
|
|
108
|
+
})
|
|
109
|
+
.catch(error => {
|
|
110
|
+
// Item production failed, reject
|
|
111
|
+
reject(error);
|
|
112
|
+
});
|
|
113
|
+
})
|
|
114
|
+
.catch(error => {
|
|
115
|
+
// Context generation failed, reject
|
|
116
|
+
reject(error);
|
|
117
|
+
});
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
exports.PCExportEngine = PCExportEngine;
|
|
122
|
+
//# sourceMappingURL=ExportEngine.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExportEngine.js","sourceRoot":"","sources":["../../../src/engine/ExportEngine.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,mBAAmB;AACnB,UAAU;AACV,EAAE;AACF,2BAA2B;AAC3B,oDAAoD;AACpD,EAAE;;;AAMF,yEAAuE;AACvE,mEAAiE;AACjE,wEAAsE;AAItE,8GAA8G;AAC9G,sBAAsB;AAEtB,8GAA8G;AAC9G,iCAAiC;AAEjC,MAAa,cAAc;IAUzB,8GAA8G;IAC9G,gBAAgB;IAEhB,YAAY,aAAoC;QAC9C,IAAI,CAAC,aAAa,GAAG,aAAa,CAAA;QAElC,kBAAkB;QAClB,IAAI,CAAC,YAAY,GAAG,IAAI,yCAAoB,CAAC,aAAa,CAAC,CAAA;QAC3D,IAAI,CAAC,YAAY,GAAG,IAAI,yCAAoB,CA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AA;YACf,CAAC,CAAC,CAAA;QACN,CAAC,CAAC,CAAA;IACJ,CAAC;CACF;AAxHD,wCAwHC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { PCExporter } from './../../model/exporters/Exporter';
|
|
2
|
+
import { PCLogger } from '../../tools/Logger';
|
|
3
|
+
import { DSMReferenceStore } from './../../model/dsm/DSMReferenceStore';
|
|
4
|
+
import { PCExportWriterMemoryStore } from './../writing/writers/memory/ExportWriterStore';
|
|
5
|
+
import { DSMBridgeConfiguration, DSMExecutionContext } from '@supernova-studio/pulsar-language';
|
|
6
|
+
import { PCPulsarExporterMode } from '../../pulsar/Pulsar';
|
|
7
|
+
export declare class PCExportConfiguration {
|
|
8
|
+
exporter: PCExporter;
|
|
9
|
+
exportMode: PCPulsarExporterMode;
|
|
10
|
+
logger: PCLogger;
|
|
11
|
+
dsmStore: DSMReferenceStore;
|
|
12
|
+
dsmBridgeConfig: DSMBridgeConfiguration;
|
|
13
|
+
outputStore: PCExportWriterMemoryStore;
|
|
14
|
+
outputPathPrefix: string;
|
|
15
|
+
sandboxData: Object;
|
|
16
|
+
constructor(exporter: PCExporter, logger: PCLogger, dsmStore: DSMReferenceStore, dsmBridgeConfig: DSMBridgeConfiguration, exportMode: PCPulsarExporterMode, sandboxData: Object);
|
|
17
|
+
newExecutionContext(): DSMExecutionContext;
|
|
18
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
//
|
|
3
|
+
// PCExportConfiguration.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.PCExportConfiguration = void 0;
|
|
11
|
+
const ExportWriterStore_1 = require("./../writing/writers/memory/ExportWriterStore");
|
|
12
|
+
const pulsar_language_1 = require("@supernova-studio/pulsar-language");
|
|
13
|
+
const BlueprintLoader_1 = require("../loaders/BlueprintLoader");
|
|
14
|
+
const Logger_1 = require("@supernova-studio/pulsar-language/build/main/interpreter/loggers/Logger");
|
|
15
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
16
|
+
// MARK: - Class
|
|
17
|
+
class PCExportConfiguration {
|
|
18
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
19
|
+
// MARK: - Setup
|
|
20
|
+
constructor(exporter, logger, dsmStore, dsmBridgeConfig, exportMode, sandboxData) {
|
|
21
|
+
this.outputPathPrefix = '';
|
|
22
|
+
this.exporter = exporter;
|
|
23
|
+
this.exportMode = exportMode;
|
|
24
|
+
// Core output pipes
|
|
25
|
+
this.logger = logger;
|
|
26
|
+
this.outputStore = new ExportWriterStore_1.PCExportWriterMemoryStore();
|
|
27
|
+
// DSM configuration
|
|
28
|
+
this.dsmStore = dsmStore;
|
|
29
|
+
this.dsmBridgeConfig = dsmBridgeConfig;
|
|
30
|
+
// Sandbox data
|
|
31
|
+
this.sandboxData = sandboxData;
|
|
32
|
+
}
|
|
33
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
34
|
+
// MARK: - Convenience
|
|
35
|
+
newExecutionContext() {
|
|
36
|
+
// Create new loaders, emitters, loggers and bridge for execution of every source. Each request has its own separate execution context
|
|
37
|
+
let blueprintLoader = new BlueprintLoader_1.PCBlueprintLoader(this.exporter);
|
|
38
|
+
let blueprintEmitter = new pulsar_language_1.PLMemoryBlueprintEmitter(false);
|
|
39
|
+
let logger = new Logger_1.PLLogger();
|
|
40
|
+
let bridge = new pulsar_language_1.DSMBridge(this.dsmBridgeConfig);
|
|
41
|
+
// Retrieve context
|
|
42
|
+
let context = new pulsar_language_1.DSMExecutionContext(blueprintLoader, blueprintEmitter, logger, bridge, this.sandboxData);
|
|
43
|
+
return context;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
exports.PCExportConfiguration = PCExportConfiguration;
|
|
47
|
+
//# sourceMappingURL=ExportConfiguration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExportConfiguration.js","sourceRoot":"","sources":["../../../../src/engine/configuration/ExportConfiguration.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,4BAA4B;AAC5B,aAAa;AACb,EAAE;AACF,2BAA2B;AAC3B,sDAAsD;AACtD,EAAE;;;AAQF,qFAAyF;AACzF,uEAK0C;AAC1C,gEAA8D;AAC9D,oGAAkG;AAGlG,8GAA8G;AAC9G,gBAAgB;AAEhB,MAAa,qBAAqB;IAgBhC,8GAA8G;IAC9G,gBAAgB;IAEhB,YACE,QAAoB,EACpB,MAAgB,EAChB,QAA2B,EAC3B,eAAuC,EACvC,UAAgC,EAChC,WAAmB;QAbrB,qBAAgB,GAAW,EAAE,CAAA;QAe3B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;QACxB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAA;QAE5B,oBAAoB;QACpB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACpB,IAAI,CAAC,WAAW,GAAG,IAAI,6CAAyB,EAAE,CAAA;QAElD,oBAAoB;QACpB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;QACxB,IAAI,CAAC,eAAe,GAAG,eAAe,CAAA;QAEtC,eAAe;QACf,IAAI,CAAC,WAAW,GAAG,WAAW,CAAA;IAChC,CAAC;IAED,8GAA8G;IAC9G,sBAAsB;IAEtB,mBAAmB;QACjB,sIAAsI;QACtI,IAAI,eAAe,GAAG,IAAI,mCAAiB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;QAC1D,IAAI,gBAAgB,GAAG,IAAI,0CAAwB,CAAC,KAAK,CAAC,CAAA;QAC1D,IAAI,MAAM,GAAG,IAAI,iBAAQ,EAAE,CAAA;QAC3B,IAAI,MAAM,GAAG,IAAI,2BAAS,CAAC,IAAI,CAAC,eAAe,CAAC,CAAA;QAEhD,mBAAmB;QACnB,IAAI,OAAO,GAAG,IAAI,qCAAmB,CAAC,eAAe,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,WAAW,CAAC,CAAA;QAC1G,OAAO,OAAO,CAAA;IAChB,CAAC;CACF;AAxDD,sDAwDC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { PCExportDataQueue } from './queue/ExportDataQueue';
|
|
2
|
+
import { PCExportConfiguration } from '../configuration/ExportConfiguration';
|
|
3
|
+
import { PCExportDataResponse } from './requests/ExportDataResponse';
|
|
4
|
+
import { PCExporterMapBlueprint } from './../../model/maps/ExporterMapBlueprint';
|
|
5
|
+
import { PCExportDataRequest } from './requests/ExportDataRequest';
|
|
6
|
+
export declare class PCExportDataProducer {
|
|
7
|
+
configuration: PCExportConfiguration;
|
|
8
|
+
processingQueue: PCExportDataQueue;
|
|
9
|
+
constructor(exportConfiguration: PCExportConfiguration);
|
|
10
|
+
validateCanProduceData(): Promise<void>;
|
|
11
|
+
produceData(): Promise<Array<PCExportDataResponse>>;
|
|
12
|
+
generateRequestsForMap(map: PCExporterMapBlueprint): Array<PCExportDataRequest>;
|
|
13
|
+
generatePrimaryResponsesFromFinishedRequests(requests: Array<PCExportDataRequest>): Array<PCExportDataResponse>;
|
|
14
|
+
generateEmittedResponsesFromFinishedRequests(requests: Array<PCExportDataRequest>): Array<PCExportDataResponse>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
//
|
|
3
|
+
// PCExportDataProducer.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.PCExportDataProducer = void 0;
|
|
11
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
12
|
+
// MARK: - Imports
|
|
13
|
+
const ExportDataQueue_1 = require("./queue/ExportDataQueue");
|
|
14
|
+
const ExportDataEmittedResponseProducer_1 = require("./requests/ExportDataEmittedResponseProducer");
|
|
15
|
+
const ExportDataPrimaryResponseProducer_1 = require("./requests/ExportDataPrimaryResponseProducer");
|
|
16
|
+
const ExportDataRequestProducer_1 = require("./requests/ExportDataRequestProducer");
|
|
17
|
+
const Pulsar_1 = require("../../pulsar/Pulsar");
|
|
18
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
19
|
+
// MARK: - Definitions
|
|
20
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --O- --- --- --- --- --- --- --- --- --- ---
|
|
21
|
+
// MARK: - Object definition
|
|
22
|
+
class PCExportDataProducer {
|
|
23
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
24
|
+
// MARK: - Init
|
|
25
|
+
constructor(exportConfiguration) {
|
|
26
|
+
this.configuration = exportConfiguration;
|
|
27
|
+
this.processingQueue = new ExportDataQueue_1.PCExportDataQueue(exportConfiguration);
|
|
28
|
+
}
|
|
29
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
30
|
+
// MARK: - Validation
|
|
31
|
+
validateCanProduceData() {
|
|
32
|
+
// It is always possible to produce data for now, no validation
|
|
33
|
+
return new Promise((resolve, _) => {
|
|
34
|
+
resolve();
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
38
|
+
// MARK: - Content creation
|
|
39
|
+
produceData() {
|
|
40
|
+
return new Promise((resolve, reject) => {
|
|
41
|
+
// Create queue with all processed operations
|
|
42
|
+
for (let map of this.configuration.exporter.outputs.values()) {
|
|
43
|
+
// Filter generated results based on the mode of the exporter. Only allow maps that have appropriate target
|
|
44
|
+
let skipGeneration = false;
|
|
45
|
+
let source = this.configuration.exporter.sourceByIdIgnoringExecutableExtension(map.invoke);
|
|
46
|
+
if (!source) {
|
|
47
|
+
throw `Output defines unknown source '${map.invoke}'`;
|
|
48
|
+
}
|
|
49
|
+
switch (this.configuration.exportMode) {
|
|
50
|
+
case Pulsar_1.PCPulsarExporterMode.ci:
|
|
51
|
+
skipGeneration = !source.targetsCI;
|
|
52
|
+
break;
|
|
53
|
+
case Pulsar_1.PCPulsarExporterMode.docs:
|
|
54
|
+
skipGeneration = !source.targetsDocumentation;
|
|
55
|
+
break;
|
|
56
|
+
case Pulsar_1.PCPulsarExporterMode.sandbox:
|
|
57
|
+
skipGeneration = !source.targetsSandbox;
|
|
58
|
+
break;
|
|
59
|
+
}
|
|
60
|
+
if (!skipGeneration) {
|
|
61
|
+
let requests = this.generateRequestsForMap(map);
|
|
62
|
+
this.processingQueue.addQueuedRequests(requests);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
// Process all items at once
|
|
66
|
+
this.processingQueue
|
|
67
|
+
.processQueue()
|
|
68
|
+
.then(processedRequests => {
|
|
69
|
+
let primaryResponses = this.generatePrimaryResponsesFromFinishedRequests(processedRequests);
|
|
70
|
+
let emittedResponses = this.generateEmittedResponsesFromFinishedRequests(processedRequests);
|
|
71
|
+
let result = primaryResponses.concat(emittedResponses);
|
|
72
|
+
resolve(result);
|
|
73
|
+
})
|
|
74
|
+
.catch(error => {
|
|
75
|
+
reject(error);
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
80
|
+
// MARK: - Request processing
|
|
81
|
+
generateRequestsForMap(map) {
|
|
82
|
+
// Generate array of requests from the source-entry configuration
|
|
83
|
+
let requestProducer = new ExportDataRequestProducer_1.PCExportDataRequestProducer(this.configuration);
|
|
84
|
+
return requestProducer.produceRequestsForMap(map);
|
|
85
|
+
}
|
|
86
|
+
generatePrimaryResponsesFromFinishedRequests(requests) {
|
|
87
|
+
// Generate responses from finished requests. This generates content from primary response, but not potentially emitted files
|
|
88
|
+
// Note: at this point, all requests will have the data, otherwise this is not called. No additional checks are neccessary
|
|
89
|
+
let responseProducer = new ExportDataPrimaryResponseProducer_1.PCExportDataPrimaryResponseProducer();
|
|
90
|
+
return responseProducer.producePrimaryResponsesFromRequests(requests);
|
|
91
|
+
}
|
|
92
|
+
generateEmittedResponsesFromFinishedRequests(requests) {
|
|
93
|
+
// Generate responses from finished requests. This generates content from emitted responses but not from primary content
|
|
94
|
+
// Note: at this point, all requests will have the data, otherwise this is not called. No additional checks are neccessary
|
|
95
|
+
let responseProducer = new ExportDataEmittedResponseProducer_1.PCExportDataEmittedResponseProducer();
|
|
96
|
+
return responseProducer.produceEmittedResponsesFromRequests(requests);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
exports.PCExportDataProducer = PCExportDataProducer;
|
|
100
|
+
//# sourceMappingURL=ExportDataProducer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExportDataProducer.js","sourceRoot":"","sources":["../../../../src/engine/generation/ExportDataProducer.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,2BAA2B;AAC3B,aAAa;AACb,EAAE;AACF,2BAA2B;AAC3B,sDAAsD;AACtD,EAAE;;;AAEF,8GAA8G;AAC9G,kBAAkB;AAElB,6DAA2D;AAG3D,oGAAkG;AAClG,oGAAkG;AAGlG,oFAAkF;AAClF,gDAA0D;AAE1D,8GAA8G;AAC9G,sBAAsB;AAEtB,+GAA+G;AAC/G,4BAA4B;AAE5B,MAAa,oBAAoB;IAO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FC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { PCExportDataQueueOperation } from './ExportDataQueueOperation';
|
|
2
|
+
import { PCExportDataRequest } from '../requests/ExportDataRequest';
|
|
3
|
+
import { PCExportConfiguration } from './../../configuration/ExportConfiguration';
|
|
4
|
+
export declare class PCExportDataQueue {
|
|
5
|
+
configuration: PCExportConfiguration;
|
|
6
|
+
waitingOperations: Array<PCExportDataQueueOperation>;
|
|
7
|
+
isLockedForChanges: boolean;
|
|
8
|
+
isFinished: boolean;
|
|
9
|
+
requests: Array<PCExportDataRequest>;
|
|
10
|
+
requestsCompleted: number;
|
|
11
|
+
constructor(configuration: PCExportConfiguration);
|
|
12
|
+
addQueuedRequest(request: PCExportDataRequest): void;
|
|
13
|
+
addQueuedRequests(requests: Array<PCExportDataRequest>): void;
|
|
14
|
+
clearQueue(): void;
|
|
15
|
+
processQueue(): Promise<Array<PCExportDataRequest>>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
//
|
|
3
|
+
// PCExportDataQueue.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.PCExportDataQueue = void 0;
|
|
11
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
12
|
+
// MARK: - Imports
|
|
13
|
+
const ExportDataQueueOperation_1 = require("./ExportDataQueueOperation");
|
|
14
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
15
|
+
// MARK: - Definitions
|
|
16
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
17
|
+
// MARK: - Object definition
|
|
18
|
+
class PCExportDataQueue {
|
|
19
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
20
|
+
// MARK: - Init
|
|
21
|
+
constructor(configuration) {
|
|
22
|
+
this.isLockedForChanges = false;
|
|
23
|
+
this.isFinished = false;
|
|
24
|
+
this.configuration = configuration;
|
|
25
|
+
this.waitingOperations = new Array();
|
|
26
|
+
this.requests = new Array();
|
|
27
|
+
this.requestsCompleted = 0;
|
|
28
|
+
}
|
|
29
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
30
|
+
// MARK: - Queue management
|
|
31
|
+
addQueuedRequest(request) {
|
|
32
|
+
// Create operation
|
|
33
|
+
let operation = new ExportDataQueueOperation_1.PCExportDataQueueOperation(request);
|
|
34
|
+
// Add operation to queue
|
|
35
|
+
this.requests.push(request);
|
|
36
|
+
this.waitingOperations.push(operation);
|
|
37
|
+
}
|
|
38
|
+
addQueuedRequests(requests) {
|
|
39
|
+
requests.forEach(r => {
|
|
40
|
+
this.addQueuedRequest(r);
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
clearQueue() {
|
|
44
|
+
this.requestsCompleted = 0;
|
|
45
|
+
this.waitingOperations = [];
|
|
46
|
+
}
|
|
47
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
48
|
+
// MARK: - Processing
|
|
49
|
+
processQueue() {
|
|
50
|
+
// Sort the files and add them to export buffer
|
|
51
|
+
this.isLockedForChanges = true;
|
|
52
|
+
this.requestsCompleted = 0;
|
|
53
|
+
// Create new queue promise, processing all items at once
|
|
54
|
+
return new Promise((resolve, reject) => {
|
|
55
|
+
let queue = new Array();
|
|
56
|
+
for (let operation of this.waitingOperations) {
|
|
57
|
+
let promise = operation.processOperation();
|
|
58
|
+
queue.push(promise);
|
|
59
|
+
}
|
|
60
|
+
// When one queue item fails, immediately cancel
|
|
61
|
+
Promise.all(queue)
|
|
62
|
+
.then(result => {
|
|
63
|
+
resolve(result);
|
|
64
|
+
})
|
|
65
|
+
.catch(error => {
|
|
66
|
+
reject(error);
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
exports.PCExportDataQueue = PCExportDataQueue;
|
|
72
|
+
//# sourceMappingURL=ExportDataQueue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExportDataQueue.js","sourceRoot":"","sources":["../../../../../src/engine/generation/queue/ExportDataQueue.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,wBAAwB;AACxB,aAAa;AACb,EAAE;AACF,2BAA2B;AAC3B,sDAAsD;AACtD,EAAE;;;AAEF,8GAA8G;AAC9G,kBAAkB;AAElB,yEAAuE;AAIvE,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,CA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ecak. All rights reserved.
|
|
8
|
+
//
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.PCExportDataQueueOperation = void 0;
|
|
11
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
12
|
+
// MARK: - Definitions
|
|
13
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
14
|
+
// MARK: - Object definition
|
|
15
|
+
class PCExportDataQueueOperation {
|
|
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
|
+
.produceData()
|
|
26
|
+
.then(response => {
|
|
27
|
+
respond(response);
|
|
28
|
+
})
|
|
29
|
+
.catch(error => {
|
|
30
|
+
reject(error);
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.PCExportDataQueueOperation = PCExportDataQueueOperation;
|
|
36
|
+
//# sourceMappingURL=ExportDataQueueOperation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExportDataQueueOperation.js","sourceRoot":"","sources":["../../../../../src/engine/generation/queue/ExportDataQueueOperation.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,iCAAiC;AACjC,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,QAAQ,CAAC,EAAE;gBACf,OAAO,CAAC,QAAQ,CAAC,CAAA;YACnB,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,7 @@
|
|
|
1
|
+
import { PCExportDataRequest } from './ExportDataRequest';
|
|
2
|
+
import { PCExportDataResponse } from './ExportDataResponse';
|
|
3
|
+
export declare class PCExportDataEmittedResponseProducer {
|
|
4
|
+
constructor();
|
|
5
|
+
produceEmittedResponsesFromRequests(requests: Array<PCExportDataRequest>): Array<PCExportDataResponse>;
|
|
6
|
+
produceEmittedResponsesFromRequest(request: PCExportDataRequest): Array<PCExportDataResponse>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
//
|
|
3
|
+
// PCExportDataEmittedResponseProducer.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.PCExportDataEmittedResponseProducer = void 0;
|
|
11
|
+
const ExportDataResponse_1 = require("./ExportDataResponse");
|
|
12
|
+
const ExportDataRequestDataStore_1 = require("./ExportDataRequestDataStore");
|
|
13
|
+
const ExportDataRequestNameStore_1 = require("./ExportDataRequestNameStore");
|
|
14
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
15
|
+
// MARK: - Imports
|
|
16
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
17
|
+
// MARK: - Definitions
|
|
18
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
19
|
+
// MARK: - Object definition
|
|
20
|
+
class PCExportDataEmittedResponseProducer {
|
|
21
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
22
|
+
// MARK: - Properties
|
|
23
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
24
|
+
// MARK: - Init
|
|
25
|
+
constructor() { }
|
|
26
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
27
|
+
// MARK: - Response production
|
|
28
|
+
produceEmittedResponsesFromRequests(requests) {
|
|
29
|
+
let result = [];
|
|
30
|
+
for (let request of requests) {
|
|
31
|
+
let responses = this.produceEmittedResponsesFromRequest(request);
|
|
32
|
+
for (let response of responses) {
|
|
33
|
+
result.push(response);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return result;
|
|
37
|
+
}
|
|
38
|
+
produceEmittedResponsesFromRequest(request) {
|
|
39
|
+
let responses = [];
|
|
40
|
+
// Create response for each emitted content - each emitted content produces exactly one file
|
|
41
|
+
for (let emittedContent of request.emittedContent) {
|
|
42
|
+
let filename = emittedContent.filename;
|
|
43
|
+
let content = emittedContent.content;
|
|
44
|
+
// Create data and name store from the emitted data
|
|
45
|
+
let dataStore = ExportDataRequestDataStore_1.PCExportDataRequestDataStore.storeWithPlainData(content);
|
|
46
|
+
let nameStore = ExportDataRequestNameStore_1.PCExportDataRequestNameStore.storeWithResolvedName(filename);
|
|
47
|
+
let response = new ExportDataResponse_1.PCExportDataResponse(request, request.map, dataStore, nameStore, []);
|
|
48
|
+
responses.push(response);
|
|
49
|
+
}
|
|
50
|
+
return responses;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
exports.PCExportDataEmittedResponseProducer = PCExportDataEmittedResponseProducer;
|
|
54
|
+
//# sourceMappingURL=ExportDataEmittedResponseProducer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExportDataEmittedResponseProducer.js","sourceRoot":"","sources":["../../../../../src/engine/generation/requests/ExportDataEmittedResponseProducer.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0CAA0C;AAC1C,aAAa;AACb,EAAE;AACF,2BAA2B;AAC3B,sDAAsD;AACtD,EAAE;;;AAGF,6DAA2D;AAC3D,6EAA2E;AAC3E,6EAA2E;AAE3E,8GAA8G;AAC9G,kBAAkB;AAElB,8GAA8G;AAC9G,sBAAsB;AAEtB,8GAA8G;AAC9G,4BAA4B;AAE5B,MAAa,mCAAmC;IAC9C,8GAA8G;IAC9G,qBAAqB;IAErB,8GAA8G;IAC9G,eAAe;IAEf,gBAAe,CAAC;IAEhB,8GAA8G;IAC9G,8BAA8B;IAE9B,mCAAmC,CAAC,QAAoC;QACtE,IAAI,MAAM,GAAgC,EAAE,CAAA;QAC5C,KAAK,IAAI,OAAO,IAAI,QAAQ,EAAE;YAC5B,IAAI,SAAS,GAAG,IAAI,CAAC,kCAAkC,CAAC,OAAO,CAAC,CAAA;YAChE,KAAK,IAAI,QAAQ,IAAI,SAAS,EAAE;gBAC9B,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;aACtB;SACF;QAED,OAAO,MAAM,CAAA;IACf,CAAC;IAED,kCAAkC,CAAC,OAA4B;QAC7D,IAAI,SAAS,GAAgC,EAAE,CAAA;QAE/C,4FAA4F;QAC5F,KAAK,IAAI,cAAc,IAAI,OAAO,CAAC,cAAc,EAAE;YACjD,IAAI,QAAQ,GAAG,cAAc,CAAC,QAAQ,CAAA;YACtC,IAAI,OAAO,GAAG,cAAc,CAAC,OAAO,CAAA;YAEpC,mDAAmD;YACnD,IAAI,SAAS,GAAG,yDAA4B,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAA;YACxE,IAAI,SAAS,GAAG,yDAA4B,CAAC,qBAAqB,CAAC,QAAQ,CAAC,CAAA;YAC5E,IAAI,QAAQ,GAAG,IAAI,yCAAoB,CAAC,OAAO,EAAE,OAAO,CAAC,GAAG,EAAE,SAAS,EAAE,SAAS,EAAE,EAAE,CAAC,CAAA;YACvF,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;SACzB;QAED,OAAO,SAAS,CAAA;IAClB,CAAC;CACF;AAzCD,kFAyCC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PCExportDataResponse } from './ExportDataResponse';
|
|
2
|
+
import { PCExportDataRequest } from './ExportDataRequest';
|
|
3
|
+
export declare class PCExportDataPrimaryResponseProducer {
|
|
4
|
+
constructor();
|
|
5
|
+
producePrimaryResponsesFromRequests(requests: Array<PCExportDataRequest>): Array<PCExportDataResponse>;
|
|
6
|
+
producePrimaryResponseFromRequest(request: PCExportDataRequest): PCExportDataResponse;
|
|
7
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
//
|
|
3
|
+
// PCExportDataPrimaryResponseProducer.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.PCExportDataPrimaryResponseProducer = void 0;
|
|
11
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
12
|
+
// MARK: - Imports
|
|
13
|
+
const ExportDataResponse_1 = require("./ExportDataResponse");
|
|
14
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
15
|
+
// MARK: - Definitions
|
|
16
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
17
|
+
// MARK: - Object definition
|
|
18
|
+
class PCExportDataPrimaryResponseProducer {
|
|
19
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
20
|
+
// MARK: - Properties
|
|
21
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
22
|
+
// MARK: - Init
|
|
23
|
+
constructor() { }
|
|
24
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
25
|
+
// MARK: - Response production
|
|
26
|
+
producePrimaryResponsesFromRequests(requests) {
|
|
27
|
+
let responses = [];
|
|
28
|
+
for (let request of requests) {
|
|
29
|
+
let response = this.producePrimaryResponseFromRequest(request);
|
|
30
|
+
responses.push(response);
|
|
31
|
+
}
|
|
32
|
+
return responses;
|
|
33
|
+
}
|
|
34
|
+
producePrimaryResponseFromRequest(request) {
|
|
35
|
+
let response = new ExportDataResponse_1.PCExportDataResponse(request, request.map, request.dataStore, request.nameStore, request.emittedContent);
|
|
36
|
+
return response;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
exports.PCExportDataPrimaryResponseProducer = PCExportDataPrimaryResponseProducer;
|
|
40
|
+
//# sourceMappingURL=ExportDataPrimaryResponseProducer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExportDataPrimaryResponseProducer.js","sourceRoot":"","sources":["../../../../../src/engine/generation/requests/ExportDataPrimaryResponseProducer.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0CAA0C;AAC1C,aAAa;AACb,EAAE;AACF,2BAA2B;AAC3B,sDAAsD;AACtD,EAAE;;;AAEF,8GAA8G;AAC9G,kBAAkB;AAElB,6DAA2D;AAG3D,8GAA8G;AAC9G,sBAAsB;AAEtB,8GAA8G;AAC9G,4BAA4B;AAE5B,MAAa,mCAAmC;IAC9C,8GAA8G;IAC9G,qBAAqB;IAErB,8GAA8G;IAC9G,eAAe;IAEf,gBAAe,CAAC;IAEhB,8GAA8G;IAC9G,8BAA8B;IAE9B,mCAAmC,CAAC,QAAoC;QACtE,IAAI,SAAS,GAAgC,EAAE,CAAA;QAC/C,KAAK,IAAI,OAAO,IAAI,QAAQ,EAAE;YAC5B,IAAI,QAAQ,GAAG,IAAI,CAAC,iCAAiC,CAAC,OAAO,CAAC,CAAA;YAC9D,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;SACzB;QAED,OAAO,SAAS,CAAA;IAClB,CAAC;IAED,iCAAiC,CAAC,OAA4B;QAC5D,IAAI,QAAQ,GAAG,IAAI,yCAAoB,CACrC,OAAO,EACP,OAAO,CAAC,GAAG,EACX,OAAO,CAAC,SAAS,EACjB,OAAO,CAAC,SAAS,EACjB,OAAO,CAAC,cAAc,CACvB,CAAA;QACD,OAAO,QAAQ,CAAA;IACjB,CAAC;CACF;AAhCD,kFAgCC"}
|