@supernova-studio/pulsar-core 1.0.4 → 1.0.7
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/package.json +4 -5
- package/build/browser/pulsar.js +0 -141743
- package/build/browser/pulsar.min.js +0 -270
- package/build/main/browser-bundle.d.ts +0 -1
- package/build/main/browser-bundle.js +0 -17
- 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 -162
- 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 -77
- 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 -47
- 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 -4
- package/build/main/exports.js +0 -13
- 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 -50
- package/build/main/model/exporters/Exporter.js +0 -88
- 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 -25
- package/build/main/model/sources/ExporterSource.js +0 -58
- 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 -351
- 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 -23
- package/build/main/pulsar/PulsarStaticAnalysis.js +0 -47
- package/build/main/pulsar/PulsarStaticAnalysis.js.map +0 -1
- package/build/main/pulsar/PulsarStaticAnalysisInterface.d.ts +0 -10
- 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 -16
- package/build/main/pulsar/managers/PulsarConfigurationManager.js +0 -48
- 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/PulsarExporterJSONGenerator.d.ts +0 -16
- package/build/main/pulsar/managers/generators/PulsarExporterJSONGenerator.js +0 -276
- package/build/main/pulsar/managers/generators/PulsarExporterJSONGenerator.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/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 -99
- 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 -20
- package/build/main/pulsar/managers/loaders/memory/PulsarExporterMemoryLoader.js +0 -194
- 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/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 -2829
|
@@ -1,351 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
//
|
|
3
|
-
// PLSPulsar.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.PLSPulsar = exports.PLSPulsarExporterMode = exports.PLSPulsarEngineState = void 0;
|
|
11
|
-
const PulsarInterface_1 = require("./PulsarInterface");
|
|
12
|
-
const PulsarExporterManager_1 = require("./managers/PulsarExporterManager");
|
|
13
|
-
const PulsarCodeManager_1 = require("./managers/PulsarCodeManager");
|
|
14
|
-
const PulsarCIManager_1 = require("./managers/PulsarCIManager");
|
|
15
|
-
const PulsarExporterGitHubLoader_1 = require("./managers/loaders/remote/PulsarExporterGitHubLoader");
|
|
16
|
-
const PulsarExporterJSONLoader_1 = require("./managers/loaders/memory/PulsarExporterJSONLoader");
|
|
17
|
-
const PulsarExporterZIPLoader_1 = require("./managers/loaders/remote/PulsarExporterZIPLoader");
|
|
18
|
-
const PulsarBlueprintManager_1 = require("./managers/PulsarBlueprintManager");
|
|
19
|
-
const PulsarFSLoader_1 = require("./managers/loaders/local/PulsarFSLoader");
|
|
20
|
-
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
21
|
-
// MARK: - Definitions
|
|
22
|
-
var PLSPulsarEngineState;
|
|
23
|
-
(function (PLSPulsarEngineState) {
|
|
24
|
-
PLSPulsarEngineState["waiting"] = "waiting";
|
|
25
|
-
PLSPulsarEngineState["loading"] = "loading";
|
|
26
|
-
PLSPulsarEngineState["ready"] = "ready";
|
|
27
|
-
})(PLSPulsarEngineState = exports.PLSPulsarEngineState || (exports.PLSPulsarEngineState = {}));
|
|
28
|
-
var PLSPulsarExporterMode;
|
|
29
|
-
(function (PLSPulsarExporterMode) {
|
|
30
|
-
PLSPulsarExporterMode["ci"] = "ci";
|
|
31
|
-
PLSPulsarExporterMode["sandbox"] = "sandbox";
|
|
32
|
-
PLSPulsarExporterMode["docs"] = "docs";
|
|
33
|
-
})(PLSPulsarExporterMode = exports.PLSPulsarExporterMode || (exports.PLSPulsarExporterMode = {}));
|
|
34
|
-
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
35
|
-
// MARK: - Class
|
|
36
|
-
class PLSPulsar {
|
|
37
|
-
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
38
|
-
// MARK: - Setup
|
|
39
|
-
constructor() {
|
|
40
|
-
this.state = PLSPulsarEngineState.waiting;
|
|
41
|
-
}
|
|
42
|
-
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
43
|
-
// MARK: - Loading and instantiation
|
|
44
|
-
/** Initiates Pulsar library from existing exporter. This is only for internal use (especially for tests) and doesn't validate integrity of the exporter, and shouldn't not be used in production! */
|
|
45
|
-
async initiateWithExporter(exporter) {
|
|
46
|
-
// Pre-init
|
|
47
|
-
this.preInit();
|
|
48
|
-
// Post-init
|
|
49
|
-
this.postInit(exporter);
|
|
50
|
-
return this.convertExporterToDetail(exporter);
|
|
51
|
-
}
|
|
52
|
-
/** Initiates Pulsar library from a local filepath. Note that this has to always be called before using the library, as all calls require the exporter to be present. This fully handles loading and validation of the package, including download of the package, unzipping and more */
|
|
53
|
-
async initiateWithLocalURL(url) {
|
|
54
|
-
// Pre-init
|
|
55
|
-
this.preInit();
|
|
56
|
-
// Load exporter using S3 signed URL
|
|
57
|
-
let packageManager = new PulsarFSLoader_1.PLSPulsarFSLoader(url);
|
|
58
|
-
let exporter = await packageManager.initialize();
|
|
59
|
-
// Post-init
|
|
60
|
-
this.postInit(exporter);
|
|
61
|
-
return this.convertExporterToDetail(exporter);
|
|
62
|
-
}
|
|
63
|
-
/** Initiates Pulsar library from remote S3 URL. Note that this has to always be called before using the library, as all calls require the exporter to be present. This fully handles loading and validation of the package, including download of the package, unzipping and more */
|
|
64
|
-
async initiateWithPackageS3URL(s3URL) {
|
|
65
|
-
// Pre-init
|
|
66
|
-
this.preInit();
|
|
67
|
-
// Load exporter using S3 signed URL
|
|
68
|
-
let packageManager = new PulsarExporterZIPLoader_1.PLSPulsarExporterZIPLoader(s3URL);
|
|
69
|
-
let exporter = await packageManager.initialize();
|
|
70
|
-
// Post-init
|
|
71
|
-
this.postInit(exporter);
|
|
72
|
-
return this.convertExporterToDetail(exporter);
|
|
73
|
-
}
|
|
74
|
-
/** Initiates Pulsar library from github URL. Note that this has to always be called before using the library, as all calls require the exporter to be present. This fully handles loading and validation of the package, including download of the package, unzipping and more */
|
|
75
|
-
async initiateWithPackageGitHubURL(githubURL) {
|
|
76
|
-
// Pre-init
|
|
77
|
-
this.preInit();
|
|
78
|
-
// Load exporter using S3 signed URL
|
|
79
|
-
let packageManager = new PulsarExporterGitHubLoader_1.PLSPulsarExporterGitHubLoader(githubURL);
|
|
80
|
-
let exporter = await packageManager.initialize();
|
|
81
|
-
// Post-init
|
|
82
|
-
this.postInit(exporter);
|
|
83
|
-
return this.convertExporterToDetail(exporter);
|
|
84
|
-
}
|
|
85
|
-
/** Initiates Pulsar library from JSON blob or already parsed object. Note that this has to always be called before using the library, as all calls require the exporter to be present. This fully handles loading and validation of the package */
|
|
86
|
-
async initiateWithPackageBlob(blob) {
|
|
87
|
-
// Pre-init
|
|
88
|
-
this.preInit();
|
|
89
|
-
// Load exporter using S3 signed URL
|
|
90
|
-
let packageManager = new PulsarExporterJSONLoader_1.PLSPulsarExporterJSONLoader(blob);
|
|
91
|
-
let exporter = await packageManager.initialize();
|
|
92
|
-
// Post-init
|
|
93
|
-
this.postInit(exporter);
|
|
94
|
-
return this.convertExporterToDetail(exporter);
|
|
95
|
-
}
|
|
96
|
-
preInit() {
|
|
97
|
-
// Validate that we didn't load the library just yet
|
|
98
|
-
if (this.state !== PLSPulsarEngineState.waiting) {
|
|
99
|
-
throw Error("Can't instantiate Pulsar library for the second time. Create new instance to load different exporter.");
|
|
100
|
-
}
|
|
101
|
-
// Retrieve the exporter using the package manager
|
|
102
|
-
this.state = PLSPulsarEngineState.loading;
|
|
103
|
-
}
|
|
104
|
-
postInit(exporter) {
|
|
105
|
-
// Configure all managers
|
|
106
|
-
this.exporter = exporter;
|
|
107
|
-
this.sourceManager = new PulsarBlueprintManager_1.PLSPulsarSourceManager(this.exporter);
|
|
108
|
-
this.ciManager = new PulsarCIManager_1.PLSPulsarCIManager(this.exporter);
|
|
109
|
-
this.codeManager = new PulsarCodeManager_1.PLSPulsarCodeManager(this.exporter);
|
|
110
|
-
this.exporterManager = new PulsarExporterManager_1.PLSPulsarExporterManager(this.exporter);
|
|
111
|
-
// Retrieve exporter
|
|
112
|
-
this.state = PLSPulsarEngineState.ready;
|
|
113
|
-
}
|
|
114
|
-
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
115
|
-
// MARK: - Exporter manipulation
|
|
116
|
-
/** Retrieve underlaying exporter object. Not to be used on the client, as it exposes other properties of exporter that are not to be consumed */
|
|
117
|
-
getExporterBackingObject() {
|
|
118
|
-
this.validateCanManipulateState();
|
|
119
|
-
return this.exporter;
|
|
120
|
-
}
|
|
121
|
-
/** Retrieve details about currently loaded exporter. Note that this only retrieves settings of the exporter, to request blueprints and mapping, use separate functions */
|
|
122
|
-
getExporterDetail() {
|
|
123
|
-
this.validateCanManipulateState();
|
|
124
|
-
return this.convertExporterToDetail(this.exporterManager.getExporterDetail());
|
|
125
|
-
}
|
|
126
|
-
/** Update exporter name. Name must be non-empty and contain at least 6 characters */
|
|
127
|
-
updateExporterName(name) {
|
|
128
|
-
this.validateCanManipulateState();
|
|
129
|
-
return this.convertExporterToDetail(this.exporterManager.updateExporterName(name));
|
|
130
|
-
}
|
|
131
|
-
/** Update exporter description. Description must be non-empty and contain at least 20 characters */
|
|
132
|
-
updateExporterDescription(description) {
|
|
133
|
-
this.validateCanManipulateState();
|
|
134
|
-
return this.convertExporterToDetail(this.exporterManager.updateExporterDescription(description));
|
|
135
|
-
}
|
|
136
|
-
/** Update exporter version. Exporter version needs to follow standard major.minor.patch versioning. Patch is optional */
|
|
137
|
-
updateExporterVersion(version) {
|
|
138
|
-
this.validateCanManipulateState();
|
|
139
|
-
return this.convertExporterToDetail(this.exporterManager.updateExporterVersion(version));
|
|
140
|
-
}
|
|
141
|
-
/** Update exporter author. Author can be empty. If non-empty, only alpha-numerics are allowed */
|
|
142
|
-
updateExporterAuthor(author) {
|
|
143
|
-
this.validateCanManipulateState();
|
|
144
|
-
return this.convertExporterToDetail(this.exporterManager.updateExporterAuthor(author));
|
|
145
|
-
}
|
|
146
|
-
/** Update exporter homepage. Homepage can be empty. If non-empty, validates the URL */
|
|
147
|
-
updateExporterHomepage(homepage) {
|
|
148
|
-
this.validateCanManipulateState();
|
|
149
|
-
return this.convertExporterToDetail(this.exporterManager.updateExporterHomepage(homepage));
|
|
150
|
-
}
|
|
151
|
-
/** Update exporter icon. Not available at the moment */
|
|
152
|
-
updateExporterIcon(icon) {
|
|
153
|
-
this.validateCanManipulateState();
|
|
154
|
-
return this.convertExporterToDetail(this.exporterManager.updateExporterIcon(icon));
|
|
155
|
-
}
|
|
156
|
-
/** Update exporter tags. Each tag must consist of letters and numbers */
|
|
157
|
-
updateExporterTags(tags) {
|
|
158
|
-
this.validateCanManipulateState();
|
|
159
|
-
return this.convertExporterToDetail(this.exporterManager.updateExporterTags(tags));
|
|
160
|
-
}
|
|
161
|
-
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
162
|
-
// MARK: - Configuration files
|
|
163
|
-
/** Get exporter configuration JSON */
|
|
164
|
-
getExporterConfigurationJSON() {
|
|
165
|
-
this.validateCanManipulateState();
|
|
166
|
-
return this.configurationManager.getExporterConfigurationJSON();
|
|
167
|
-
}
|
|
168
|
-
/** Get source configuration JSON */
|
|
169
|
-
getSourceConfigurationJSON() {
|
|
170
|
-
this.validateCanManipulateState();
|
|
171
|
-
return this.configurationManager.getSourceConfigurationJSON();
|
|
172
|
-
}
|
|
173
|
-
/** Get output configuration JSON */
|
|
174
|
-
getOutputConfigurationJSON() {
|
|
175
|
-
this.validateCanManipulateState();
|
|
176
|
-
return this.configurationManager.getOutputConfigurationJSON();
|
|
177
|
-
}
|
|
178
|
-
/** Update exporter configuration JSON */
|
|
179
|
-
updateExporterConfigurationJSON(content) {
|
|
180
|
-
this.validateCanManipulateState();
|
|
181
|
-
this.configurationManager.updateExporterConfigurationJSON(content);
|
|
182
|
-
}
|
|
183
|
-
/** Update source configuration JSON */
|
|
184
|
-
updateSourceConfigurationJSON(content) {
|
|
185
|
-
this.validateCanManipulateState();
|
|
186
|
-
this.configurationManager.updateSourceConfigurationJSON(content);
|
|
187
|
-
}
|
|
188
|
-
/** Update output configuration JSON */
|
|
189
|
-
updateOutputConfigurationJSON(content) {
|
|
190
|
-
this.validateCanManipulateState();
|
|
191
|
-
this.configurationManager.updateOutputConfigurationJSON(content);
|
|
192
|
-
}
|
|
193
|
-
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
194
|
-
// MARK: - Source manipulation
|
|
195
|
-
/** Get all blueprints associated with loaded exporter */
|
|
196
|
-
getSources() {
|
|
197
|
-
this.validateCanManipulateState();
|
|
198
|
-
return this.convertSourcesToDetails(this.sourceManager.getSources());
|
|
199
|
-
}
|
|
200
|
-
/** Get specific source associated with loaded exporter */
|
|
201
|
-
getSourceById(blueprintId) {
|
|
202
|
-
this.validateCanManipulateState();
|
|
203
|
-
return this.convertSourceToDetail(this.sourceManager.getSourceById(blueprintId));
|
|
204
|
-
}
|
|
205
|
-
/** Create new source for loaded exporter. Source comes with default name and code and uses generic context */
|
|
206
|
-
createNewSource() {
|
|
207
|
-
this.validateCanManipulateState();
|
|
208
|
-
return this.convertSourceToDetail(this.sourceManager.createNewSource());
|
|
209
|
-
}
|
|
210
|
-
/** Delete specified source. Throws error when source is not found */
|
|
211
|
-
deleteSourceById(blueprintId) {
|
|
212
|
-
this.validateCanManipulateState();
|
|
213
|
-
return this.sourceManager.deleteSourceById(blueprintId);
|
|
214
|
-
}
|
|
215
|
-
/** Update source location. Id must be non-empty and contain at least 3 characters. It must also be unique in scope of the entire exporter */
|
|
216
|
-
updateSourceLocation(oldSourceId, newSourceId, newPath) {
|
|
217
|
-
this.validateCanManipulateState();
|
|
218
|
-
return this.convertSourceToDetail(this.sourceManager.updateSourceLocation(oldSourceId, newSourceId, newPath));
|
|
219
|
-
}
|
|
220
|
-
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
221
|
-
// MARK: - Context
|
|
222
|
-
/** Get reference store containing description of all elements in the DSM, including all context categories */
|
|
223
|
-
getDSMContextStore(dsmBridgeConfig) {
|
|
224
|
-
this.validateCanManipulateState();
|
|
225
|
-
return this.ciManager.getDSMContextStore(dsmBridgeConfig);
|
|
226
|
-
}
|
|
227
|
-
/** Get reference store containing description of all elements in the DSM, including all context categories. Note this can be called as static method to see the store content regardless of the exporter */
|
|
228
|
-
static getDSMContextStoreStatic(dsmBridgeConfig) {
|
|
229
|
-
return PulsarCIManager_1.PLSPulsarCIManager.fetchReferenceStoreStatic(dsmBridgeConfig);
|
|
230
|
-
}
|
|
231
|
-
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
232
|
-
// MARK: - Code editor
|
|
233
|
-
/** Execute source code and retrieve the resulting code. This also retrieves any emitted extra files. Throws error when source is not found */
|
|
234
|
-
async executeSourceById(blueprintId, dsmBridgeConfig, contextKey, contextId) {
|
|
235
|
-
await this.validateCanManipulateState();
|
|
236
|
-
let result = await this.codeManager.executeSourceById(blueprintId, dsmBridgeConfig, contextKey, contextId);
|
|
237
|
-
return result;
|
|
238
|
-
}
|
|
239
|
-
/** Update source code definition. Overview can be empty. Throws error when source is not found */
|
|
240
|
-
updateSourceCodeDefinitionForSourceId(sourceId, definition) {
|
|
241
|
-
this.validateCanManipulateState();
|
|
242
|
-
return this.codeManager.updateSourceCodeDefinitionForSourceId(sourceId, definition);
|
|
243
|
-
}
|
|
244
|
-
/** Suggest next characters, words or snippets to be inserted into blazar code as user types */
|
|
245
|
-
suggestNextFromSourceCode(code, selectionLocation, selectionLength) {
|
|
246
|
-
this.validateCanManipulateState();
|
|
247
|
-
return this.codeManager.suggestNextFromSourceCode(code, selectionLocation, selectionLength);
|
|
248
|
-
}
|
|
249
|
-
/** Apply autocompletion result to specified blazar code */
|
|
250
|
-
applyAutocompletionResultToCode(code, selectionLocation, selectionLength, apply) {
|
|
251
|
-
this.validateCanManipulateState();
|
|
252
|
-
return this.codeManager.applyAutocompletionResultToCode(code, selectionLocation, selectionLength, apply);
|
|
253
|
-
}
|
|
254
|
-
/** Compute highlight tokens for the provided blazar code */
|
|
255
|
-
suggestHighlightFromSourceCode(code) {
|
|
256
|
-
this.validateCanManipulateState();
|
|
257
|
-
return this.codeManager.suggestHighlightFromSourceCode(code);
|
|
258
|
-
}
|
|
259
|
-
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
260
|
-
// MARK: - Server / CI support
|
|
261
|
-
/** Serialize entire exporter into single javascript object. Returns object representation */
|
|
262
|
-
getExporterBlob() {
|
|
263
|
-
this.validateCanManipulateState();
|
|
264
|
-
return this.exporterManager.getExporterBlob();
|
|
265
|
-
}
|
|
266
|
-
/** Serialize entire exporter into single javascript object. Returns JSON-string representation */
|
|
267
|
-
getExporterBlobJSONSerialized() {
|
|
268
|
-
this.validateCanManipulateState();
|
|
269
|
-
return this.exporterManager.getExporterBlobJSONSerialized();
|
|
270
|
-
}
|
|
271
|
-
/** Execute entire exporter and retrieve all files produced as a result of this export */
|
|
272
|
-
async executeExporter(dsmBridgeConfig, exportMode = PLSPulsarExporterMode.ci) {
|
|
273
|
-
await this.validateCanManipulateState();
|
|
274
|
-
let result = await this.ciManager.executeExporter(dsmBridgeConfig, exportMode);
|
|
275
|
-
return result;
|
|
276
|
-
}
|
|
277
|
-
/** Execute exporter in sandbox mode for a specific component */
|
|
278
|
-
async executeExporterForSingleSandboxedComponent(dsmBridgeConfig, sandboxComponentId, serializedSandboxData) {
|
|
279
|
-
await this.validateCanManipulateState();
|
|
280
|
-
let result = await this.ciManager.executeExporterForSingleSandboxedComponent(dsmBridgeConfig, PLSPulsarExporterMode.ci, sandboxComponentId, serializedSandboxData);
|
|
281
|
-
return result;
|
|
282
|
-
}
|
|
283
|
-
/** Retrieve intermediate output of exporter in progress */
|
|
284
|
-
retrieveRunningExporterState() {
|
|
285
|
-
let result = this.ciManager.retrieveRunningExporterState();
|
|
286
|
-
return result;
|
|
287
|
-
}
|
|
288
|
-
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
289
|
-
// MARK: - Convenience
|
|
290
|
-
validateCanManipulateState() {
|
|
291
|
-
return new Promise((resolve, reject) => {
|
|
292
|
-
if (this.state === PLSPulsarEngineState.ready) {
|
|
293
|
-
resolve();
|
|
294
|
-
}
|
|
295
|
-
else {
|
|
296
|
-
if (this.state === PLSPulsarEngineState.waiting) {
|
|
297
|
-
reject(new Error('Unable to manipulate state because the exporter has to be loaded first'));
|
|
298
|
-
}
|
|
299
|
-
else if (this.state === PLSPulsarEngineState.loading) {
|
|
300
|
-
reject(new Error('Unable to manipulate state because the engine is currently loading an exporter'));
|
|
301
|
-
}
|
|
302
|
-
else {
|
|
303
|
-
// Should never happen, only when extended
|
|
304
|
-
reject(new Error('Unhandled manipulation state'));
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
});
|
|
308
|
-
}
|
|
309
|
-
convertExporterToDetail(exporter) {
|
|
310
|
-
let detail = new PulsarInterface_1.PLSEngineExporterDetail();
|
|
311
|
-
detail.id = exporter.id;
|
|
312
|
-
detail.name = exporter.name;
|
|
313
|
-
detail.description = exporter.description;
|
|
314
|
-
detail.author = exporter.author;
|
|
315
|
-
detail.organization = exporter.organization;
|
|
316
|
-
detail.homepage = exporter.homepage;
|
|
317
|
-
detail.source_dir = exporter.sourceDirectory;
|
|
318
|
-
detail.version = exporter.version;
|
|
319
|
-
detail.tags = exporter.tags;
|
|
320
|
-
detail.icon = exporter.icon;
|
|
321
|
-
detail.config = {
|
|
322
|
-
sources: exporter.sourceConfigFilePath,
|
|
323
|
-
output: exporter.outputConfigFilePath
|
|
324
|
-
};
|
|
325
|
-
detail.engines = {
|
|
326
|
-
blazar: exporter.blazarEngineVersion,
|
|
327
|
-
supernova: exporter.supernovaEngineVersion
|
|
328
|
-
};
|
|
329
|
-
return detail;
|
|
330
|
-
}
|
|
331
|
-
convertSourceToDetail(source) {
|
|
332
|
-
let detail = new PulsarInterface_1.PLSEngineSourceDetail();
|
|
333
|
-
detail.id = source.id;
|
|
334
|
-
detail.path = source.path;
|
|
335
|
-
detail.targetsCI = source.targetsCI;
|
|
336
|
-
detail.targetsSandbox = source.targetsSandbox;
|
|
337
|
-
detail.targetsDocumentation = source.targetsDocumentation;
|
|
338
|
-
detail.context = source.context;
|
|
339
|
-
detail.content = source.content;
|
|
340
|
-
return detail;
|
|
341
|
-
}
|
|
342
|
-
convertSourcesToDetails(blueprints) {
|
|
343
|
-
let convertedSources = new Array();
|
|
344
|
-
for (let source of blueprints) {
|
|
345
|
-
convertedSources.push(this.convertSourceToDetail(source));
|
|
346
|
-
}
|
|
347
|
-
return convertedSources;
|
|
348
|
-
}
|
|
349
|
-
}
|
|
350
|
-
exports.PLSPulsar = PLSPulsar;
|
|
351
|
-
//# sourceMappingURL=Pulsar.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Pulsar.js","sourceRoot":"","sources":["../../../src/pulsar/Pulsar.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,gBAAgB;AAChB,aAAa;AACb,EAAE;AACF,2BAA2B;AAC3B,sDAAsD;AACtD,EAAE;;;AAMF,uDAM2B;AAC3B,4EAA4E;AAC5E,oEAAoE;AACpE,gEAAgE;AAShE,qGAAqG;AACrG,iGAAiG;AAGjG,+FAA+F;AAC/F,8EAA2E;AAC3E,4EAA4E;AAG5E,8GAA8G;AAC9G,sBAAsB;AAEtB,IAAY,oBAIX;AAJD,WAAY,oBAAoB;IAC9B,2CAAmB,CAAA;IACnB,2CAAmB,CAAA;IACnB,uCAAe,CAAA;AACjB,CAAC,EAJW,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAI/B;AAED,IAAY,qBAIX;AAJD,WAAY,qBAAqB;IAC/B,kCAAS,CAAA;IACT,4CAAmB,CAAA;IACnB,sCAAa,CAAA;AACf,CAAC,EAJW,qBAAqB,GAArB,6BAAqB,KAArB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AAQ,CAAC,IAAI,CAAC;QAE5B,MAAM,CAAC,MAAM,GAAG;YACd,OAAO,EAAE,QAAQ,CAAC,oBAAoB;YACtC,MAAM,EAAE,QAAQ,CAAC,oBAAoB;SACtC,CAAC;QAEF,MAAM,CAAC,OAAO,GAAG;YACf,MAAM,EAAE,QAAQ,CAAC,mBAAmB;YACpC,SAAS,EAAE,QAAQ,CAAC,sBAAsB;SAC3C,CAAC;QAEF,OAAO,MAAM,CAAC;IAChB,CAAC;IAEO,qBAAqB,CAC3B,MAAyB;QAEzB,IAAI,MAAM,GAAG,IAAI,uCAAqB,EAAE,CAAC;QACzC,MAAM,CAAC,EAAE,GAAG,MAAM,CAAC,EAAE,CAAC;QACtB,MAAM,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;QAE1B,MAAM,CAAC,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;QACpC,MAAM,CAAC,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;QAC9C,MAAM,CAAC,oBAAoB,GAAG,MAAM,CAAC,oBAAoB,CAAC;QAE1D,MAAM,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;QAChC,MAAM,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;QAEhC,OAAO,MAAM,CAAC;IAChB,CAAC;IAEO,uBAAuB,CAC7B,UAAoC;QAEpC,IAAI,gBAAgB,GAAG,IAAI,KAAK,EAAyB,CAAC;QAC1D,KAAK,IAAI,MAAM,IAAI,UAAU,EAAE;YAC7B,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,qBAAqB,CAAC,MAAM,CAAC,CAAC,CAAC;SAC3D;QAED,OAAO,gBAAgB,CAAC;IAC1B,CAAC;CACF;AAhfD,8BAgfC"}
|
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
import { PLSExporterSourceContextType } from '../model/sources/ExporterSource';
|
|
2
|
-
import { PLSExporter } from './../model/exporters/Exporter';
|
|
3
|
-
import { BLZLogger } from '@supernova-studio/pulsar-language/build/main/interpreter/loggers/Logger';
|
|
4
|
-
import { BLZAutocompleteEngineApplicationResult, BLZAutocompleteEngineSuggestion } from '@supernova-studio/pulsar-language/build/main/tools/autocomplete/AutocompleteEngine';
|
|
5
|
-
import { BLZHighlightEngineToken, DSMBridgeConfiguration } from '@supernova-studio/pulsar-language';
|
|
6
|
-
import { DSMReferenceStore } from '../model/dsm/DSMReferenceStore';
|
|
7
|
-
/** Exporter detail containing data about the currently loaded exporter */
|
|
8
|
-
export declare class PLSEngineExporterDetail {
|
|
9
|
-
id: string;
|
|
10
|
-
name: string;
|
|
11
|
-
description: string;
|
|
12
|
-
author?: string;
|
|
13
|
-
organization?: string;
|
|
14
|
-
homepage: string;
|
|
15
|
-
source_dir: string;
|
|
16
|
-
version: string;
|
|
17
|
-
icon?: string;
|
|
18
|
-
config?: {
|
|
19
|
-
sources?: string;
|
|
20
|
-
output?: string;
|
|
21
|
-
};
|
|
22
|
-
engines?: {
|
|
23
|
-
blazar?: string;
|
|
24
|
-
supernova?: string;
|
|
25
|
-
};
|
|
26
|
-
tags: Array<string>;
|
|
27
|
-
}
|
|
28
|
-
/** Source detail containing data about specific source including its code definition */
|
|
29
|
-
export declare class PLSEngineSourceDetail {
|
|
30
|
-
id: string;
|
|
31
|
-
path: string;
|
|
32
|
-
targetsCI: boolean;
|
|
33
|
-
targetsSandbox: boolean;
|
|
34
|
-
targetsDocumentation: boolean;
|
|
35
|
-
context: PLSExporterSourceContextType;
|
|
36
|
-
content: string;
|
|
37
|
-
}
|
|
38
|
-
/** Unique, computed file group */
|
|
39
|
-
export declare class PLSEngineFileGroup {
|
|
40
|
-
name: string;
|
|
41
|
-
path: string;
|
|
42
|
-
files: Array<PLSEngineFileDescriptor>;
|
|
43
|
-
groups: Array<PLSEngineFileGroup>;
|
|
44
|
-
constructor(name: string, path: string, files: Array<PLSEngineFileDescriptor>, groups: Array<PLSEngineFileGroup>);
|
|
45
|
-
}
|
|
46
|
-
/** Result of a specific run of a singular exporter. Also used to retrieve export in progress as a way to load files gradually as they are fed and written by the exporter */
|
|
47
|
-
export declare type PLSEngineExporterProcessingResult = {
|
|
48
|
-
exporterId: string;
|
|
49
|
-
runId: string;
|
|
50
|
-
state: PLSEngineExporterState;
|
|
51
|
-
emittedFiles: Array<PLSEngineFileDescriptor>;
|
|
52
|
-
rootGroup: PLSEngineFileGroup;
|
|
53
|
-
};
|
|
54
|
-
/** Result of a specific run of a singular source. Can optionally produce multiple files if emitter was used within the source */
|
|
55
|
-
export declare type PLSEngineSourceProcessingResult = {
|
|
56
|
-
sourceId: string;
|
|
57
|
-
logger: BLZLogger;
|
|
58
|
-
producedContent: Array<PLSEngineFileDescriptor>;
|
|
59
|
-
};
|
|
60
|
-
/** Result of a specific run of a singular file map. Always produces one file because that file represents the generates the path to the file */
|
|
61
|
-
export declare type PLSEngineMapProcessingResult = {
|
|
62
|
-
mapId: string;
|
|
63
|
-
logger: BLZLogger;
|
|
64
|
-
producedContent: Array<PLSEngineFileDescriptor>;
|
|
65
|
-
};
|
|
66
|
-
/** File descriptor for one specific file produced by either source, map generation or exporter run */
|
|
67
|
-
export declare type PLSEngineFileDescriptor = {
|
|
68
|
-
name: string;
|
|
69
|
-
path: string;
|
|
70
|
-
content: string;
|
|
71
|
-
source: 'primary' | 'emitter';
|
|
72
|
-
type: 'string';
|
|
73
|
-
};
|
|
74
|
-
export declare enum PLSEngineExporterState {
|
|
75
|
-
running = "running",
|
|
76
|
-
finished_success = "finished_success",
|
|
77
|
-
finished_failure = "finished_failure"
|
|
78
|
-
}
|
|
79
|
-
export interface PLSPulsarInterface {
|
|
80
|
-
/** Initiates Pulsar library from existing exporter. This is only for internal use (especially for tests) and doesn't validate integrity of the exporter, and shouldn't not be used in production! */
|
|
81
|
-
initiateWithExporter(exporter: PLSExporter): Promise<PLSEngineExporterDetail>;
|
|
82
|
-
/** Initiates Pulsar library from a local filepath. Note that this has to always be called before using the library, as all calls require the exporter to be present. This fully handles loading and validation of the package, including download of the package, unzipping and more */
|
|
83
|
-
initiateWithLocalURL(url: string): Promise<PLSEngineExporterDetail>;
|
|
84
|
-
/** Initiates Pulsar library from remote S3 URL. Note that this has to always be called before using the library, as all calls require the exporter to be present. This fully handles loading and validation of the package, including download of the package, unzipping and more */
|
|
85
|
-
initiateWithPackageS3URL(s3URL: string): Promise<PLSEngineExporterDetail>;
|
|
86
|
-
/** Initiates Pulsar library from github URL. Note that this has to always be called before using the library, as all calls require the exporter to be present. This fully handles loading and validation of the package, including download of the package, unzipping and more */
|
|
87
|
-
initiateWithPackageGitHubURL(githubURL: string): Promise<PLSEngineExporterDetail>;
|
|
88
|
-
/** Initiates Pulsar library from JSON blob or already parsed object. Note that this has to always be called before using the library, as all calls require the exporter to be present. This fully handles loading and validation of the package */
|
|
89
|
-
initiateWithPackageBlob(blob: Object | string): Promise<PLSEngineExporterDetail>;
|
|
90
|
-
/** Retrieve underlaying exporter object. Not to be used on the client, as it exposes other properties of exporter that are not to be consumed */
|
|
91
|
-
getExporterBackingObject(): PLSExporter;
|
|
92
|
-
/** Retrieve details about currently loaded exporter. Note that this only retrieves settings of the exporter, to request Sources and mapping, use separate functions */
|
|
93
|
-
getExporterDetail(): PLSEngineExporterDetail;
|
|
94
|
-
/** Update exporter name. Name must be non-empty and contain at least 6 characters */
|
|
95
|
-
updateExporterName(name: string): PLSEngineExporterDetail;
|
|
96
|
-
/** Update exporter description. Overview must be non-empty and contain at least 20 characters */
|
|
97
|
-
updateExporterDescription(description: string): PLSEngineExporterDetail;
|
|
98
|
-
/** Update exporter version. Exporter version needs to follow standard major.minor.patch versioning. Patch is optional */
|
|
99
|
-
updateExporterVersion(version: string): PLSEngineExporterDetail;
|
|
100
|
-
/** Update exporter author. Author can be empty. If non-empty, only alpha-numerics are allowed */
|
|
101
|
-
updateExporterAuthor(author: string | null): PLSEngineExporterDetail;
|
|
102
|
-
/** Update exporter homepage. Homepage can be empty */
|
|
103
|
-
updateExporterHomepage(homepage: string): PLSEngineExporterDetail;
|
|
104
|
-
/** Update exporter icon. Not available at the moment and will throw */
|
|
105
|
-
updateExporterIcon(icon: string): PLSEngineExporterDetail;
|
|
106
|
-
/** Update exporter tags. Each tag must consist of letters and numbers */
|
|
107
|
-
updateExporterTags(tags: string[]): PLSEngineExporterDetail;
|
|
108
|
-
/** Get all Sources associated with loaded exporter. Note that Sources don't contain their code definitions, as those need to be requested separaterly */
|
|
109
|
-
getSources(): Array<PLSEngineSourceDetail>;
|
|
110
|
-
/** Get specific source associated with loaded exporter */
|
|
111
|
-
getSourceById(sourceId: string): PLSEngineSourceDetail;
|
|
112
|
-
/** Create new source for loaded exporter. Source comes with default name and code and uses generic context */
|
|
113
|
-
createNewSource(): PLSEngineSourceDetail;
|
|
114
|
-
/** Delete specified source. Throws error when source is not found */
|
|
115
|
-
deleteSourceById(sourceId: string): any;
|
|
116
|
-
/** 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 */
|
|
117
|
-
updateSourceLocation(oldSourceId: string, newSourceId: string, newPath: string): PLSEngineSourceDetail;
|
|
118
|
-
/** Get exporter configuration JSON */
|
|
119
|
-
getExporterConfigurationJSON(): string;
|
|
120
|
-
/** Get source configuration JSON */
|
|
121
|
-
getSourceConfigurationJSON(): string;
|
|
122
|
-
/** Get output configuration JSON */
|
|
123
|
-
getOutputConfigurationJSON(): string;
|
|
124
|
-
/** Update exporter configuration JSON */
|
|
125
|
-
updateExporterConfigurationJSON(content: string): any;
|
|
126
|
-
/** Update source configuration JSON */
|
|
127
|
-
updateSourceConfigurationJSON(content: string): any;
|
|
128
|
-
/** Update output configuration JSON */
|
|
129
|
-
updateOutputConfigurationJSON(content: string): any;
|
|
130
|
-
/** Get reference store containing description of all elements in the DSM, including all context categories */
|
|
131
|
-
getDSMContextStore(dsmBridgeConfig: DSMBridgeConfiguration): Promise<DSMReferenceStore>;
|
|
132
|
-
/** Execute source code and retrieve the resulting code. This also retrieves any emitted extra files. Throws error when source is not found */
|
|
133
|
-
executeSourceById(sourceId: string, dsmBridgeConfig: DSMBridgeConfiguration, contextKey: string, contextId: string): Promise<PLSEngineSourceProcessingResult>;
|
|
134
|
-
/** Update source code definition. Overview can be empty. Throws error when source is not found */
|
|
135
|
-
updateSourceCodeDefinitionForSourceId(sourceId: string, definition: string): any;
|
|
136
|
-
/** @deprecated Use PLSPulsarStaticAnalysis instead. Suggest next characters, words or snippets to be inserted into blazar code as user types */
|
|
137
|
-
suggestNextFromSourceCode(code: string, selectionLocation: number, selectionLength: number): Array<BLZAutocompleteEngineSuggestion>;
|
|
138
|
-
/** @deprecated Use PLSPulsarStaticAnalysis instead. Apply autocompletion result to specified blazar code */
|
|
139
|
-
applyAutocompletionResultToCode(code: string, selectionLocation: number, selectionLength: number, apply: BLZAutocompleteEngineSuggestion): BLZAutocompleteEngineApplicationResult;
|
|
140
|
-
/** @deprecated Use PLSPulsarStaticAnalysis instead. Compute highlight tokens for the provided blazar code */
|
|
141
|
-
suggestHighlightFromSourceCode(code: string): Array<BLZHighlightEngineToken>;
|
|
142
|
-
/** Serialize entire exporter into single javascript object. Returns object representation */
|
|
143
|
-
getExporterBlob(): Object;
|
|
144
|
-
/** Serialize entire exporter into single javascript object. Returns JSON-string representation */
|
|
145
|
-
getExporterBlobJSONSerialized(): string;
|
|
146
|
-
/** Execute entire exporter and retrieve all files produced as a result of this export */
|
|
147
|
-
executeExporter(dsmBridgeConfig: DSMBridgeConfiguration, exportMode: string): Promise<PLSEngineExporterProcessingResult>;
|
|
148
|
-
/** Execute exporter in sandbox mode for a specific component */
|
|
149
|
-
executeExporterForSingleSandboxedComponent(dsmBridgeConfig: DSMBridgeConfiguration, sandboxComponentId: string, serializedSandboxData: string): Promise<PLSEngineExporterProcessingResult>;
|
|
150
|
-
/** Retrieve intermediate output of exporter in progress */
|
|
151
|
-
retrieveRunningExporterState(): PLSEngineExporterProcessingResult | null;
|
|
152
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
//
|
|
3
|
-
// PLSPulsarInterface.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.PLSEngineExporterState = exports.PLSEngineFileGroup = exports.PLSEngineSourceDetail = exports.PLSEngineExporterDetail = void 0;
|
|
11
|
-
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
12
|
-
// MARK: - Definitions
|
|
13
|
-
/** Exporter detail containing data about the currently loaded exporter */
|
|
14
|
-
class PLSEngineExporterDetail {
|
|
15
|
-
}
|
|
16
|
-
exports.PLSEngineExporterDetail = PLSEngineExporterDetail;
|
|
17
|
-
/** Source detail containing data about specific source including its code definition */
|
|
18
|
-
class PLSEngineSourceDetail {
|
|
19
|
-
}
|
|
20
|
-
exports.PLSEngineSourceDetail = PLSEngineSourceDetail;
|
|
21
|
-
/** Unique, computed file group */
|
|
22
|
-
class PLSEngineFileGroup {
|
|
23
|
-
constructor(name, path, files, groups) {
|
|
24
|
-
this.name = name;
|
|
25
|
-
this.path = path;
|
|
26
|
-
this.files = files;
|
|
27
|
-
this.groups = groups;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
exports.PLSEngineFileGroup = PLSEngineFileGroup;
|
|
31
|
-
var PLSEngineExporterState;
|
|
32
|
-
(function (PLSEngineExporterState) {
|
|
33
|
-
PLSEngineExporterState["running"] = "running";
|
|
34
|
-
PLSEngineExporterState["finished_success"] = "finished_success";
|
|
35
|
-
PLSEngineExporterState["finished_failure"] = "finished_failure";
|
|
36
|
-
})(PLSEngineExporterState = exports.PLSEngineExporterState || (exports.PLSEngineExporterState = {}));
|
|
37
|
-
//# sourceMappingURL=PulsarInterface.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PulsarInterface.js","sourceRoot":"","sources":["../../../src/pulsar/PulsarInterface.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,yBAAyB;AACzB,aAAa;AACb,EAAE;AACF,2BAA2B;AAC3B,sDAAsD;AACtD,EAAE;;;AAkBF,8GAA8G;AAC9G,sBAAsB;AAEtB,0EAA0E;AAC1E,MAAa,uBAAuB;CAsBnC;AAtBD,0DAsBC;AAED,wFAAwF;AACxF,MAAa,qBAAqB;CAWjC;AAXD,sDAWC;AAED,kCAAkC;AAClC,MAAa,kBAAkB;IAM7B,YACE,IAAY,EACZ,IAAY,EACZ,KAAqC,EACrC,MAAiC;QAEjC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;CACF;AAjBD,gDAiBC;AAmCD,IAAY,sBAIX;AAJD,WAAY,sBAAsB;IAChC,6CAAmB,CAAA;IACnB,+DAAqC,CAAA;IACrC,+DAAqC,CAAA;AACvC,CAAC,EAJW,sBAAsB,GAAtB,8BAAsB,KAAtB,8BAAsB,QAIjC"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { BLZHighlightEngineToken } from '@supernova-studio/pulsar-language';
|
|
2
|
-
import { BLZAutocompleteEngineApplicationResult, BLZAutocompleteEngineSuggestion } from '@supernova-studio/pulsar-language/build/main/tools/autocomplete/AutocompleteEngine';
|
|
3
|
-
import { PLSPulsarStaticAnalysisInterface } from './PulsarStaticAnalysisInterface';
|
|
4
|
-
export declare enum PLSPulsarEngineState {
|
|
5
|
-
waiting = "waiting",
|
|
6
|
-
loading = "loading",
|
|
7
|
-
ready = "ready"
|
|
8
|
-
}
|
|
9
|
-
export declare enum PLSPulsarExporterMode {
|
|
10
|
-
ci = "ci",
|
|
11
|
-
sandbox = "sandbox",
|
|
12
|
-
docs = "docs"
|
|
13
|
-
}
|
|
14
|
-
export declare class PLSPulsarStaticAnalysis implements PLSPulsarStaticAnalysisInterface {
|
|
15
|
-
private codeManager;
|
|
16
|
-
constructor();
|
|
17
|
-
/** Suggest next characters, words or snippets to be inserted into blazar code as user types */
|
|
18
|
-
suggestNextFromBlueprintCode(code: string, selectionLocation: number, selectionLength: number): Array<BLZAutocompleteEngineSuggestion>;
|
|
19
|
-
/** Apply autocompletion result to specified blazar code */
|
|
20
|
-
applyAutocompletionResultToCode(code: string, selectionLocation: number, selectionLength: number, apply: BLZAutocompleteEngineSuggestion): BLZAutocompleteEngineApplicationResult;
|
|
21
|
-
/** Compute highlight tokens for the provided blazar code */
|
|
22
|
-
suggestHighlightFromBlueprintCode(code: string): Array<BLZHighlightEngineToken>;
|
|
23
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
//
|
|
3
|
-
// PLSPulsar.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.PLSPulsarStaticAnalysis = exports.PLSPulsarExporterMode = exports.PLSPulsarEngineState = void 0;
|
|
11
|
-
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
12
|
-
// MARK: - Definitions
|
|
13
|
-
var PLSPulsarEngineState;
|
|
14
|
-
(function (PLSPulsarEngineState) {
|
|
15
|
-
PLSPulsarEngineState["waiting"] = "waiting";
|
|
16
|
-
PLSPulsarEngineState["loading"] = "loading";
|
|
17
|
-
PLSPulsarEngineState["ready"] = "ready";
|
|
18
|
-
})(PLSPulsarEngineState = exports.PLSPulsarEngineState || (exports.PLSPulsarEngineState = {}));
|
|
19
|
-
var PLSPulsarExporterMode;
|
|
20
|
-
(function (PLSPulsarExporterMode) {
|
|
21
|
-
PLSPulsarExporterMode["ci"] = "ci";
|
|
22
|
-
PLSPulsarExporterMode["sandbox"] = "sandbox";
|
|
23
|
-
PLSPulsarExporterMode["docs"] = "docs";
|
|
24
|
-
})(PLSPulsarExporterMode = exports.PLSPulsarExporterMode || (exports.PLSPulsarExporterMode = {}));
|
|
25
|
-
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
26
|
-
// MARK: - Class
|
|
27
|
-
class PLSPulsarStaticAnalysis {
|
|
28
|
-
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
29
|
-
// MARK: - Setup
|
|
30
|
-
constructor() { }
|
|
31
|
-
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
32
|
-
// MARK: - Code editor
|
|
33
|
-
/** Suggest next characters, words or snippets to be inserted into blazar code as user types */
|
|
34
|
-
suggestNextFromBlueprintCode(code, selectionLocation, selectionLength) {
|
|
35
|
-
return this.codeManager.suggestNextFromSourceCode(code, selectionLocation, selectionLength);
|
|
36
|
-
}
|
|
37
|
-
/** Apply autocompletion result to specified blazar code */
|
|
38
|
-
applyAutocompletionResultToCode(code, selectionLocation, selectionLength, apply) {
|
|
39
|
-
return this.codeManager.applyAutocompletionResultToCode(code, selectionLocation, selectionLength, apply);
|
|
40
|
-
}
|
|
41
|
-
/** Compute highlight tokens for the provided blazar code */
|
|
42
|
-
suggestHighlightFromBlueprintCode(code) {
|
|
43
|
-
return this.codeManager.suggestHighlightFromSourceCode(code);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
exports.PLSPulsarStaticAnalysis = PLSPulsarStaticAnalysis;
|
|
47
|
-
//# sourceMappingURL=PulsarStaticAnalysis.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PulsarStaticAnalysis.js","source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