@supernova-studio/pulsar-core 1.0.32 → 1.0.36
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-core-dev.js +67725 -0
- package/build/browser/pulsar-core-dev.js.map +1 -0
- package/build/browser/pulsar-core.js +7 -0
- package/build/browser/pulsar-core.js.LICENSE.txt +31 -0
- package/build/browser/pulsar-core.js.map +1 -0
- package/build/main/pulsar-core.js +22495 -0
- package/build/main/pulsar-core.js.map +1 -0
- package/build/typings/core/tsconfig.typings.tsbuildinfo +5035 -0
- package/package.json +19 -15
- package/tsconfig.typings.json +19 -0
- package/webpack.config.browser.dev.js +52 -0
- package/webpack.config.browser.js +52 -0
- package/webpack.config.main.js +45 -0
- package/build/browser/pulsar.js +0 -142584
- package/build/browser/pulsar.min.js +0 -270
- package/build/main/browser-bundle.d.ts +0 -1
- package/build/main/browser-bundle.js +0 -16
- package/build/main/browser-bundle.js.map +0 -1
- package/build/main/engine/ExportEngine.d.ts +0 -17
- package/build/main/engine/ExportEngine.js +0 -122
- package/build/main/engine/ExportEngine.js.map +0 -1
- package/build/main/engine/configuration/ExportConfiguration.d.ts +0 -18
- package/build/main/engine/configuration/ExportConfiguration.js +0 -47
- package/build/main/engine/configuration/ExportConfiguration.js.map +0 -1
- package/build/main/engine/generation/ExportDataProducer.d.ts +0 -15
- package/build/main/engine/generation/ExportDataProducer.js +0 -100
- package/build/main/engine/generation/ExportDataProducer.js.map +0 -1
- package/build/main/engine/generation/queue/ExportDataQueue.d.ts +0 -16
- package/build/main/engine/generation/queue/ExportDataQueue.js +0 -72
- package/build/main/engine/generation/queue/ExportDataQueue.js.map +0 -1
- package/build/main/engine/generation/queue/ExportDataQueueOperation.d.ts +0 -6
- package/build/main/engine/generation/queue/ExportDataQueueOperation.js +0 -36
- package/build/main/engine/generation/queue/ExportDataQueueOperation.js.map +0 -1
- package/build/main/engine/generation/requests/ExportDataEmittedResponseProducer.d.ts +0 -7
- package/build/main/engine/generation/requests/ExportDataEmittedResponseProducer.js +0 -54
- package/build/main/engine/generation/requests/ExportDataEmittedResponseProducer.js.map +0 -1
- package/build/main/engine/generation/requests/ExportDataPrimaryResponseProducer.d.ts +0 -7
- package/build/main/engine/generation/requests/ExportDataPrimaryResponseProducer.js +0 -40
- package/build/main/engine/generation/requests/ExportDataPrimaryResponseProducer.js.map +0 -1
- package/build/main/engine/generation/requests/ExportDataRequest.d.ts +0 -19
- package/build/main/engine/generation/requests/ExportDataRequest.js +0 -55
- package/build/main/engine/generation/requests/ExportDataRequest.js.map +0 -1
- package/build/main/engine/generation/requests/ExportDataRequestDataStore.d.ts +0 -16
- package/build/main/engine/generation/requests/ExportDataRequestDataStore.js +0 -57
- package/build/main/engine/generation/requests/ExportDataRequestDataStore.js.map +0 -1
- package/build/main/engine/generation/requests/ExportDataRequestNameStore.d.ts +0 -22
- package/build/main/engine/generation/requests/ExportDataRequestNameStore.js +0 -86
- package/build/main/engine/generation/requests/ExportDataRequestNameStore.js.map +0 -1
- package/build/main/engine/generation/requests/ExportDataRequestProducer.d.ts +0 -16
- package/build/main/engine/generation/requests/ExportDataRequestProducer.js +0 -149
- package/build/main/engine/generation/requests/ExportDataRequestProducer.js.map +0 -1
- package/build/main/engine/generation/requests/ExportDataResponse.d.ts +0 -13
- package/build/main/engine/generation/requests/ExportDataResponse.js +0 -30
- package/build/main/engine/generation/requests/ExportDataResponse.js.map +0 -1
- package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestBlueprint.d.ts +0 -14
- package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestBlueprint.js +0 -76
- package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestBlueprint.js.map +0 -1
- package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestDSMComponent.d.ts +0 -13
- package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestDSMComponent.js +0 -47
- package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestDSMComponent.js.map +0 -1
- package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestDSMComponentGroup.d.ts +0 -13
- package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestDSMComponentGroup.js +0 -47
- package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestDSMComponentGroup.js.map +0 -1
- package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestDSMGeneric.d.ts +0 -11
- package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestDSMGeneric.js +0 -43
- package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestDSMGeneric.js.map +0 -1
- package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestDSMTheme.d.ts +0 -13
- package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestDSMTheme.js +0 -47
- package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestDSMTheme.js.map +0 -1
- package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestDSMTokenGroup.d.ts +0 -13
- package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestDSMTokenGroup.js +0 -47
- package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestDSMTokenGroup.js.map +0 -1
- package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestDSMTokenType.d.ts +0 -13
- package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestDSMTokenType.js +0 -47
- package/build/main/engine/generation/requests/specific/dsm/ExportDataRequestDSMTokenType.js.map +0 -1
- package/build/main/engine/items/ExportItemProducer.d.ts +0 -14
- package/build/main/engine/items/ExportItemProducer.js +0 -70
- package/build/main/engine/items/ExportItemProducer.js.map +0 -1
- package/build/main/engine/items/construction/ExportItem.d.ts +0 -8
- package/build/main/engine/items/construction/ExportItem.js +0 -25
- package/build/main/engine/items/construction/ExportItem.js.map +0 -1
- package/build/main/engine/items/construction/ExportItemBuilder.d.ts +0 -9
- package/build/main/engine/items/construction/ExportItemBuilder.js +0 -43
- package/build/main/engine/items/construction/ExportItemBuilder.js.map +0 -1
- package/build/main/engine/items/queue/ExportItemQueue.d.ts +0 -16
- package/build/main/engine/items/queue/ExportItemQueue.js +0 -70
- package/build/main/engine/items/queue/ExportItemQueue.js.map +0 -1
- package/build/main/engine/items/queue/ExportItemQueueOperation.d.ts +0 -6
- package/build/main/engine/items/queue/ExportItemQueueOperation.js +0 -36
- package/build/main/engine/items/queue/ExportItemQueueOperation.js.map +0 -1
- package/build/main/engine/items/requests/ExportItemRequest.d.ts +0 -16
- package/build/main/engine/items/requests/ExportItemRequest.js +0 -68
- package/build/main/engine/items/requests/ExportItemRequest.js.map +0 -1
- package/build/main/engine/items/requests/ExportItemRequestProducer.d.ts +0 -8
- package/build/main/engine/items/requests/ExportItemRequestProducer.js +0 -24
- package/build/main/engine/items/requests/ExportItemRequestProducer.js.map +0 -1
- package/build/main/engine/items/requests/ExportItemResponse.d.ts +0 -9
- package/build/main/engine/items/requests/ExportItemResponse.js +0 -25
- package/build/main/engine/items/requests/ExportItemResponse.js.map +0 -1
- package/build/main/engine/items/requests/ExportItemResponseProducer.d.ts +0 -7
- package/build/main/engine/items/requests/ExportItemResponseProducer.js +0 -45
- package/build/main/engine/items/requests/ExportItemResponseProducer.js.map +0 -1
- package/build/main/engine/loaders/BlueprintLoader.d.ts +0 -9
- package/build/main/engine/loaders/BlueprintLoader.js +0 -55
- package/build/main/engine/loaders/BlueprintLoader.js.map +0 -1
- package/build/main/engine/writing/queue/ExportWriterQueue.d.ts +0 -16
- package/build/main/engine/writing/queue/ExportWriterQueue.js +0 -70
- package/build/main/engine/writing/queue/ExportWriterQueue.js.map +0 -1
- package/build/main/engine/writing/queue/ExportWriterQueueOperation.d.ts +0 -6
- package/build/main/engine/writing/queue/ExportWriterQueueOperation.js +0 -36
- package/build/main/engine/writing/queue/ExportWriterQueueOperation.js.map +0 -1
- package/build/main/engine/writing/requests/ExportWriterRequest.d.ts +0 -14
- package/build/main/engine/writing/requests/ExportWriterRequest.js +0 -40
- package/build/main/engine/writing/requests/ExportWriterRequest.js.map +0 -1
- package/build/main/engine/writing/requests/ExportWriterRequestProducer.d.ts +0 -8
- package/build/main/engine/writing/requests/ExportWriterRequestProducer.js +0 -30
- package/build/main/engine/writing/requests/ExportWriterRequestProducer.js.map +0 -1
- package/build/main/engine/writing/requests/ExportWriterResponse.d.ts +0 -9
- package/build/main/engine/writing/requests/ExportWriterResponse.js +0 -25
- package/build/main/engine/writing/requests/ExportWriterResponse.js.map +0 -1
- package/build/main/engine/writing/requests/ExportWriterResponseProducer.d.ts +0 -7
- package/build/main/engine/writing/requests/ExportWriterResponseProducer.js +0 -40
- package/build/main/engine/writing/requests/ExportWriterResponseProducer.js.map +0 -1
- package/build/main/engine/writing/writers/ExportItemWriter.d.ts +0 -14
- package/build/main/engine/writing/writers/ExportItemWriter.js +0 -70
- package/build/main/engine/writing/writers/ExportItemWriter.js.map +0 -1
- package/build/main/engine/writing/writers/ExportWriterRuleProcessor.d.ts +0 -9
- package/build/main/engine/writing/writers/ExportWriterRuleProcessor.js +0 -63
- package/build/main/engine/writing/writers/ExportWriterRuleProcessor.js.map +0 -1
- package/build/main/engine/writing/writers/memory/ExportWriterMemory.d.ts +0 -4
- package/build/main/engine/writing/writers/memory/ExportWriterMemory.js +0 -29
- package/build/main/engine/writing/writers/memory/ExportWriterMemory.js.map +0 -1
- package/build/main/engine/writing/writers/memory/ExportWriterMemoryRequest.d.ts +0 -5
- package/build/main/engine/writing/writers/memory/ExportWriterMemoryRequest.js +0 -59
- package/build/main/engine/writing/writers/memory/ExportWriterMemoryRequest.js.map +0 -1
- package/build/main/engine/writing/writers/memory/ExportWriterStore.d.ts +0 -5
- package/build/main/engine/writing/writers/memory/ExportWriterStore.js +0 -33
- package/build/main/engine/writing/writers/memory/ExportWriterStore.js.map +0 -1
- package/build/main/exports.d.ts +0 -5
- package/build/main/exports.js +0 -15
- package/build/main/exports.js.map +0 -1
- package/build/main/index.d.ts +0 -1
- package/build/main/index.js +0 -14
- package/build/main/index.js.map +0 -1
- package/build/main/model/dsm/DSMReferenceStore.d.ts +0 -28
- package/build/main/model/dsm/DSMReferenceStore.js +0 -100
- package/build/main/model/dsm/DSMReferenceStore.js.map +0 -1
- package/build/main/model/exporters/Exporter.d.ts +0 -53
- package/build/main/model/exporters/Exporter.js +0 -106
- package/build/main/model/exporters/Exporter.js.map +0 -1
- package/build/main/model/maps/ExporterMapBlueprint.d.ts +0 -12
- package/build/main/model/maps/ExporterMapBlueprint.js +0 -39
- package/build/main/model/maps/ExporterMapBlueprint.js.map +0 -1
- package/build/main/model/sources/ExporterSource.d.ts +0 -26
- package/build/main/model/sources/ExporterSource.js +0 -64
- package/build/main/model/sources/ExporterSource.js.map +0 -1
- package/build/main/pulsar/Pulsar.d.ts +0 -105
- package/build/main/pulsar/Pulsar.js +0 -353
- package/build/main/pulsar/Pulsar.js.map +0 -1
- package/build/main/pulsar/PulsarInterface.d.ts +0 -152
- package/build/main/pulsar/PulsarInterface.js +0 -37
- package/build/main/pulsar/PulsarInterface.js.map +0 -1
- package/build/main/pulsar/PulsarStaticAnalysis.d.ts +0 -26
- package/build/main/pulsar/PulsarStaticAnalysis.js +0 -69
- package/build/main/pulsar/PulsarStaticAnalysis.js.map +0 -1
- package/build/main/pulsar/PulsarStaticAnalysisInterface.d.ts +0 -13
- package/build/main/pulsar/PulsarStaticAnalysisInterface.js +0 -10
- package/build/main/pulsar/PulsarStaticAnalysisInterface.js.map +0 -1
- package/build/main/pulsar/managers/PulsarBlueprintManager.d.ts +0 -16
- package/build/main/pulsar/managers/PulsarBlueprintManager.js +0 -76
- package/build/main/pulsar/managers/PulsarBlueprintManager.js.map +0 -1
- package/build/main/pulsar/managers/PulsarCIManager.d.ts +0 -25
- package/build/main/pulsar/managers/PulsarCIManager.js +0 -220
- package/build/main/pulsar/managers/PulsarCIManager.js.map +0 -1
- package/build/main/pulsar/managers/PulsarCodeManager.d.ts +0 -24
- package/build/main/pulsar/managers/PulsarCodeManager.js +0 -180
- package/build/main/pulsar/managers/PulsarCodeManager.js.map +0 -1
- package/build/main/pulsar/managers/PulsarConfigurationManager.d.ts +0 -17
- package/build/main/pulsar/managers/PulsarConfigurationManager.js +0 -88
- package/build/main/pulsar/managers/PulsarConfigurationManager.js.map +0 -1
- package/build/main/pulsar/managers/PulsarExporterManager.d.ts +0 -25
- package/build/main/pulsar/managers/PulsarExporterManager.js +0 -121
- package/build/main/pulsar/managers/PulsarExporterManager.js.map +0 -1
- package/build/main/pulsar/managers/generators/PulsarExporterConfigFileGenerator.d.ts +0 -12
- package/build/main/pulsar/managers/generators/PulsarExporterConfigFileGenerator.js +0 -140
- package/build/main/pulsar/managers/generators/PulsarExporterConfigFileGenerator.js.map +0 -1
- package/build/main/pulsar/managers/generators/PulsarExporterJSONGenerator.d.ts +0 -8
- package/build/main/pulsar/managers/generators/PulsarExporterJSONGenerator.js +0 -45
- package/build/main/pulsar/managers/generators/PulsarExporterJSONGenerator.js.map +0 -1
- package/build/main/pulsar/managers/generators/PulsarExporterSourceFileGenerator.d.ts +0 -9
- package/build/main/pulsar/managers/generators/PulsarExporterSourceFileGenerator.js +0 -45
- package/build/main/pulsar/managers/generators/PulsarExporterSourceFileGenerator.js.map +0 -1
- package/build/main/pulsar/managers/generators/PulsarExporterZIPGenerator.d.ts +0 -7
- package/build/main/pulsar/managers/generators/PulsarExporterZIPGenerator.js +0 -63
- package/build/main/pulsar/managers/generators/PulsarExporterZIPGenerator.js.map +0 -1
- package/build/main/pulsar/managers/generators/PulsarFileGenerator.d.ts +0 -20
- package/build/main/pulsar/managers/generators/PulsarFileGenerator.js +0 -77
- package/build/main/pulsar/managers/generators/PulsarFileGenerator.js.map +0 -1
- package/build/main/pulsar/managers/loaders/PulsarBaseLoader.d.ts +0 -5
- package/build/main/pulsar/managers/loaders/PulsarBaseLoader.js +0 -28
- package/build/main/pulsar/managers/loaders/PulsarBaseLoader.js.map +0 -1
- package/build/main/pulsar/managers/loaders/local/PulsarFSLoader.d.ts +0 -11
- package/build/main/pulsar/managers/loaders/local/PulsarFSLoader.js +0 -98
- package/build/main/pulsar/managers/loaders/local/PulsarFSLoader.js.map +0 -1
- package/build/main/pulsar/managers/loaders/memory/PulsarExporterJSONLoader.d.ts +0 -9
- package/build/main/pulsar/managers/loaders/memory/PulsarExporterJSONLoader.js +0 -81
- package/build/main/pulsar/managers/loaders/memory/PulsarExporterJSONLoader.js.map +0 -1
- package/build/main/pulsar/managers/loaders/memory/PulsarExporterMemoryLoader.d.ts +0 -11
- package/build/main/pulsar/managers/loaders/memory/PulsarExporterMemoryLoader.js +0 -106
- package/build/main/pulsar/managers/loaders/memory/PulsarExporterMemoryLoader.js.map +0 -1
- package/build/main/pulsar/managers/loaders/remote/PulsarExporterGitHubLoader.d.ts +0 -12
- package/build/main/pulsar/managers/loaders/remote/PulsarExporterGitHubLoader.js +0 -143
- package/build/main/pulsar/managers/loaders/remote/PulsarExporterGitHubLoader.js.map +0 -1
- package/build/main/pulsar/managers/loaders/remote/PulsarExporterZIPLoader.d.ts +0 -12
- package/build/main/pulsar/managers/loaders/remote/PulsarExporterZIPLoader.js +0 -115
- package/build/main/pulsar/managers/loaders/remote/PulsarExporterZIPLoader.js.map +0 -1
- package/build/main/pulsar/managers/validators/PulsarExporterConfigFileValidator.d.ts +0 -7
- package/build/main/pulsar/managers/validators/PulsarExporterConfigFileValidator.js +0 -124
- package/build/main/pulsar/managers/validators/PulsarExporterConfigFileValidator.js.map +0 -1
- package/build/main/tests/TestConfiguration.d.ts +0 -9
- package/build/main/tests/TestConfiguration.js +0 -25
- package/build/main/tests/TestConfiguration.js.map +0 -1
- package/build/main/tests/casebuilders/ci.d.ts +0 -12
- package/build/main/tests/casebuilders/ci.js +0 -38
- package/build/main/tests/casebuilders/ci.js.map +0 -1
- package/build/main/tests/casebuilders/configuration.d.ts +0 -5
- package/build/main/tests/casebuilders/configuration.js +0 -25
- package/build/main/tests/casebuilders/configuration.js.map +0 -1
- package/build/main/tests/casebuilders/dsm.d.ts +0 -7
- package/build/main/tests/casebuilders/dsm.js +0 -57
- package/build/main/tests/casebuilders/dsm.js.map +0 -1
- package/build/main/tests/casebuilders/modelObjects.d.ts +0 -13
- package/build/main/tests/casebuilders/modelObjects.js +0 -120
- package/build/main/tests/casebuilders/modelObjects.js.map +0 -1
- package/build/main/tools/Logger.d.ts +0 -27
- package/build/main/tools/Logger.js +0 -98
- package/build/main/tools/Logger.js.map +0 -1
- package/build/main/tools/LoggerDefaultMessages.d.ts +0 -13
- package/build/main/tools/LoggerDefaultMessages.js +0 -41
- package/build/main/tools/LoggerDefaultMessages.js.map +0 -1
- package/build/tsconfig.tsbuildinfo +0 -3045
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
//
|
|
3
|
-
// PCPulsar.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.PCPulsarStaticAnalysis = exports.PCPulsarExporterMode = exports.PCPulsarEngineState = void 0;
|
|
11
|
-
const main_1 = require("@supernova-studio/pulsar-language/build/main");
|
|
12
|
-
const BlueprintLoader_1 = require("@supernova-studio/pulsar-language/build/main/interpreter/loaders/BlueprintLoader");
|
|
13
|
-
const Logger_1 = require("@supernova-studio/pulsar-language/build/main/interpreter/loggers/Logger");
|
|
14
|
-
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
15
|
-
// MARK: - Definitions
|
|
16
|
-
var PCPulsarEngineState;
|
|
17
|
-
(function (PCPulsarEngineState) {
|
|
18
|
-
PCPulsarEngineState["waiting"] = "waiting";
|
|
19
|
-
PCPulsarEngineState["loading"] = "loading";
|
|
20
|
-
PCPulsarEngineState["ready"] = "ready";
|
|
21
|
-
})(PCPulsarEngineState = exports.PCPulsarEngineState || (exports.PCPulsarEngineState = {}));
|
|
22
|
-
var PCPulsarExporterMode;
|
|
23
|
-
(function (PCPulsarExporterMode) {
|
|
24
|
-
PCPulsarExporterMode["ci"] = "ci";
|
|
25
|
-
PCPulsarExporterMode["sandbox"] = "sandbox";
|
|
26
|
-
PCPulsarExporterMode["docs"] = "docs";
|
|
27
|
-
})(PCPulsarExporterMode = exports.PCPulsarExporterMode || (exports.PCPulsarExporterMode = {}));
|
|
28
|
-
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
29
|
-
// MARK: - Class
|
|
30
|
-
class PCPulsarStaticAnalysis {
|
|
31
|
-
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
32
|
-
// MARK: - Setup
|
|
33
|
-
constructor() { }
|
|
34
|
-
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
35
|
-
// MARK: - Code editor
|
|
36
|
-
/** Run analysis and return errors if found, otherwise empty */
|
|
37
|
-
analyzeBlueprintCode(code, sourceFileName) {
|
|
38
|
-
let context = new main_1.DSMExecutionContext(new BlueprintLoader_1.PLBlueprintLoader(), new main_1.PLBlueprintEmitter(), new Logger_1.PLLogger(), new main_1.DSMBridge({
|
|
39
|
-
accessToken: '',
|
|
40
|
-
apiUrl: '',
|
|
41
|
-
designSystemId: '',
|
|
42
|
-
dsVersionId: '',
|
|
43
|
-
apiVersion: '0.2'
|
|
44
|
-
}), null);
|
|
45
|
-
try {
|
|
46
|
-
main_1.PLBlueprintFactory.blueprint(code, sourceFileName, context);
|
|
47
|
-
return [];
|
|
48
|
-
}
|
|
49
|
-
catch (error) {
|
|
50
|
-
// TODO: Analyzer should return array of errors but right now will only return one
|
|
51
|
-
// though the interface is at least stable and will work when we retrieve more
|
|
52
|
-
return [error];
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
/** Suggest next characters, words or snippets to be inserted into pulsar code as user types */
|
|
56
|
-
suggestNextFromBlueprintCode(code, selectionLocation, selectionLength) {
|
|
57
|
-
return this.codeManager.suggestNextFromSourceCode(code, selectionLocation, selectionLength);
|
|
58
|
-
}
|
|
59
|
-
/** Apply autocompletion result to specified pulsar code */
|
|
60
|
-
applyAutocompletionResultToCode(code, selectionLocation, selectionLength, apply) {
|
|
61
|
-
return this.codeManager.applyAutocompletionResultToCode(code, selectionLocation, selectionLength, apply);
|
|
62
|
-
}
|
|
63
|
-
/** Compute highlight tokens for the provided pulsar code */
|
|
64
|
-
suggestHighlightFromBlueprintCode(code) {
|
|
65
|
-
return this.codeManager.suggestHighlightFromSourceCode(code);
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
exports.PCPulsarStaticAnalysis = PCPulsarStaticAnalysis;
|
|
69
|
-
//# sourceMappingURL=PulsarStaticAnalysis.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PulsarStaticAnalysis.js","sourceRoot":"","sources":["../../../src/pulsar/PulsarStaticAnalysis.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,eAAe;AACf,aAAa;AACb,EAAE;AACF,2BAA2B;AAC3B,sDAAsD;AACtD,EAAE;;;AAMF,uEAMqD;AAOrD,sHAAoH;AACpH,oGAAkG;AAElG,8GAA8G;AAC9G,sBAAsB;AAEtB,IAAY,mBAIX;AAJD,WAAY,mBAAmB;IAC7B,0CAAmB,CAAA;IACnB,0CAAmB,CAAA;IACnB,sCAAe,CAAA;AACjB,CAAC,EAJW,mBAAmB,GAAnB,2BAAmB,KAAnB,2BAAmB,QAI9B;AAED,IAAY,oBAIX;AAJD,WAAY,oBAAoB;IAC9B,iCAAS,CAAA;IACT,2CAAmB,CAAA;IACnB,qCAAa,CAAA;AACf,CAAC,EAJW,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAI/B;AAED,8GAA8G;AAC9G,gBAAgB;AAEhB,MAAa,sBAAsB;IAMjC,8GAA8G;IAC9G,gBAAgB;IAEhB,gBAAe,CAAC;IAEhB,8GAA8G;IAC9G,sBAAsB;IAEtB,+DAA+D;IAC/D,oBAAoB,CAAC,IAAY,EAAE,cAAsB;QACvD,IAAI,OAAO,GAAG,IAAI,0BAAmB,CACnC,IAAI,mCAAiB,EAAE,EACvB,IAAI,yBAAkB,EAAE,EACxB,IAAI,iBAAQ,EAAE,EACd,IAAI,gBAAS,CAAC;YACZ,WAAW,EAAE,EAAE;YACf,MAAM,EAAE,EAAE;YACV,cAAc,EAAE,EAAE;YAClB,WAAW,EAAE,EAAE;YACf,UAAU,EAAE,KAAK;SAClB,CAAC,EACF,IAAI,CACL,CAAA;QACD,IAAI;YACF,yBAAkB,CAAC,SAAS,CAAC,IAAI,EAAE,cAAc,EAAE,OAAO,CAAC,CAAA;YAC3D,OAAO,EAAE,CAAA;SACV;QAAC,OAAO,KAAK,EAAE;YACd,kFAAkF;YAClF,8EAA8E;YAC9E,OAAO,CAAC,KAAK,CAAC,CAAA;SACf;IACH,CAAC;IAED,+FAA+F;IAC/F,4BAA4B,CAC1B,IAAY,EACZ,iBAAyB,EACzB,eAAuB;QAEvB,OAAO,IAAI,CAAC,WAAW,CAAC,yBAAyB,CAAC,IAAI,EAAE,iBAAiB,EAAE,eAAe,CAAC,CAAA;IAC7F,CAAC;IAED,2DAA2D;IAC3D,+BAA+B,CAC7B,IAAY,EACZ,iBAAyB,EACzB,eAAuB,EACvB,KAAqC;QAErC,OAAO,IAAI,CAAC,WAAW,CAAC,+BAA+B,CAAC,IAAI,EAAE,iBAAiB,EAAE,eAAe,EAAE,KAAK,CAAC,CAAA;IAC1G,CAAC;IAED,4DAA4D;IAC5D,iCAAiC,CAAC,IAAY;QAC5C,OAAO,IAAI,CAAC,WAAW,CAAC,8BAA8B,CAAC,IAAI,CAAC,CAAA;IAC9D,CAAC;CACF;AA9DD,wDA8DC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { PLAutocompleteEngineApplicationResult, PLAutocompleteEngineSuggestion } from '@supernova-studio/pulsar-language/build/main/tools/autocomplete/AutocompleteEngine';
|
|
2
|
-
import { PLHighlightEngineToken } from '@supernova-studio/pulsar-language/build/main';
|
|
3
|
-
import { PLError } from '@supernova-studio/pulsar-language/build/main/parser/errors/LanguageError';
|
|
4
|
-
export interface PCPulsarStaticAnalysisInterface {
|
|
5
|
-
/** Run analysis and return errors if found, otherwise empty */
|
|
6
|
-
analyzeBlueprintCode(code: string, sourceFileName: string): Array<PLError>;
|
|
7
|
-
/** Suggest next characters, words or snippets to be inserted into pulsar code as user types */
|
|
8
|
-
suggestNextFromBlueprintCode(code: string, selectionLocation: number, selectionLength: number): Array<PLAutocompleteEngineSuggestion>;
|
|
9
|
-
/** Apply autocompletion result to specified pulsar code */
|
|
10
|
-
applyAutocompletionResultToCode(code: string, selectionLocation: number, selectionLength: number, apply: PLAutocompleteEngineSuggestion): PLAutocompleteEngineApplicationResult;
|
|
11
|
-
/** Compute highlight tokens for the provided pulsar code */
|
|
12
|
-
suggestHighlightFromBlueprintCode(code: string): Array<PLHighlightEngineToken>;
|
|
13
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
//
|
|
3
|
-
// PCPulsarInterface.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
|
-
//# sourceMappingURL=PulsarStaticAnalysisInterface.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PulsarStaticAnalysisInterface.js","sourceRoot":"","sources":["../../../src/pulsar/PulsarStaticAnalysisInterface.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,wBAAwB;AACxB,aAAa;AACb,EAAE;AACF,2BAA2B;AAC3B,sDAAsD;AACtD,EAAE"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { PCExporter } from './../../model/exporters/Exporter';
|
|
2
|
-
import { PCExporterSource } from '../../model/sources/ExporterSource';
|
|
3
|
-
export declare class PCPulsarSourceManager {
|
|
4
|
-
private exporter;
|
|
5
|
-
constructor(exporter: PCExporter);
|
|
6
|
-
/** Get all sources associated with loaded exporter. Note that sources don't contain their code definitions, as those need to be requested separaterly */
|
|
7
|
-
getSources(): Array<PCExporterSource>;
|
|
8
|
-
/** Get specific source associated with loaded exporter */
|
|
9
|
-
getSourceById(sourceId: string): PCExporterSource;
|
|
10
|
-
/** Create new source for loaded exporter. Source comes with default name and code and uses generic context */
|
|
11
|
-
createNewSource(): PCExporterSource;
|
|
12
|
-
/** Delete specified source. Throws error when source is not found */
|
|
13
|
-
deleteSourceById(sourceId: string): void;
|
|
14
|
-
/** Update source id. Id must be non-empty and contain at least 3 characters. It must also be unique in scope. Note that this also updates all maps that are referencing this source */
|
|
15
|
-
updateSourceLocation(oldSourceId: string, newSourceId: string, newPath: string): PCExporterSource;
|
|
16
|
-
}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
//
|
|
3
|
-
// PulsarSourceManager.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.PCPulsarSourceManager = void 0;
|
|
11
|
-
const ExporterSource_1 = require("../../model/sources/ExporterSource");
|
|
12
|
-
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
13
|
-
// MARK: - Definitions
|
|
14
|
-
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
15
|
-
// MARK: - Class
|
|
16
|
-
class PCPulsarSourceManager {
|
|
17
|
-
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
18
|
-
// MARK: - Setup
|
|
19
|
-
constructor(exporter) {
|
|
20
|
-
this.exporter = exporter;
|
|
21
|
-
}
|
|
22
|
-
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
23
|
-
// MARK: - Source manipulation
|
|
24
|
-
/** Get all sources associated with loaded exporter. Note that sources don't contain their code definitions, as those need to be requested separaterly */
|
|
25
|
-
getSources() {
|
|
26
|
-
// Create true array, as every other approach returns some form of iterator
|
|
27
|
-
let sourceStore = new Array();
|
|
28
|
-
for (let source of this.exporter.sources.values()) {
|
|
29
|
-
sourceStore.push(source);
|
|
30
|
-
}
|
|
31
|
-
return sourceStore;
|
|
32
|
-
}
|
|
33
|
-
/** Get specific source associated with loaded exporter */
|
|
34
|
-
getSourceById(sourceId) {
|
|
35
|
-
for (let source of this.exporter.sources.values()) {
|
|
36
|
-
if (source.id === sourceId) {
|
|
37
|
-
return source;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
throw new Error(`Unknown source ${sourceId}`);
|
|
41
|
-
}
|
|
42
|
-
/** Create new source for loaded exporter. Source comes with default name and code and uses generic context */
|
|
43
|
-
createNewSource() {
|
|
44
|
-
let count = this.exporter.sources.size;
|
|
45
|
-
let source = new ExporterSource_1.PCExporterSource(`source${count + 1}.pr`, null, ``);
|
|
46
|
-
this.exporter.storeNewSource(source);
|
|
47
|
-
return source;
|
|
48
|
-
}
|
|
49
|
-
/** Delete specified source. Throws error when source is not found */
|
|
50
|
-
deleteSourceById(sourceId) {
|
|
51
|
-
if (!this.exporter.sourceById(sourceId)) {
|
|
52
|
-
throw Error(`Unknown source for deletion ${sourceId}`);
|
|
53
|
-
}
|
|
54
|
-
this.exporter.removeSourceById(sourceId);
|
|
55
|
-
}
|
|
56
|
-
/** Update source id. Id must be non-empty and contain at least 3 characters. It must also be unique in scope. Note that this also updates all maps that are referencing this source */
|
|
57
|
-
updateSourceLocation(oldSourceId, newSourceId, newPath) {
|
|
58
|
-
// Find the source
|
|
59
|
-
let source = this.exporter.sourceById(oldSourceId);
|
|
60
|
-
if (!source) {
|
|
61
|
-
throw Error(`Unknown source for update ${oldSourceId}`);
|
|
62
|
-
}
|
|
63
|
-
let sourceId = newSourceId.trim();
|
|
64
|
-
if (sourceId.length < 3) {
|
|
65
|
-
throw Error('Source id must be at least 3 letters long');
|
|
66
|
-
}
|
|
67
|
-
if (!sourceId.match(/^[0-9a-zA-Z._]+$/)) {
|
|
68
|
-
throw Error('Source id must only contain letters, numbers, dots or underscores');
|
|
69
|
-
}
|
|
70
|
-
// Modify source id
|
|
71
|
-
this.exporter.moveBlueprintSource(oldSourceId, newSourceId, newPath);
|
|
72
|
-
return source;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
exports.PCPulsarSourceManager = PCPulsarSourceManager;
|
|
76
|
-
//# sourceMappingURL=PulsarBlueprintManager.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PulsarBlueprintManager.js","sourceRoot":"","sources":["../../../../src/pulsar/managers/PulsarBlueprintManager.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,aAAa;AACb,EAAE;AACF,2BAA2B;AAC3B,sDAAsD;AACtD,EAAE;;;AAMF,uEAAqE;AAErE,8GAA8G;AAC9G,sBAAsB;AAEtB,8GAA8G;AAC9G,gBAAgB;AAEhB,MAAa,qBAAqB;IAMhC,8GAA8G;IAC9G,gBAAgB;IAEhB,YAAY,QAAoB;QAC9B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;IAC1B,CAAC;IAED,8GAA8G;IAC9G,8BAA8B;IAE9B,yJAAyJ;IACzJ,UAAU;QACR,2EAA2E;QAC3E,IAAI,WAAW,GAAG,IAAI,KAAK,EAAoB,CAAA;QAC/C,KAAK,IAAI,MAAM,IAAI,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE;YACjD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AAE,CAAA;QACjC,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE;YACvB,MAAM,KAAK,CAAC,2CAA2C,CAAC,CAAA;SACzD;QAED,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,kBAAkB,CAAC,EAAE;YACvC,MAAM,KAAK,CAAC,mEAAmE,CAAC,CAAA;SACjF;QAED,mBAAmB;QACnB,IAAI,CAAC,QAAQ,CAAC,mBAAmB,CAAC,WAAW,EAAE,WAAW,EAAE,OAAO,CAAC,CAAA;QACpE,OAAO,MAAM,CAAA;IACf,CAAC;CACF;AA7ED,sDA6EC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { PCExporter } from './../../model/exporters/Exporter';
|
|
2
|
-
import { PCEngineExporterProcessingResult } from '../PulsarInterface';
|
|
3
|
-
import { DSMReferenceStore } from './../../model/dsm/DSMReferenceStore';
|
|
4
|
-
import { DSMBridgeConfiguration } from '@supernova-studio/pulsar-language/build/main';
|
|
5
|
-
import { PCPulsarExporterMode } from '../Pulsar';
|
|
6
|
-
export declare class PCPulsarCIManager {
|
|
7
|
-
private exporter;
|
|
8
|
-
private currentExporterInstance;
|
|
9
|
-
constructor(exporter: PCExporter);
|
|
10
|
-
/** Execute entire exporter and retrieve all files produced as a result of this export */
|
|
11
|
-
executeExporter(dsmBridgeConfig: DSMBridgeConfiguration, exportMode: PCPulsarExporterMode): Promise<PCEngineExporterProcessingResult>;
|
|
12
|
-
/** Execute entire exporter and retrieve all files produced as a result of this export */
|
|
13
|
-
executeExporterForSingleSandboxedComponent(dsmBridgeConfig: DSMBridgeConfiguration, exportMode: PCPulsarExporterMode, sandboxComponentId: string, serializedSandboxData: string): Promise<PCEngineExporterProcessingResult>;
|
|
14
|
-
/** Retrieve intermediate output of exporter in progress */
|
|
15
|
-
retrieveRunningExporterState(): PCEngineExporterProcessingResult | null;
|
|
16
|
-
/** Get reference store containing description of all elements in the DSM, including all context categories */
|
|
17
|
-
getDSMContextStore(dsmBridgeConfig: DSMBridgeConfiguration): Promise<DSMReferenceStore>;
|
|
18
|
-
private convertExportResultToPulsarResult;
|
|
19
|
-
private parseName;
|
|
20
|
-
fetchReferenceStore(dsmBridgeConfig: DSMBridgeConfiguration): Promise<DSMReferenceStore>;
|
|
21
|
-
static fetchReferenceStoreStatic(dsmBridgeConfig: DSMBridgeConfiguration): Promise<DSMReferenceStore>;
|
|
22
|
-
fetchReferenceStoreForSandboxedComponent(componentId: string): Promise<DSMReferenceStore>;
|
|
23
|
-
private computeRootFileGroupFromFiles;
|
|
24
|
-
private pathPermutations;
|
|
25
|
-
}
|
|
@@ -1,220 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
//
|
|
3
|
-
// PulsarCIManager.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.PCPulsarCIManager = void 0;
|
|
11
|
-
const PulsarInterface_1 = require("../PulsarInterface");
|
|
12
|
-
const DSMReferenceStore_1 = require("./../../model/dsm/DSMReferenceStore");
|
|
13
|
-
const Logger_1 = require("./../../tools/Logger");
|
|
14
|
-
const ExportConfiguration_1 = require("./../../engine/configuration/ExportConfiguration");
|
|
15
|
-
const ExportEngine_1 = require("./../../engine/ExportEngine");
|
|
16
|
-
const main_1 = require("@supernova-studio/pulsar-language/build/main");
|
|
17
|
-
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
18
|
-
// MARK: - Definitions
|
|
19
|
-
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
20
|
-
// MARK: - Class
|
|
21
|
-
class PCPulsarCIManager {
|
|
22
|
-
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
23
|
-
// MARK: - Setup
|
|
24
|
-
constructor(exporter) {
|
|
25
|
-
this.exporter = exporter;
|
|
26
|
-
this.currentExporterInstance = null;
|
|
27
|
-
}
|
|
28
|
-
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
29
|
-
// MARK: - CI support
|
|
30
|
-
/** Execute entire exporter and retrieve all files produced as a result of this export */
|
|
31
|
-
async executeExporter(dsmBridgeConfig, exportMode) {
|
|
32
|
-
// Fetch the reference store containing description of the entire dsm, with all its elements
|
|
33
|
-
let store = await this.fetchReferenceStore(dsmBridgeConfig);
|
|
34
|
-
// Configure export engine
|
|
35
|
-
let logger = new Logger_1.PCLogger();
|
|
36
|
-
let configuration = new ExportConfiguration_1.PCExportConfiguration(this.exporter, logger, store, dsmBridgeConfig, exportMode, {});
|
|
37
|
-
let pulsarEngine = new ExportEngine_1.PCExportEngine(configuration);
|
|
38
|
-
this.currentExporterInstance = pulsarEngine;
|
|
39
|
-
// Run the export and wait for results, processing all blueprints against all file maps
|
|
40
|
-
let result = await pulsarEngine.processExport();
|
|
41
|
-
// Convert results and ditch the current export instance
|
|
42
|
-
let convertedResult = this.convertExportResultToPulsarResult(result, this.currentExporterInstance);
|
|
43
|
-
this.currentExporterInstance;
|
|
44
|
-
return convertedResult;
|
|
45
|
-
}
|
|
46
|
-
/** Execute entire exporter and retrieve all files produced as a result of this export */
|
|
47
|
-
async executeExporterForSingleSandboxedComponent(dsmBridgeConfig, exportMode, sandboxComponentId, serializedSandboxData) {
|
|
48
|
-
// Fetch the reference store containing description of the entire dsm, with all its elements
|
|
49
|
-
let store = await this.fetchReferenceStoreForSandboxedComponent(sandboxComponentId);
|
|
50
|
-
// Configure export engine
|
|
51
|
-
let logger = new Logger_1.PCLogger();
|
|
52
|
-
let sandboxData = JSON.parse(serializedSandboxData);
|
|
53
|
-
let configuration = new ExportConfiguration_1.PCExportConfiguration(this.exporter, logger, store, dsmBridgeConfig, exportMode, sandboxData);
|
|
54
|
-
let pulsarEngine = new ExportEngine_1.PCExportEngine(configuration);
|
|
55
|
-
this.currentExporterInstance = pulsarEngine;
|
|
56
|
-
// Run the export and wait for results, processing all blueprints against all file maps
|
|
57
|
-
let result = await pulsarEngine.processExport();
|
|
58
|
-
// Convert results and ditch the current export instance
|
|
59
|
-
let convertedResult = this.convertExportResultToPulsarResult(result, this.currentExporterInstance);
|
|
60
|
-
this.currentExporterInstance;
|
|
61
|
-
return convertedResult;
|
|
62
|
-
}
|
|
63
|
-
/** Retrieve intermediate output of exporter in progress */
|
|
64
|
-
retrieveRunningExporterState() {
|
|
65
|
-
if (this.currentExporterInstance !== null) {
|
|
66
|
-
let store = this.currentExporterInstance.configuration.outputStore;
|
|
67
|
-
return this.convertExportResultToPulsarResult(store, this.currentExporterInstance);
|
|
68
|
-
}
|
|
69
|
-
else {
|
|
70
|
-
return null;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
/** Get reference store containing description of all elements in the DSM, including all context categories */
|
|
74
|
-
async getDSMContextStore(dsmBridgeConfig) {
|
|
75
|
-
return this.fetchReferenceStore(dsmBridgeConfig);
|
|
76
|
-
}
|
|
77
|
-
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
78
|
-
// MARK: - Context
|
|
79
|
-
convertExportResultToPulsarResult(sourceStore, exportEngine) {
|
|
80
|
-
let files = new Array();
|
|
81
|
-
for (let [path, partialResult] of sourceStore.dataStore.entries()) {
|
|
82
|
-
if (typeof partialResult === 'string') {
|
|
83
|
-
let pathDescriptor = this.parseName(path);
|
|
84
|
-
let fileDescriptor = {
|
|
85
|
-
name: pathDescriptor.fullname,
|
|
86
|
-
path: pathDescriptor.path,
|
|
87
|
-
content: partialResult,
|
|
88
|
-
type: 'string',
|
|
89
|
-
source: 'primary' // TODO: Decide whether it is a main invoked file or emitted
|
|
90
|
-
};
|
|
91
|
-
files.push(fileDescriptor);
|
|
92
|
-
}
|
|
93
|
-
else {
|
|
94
|
-
throw new Error('Unsupported type of produced file for write');
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
return {
|
|
98
|
-
exporterId: this.exporter.id,
|
|
99
|
-
runId: exportEngine.runId,
|
|
100
|
-
emittedFiles: files,
|
|
101
|
-
state: PulsarInterface_1.PCEngineExporterState.finished_success,
|
|
102
|
-
rootGroup: this.computeRootFileGroupFromFiles(files)
|
|
103
|
-
};
|
|
104
|
-
}
|
|
105
|
-
parseName(fullPath) {
|
|
106
|
-
// Only retrieve files that are .pr or .json
|
|
107
|
-
// Modify filename by removing the first directory
|
|
108
|
-
let components = fullPath.split('/');
|
|
109
|
-
// Extract filename, extension and paths
|
|
110
|
-
let filename = components[components.length - 1];
|
|
111
|
-
let fullpath = components.join('/');
|
|
112
|
-
// Extract directory
|
|
113
|
-
components.pop();
|
|
114
|
-
let directory = components.join('/');
|
|
115
|
-
// Get extension and check whether it is correct format
|
|
116
|
-
let nameParts = filename.split('.');
|
|
117
|
-
let extension;
|
|
118
|
-
let name;
|
|
119
|
-
if (nameParts.length >= 2) {
|
|
120
|
-
extension = nameParts[nameParts.length - 1];
|
|
121
|
-
nameParts.pop();
|
|
122
|
-
name = nameParts.join('.');
|
|
123
|
-
}
|
|
124
|
-
else {
|
|
125
|
-
throw Error('Unable to properly parse output file');
|
|
126
|
-
}
|
|
127
|
-
return {
|
|
128
|
-
fullname: filename,
|
|
129
|
-
name: name,
|
|
130
|
-
extension: extension,
|
|
131
|
-
folder: directory,
|
|
132
|
-
path: fullpath
|
|
133
|
-
};
|
|
134
|
-
}
|
|
135
|
-
async fetchReferenceStore(dsmBridgeConfig) {
|
|
136
|
-
let dsmBridge = new main_1.DSMBridge(dsmBridgeConfig);
|
|
137
|
-
let result = await dsmBridge.getDSMDataFromEndpoint('bff/structure', null);
|
|
138
|
-
// Construct store from the result
|
|
139
|
-
let store = new DSMReferenceStore_1.DSMReferenceStore(result);
|
|
140
|
-
return store;
|
|
141
|
-
}
|
|
142
|
-
static async fetchReferenceStoreStatic(dsmBridgeConfig) {
|
|
143
|
-
let dsmBridge = new main_1.DSMBridge(dsmBridgeConfig);
|
|
144
|
-
let result = await dsmBridge.getDSMDataFromEndpoint('bff/structure', null);
|
|
145
|
-
// Construct store from the result
|
|
146
|
-
let store = new DSMReferenceStore_1.DSMReferenceStore(result);
|
|
147
|
-
return store;
|
|
148
|
-
}
|
|
149
|
-
async fetchReferenceStoreForSandboxedComponent(componentId) {
|
|
150
|
-
// Construct store from the result
|
|
151
|
-
let store = new DSMReferenceStore_1.DSMReferenceStore({
|
|
152
|
-
components: [{ id: componentId, name: 'Sandboxed Component' }],
|
|
153
|
-
componentGroups: [],
|
|
154
|
-
tokenGroups: [],
|
|
155
|
-
tokenTypes: [],
|
|
156
|
-
themes: []
|
|
157
|
-
});
|
|
158
|
-
return store;
|
|
159
|
-
}
|
|
160
|
-
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
161
|
-
// MARK: - File group computing
|
|
162
|
-
computeRootFileGroupFromFiles(files) {
|
|
163
|
-
// Create root group to which everything goes
|
|
164
|
-
let rootGroup = new PulsarInterface_1.PCEngineFileGroup('Root', '/', [], []);
|
|
165
|
-
let subgroups = new Map();
|
|
166
|
-
let currentParent = rootGroup;
|
|
167
|
-
for (let file of files) {
|
|
168
|
-
// Assign current parent as root
|
|
169
|
-
currentParent = rootGroup;
|
|
170
|
-
// Compute all subpaths leading to certain path, for example path like /root/sub/sub will return following:
|
|
171
|
-
// /root
|
|
172
|
-
// /root/sub
|
|
173
|
-
// /root/sub/sub
|
|
174
|
-
let permutations = this.pathPermutations(file.path);
|
|
175
|
-
if (permutations.length === 0) {
|
|
176
|
-
// Assuming no directories, it belongs to the root group
|
|
177
|
-
rootGroup.files.push(file);
|
|
178
|
-
}
|
|
179
|
-
else {
|
|
180
|
-
// With directories, we go through each one, create it and we also create subgroup and link them proprly together
|
|
181
|
-
// File is added to the last group
|
|
182
|
-
for (let [index, permutation] of permutations.entries()) {
|
|
183
|
-
let group = subgroups.get(permutation.path);
|
|
184
|
-
if (group) {
|
|
185
|
-
// Group exists, we do nothing except moving parent
|
|
186
|
-
currentParent = group;
|
|
187
|
-
}
|
|
188
|
-
else {
|
|
189
|
-
// Group doesn't exist, we create one, assign it to parent and buffer
|
|
190
|
-
group = new PulsarInterface_1.PCEngineFileGroup(permutation.lastComponent, permutation.path, [], []);
|
|
191
|
-
currentParent.groups.push(group);
|
|
192
|
-
subgroups.set(permutation.path, group);
|
|
193
|
-
}
|
|
194
|
-
if (index === permutations.length - 1) {
|
|
195
|
-
// For last permutation, we add the file to it
|
|
196
|
-
group.files.push(file);
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
return rootGroup;
|
|
202
|
-
}
|
|
203
|
-
pathPermutations(path) {
|
|
204
|
-
// Path always contains filename in our case, so we remove it
|
|
205
|
-
let pathComponents = path.split('/');
|
|
206
|
-
pathComponents.pop();
|
|
207
|
-
let buffer = new Array();
|
|
208
|
-
let stringBuffer = '';
|
|
209
|
-
for (let component of pathComponents) {
|
|
210
|
-
stringBuffer += `/${component}`;
|
|
211
|
-
buffer.push({
|
|
212
|
-
path: stringBuffer,
|
|
213
|
-
lastComponent: component
|
|
214
|
-
});
|
|
215
|
-
}
|
|
216
|
-
return buffer;
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
exports.PCPulsarCIManager = PCPulsarCIManager;
|
|
220
|
-
//# sourceMappingURL=PulsarCIManager.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PulsarCIManager.js","sourceRoot":"","sources":["../../../../src/pulsar/managers/PulsarCIManager.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,sBAAsB;AACtB,aAAa;AACb,EAAE;AACF,2BAA2B;AAC3B,sDAAsD;AACtD,EAAE;;;AAMF,wDAK2B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wBAClF,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;wBAChC,SAAS,CAAC,GAAG,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;qBACvC;oBAED,IAAI,KAAK,KAAK,YAAY,CAAC,MAAM,GAAG,CAAC,EAAE;wBACrC,8CAA8C;wBAC9C,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;qBACvB;iBACF;aACF;SACF;QAED,OAAO,SAAS,CAAA;IAClB,CAAC;IAEO,gBAAgB,CAAC,IAAY;QACnC,6DAA6D;QAC7D,IAAI,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;QACpC,cAAc,CAAC,GAAG,EAAE,CAAA;QAEpB,IAAI,MAAM,GAAG,IAAI,KAAK,EAA2C,CAAA;QACjE,IAAI,YAAY,GAAG,EAAE,CAAA;QACrB,KAAK,IAAI,SAAS,IAAI,cAAc,EAAE;YACpC,YAAY,IAAI,IAAI,SAAS,EAAE,CAAA;YAC/B,MAAM,CAAC,IAAI,CAAC;gBACV,IAAI,EAAE,YAAY;gBAClB,aAAa,EAAE,SAAS;aACzB,CAAC,CAAA;SACH;QAED,OAAO,MAAM,CAAA;IACf,CAAC;CACF;AArQD,8CAqQC"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { PCExporter } from './../../model/exporters/Exporter';
|
|
2
|
-
import { PLBlueprint, DSMExecutionContext, PLHighlightEngineToken, DSMBridgeConfiguration } from '@supernova-studio/pulsar-language/build/main';
|
|
3
|
-
import { PLAutocompleteEngineApplicationResult, PLAutocompleteEngineSuggestion } from '@supernova-studio/pulsar-language/build/main/tools/autocomplete/AutocompleteEngine';
|
|
4
|
-
import { PCEngineSourceProcessingResult } from './../PulsarInterface';
|
|
5
|
-
export declare class PCPulsarCodeManager {
|
|
6
|
-
private exporter;
|
|
7
|
-
private codeExecutionContext;
|
|
8
|
-
constructor(exporter: PCExporter);
|
|
9
|
-
/** Execute source code and retrieve the resulting output. This also retrieves any emitted extra files. Throws error when source is not found */
|
|
10
|
-
executeSourceById(sourceId: string, dsmBridgeConfig: DSMBridgeConfiguration, contextKey: string, contextId: string): Promise<PCEngineSourceProcessingResult>;
|
|
11
|
-
/** Update source code definition. Content can be anything */
|
|
12
|
-
updateSourceCodeDefinitionForSourceId(sourceId: string, definition: string): void;
|
|
13
|
-
/** Update source code definition. Overview can be empty. Throws error when source is not found */
|
|
14
|
-
updateSourceLocation(oldSourceId: string, newSourceId: string, newPath: string): void;
|
|
15
|
-
/** Suggest next characters, words or snippets to be inserted into pulsar code as user types */
|
|
16
|
-
suggestNextFromSourceCode(code: string, selectionLocation: number, selectionLength: number): Array<PLAutocompleteEngineSuggestion>;
|
|
17
|
-
/** Apply autocompletion result to specified pulsar code */
|
|
18
|
-
applyAutocompletionResultToCode(code: string, selectionLocation: number, selectionLength: number, apply: PLAutocompleteEngineSuggestion): PLAutocompleteEngineApplicationResult;
|
|
19
|
-
/** Compute highlight tokens for the provided pulsar code */
|
|
20
|
-
suggestHighlightFromSourceCode(code: string): Array<PLHighlightEngineToken>;
|
|
21
|
-
createContextData(contextKey: string, contextId: string): Map<string, any>;
|
|
22
|
-
parseSource(declaration: string, executionContext: DSMExecutionContext): Promise<PLBlueprint>;
|
|
23
|
-
interpretSource(source: PLBlueprint, data: Map<string, any>, executionContext: DSMExecutionContext): Promise<string>;
|
|
24
|
-
}
|