@supernova-studio/pulsar-core 2.0.14 → 2.0.17
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/main/core/src/browser-bundle.d.ts +1 -0
- package/build/main/core/src/engine/ExportEngineLegacy.d.ts +17 -0
- package/build/main/core/src/engine/ExportEngineNew.d.ts +12 -0
- package/build/main/core/src/engine/configuration/ExportConfiguration.d.ts +24 -0
- package/build/main/core/src/engine/generation/ExportDataProducer.d.ts +20 -0
- package/build/main/core/src/engine/generation/queue/ExportDataQueue.d.ts +16 -0
- package/build/main/core/src/engine/generation/queue/ExportDataQueueOperation.d.ts +6 -0
- package/build/main/core/src/engine/generation/requests/ExportDataEmittedResponseProducer.d.ts +7 -0
- package/build/main/core/src/engine/generation/requests/ExportDataPrimaryResponseProducer.d.ts +7 -0
- package/build/main/core/src/engine/generation/requests/ExportDataRequest.d.ts +21 -0
- package/build/main/core/src/engine/generation/requests/ExportDataRequestDataStore.d.ts +16 -0
- package/build/main/core/src/engine/generation/requests/ExportDataRequestNameStore.d.ts +22 -0
- package/build/main/core/src/engine/generation/requests/ExportDataRequestProducer.d.ts +23 -0
- package/build/main/core/src/engine/generation/requests/ExportDataResponse.d.ts +15 -0
- package/build/main/core/src/engine/generation/requests/specific/dsm/ExportDataRequestAsset.d.ts +15 -0
- package/build/main/core/src/engine/generation/requests/specific/dsm/ExportDataRequestBlueprint.d.ts +17 -0
- package/build/main/core/src/engine/generation/requests/specific/dsm/ExportDataRequestBundledResource.d.ts +11 -0
- package/build/main/core/src/engine/generation/requests/specific/dsm/ExportDataRequestDSMComponent.d.ts +13 -0
- package/build/main/core/src/engine/generation/requests/specific/dsm/ExportDataRequestDSMComponentGroup.d.ts +13 -0
- package/build/main/core/src/engine/generation/requests/specific/dsm/ExportDataRequestDSMDocumentationPage.d.ts +13 -0
- package/build/main/core/src/engine/generation/requests/specific/dsm/ExportDataRequestDSMGeneric.d.ts +11 -0
- package/build/main/core/src/engine/generation/requests/specific/dsm/ExportDataRequestDSMTheme.d.ts +13 -0
- package/build/main/core/src/engine/generation/requests/specific/dsm/ExportDataRequestDSMTokenGroup.d.ts +13 -0
- package/build/main/core/src/engine/generation/requests/specific/dsm/ExportDataRequestDSMTokenType.d.ts +13 -0
- package/build/main/core/src/engine/items/ExportItemProducer.d.ts +14 -0
- package/build/main/core/src/engine/items/construction/ExportItem.d.ts +10 -0
- package/build/main/core/src/engine/items/construction/ExportItemBuilder.d.ts +9 -0
- package/build/main/core/src/engine/items/queue/ExportItemQueue.d.ts +16 -0
- package/build/main/core/src/engine/items/queue/ExportItemQueueOperation.d.ts +6 -0
- package/build/main/core/src/engine/items/requests/ExportItemRequest.d.ts +16 -0
- package/build/main/core/src/engine/items/requests/ExportItemRequestProducer.d.ts +8 -0
- package/build/main/core/src/engine/items/requests/ExportItemResponse.d.ts +11 -0
- package/build/main/core/src/engine/items/requests/ExportItemResponseProducer.d.ts +7 -0
- package/build/main/core/src/engine/jsruntime/JSExportContext.d.ts +10 -0
- package/build/main/core/src/engine/loaders/BlueprintLoader.d.ts +9 -0
- package/build/main/core/src/engine/writing/queue/ExportWriterQueue.d.ts +16 -0
- package/build/main/core/src/engine/writing/queue/ExportWriterQueueOperation.d.ts +6 -0
- package/build/main/core/src/engine/writing/requests/ExportWriterRequest.d.ts +16 -0
- package/build/main/core/src/engine/writing/requests/ExportWriterRequestProducer.d.ts +8 -0
- package/build/main/core/src/engine/writing/requests/ExportWriterResponse.d.ts +11 -0
- package/build/main/core/src/engine/writing/requests/ExportWriterResponseProducer.d.ts +7 -0
- package/build/main/core/src/engine/writing/writers/ExportItemWriter.d.ts +14 -0
- package/build/main/core/src/engine/writing/writers/ExportWriterRuleProcessor.d.ts +11 -0
- package/build/main/core/src/engine/writing/writers/memory/ExportWriterMemory.d.ts +4 -0
- package/build/main/core/src/engine/writing/writers/memory/ExportWriterMemoryRequest.d.ts +11 -0
- package/build/main/core/src/engine/writing/writers/memory/ExportWriterStore.d.ts +16 -0
- package/build/main/core/src/exports.d.ts +7 -0
- package/build/main/core/src/index.d.ts +1 -0
- package/build/main/core/src/model/assets/ExporterBundledResource.d.ts +6 -0
- package/build/main/core/src/model/dsm/DSMReferenceStore.d.ts +32 -0
- package/build/main/core/src/model/exporters/Exporter.d.ts +125 -0
- package/build/main/core/src/model/exporters/ExporterContribution.d.ts +15 -0
- package/build/main/core/src/model/exporters/ExporterContributionBlock.d.ts +27 -0
- package/build/main/core/src/model/exporters/ExporterContributionBlockProperty.d.ts +16 -0
- package/build/main/core/src/model/exporters/ExporterContributionBlockVariant.d.ts +18 -0
- package/build/main/core/src/model/exporters/ExporterContributionConfiguration.d.ts +12 -0
- package/build/main/core/src/model/exporters/ExporterContributionConfigurationItem.d.ts +40 -0
- package/build/main/core/src/model/exporters/configuration/ExporterConfigurationProperty.d.ts +44 -0
- package/build/main/core/src/model/maps/ExporterMapAsset.d.ts +32 -0
- package/build/main/core/src/model/maps/ExporterMapBlueprint.d.ts +20 -0
- package/build/main/core/src/model/maps/ExporterMapBundledResource.d.ts +12 -0
- package/build/main/core/src/model/sources/ExporterSource.d.ts +25 -0
- package/build/main/core/src/pulsar/Pulsar.d.ts +91 -0
- package/build/main/core/src/pulsar/PulsarInterface.d.ts +117 -0
- package/build/main/core/src/pulsar/PulsarStaticAnalysis.d.ts +14 -0
- package/build/main/core/src/pulsar/PulsarStaticAnalysisInterface.d.ts +12 -0
- package/build/main/core/src/pulsar/managers/PulsarBlueprintManager.d.ts +16 -0
- package/build/main/core/src/pulsar/managers/PulsarCIManager.d.ts +31 -0
- package/build/main/core/src/pulsar/managers/PulsarCodeManager.d.ts +24 -0
- package/build/main/core/src/pulsar/managers/PulsarConfigurationManager.d.ts +6 -0
- package/build/main/core/src/pulsar/managers/PulsarExporterManager.d.ts +7 -0
- package/build/main/core/src/pulsar/managers/generators/PulsarExporterPackageAnalyzer.d.ts +10 -0
- package/build/main/core/src/pulsar/managers/generators/PulsarExporterPackageGenerator.d.ts +7 -0
- package/build/main/core/src/pulsar/managers/generators/PulsarFiles.d.ts +21 -0
- package/build/main/core/src/pulsar/managers/loaders/PulsarExporterPackageBrowserLoader.d.ts +12 -0
- package/build/main/core/src/pulsar/managers/loaders/PulsarExporterPackageFileSystemLoader.d.ts +15 -0
- package/build/main/core/src/pulsar/managers/loaders/PulsarExporterPackageGithubLoader.d.ts +32 -0
- package/build/main/core/src/pulsar/managers/loaders/PulsarExporterPackageLoader.d.ts +10 -0
- package/build/main/core/src/pulsar/managers/loaders/PulsarExporterPackageMemoryLoader.d.ts +14 -0
- package/build/main/core/src/pulsar/managers/loaders/PulsarExporterPackageURLLoader.d.ts +12 -0
- package/build/main/core/src/pulsar/managers/loaders/partials/PulsarExporterAssetLoader.d.ts +13 -0
- package/build/main/core/src/pulsar/managers/loaders/partials/PulsarExporterConfigLoader.d.ts +9 -0
- package/build/main/core/src/pulsar/managers/loaders/partials/PulsarExporterJSLoader.d.ts +9 -0
- package/build/main/core/src/pulsar/managers/loaders/partials/PulsarExporterLocalConfigLoader.d.ts +9 -0
- package/build/main/core/src/pulsar/managers/loaders/partials/PulsarExporterMappingLoader.d.ts +21 -0
- package/build/main/core/src/pulsar/managers/loaders/partials/PulsarExporterObjectLoader.d.ts +6 -0
- package/build/main/core/src/pulsar/managers/loaders/partials/PulsarExporterReadmeLoader.d.ts +9 -0
- package/build/main/core/src/pulsar/managers/loaders/partials/PulsarExporterSourceLoader.d.ts +14 -0
- package/build/main/core/src/pulsar/managers/loaders/support/PulsarExporterUnzipper.d.ts +11 -0
- package/build/main/core/src/pulsar/managers/loaders/support/PulsarPathParser.d.ts +4 -0
- package/build/main/core/src/pulsar/managers/loaders/validators/PulsarExporterConfigurationValidator.d.ts +11 -0
- package/build/main/core/src/pulsar/managers/loaders/validators/PulsarExporterMappingValidator.d.ts +8 -0
- package/build/main/core/src/pulsar/managers/loaders/validators/PulsarExporterObjectValidator.d.ts +10 -0
- package/build/main/core/src/pulsar/managers/loaders/validators/PulsarExporterSourceValidator.d.ts +4 -0
- package/build/main/core/src/pulsar/managers/loaders/validators/PulsarJSONValidator.d.ts +3 -0
- package/build/main/core/src/tests/TestConfiguration.d.ts +10 -0
- package/build/main/core/src/tests/casebuilders/ci.d.ts +12 -0
- package/build/main/core/src/tests/casebuilders/configuration.d.ts +5 -0
- package/build/main/core/src/tests/casebuilders/dsm.d.ts +7 -0
- package/build/main/core/src/tests/casebuilders/modelObjects.d.ts +14 -0
- package/build/main/core/src/tests/complex/TestExporter.spec.d.ts +1 -0
- package/build/main/core/src/tests/dynamic_execution/DynamicExecutionSupport.d.ts +4 -0
- package/build/main/core/src/tests/dynamic_execution/TestConfigurableExecution.spec.d.ts +1 -0
- package/build/main/core/src/tests/dynamic_execution/TestJSConstantExecution.spec.d.ts +1 -0
- package/build/main/core/src/tests/dynamic_execution/TestJSFunctionExecution.spec.d.ts +1 -0
- package/build/main/core/src/tests/dynamic_execution/TestJSTransformerExecution.spec.d.ts +1 -0
- package/build/main/core/src/tests/lib.pulsar/TestPulsarBlueprintManipulation.spec.d.ts +1 -0
- package/build/main/core/src/tests/lib.pulsar/TestPulsarCodeManipulation.spec.d.ts +1 -0
- package/build/main/core/src/tests/lib.pulsar/TestPulsarExporterManipulation.spec.d.ts +1 -0
- package/build/main/core/src/tests/packages/TestGitHubPackageDownloader.spec.d.ts +1 -0
- package/build/main/core/src/tests/packages/TestRemotePackageDownloader.spec.d.ts +1 -0
- package/build/main/core/src/tests/packages/TestZipping.spec.d.ts +1 -0
- package/build/main/core/src/tests/scenarios/TestBrowserScenario.spec.d.ts +1 -0
- package/build/main/core/src/tests/scenarios/TestCIScenario.spec.d.ts +1 -0
- package/build/main/core/src/tools/Logger.d.ts +3 -0
- package/build/main/core/src/tools/LoggerDefaultMessages.d.ts +9 -0
- package/build/main/core/src/tools/Timer.d.ts +14 -0
- package/build/main/pulsar-core.js +2 -272
- package/package.json +6 -2
- package/LICENSE +0 -21
- package/images/image.png +0 -0
- package/scripts/travis-npm-publish.sh +0 -4
- package/shims/tmp-promise.js +0 -2
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { DSMBridgeConfiguration, PLHighlightEngineToken } from '@supernova-studio/pulsar-language';
|
|
2
|
+
import { PLAutocompleteEngineSuggestion, PLAutocompleteEngineApplicationResult } from '@supernova-studio/pulsar-language';
|
|
3
|
+
import { DSMReferenceStore } from '..';
|
|
4
|
+
import { PCExporterSourceContextType } from '../model/sources/ExporterSource';
|
|
5
|
+
import { PCLogger } from '../tools/Logger';
|
|
6
|
+
import { PCExporter, PCExporterEngine, PCExporterEnvironment } from './../model/exporters/Exporter';
|
|
7
|
+
/** Exporter detail containing data about the currently loaded exporter */
|
|
8
|
+
export declare class PCEngineExporterDetail {
|
|
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
|
+
routingVersion?: string;
|
|
18
|
+
icon?: string;
|
|
19
|
+
readme?: string;
|
|
20
|
+
usesBrands: boolean;
|
|
21
|
+
usesThemes: boolean;
|
|
22
|
+
repository?: {
|
|
23
|
+
url: string;
|
|
24
|
+
branch: string;
|
|
25
|
+
directory: string;
|
|
26
|
+
};
|
|
27
|
+
config?: {
|
|
28
|
+
sources?: string;
|
|
29
|
+
output?: string;
|
|
30
|
+
js?: string;
|
|
31
|
+
};
|
|
32
|
+
engine: PCExporterEngine;
|
|
33
|
+
executable?: string;
|
|
34
|
+
tags: Array<string>;
|
|
35
|
+
}
|
|
36
|
+
/** Source detail containing data about specific source including its code definition */
|
|
37
|
+
export declare class PCEngineSourceDetail {
|
|
38
|
+
id: string;
|
|
39
|
+
path: string;
|
|
40
|
+
targetsFullExport: boolean;
|
|
41
|
+
targetsSandbox: boolean;
|
|
42
|
+
context: PCExporterSourceContextType;
|
|
43
|
+
content: string;
|
|
44
|
+
}
|
|
45
|
+
/** Unique, computed file group */
|
|
46
|
+
export declare class PCEngineFileGroup {
|
|
47
|
+
name: string;
|
|
48
|
+
path: string;
|
|
49
|
+
files: Array<PCEngineFileDescriptor>;
|
|
50
|
+
groups: Array<PCEngineFileGroup>;
|
|
51
|
+
constructor(name: string, path: string, files: Array<PCEngineFileDescriptor>, groups: Array<PCEngineFileGroup>);
|
|
52
|
+
}
|
|
53
|
+
/** 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 */
|
|
54
|
+
export declare type PCEngineExporterProcessingResult = {
|
|
55
|
+
exporterId: string;
|
|
56
|
+
runId: string;
|
|
57
|
+
state: PCEngineExporterState;
|
|
58
|
+
emittedFiles: Array<PCEngineFileDescriptor>;
|
|
59
|
+
rootGroup: PCEngineFileGroup;
|
|
60
|
+
logger: PCLogger;
|
|
61
|
+
emittedFileChecksums: Object;
|
|
62
|
+
};
|
|
63
|
+
/** Result of a specific run of a singular source. Can optionally produce multiple files if emitter was used within the source */
|
|
64
|
+
export declare type PCEngineSourceProcessingResult = {
|
|
65
|
+
sourceId: string;
|
|
66
|
+
logger: PCLogger;
|
|
67
|
+
producedContent: Array<PCEngineFileDescriptor>;
|
|
68
|
+
};
|
|
69
|
+
/** File descriptor for one specific file produced by either source, map generation or exporter run */
|
|
70
|
+
export declare type PCEngineFileDescriptor = {
|
|
71
|
+
name: string;
|
|
72
|
+
path: string;
|
|
73
|
+
content: string;
|
|
74
|
+
source: 'primary' | 'emitter';
|
|
75
|
+
type: 'string' | 'copy_file' | 'copy_file_remote';
|
|
76
|
+
hash?: string;
|
|
77
|
+
};
|
|
78
|
+
export declare enum PCEngineExporterState {
|
|
79
|
+
running = "running",
|
|
80
|
+
finished_success = "finished_success",
|
|
81
|
+
finished_failure = "finished_failure"
|
|
82
|
+
}
|
|
83
|
+
export interface PCPulsarInterface {
|
|
84
|
+
/** 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! */
|
|
85
|
+
initiateWithExporter(exporter: PCExporter, environment: PCExporterEnvironment): Promise<PCEngineExporterDetail>;
|
|
86
|
+
/** Initiates Pulsar library from a local folder. This must point to directly-readable directory, can't be zip. */
|
|
87
|
+
initiateWithLocalFolderURL(url: string, environment: PCExporterEnvironment): Promise<PCEngineExporterDetail>;
|
|
88
|
+
/** Initiates Pulsar library from github URL. Can only be used when filesystem is present (CI, VSCode) */
|
|
89
|
+
initiateWithGitHubPackageURL(githubURL: string, accessToken: string | undefined, environment: PCExporterEnvironment): Promise<PCEngineExporterDetail>;
|
|
90
|
+
/** Initiates Pulsar library from remote package URL. Can only be used when filesystem is present (CI, VSCode) */
|
|
91
|
+
initiateWithRemotePackageURL(s3URL: string, environment: PCExporterEnvironment): Promise<PCEngineExporterDetail>;
|
|
92
|
+
/** Initiates Pulsar library from package URL. Can only be used if filesystem is NOT present (Browser) and ignores some capabilities, such as copying assets */
|
|
93
|
+
initiateWithRemoteBrowserPackageURL(packageURL: string, environment: PCExporterEnvironment): Promise<PCEngineExporterDetail>;
|
|
94
|
+
/** Retrieve underlaying exporter object. Not to be used on the client, as it exposes other properties of exporter that are not to be consumed */
|
|
95
|
+
getExporterBackingObject(): PCExporter;
|
|
96
|
+
/** Retrieve details about currently loaded exporter. Note that this only retrieves settings of the exporter, to request Sources and mapping, use separate functions */
|
|
97
|
+
getExporterDetail(): PCEngineExporterDetail;
|
|
98
|
+
/** Get all Sources associated with loaded exporter. Note that Sources don't contain their code definitions, as those need to be requested separaterly */
|
|
99
|
+
getSources(): Array<PCEngineSourceDetail>;
|
|
100
|
+
/** Get specific source associated with loaded exporter */
|
|
101
|
+
getSourceById(sourceId: string): PCEngineSourceDetail;
|
|
102
|
+
setUserConfiguration(data: Object): any;
|
|
103
|
+
/** Get reference store containing description of all elements in the DSM, including all context categories */
|
|
104
|
+
getDSMContextStore(dsmBridgeConfig: DSMBridgeConfiguration): Promise<DSMReferenceStore>;
|
|
105
|
+
/** Execute source code and retrieve the resulting code. This also retrieves any emitted extra files. Throws error when source is not found */
|
|
106
|
+
executeSourceById(sourceId: string, dsmBridgeConfig: DSMBridgeConfiguration, contextKey: string, contextId: string): Promise<PCEngineSourceProcessingResult>;
|
|
107
|
+
/** @deprecated Use PCPulsarStaticAnalysis instead. Suggest next characters, words or snippets to be inserted into pulsar code as user types */
|
|
108
|
+
suggestNextFromSourceCode(code: string, selectionLocation: number, selectionLength: number): Array<PLAutocompleteEngineSuggestion>;
|
|
109
|
+
/** @deprecated Use PCPulsarStaticAnalysis instead. Apply autocompletion result to specified pulsar code */
|
|
110
|
+
applyAutocompletionResultToCode(code: string, selectionLocation: number, selectionLength: number, apply: PLAutocompleteEngineSuggestion): PLAutocompleteEngineApplicationResult;
|
|
111
|
+
/** @deprecated Use PCPulsarStaticAnalysis instead. Compute highlight tokens for the provided pulsar code */
|
|
112
|
+
suggestHighlightFromSourceCode(code: string): Array<PLHighlightEngineToken>;
|
|
113
|
+
/** Execute entire exporter and retrieve all files produced as a result of this export */
|
|
114
|
+
executeExporter(dsmBridgeConfig: DSMBridgeConfiguration, debugMode: boolean): Promise<PCEngineExporterProcessingResult>;
|
|
115
|
+
/** Retrieve intermediate output of exporter in progress */
|
|
116
|
+
retrieveRunningExporterState(): PCEngineExporterProcessingResult | null;
|
|
117
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { DSMExecutionContext, PLHighlightEngineToken, PLError, PLAutocompleteEngineSuggestion, PLAutocompleteEngineApplicationResult } from '@supernova-studio/pulsar-language';
|
|
2
|
+
import { PCPulsarStaticAnalysisInterface } from './PulsarStaticAnalysisInterface';
|
|
3
|
+
export declare class PCPulsarStaticAnalysis implements PCPulsarStaticAnalysisInterface {
|
|
4
|
+
private codeManager;
|
|
5
|
+
constructor();
|
|
6
|
+
/** Run analysis and return errors if found, otherwise empty */
|
|
7
|
+
analyzeBlueprintCode(code: string, sourceFileName: string, executionContext?: DSMExecutionContext | undefined): Array<PLError>;
|
|
8
|
+
/** Suggest next characters, words or snippets to be inserted into pulsar code as user types */
|
|
9
|
+
suggestNextFromBlueprintCode(code: string, selectionLocation: number, selectionLength: number): Array<PLAutocompleteEngineSuggestion>;
|
|
10
|
+
/** Apply autocompletion result to specified pulsar code */
|
|
11
|
+
applyAutocompletionResultToCode(code: string, selectionLocation: number, selectionLength: number, apply: PLAutocompleteEngineSuggestion): PLAutocompleteEngineApplicationResult;
|
|
12
|
+
/** Compute highlight tokens for the provided pulsar code */
|
|
13
|
+
suggestHighlightFromBlueprintCode(code: string): Array<PLHighlightEngineToken>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { PLHighlightEngineToken } from '@supernova-studio/pulsar-language';
|
|
2
|
+
import { PLAutocompleteEngineApplicationResult, PLAutocompleteEngineSuggestion, PLError } from '@supernova-studio/pulsar-language';
|
|
3
|
+
export interface PCPulsarStaticAnalysisInterface {
|
|
4
|
+
/** Run analysis and return errors if found, otherwise empty */
|
|
5
|
+
analyzeBlueprintCode(code: string, sourceFileName: string): Array<PLError>;
|
|
6
|
+
/** Suggest next characters, words or snippets to be inserted into pulsar code as user types */
|
|
7
|
+
suggestNextFromBlueprintCode(code: string, selectionLocation: number, selectionLength: number): Array<PLAutocompleteEngineSuggestion>;
|
|
8
|
+
/** Apply autocompletion result to specified pulsar code */
|
|
9
|
+
applyAutocompletionResultToCode(code: string, selectionLocation: number, selectionLength: number, apply: PLAutocompleteEngineSuggestion): PLAutocompleteEngineApplicationResult;
|
|
10
|
+
/** Compute highlight tokens for the provided pulsar code */
|
|
11
|
+
suggestHighlightFromBlueprintCode(code: string): Array<PLHighlightEngineToken>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { PCExporter } from '@pulsar/core/model/exporters/Exporter';
|
|
2
|
+
import { PCLogger } from '@pulsar/core/tools/Logger';
|
|
3
|
+
import { DSMBridgeConfiguration } from '@supernova-studio/pulsar-language';
|
|
4
|
+
import { DSMReferenceStore } from '../..';
|
|
5
|
+
import { PCPulsarExporterMode } from '../Pulsar';
|
|
6
|
+
import { PCEngineExporterProcessingResult } from '../PulsarInterface';
|
|
7
|
+
export declare class PCPulsarCIManager {
|
|
8
|
+
private exporter;
|
|
9
|
+
private mode;
|
|
10
|
+
private currentExporterInstance;
|
|
11
|
+
constructor(exporter: PCExporter, mode: PCPulsarExporterMode);
|
|
12
|
+
/** Execute entire exporter and retrieve all files produced as a result of this export */
|
|
13
|
+
executeExporter(dsmBridgeConfig: DSMBridgeConfiguration, debugMode: boolean, logger?: PCLogger): Promise<PCEngineExporterProcessingResult>;
|
|
14
|
+
/** Execute exporter under new engine */
|
|
15
|
+
executeExporterNew(dsmBridgeConfig: DSMBridgeConfiguration, debugMode: boolean, logger?: PCLogger): Promise<PCEngineExporterProcessingResult>;
|
|
16
|
+
/** Execute exporter under legacy engine */
|
|
17
|
+
executeExporterLegacy(dsmBridgeConfig: DSMBridgeConfiguration, debugMode: boolean, logger?: PCLogger): Promise<PCEngineExporterProcessingResult>;
|
|
18
|
+
/** Retrieve intermediate output of exporter in progress */
|
|
19
|
+
retrieveRunningExporterState(): PCEngineExporterProcessingResult | null;
|
|
20
|
+
/** Get reference store containing description of all elements in the DSM, including all context categories */
|
|
21
|
+
getDSMContextStore(dsmBridgeConfig: DSMBridgeConfiguration): Promise<DSMReferenceStore>;
|
|
22
|
+
private convertExportResultToPulsarResult;
|
|
23
|
+
private convertExportResultToPulsarResultWithChecksums;
|
|
24
|
+
private compileChecksums;
|
|
25
|
+
private parseName;
|
|
26
|
+
fetchReferenceStore(dsmBridgeConfig: DSMBridgeConfiguration): Promise<DSMReferenceStore>;
|
|
27
|
+
static fetchReferenceStoreStatic(dsmBridgeConfig: DSMBridgeConfiguration): Promise<DSMReferenceStore>;
|
|
28
|
+
fetchReferenceStoreForSandboxedComponent(componentId: string): Promise<DSMReferenceStore>;
|
|
29
|
+
private computeRootFileGroupFromFiles;
|
|
30
|
+
private pathPermutations;
|
|
31
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { PCExporter } from '@pulsar/core/model/exporters/Exporter';
|
|
2
|
+
import { PCLogger } from '@pulsar/core/tools/Logger';
|
|
3
|
+
import { DSMBridgeConfiguration, DSMExecutionContext, PLBlueprint, PLHighlightEngineToken, PLAutocompleteEngineApplicationResult, PLAutocompleteEngineSuggestion } from '@supernova-studio/pulsar-language';
|
|
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, logger?: PCLogger): 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, name: string, executionContext: DSMExecutionContext): Promise<PLBlueprint>;
|
|
23
|
+
interpretSource(source: PLBlueprint, data: Map<string, any>, executionContext: DSMExecutionContext): Promise<string>;
|
|
24
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PCExporter } from './../../model/exporters/Exporter';
|
|
2
|
+
export declare class PCPulsarExporterManager {
|
|
3
|
+
private exporter;
|
|
4
|
+
constructor(exporter: PCExporter);
|
|
5
|
+
/** Retrieve details about currently loaded exporter. Note that this only retrieves settings of the exporter, to request blueprints and mapping, use separate functions */
|
|
6
|
+
getExporterDetail(): PCExporter;
|
|
7
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { PCPulsar } from '../../Pulsar';
|
|
2
|
+
export declare class PCPulsarExporterPackageAnalyzer {
|
|
3
|
+
pulsar: PCPulsar;
|
|
4
|
+
constructor(pulsar: PCPulsar);
|
|
5
|
+
packageFilePaths(): Array<string>;
|
|
6
|
+
private configurationFilePaths;
|
|
7
|
+
private resourceFilePaths;
|
|
8
|
+
private sourceFilePaths;
|
|
9
|
+
private auxiliaryFilePaths;
|
|
10
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { PCEngineExporterProcessingResult } from '../../PulsarInterface';
|
|
3
|
+
import { PCPulsar } from '../../Pulsar';
|
|
4
|
+
export declare class PCPulsarExporterPackageGenerator {
|
|
5
|
+
static createZipBufferForTemporaryExporter(pulsar: PCPulsar): NodeJS.ReadableStream;
|
|
6
|
+
static constructZIPBufferForExporterResult(result: PCEngineExporterProcessingResult): Promise<NodeJS.ReadableStream>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare type PCPulsarFileMap = Map<string, PCPulsarFile>;
|
|
2
|
+
export declare type PCPulsarFile = {
|
|
3
|
+
directory: string;
|
|
4
|
+
filename: string;
|
|
5
|
+
name: string;
|
|
6
|
+
extension: string;
|
|
7
|
+
content: string;
|
|
8
|
+
key: string;
|
|
9
|
+
};
|
|
10
|
+
export declare type PCPulsarFileDescriptor = {
|
|
11
|
+
/** Absolute file path that always points to the file and can be used with fs. to read the file */
|
|
12
|
+
absoluteFSPath: string;
|
|
13
|
+
/** Relative file path where the root is the package root */
|
|
14
|
+
relativePackagePath: string;
|
|
15
|
+
/** File name, without extension */
|
|
16
|
+
name: string;
|
|
17
|
+
/** File extension, without name */
|
|
18
|
+
extension: string;
|
|
19
|
+
/** File and extension, without path */
|
|
20
|
+
fullName: string;
|
|
21
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { PCExporter, PCExporterEnvironment } from '@pulsar/core/model/exporters/Exporter';
|
|
2
|
+
import { PCPulsarExporterPackageLoader } from './PulsarExporterPackageLoader';
|
|
3
|
+
export declare class PCPulsarExporterPackageBrowserLoader extends PCPulsarExporterPackageLoader {
|
|
4
|
+
remoteSourceUrl: string;
|
|
5
|
+
environment: PCExporterEnvironment;
|
|
6
|
+
constructor(remoteSourceUrl: string, environment: PCExporterEnvironment);
|
|
7
|
+
initialize(): Promise<{
|
|
8
|
+
exporter: PCExporter;
|
|
9
|
+
fsUrl: string | null;
|
|
10
|
+
}>;
|
|
11
|
+
private downloadZIPFromURL;
|
|
12
|
+
}
|
package/build/main/core/src/pulsar/managers/loaders/PulsarExporterPackageFileSystemLoader.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { PCExporter, PCExporterEnvironment } from '@pulsar/core/model/exporters/Exporter';
|
|
2
|
+
import { PCPulsarExporterPackageLoader } from './PulsarExporterPackageLoader';
|
|
3
|
+
export declare class PCPulsarExporterPackageFileSystemLoader extends PCPulsarExporterPackageLoader {
|
|
4
|
+
rootDirectoryUrl: string;
|
|
5
|
+
configurationFileName: string;
|
|
6
|
+
environment: PCExporterEnvironment;
|
|
7
|
+
constructor(rootDirectoryUrl: string, environment: PCExporterEnvironment);
|
|
8
|
+
initialize(): Promise<{
|
|
9
|
+
exporter: PCExporter;
|
|
10
|
+
fsUrl: string | null;
|
|
11
|
+
}>;
|
|
12
|
+
private validateAndLoadLegacyExporter;
|
|
13
|
+
private validateAndLoadLatestExporter;
|
|
14
|
+
private getExporterBaseObject;
|
|
15
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { SimpleGithubParseResult } from '@supernova-studio/simple-parse-github-url';
|
|
2
|
+
import JSZip from 'jszip';
|
|
3
|
+
import { PCExporter, PCExporterEnvironment } from '@pulsar/core/model/exporters/Exporter';
|
|
4
|
+
import { PCPulsarExporterPackageLoader } from './PulsarExporterPackageLoader';
|
|
5
|
+
import { Octokit } from 'octokit';
|
|
6
|
+
declare type ExporterRepository = {
|
|
7
|
+
octokit: Octokit;
|
|
8
|
+
branch: string;
|
|
9
|
+
directory: string;
|
|
10
|
+
segments: SimpleGithubParseResult;
|
|
11
|
+
};
|
|
12
|
+
export declare class PCPulsarExporterPackageGithHubLoader extends PCPulsarExporterPackageLoader {
|
|
13
|
+
repositoryURL: string;
|
|
14
|
+
accessToken: string;
|
|
15
|
+
environment: PCExporterEnvironment;
|
|
16
|
+
constructor(githubURL: string, accessToken: string, environment: PCExporterEnvironment);
|
|
17
|
+
initialize(): Promise<{
|
|
18
|
+
exporter: PCExporter;
|
|
19
|
+
fsUrl: string | null;
|
|
20
|
+
}>;
|
|
21
|
+
private fetchPaged;
|
|
22
|
+
private hasMore;
|
|
23
|
+
listBranches(octokit: Octokit, owner: string, repo: string): Promise<string[]>;
|
|
24
|
+
initGitRepository(): Promise<ExporterRepository>;
|
|
25
|
+
retrieveExporterArchive(): Promise<{
|
|
26
|
+
zip: JSZip;
|
|
27
|
+
repositoryUrl: string;
|
|
28
|
+
dropRootDirectory: boolean;
|
|
29
|
+
} & ExporterRepository>;
|
|
30
|
+
private downloadZIPFromURL;
|
|
31
|
+
}
|
|
32
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { PCExporter } from '../../../model/exporters/Exporter';
|
|
2
|
+
export declare class PCPulsarExporterPackageLoader {
|
|
3
|
+
constructor();
|
|
4
|
+
initialize(): Promise<{
|
|
5
|
+
exporter: PCExporter;
|
|
6
|
+
fsUrl: string | null;
|
|
7
|
+
}>;
|
|
8
|
+
/** Make sure path doesn't start with / */
|
|
9
|
+
normalizeFSPath(path: string): string;
|
|
10
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { PCExporter, PCExporterEnvironment } from '@pulsar/core/model/exporters/Exporter';
|
|
2
|
+
import { PCPulsarExporterPackageLoader } from './PulsarExporterPackageLoader';
|
|
3
|
+
import JSZip from 'jszip';
|
|
4
|
+
export declare class PCPulsarExporterPackageMemoryLoader extends PCPulsarExporterPackageLoader {
|
|
5
|
+
exporterPackage: Map<string, JSZip.JSZipObject>;
|
|
6
|
+
configurationFileName: string;
|
|
7
|
+
environment: PCExporterEnvironment;
|
|
8
|
+
constructor(exporterPackage: JSZip, environment: PCExporterEnvironment);
|
|
9
|
+
initialize(): Promise<{
|
|
10
|
+
exporter: PCExporter;
|
|
11
|
+
fsUrl: string | null;
|
|
12
|
+
}>;
|
|
13
|
+
private getExporterBaseObject;
|
|
14
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { PCExporter, PCExporterEnvironment } from '@pulsar/core/model/exporters/Exporter';
|
|
2
|
+
import { PCPulsarExporterPackageLoader } from './PulsarExporterPackageLoader';
|
|
3
|
+
export declare class PCPulsarExporterPackageURLLoader extends PCPulsarExporterPackageLoader {
|
|
4
|
+
remoteSourceUrl: string;
|
|
5
|
+
environment: PCExporterEnvironment;
|
|
6
|
+
constructor(remoteSourceUrl: string, environment: PCExporterEnvironment);
|
|
7
|
+
initialize(): Promise<{
|
|
8
|
+
exporter: PCExporter;
|
|
9
|
+
fsUrl: string | null;
|
|
10
|
+
}>;
|
|
11
|
+
private downloadZIPFromURL;
|
|
12
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { PCExporter } from '@pulsar/core/model/exporters/Exporter';
|
|
2
|
+
import { PCBundledResource } from '@pulsar/core/model/assets/ExporterBundledResource';
|
|
3
|
+
export declare class PCPulsarExporterBundledResourceLoader {
|
|
4
|
+
exporter: PCExporter;
|
|
5
|
+
iconName: string;
|
|
6
|
+
constructor(exporter: PCExporter);
|
|
7
|
+
loadResourcesFromPackageDirectory(packageLocalFSPath: string): Promise<Array<PCBundledResource>>;
|
|
8
|
+
loadIconFromPackageDirectory(packageLocalFSPath: string): Promise<PCBundledResource | null>;
|
|
9
|
+
loadBlockIconsFromPackageDirectory(packageLocalFSPath: string): Promise<void>;
|
|
10
|
+
loadVariantIconsFromPackageDirectory(packageLocalFSPath: string): Promise<void>;
|
|
11
|
+
getListOfAssetFilesFromRoot(directory: string): Promise<Array<string>>;
|
|
12
|
+
fileExists(file: any): Promise<boolean>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PCExporter } from '@pulsar/core/model/exporters/Exporter';
|
|
2
|
+
import JSZip from 'jszip';
|
|
3
|
+
export declare class PCPulsarExporterConfigLoader {
|
|
4
|
+
exporter: PCExporter;
|
|
5
|
+
configName: string;
|
|
6
|
+
constructor(exporter: PCExporter);
|
|
7
|
+
loadConfigFromExporterPackage(exporterPackage: Map<string, JSZip.JSZipObject>): Promise<boolean>;
|
|
8
|
+
loadConfigFromPackageDirectory(packageLocalFSPath: string): boolean;
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PCExporter } from '@pulsar/core/model/exporters/Exporter';
|
|
2
|
+
import JSZip from 'jszip';
|
|
3
|
+
export declare class PCPulsarExporterJSLoader {
|
|
4
|
+
exporter: PCExporter;
|
|
5
|
+
constructor(exporter: PCExporter);
|
|
6
|
+
loadJSHelperFromExporterPackage(exporterPackage: Map<string, JSZip.JSZipObject>): Promise<boolean>;
|
|
7
|
+
loadJSHelperFromPackageDirectory(packageLocalFSPath: string): boolean;
|
|
8
|
+
loadJSExecutableFromPackageDirectory(packageLocalFSPath: string): boolean;
|
|
9
|
+
}
|
package/build/main/core/src/pulsar/managers/loaders/partials/PulsarExporterLocalConfigLoader.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PCExporter } from '@pulsar/core/model/exporters/Exporter';
|
|
2
|
+
import JSZip from 'jszip';
|
|
3
|
+
export declare class PCPulsarExporterLocalConfigLoader {
|
|
4
|
+
exporter: PCExporter;
|
|
5
|
+
configName: string;
|
|
6
|
+
constructor(exporter: PCExporter);
|
|
7
|
+
loadLocalConfigFromExporterPackage(exporterPackage: Map<string, JSZip.JSZipObject>): Promise<boolean>;
|
|
8
|
+
loadLocalConfigFromPackageDirectory(packageLocalFSPath: string): boolean;
|
|
9
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { PCExporter } from '@pulsar/core/model/exporters/Exporter';
|
|
2
|
+
import { PCExporterMapBlueprint } from '@pulsar/core/model/maps/ExporterMapBlueprint';
|
|
3
|
+
import { PCExporterMapBundledResource } from '@pulsar/core/model/maps/ExporterMapBundledResource';
|
|
4
|
+
import JSZip from 'jszip';
|
|
5
|
+
import { PCExporterMapAsset } from '@pulsar/core/model/maps/ExporterMapAsset';
|
|
6
|
+
export declare type PCPulsarExporterMappingLoaderPack = {
|
|
7
|
+
blueprintMaps?: Array<PCExporterMapBlueprint>;
|
|
8
|
+
bundledResourceMaps?: Array<PCExporterMapBundledResource>;
|
|
9
|
+
assetMaps?: Array<PCExporterMapAsset>;
|
|
10
|
+
};
|
|
11
|
+
export declare class PCPulsarExporterMappingLoader {
|
|
12
|
+
exporter: PCExporter;
|
|
13
|
+
defaultName: string;
|
|
14
|
+
constructor(exporter: PCExporter);
|
|
15
|
+
loadPulsarMappingFromExporterPackage(exporterPackage: Map<string, JSZip.JSZipObject>): Promise<PCPulsarExporterMappingLoaderPack>;
|
|
16
|
+
loadPulsarMappingFromPackageDirectory(packageLocalFSPath: string): PCPulsarExporterMappingLoaderPack;
|
|
17
|
+
private createMapping;
|
|
18
|
+
private processBlueprintMapping;
|
|
19
|
+
private processBundledResourceMapping;
|
|
20
|
+
private processAssetGenerationMapping;
|
|
21
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { PCExporter, PCExporterEnvironment } from '@pulsar/core/model/exporters/Exporter';
|
|
2
|
+
export declare class PCPulsarExporterObjectLoader {
|
|
3
|
+
environment: PCExporterEnvironment;
|
|
4
|
+
constructor(environment: PCExporterEnvironment);
|
|
5
|
+
initializeConfigurationFromDefinition(definition: string): Promise<PCExporter>;
|
|
6
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PCExporter } from '@pulsar/core/model/exporters/Exporter';
|
|
2
|
+
import JSZip from 'jszip';
|
|
3
|
+
export declare class PCPulsarExporterReadmeLoader {
|
|
4
|
+
exporter: PCExporter;
|
|
5
|
+
readmeName: string;
|
|
6
|
+
constructor(exporter: PCExporter);
|
|
7
|
+
loadReadmeFromExporterPackage(exporterPackage: Map<string, JSZip.JSZipObject>): Promise<boolean>;
|
|
8
|
+
loadReadmeFromPackageDirectory(packageLocalFSPath: string): boolean;
|
|
9
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { PCExporter } from '@pulsar/core/model/exporters/Exporter';
|
|
2
|
+
import { PCExporterSource } from '@pulsar/core/model/sources/ExporterSource';
|
|
3
|
+
import JSZip from 'jszip';
|
|
4
|
+
export declare class PCPulsarExporterSourceLoader {
|
|
5
|
+
exporter: PCExporter;
|
|
6
|
+
extension: string;
|
|
7
|
+
defaultName: string;
|
|
8
|
+
constructor(exporter: PCExporter);
|
|
9
|
+
loadPulsarSourcesFromExporterPackage(exporterPackage: Map<string, JSZip.JSZipObject>): Promise<Array<PCExporterSource>>;
|
|
10
|
+
enhanceSourcesWithPackageConfiguration(exporterPackage: Map<string, JSZip.JSZipObject>): Promise<void>;
|
|
11
|
+
loadPulsarSourcesFromPackageDirectory(packageLocalFSPath: string): Promise<Array<PCExporterSource>>;
|
|
12
|
+
enhanceSourcesWithConfiguration(packageLocalFSPath: string): void;
|
|
13
|
+
getListOfSourceFilesFromRoot(directory: string): Promise<Array<string>>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import JSZip from 'jszip';
|
|
2
|
+
import { DirectoryResult } from 'tmp-promise';
|
|
3
|
+
export declare class PCPulsarExporterUnzipper {
|
|
4
|
+
zip: JSZip;
|
|
5
|
+
constructor(zip: JSZip);
|
|
6
|
+
unarchiveToTemporaryUrl(dropRootDirectory: boolean): Promise<DirectoryResult>;
|
|
7
|
+
/** Parse out directory from full file path. Only works with file paths, but that is the only thing this will ever get */
|
|
8
|
+
private writeDirectoryFromPath;
|
|
9
|
+
/** Ensure directory exists - if it doesn't create it, recursively */
|
|
10
|
+
private ensureDirectoryExistence;
|
|
11
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PCExporterConfigurationProperty, PCExporterConfigurationPropertyArray, PCExporterConfigurationPropertyBoolean, PCExporterConfigurationPropertyEnum, PCExporterConfigurationPropertyNumber, PCExporterConfigurationPropertyObject, PCExporterConfigurationPropertyString } from '../../../../model/exporters/configuration/ExporterConfigurationProperty';
|
|
2
|
+
export declare class PCPulsarExporterConfigurationValidator {
|
|
3
|
+
static validateLocalConfigAgainstDefinition(localContent: string, configDefinition: Array<PCExporterConfigurationProperty>): object;
|
|
4
|
+
static validateExporterConfigFileContent(content: string): Array<PCExporterConfigurationProperty>;
|
|
5
|
+
static validateEnumProperty(property: PCExporterConfigurationPropertyEnum, index: number): void;
|
|
6
|
+
static validateBooleanProperty(property: PCExporterConfigurationPropertyBoolean, index: number): void;
|
|
7
|
+
static validateStringProperty(property: PCExporterConfigurationPropertyString, index: number): void;
|
|
8
|
+
static validateNumberProperty(property: PCExporterConfigurationPropertyNumber, index: number): void;
|
|
9
|
+
static validateArrayProperty(property: PCExporterConfigurationPropertyArray, index: number): void;
|
|
10
|
+
static validateObjectProperty(property: PCExporterConfigurationPropertyObject, index: number): void;
|
|
11
|
+
}
|
package/build/main/core/src/pulsar/managers/loaders/validators/PulsarExporterMappingValidator.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PCExporter } from '@pulsar/core/model/exporters/Exporter';
|
|
2
|
+
export declare class PCPulsarExporterMappingValidator {
|
|
3
|
+
validateOutputConfigFileContent(content: string, exporter: PCExporter): Object;
|
|
4
|
+
private validateBlueprintConfiguration;
|
|
5
|
+
private validateBundledResourceConfiguration;
|
|
6
|
+
private validateAssetConfiguration;
|
|
7
|
+
private isDirectory;
|
|
8
|
+
}
|
package/build/main/core/src/pulsar/managers/loaders/validators/PulsarExporterObjectValidator.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { PCExporterModel } from '@pulsar/core/model/exporters/Exporter';
|
|
2
|
+
import { PCExporterContributionModel } from '@pulsar/core/model/exporters/ExporterContribution';
|
|
3
|
+
export declare class PCPulsarExporterObjectValidator {
|
|
4
|
+
static validateExporterConfigFileContent(content: string): PCExporterModel;
|
|
5
|
+
static validateExporterConfigFileNewEngine(content: string): PCExporterModel;
|
|
6
|
+
static validateExporterContribution(parsedConfiguration: PCExporterModel): void;
|
|
7
|
+
static validateExporterContributionConfigurationProperties(parsedConfiguration: PCExporterContributionModel): void;
|
|
8
|
+
static validateExporterContributionBlocks(parsedConfiguration: PCExporterContributionModel): void;
|
|
9
|
+
static validateExporterContributionBlockVariants(parsedConfiguration: PCExporterContributionModel): void;
|
|
10
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { PCExporter } from './../../model/exporters/Exporter';
|
|
2
|
+
import { PCExportConfiguration } from './../../engine/configuration/ExportConfiguration';
|
|
3
|
+
import { PCPulsarCIManager } from '../../pulsar/managers/PulsarCIManager';
|
|
4
|
+
import { PCPulsarExporterMode } from '../../pulsar/Pulsar';
|
|
5
|
+
export declare type ExportPack = {
|
|
6
|
+
exporter: PCExporter;
|
|
7
|
+
manager: PCPulsarCIManager;
|
|
8
|
+
configuration: PCExportConfiguration;
|
|
9
|
+
accessToken: string;
|
|
10
|
+
};
|
|
11
|
+
export declare function executeExportPack(pack: ExportPack): Promise<import("../..").PCEngineExporterProcessingResult>;
|
|
12
|
+
export declare function newExportTestPack(mode: PCPulsarExporterMode): Promise<ExportPack>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { PCExporter } from './../../model/exporters/Exporter';
|
|
2
|
+
import { DSMReferenceStore } from './../../model/dsm/DSMReferenceStore';
|
|
3
|
+
import { PCExportConfiguration } from './../../engine/configuration/ExportConfiguration';
|
|
4
|
+
import { PCPulsarExporterMode } from '../../pulsar/Pulsar';
|
|
5
|
+
export declare function newDevExportConfiguration(exporter: PCExporter, store: DSMReferenceStore, exportMode?: PCPulsarExporterMode): Promise<PCExportConfiguration>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PCExporter } from '@pulsar/core/model/exporters/Exporter';
|
|
2
|
+
import { DSMBridge, DSMExecutionContext } from '@supernova-studio/pulsar-language';
|
|
3
|
+
import { DSMReferenceStore } from '../..';
|
|
4
|
+
export declare function newConfiguredDSMExecutionContext(exporter: PCExporter): Promise<DSMExecutionContext>;
|
|
5
|
+
export declare function newConfiguredDSMStore(): Promise<DSMReferenceStore>;
|
|
6
|
+
export declare function newConfiguredDSMBridge(): Promise<DSMBridge>;
|
|
7
|
+
export declare function newConfiguredDSMToken(): Promise<string>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { PCExporter } from './../../model/exporters/Exporter';
|
|
2
|
+
import { PCExporterSource, PCExporterSourceContextType } from '../../model/sources/ExporterSource';
|
|
3
|
+
import { PCExporterMapBlueprint } from '../../model/maps/ExporterMapBlueprint';
|
|
4
|
+
import { PCExporterContributionConfigurationItemModel } from '@pulsar/core/model/exporters/ExporterContributionConfigurationItem';
|
|
5
|
+
export declare function newEmptyExporter(): PCExporter;
|
|
6
|
+
export declare function newFullExporter(configuration?: Array<PCExporterContributionConfigurationItemModel>): PCExporter;
|
|
7
|
+
export declare function newBlueprintFor(exporter: PCExporter, definition: string, name: string, path: string | null, context: PCExporterSourceContextType, targetsFullExport?: boolean, targetsSandbox?: boolean): PCExporterSource;
|
|
8
|
+
export declare function newGenericBlueprintFor(exporter: PCExporter, id: string, definition: string): PCExporterSource;
|
|
9
|
+
export declare function newComponentBlueprintFor(exporter: PCExporter, id: string, definition: string): PCExporterSource;
|
|
10
|
+
export declare function newComponentGroupBlueprintFor(exporter: PCExporter, id: string, definition: string): PCExporterSource;
|
|
11
|
+
export declare function newTokenGroupBlueprintFor(exporter: PCExporter, id: string, definition: string): PCExporterSource;
|
|
12
|
+
export declare function newTokenTypeBlueprintFor(exporter: PCExporter, id: string, definition: string): PCExporterSource;
|
|
13
|
+
export declare function newThemeBlueprintFor(exporter: PCExporter, id: string, definition: string): PCExporterSource;
|
|
14
|
+
export declare function newOutputInvokingBlueprint(blueprint: string, writeTo: string | null, writeUsing: string | null, exporter: PCExporter): PCExporterMapBlueprint;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|