@supernova-studio/pulsar-core 1.0.28 → 1.0.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/browser/pulsar.js +1189 -1027
- package/build/browser/pulsar.min.js +21 -21
- package/build/main/exports.d.ts +1 -0
- package/build/main/exports.js +2 -0
- package/build/main/exports.js.map +1 -1
- package/build/main/model/exporters/Exporter.d.ts +2 -0
- package/build/main/model/exporters/Exporter.js +10 -2
- package/build/main/model/exporters/Exporter.js.map +1 -1
- package/build/main/model/sources/ExporterSource.d.ts +1 -0
- package/build/main/model/sources/ExporterSource.js +9 -3
- package/build/main/model/sources/ExporterSource.js.map +1 -1
- package/build/main/pulsar/Pulsar.js +2 -0
- package/build/main/pulsar/Pulsar.js.map +1 -1
- package/build/main/pulsar/managers/PulsarConfigurationManager.d.ts +5 -4
- package/build/main/pulsar/managers/PulsarConfigurationManager.js +51 -11
- package/build/main/pulsar/managers/PulsarConfigurationManager.js.map +1 -1
- package/build/main/pulsar/managers/generators/PulsarExporterConfigFileGenerator.d.ts +12 -0
- package/build/main/pulsar/managers/generators/PulsarExporterConfigFileGenerator.js +140 -0
- package/build/main/pulsar/managers/generators/PulsarExporterConfigFileGenerator.js.map +1 -0
- package/build/main/pulsar/managers/generators/PulsarExporterJSONGenerator.d.ts +2 -10
- package/build/main/pulsar/managers/generators/PulsarExporterJSONGenerator.js +12 -239
- package/build/main/pulsar/managers/generators/PulsarExporterJSONGenerator.js.map +1 -1
- package/build/main/pulsar/managers/generators/PulsarExporterSourceFileGenerator.d.ts +9 -0
- package/build/main/pulsar/managers/generators/PulsarExporterSourceFileGenerator.js +45 -0
- package/build/main/pulsar/managers/generators/PulsarExporterSourceFileGenerator.js.map +1 -0
- package/build/main/pulsar/managers/generators/PulsarExporterZIPGenerator.js.map +1 -1
- package/build/main/pulsar/managers/generators/PulsarFileGenerator.d.ts +20 -0
- package/build/main/pulsar/managers/generators/PulsarFileGenerator.js +77 -0
- package/build/main/pulsar/managers/generators/PulsarFileGenerator.js.map +1 -0
- package/build/main/pulsar/managers/loaders/local/PulsarFSLoader.d.ts +3 -3
- package/build/main/pulsar/managers/loaders/local/PulsarFSLoader.js.map +1 -1
- package/build/main/pulsar/managers/loaders/memory/PulsarExporterJSONLoader.d.ts +2 -2
- package/build/main/pulsar/managers/loaders/memory/PulsarExporterJSONLoader.js.map +1 -1
- package/build/main/pulsar/managers/loaders/memory/PulsarExporterMemoryLoader.d.ts +3 -12
- package/build/main/pulsar/managers/loaders/memory/PulsarExporterMemoryLoader.js +7 -84
- package/build/main/pulsar/managers/loaders/memory/PulsarExporterMemoryLoader.js.map +1 -1
- package/build/main/pulsar/managers/loaders/remote/PulsarExporterGitHubLoader.d.ts +3 -3
- package/build/main/pulsar/managers/loaders/remote/PulsarExporterGitHubLoader.js.map +1 -1
- package/build/main/pulsar/managers/loaders/remote/PulsarExporterZIPLoader.d.ts +3 -3
- package/build/main/pulsar/managers/loaders/remote/PulsarExporterZIPLoader.js.map +1 -1
- package/build/main/pulsar/managers/validators/PulsarExporterConfigFileValidator.d.ts +7 -0
- package/build/main/pulsar/managers/validators/PulsarExporterConfigFileValidator.js +124 -0
- package/build/main/pulsar/managers/validators/PulsarExporterConfigFileValidator.js.map +1 -0
- package/build/main/tests/TestConfiguration.js +1 -1
- package/build/main/tests/TestConfiguration.js.map +1 -1
- package/build/tsconfig.tsbuildinfo +1464 -1388
- package/package.json +2 -2
|
@@ -14,6 +14,7 @@ const PulsarBaseLoader_1 = require("../PulsarBaseLoader");
|
|
|
14
14
|
const Exporter_1 = require("../../../../model/exporters/Exporter");
|
|
15
15
|
const ExporterSource_1 = require("../../../../model/sources/ExporterSource");
|
|
16
16
|
const ExporterMapBlueprint_1 = require("../../../../model/maps/ExporterMapBlueprint");
|
|
17
|
+
const PulsarExporterConfigFileValidator_1 = require("../../validators/PulsarExporterConfigFileValidator");
|
|
17
18
|
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
18
19
|
// MARK: - Class
|
|
19
20
|
class PCPulsarExporterMemoryLoader extends PulsarBaseLoader_1.PCPulsarBaseLoader {
|
|
@@ -33,8 +34,8 @@ class PCPulsarExporterMemoryLoader extends PulsarBaseLoader_1.PCPulsarBaseLoader
|
|
|
33
34
|
}
|
|
34
35
|
try {
|
|
35
36
|
// Parse and validate configuration file
|
|
36
|
-
let
|
|
37
|
-
|
|
37
|
+
let validator = new PulsarExporterConfigFileValidator_1.PCPulsarExporterConfigurationFileValidator();
|
|
38
|
+
let parsedConfiguration = validator.validateExporterConfigFileContent(configurationFile.content);
|
|
38
39
|
// Create exporter based on the configuration
|
|
39
40
|
let exporter = new Exporter_1.PCExporter(parsedConfiguration);
|
|
40
41
|
// Load all sources including their configuration
|
|
@@ -54,7 +55,7 @@ class PCPulsarExporterMemoryLoader extends PulsarBaseLoader_1.PCPulsarBaseLoader
|
|
|
54
55
|
for (let sourceDefinition of this.sourceFiles.values()) {
|
|
55
56
|
// Only sources inside the source directory
|
|
56
57
|
if (sourceDefinition.directory.startsWith(exporter.sourceDirectory)) {
|
|
57
|
-
let source = new ExporterSource_1.PCExporterSource(sourceDefinition.
|
|
58
|
+
let source = new ExporterSource_1.PCExporterSource(sourceDefinition.filename, sourceDefinition.directory, sourceDefinition.content);
|
|
58
59
|
sources.push(source);
|
|
59
60
|
}
|
|
60
61
|
}
|
|
@@ -72,17 +73,11 @@ class PCPulsarExporterMemoryLoader extends PulsarBaseLoader_1.PCPulsarBaseLoader
|
|
|
72
73
|
throw `Could not find source configuration file at ${configPath}`;
|
|
73
74
|
}
|
|
74
75
|
// Configuration file must contain source definitions
|
|
75
|
-
let
|
|
76
|
-
|
|
77
|
-
//
|
|
76
|
+
let validator = new PulsarExporterConfigFileValidator_1.PCPulsarExporterConfigurationFileValidator();
|
|
77
|
+
let parsedConfiguration = validator.validateSourceConfigFileContent(configFile.content, exporter);
|
|
78
|
+
// Update each source that are already pre-validated
|
|
78
79
|
for (const [sourceId, configuration] of Object.entries(parsedConfiguration)) {
|
|
79
80
|
let source = exporter.sourceById(sourceId);
|
|
80
|
-
if (!source) {
|
|
81
|
-
throw `Source configuration file defines source id ${sourceId} but there is no such file`;
|
|
82
|
-
}
|
|
83
|
-
if (!(configuration instanceof Object)) {
|
|
84
|
-
throw `Source configuration for source id ${sourceId} must be key/value object`;
|
|
85
|
-
}
|
|
86
81
|
source.loadBlueprintConfiguration(configuration);
|
|
87
82
|
}
|
|
88
83
|
}
|
|
@@ -100,84 +95,12 @@ class PCPulsarExporterMemoryLoader extends PulsarBaseLoader_1.PCPulsarBaseLoader
|
|
|
100
95
|
// Configuration file must contain source definitions
|
|
101
96
|
let parsedConfiguration = JSON.parse(configFile.content);
|
|
102
97
|
let outputDefinition = parsedConfiguration['blueprints'];
|
|
103
|
-
if (!outputDefinition) {
|
|
104
|
-
throw `Output configuration file must define 'blueprints' key`;
|
|
105
|
-
}
|
|
106
|
-
if (!(outputDefinition instanceof Array)) {
|
|
107
|
-
throw `Output configuration file 'blueprints' key must be an array`;
|
|
108
|
-
}
|
|
109
98
|
// Create output mapping object from each output entry
|
|
110
99
|
for (let configuration of outputDefinition) {
|
|
111
|
-
if (!(configuration instanceof Object)) {
|
|
112
|
-
throw `Output configuration source entry must be a key/value object`;
|
|
113
|
-
}
|
|
114
|
-
let invoke = configuration['invoke'];
|
|
115
|
-
let writeTo = configuration['write_to'];
|
|
116
|
-
let writeUsing = configuration['write_using'];
|
|
117
|
-
if (!invoke) {
|
|
118
|
-
throw `Output configuration source entry must define 'invoke' key`;
|
|
119
|
-
}
|
|
120
|
-
if (!writeTo && !writeUsing) {
|
|
121
|
-
throw `Output configuration source entry must define either 'write_to' or 'write_using' key`;
|
|
122
|
-
}
|
|
123
|
-
if (writeTo && writeUsing) {
|
|
124
|
-
throw `Output configuration source entry must define one of 'write_to' or 'write_using' keys, but not both`;
|
|
125
|
-
}
|
|
126
|
-
if (writeUsing && !exporter.sources.get(writeUsing)) {
|
|
127
|
-
throw `Output configuration source entry references unknown source '${writeUsing}'`;
|
|
128
|
-
}
|
|
129
100
|
let map = new ExporterMapBlueprint_1.PCExporterMapBlueprint(configuration);
|
|
130
101
|
exporter.linkOutputs([map]);
|
|
131
102
|
}
|
|
132
103
|
}
|
|
133
|
-
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
134
|
-
// MARK: - Validation
|
|
135
|
-
validateExporterConfiguration(parsedConfiguration) {
|
|
136
|
-
// Required
|
|
137
|
-
if (!parsedConfiguration.id || !(typeof parsedConfiguration.id === 'string')) {
|
|
138
|
-
throw new Error("Invalid exporter.json configuration, missing or invalid 'id'");
|
|
139
|
-
}
|
|
140
|
-
if (!parsedConfiguration.name || !(typeof parsedConfiguration.name === 'string')) {
|
|
141
|
-
throw new Error("Invalid exporter.json configuration, missing or invalid 'name'");
|
|
142
|
-
}
|
|
143
|
-
if (!parsedConfiguration.description || !(typeof parsedConfiguration.description === 'string')) {
|
|
144
|
-
throw new Error("Invalid exporter.json configuration, missing or invalid 'description'");
|
|
145
|
-
}
|
|
146
|
-
if (!parsedConfiguration.source_dir || !(typeof parsedConfiguration.source_dir === 'string')) {
|
|
147
|
-
throw new Error("Invalid exporter.json configuration, missing or invalid 'source_dir'");
|
|
148
|
-
}
|
|
149
|
-
if (!parsedConfiguration.version || !(typeof parsedConfiguration.version === 'string')) {
|
|
150
|
-
throw new Error("Invalid exporter.json configuration, missing or invalid 'version'");
|
|
151
|
-
}
|
|
152
|
-
if (!parsedConfiguration.tags || !(parsedConfiguration.tags instanceof Array)) {
|
|
153
|
-
throw new Error("Invalid exporter.json configuration, missing or invalid 'tags'");
|
|
154
|
-
}
|
|
155
|
-
if (parsedConfiguration.tags.length === 0) {
|
|
156
|
-
throw new Error("Invalid exporter.json configuration, 'tags' must not be empty");
|
|
157
|
-
}
|
|
158
|
-
// Optional
|
|
159
|
-
if (parsedConfiguration.author && !(typeof parsedConfiguration.author === 'string')) {
|
|
160
|
-
throw new Error("Invalid exporter.json configuration, invalid 'author'");
|
|
161
|
-
}
|
|
162
|
-
if (parsedConfiguration.organization && !(typeof parsedConfiguration.organization === 'string')) {
|
|
163
|
-
throw new Error("Invalid exporter.json configuration, invalid 'organization'");
|
|
164
|
-
}
|
|
165
|
-
if (parsedConfiguration.homepage && !(typeof parsedConfiguration.homepage === 'string')) {
|
|
166
|
-
throw new Error("Invalid exporter.json configuration, invalid 'homepage'");
|
|
167
|
-
}
|
|
168
|
-
// TODO Validate config and engines
|
|
169
|
-
/*
|
|
170
|
-
config?: {
|
|
171
|
-
sources?: string,
|
|
172
|
-
output?: string
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
engines?: {
|
|
176
|
-
pulsar?: string,
|
|
177
|
-
supernova?: string
|
|
178
|
-
}
|
|
179
|
-
*/
|
|
180
|
-
}
|
|
181
104
|
}
|
|
182
105
|
exports.PCPulsarExporterMemoryLoader = PCPulsarExporterMemoryLoader;
|
|
183
106
|
//# sourceMappingURL=PulsarExporterMemoryLoader.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PulsarExporterMemoryLoader.js","sourceRoot":"","sources":["../../../../../../src/pulsar/managers/loaders/memory/PulsarExporterMemoryLoader.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,iCAAiC;AACjC,aAAa;AACb,EAAE;AACF,2BAA2B;AAC3B,sDAAsD;AACtD,EAAE;;;AAEF,8GAA8G;AAC9G,kBAAkB;AAElB,0DAAwD;AACxD,mEAAiE;AAEjE,6EAA2E;AAC3E,sFAAoF;
|
|
1
|
+
{"version":3,"file":"PulsarExporterMemoryLoader.js","sourceRoot":"","sources":["../../../../../../src/pulsar/managers/loaders/memory/PulsarExporterMemoryLoader.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,iCAAiC;AACjC,aAAa;AACb,EAAE;AACF,2BAA2B;AAC3B,sDAAsD;AACtD,EAAE;;;AAEF,8GAA8G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I,UAAU,GAAG,QAAQ,CAAC,oBAAoB,CAAA;QAC9C,IAAI,UAAU,GAAG,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,UAAU,CAAC,CAAA;QAEjD,2EAA2E;QAC3E,IAAI,CAAC,UAAU,EAAE;YACf,MAAM,+CAA+C,UAAU,EAAE,CAAA;SAClE;QAED,qDAAqD;QACrD,IAAI,mBAAmB,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,CAAA;QACxD,IAAI,gBAAgB,GAAG,mBAAmB,CAAC,YAAY,CAAC,CAAA;QAExD,sDAAsD;QACtD,KAAK,IAAI,aAAa,IAAI,gBAAgB,EAAE;YAC1C,IAAI,GAAG,GAAG,IAAI,6CAAsB,CAAC,aAAa,CAAC,CAAA;YACnD,QAAQ,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,CAAC,CAAA;SAC5B;IACH,CAAC;CACF;AAjHD,oEAiHC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { PCPulsarBaseLoader } from '../PulsarBaseLoader';
|
|
2
2
|
import { PCExporter } from '../../../../model/exporters/Exporter';
|
|
3
|
-
import { ExporterPackageExtractionData, ExporterPackageFileExtractionData } from '../memory/PulsarExporterMemoryLoader';
|
|
4
3
|
import JSZip from 'jszip';
|
|
4
|
+
import { PCPulsarFile, PCPulsarFileMap } from '../../generators/PulsarFileGenerator';
|
|
5
5
|
export declare class PCPulsarExporterGitHubLoader extends PCPulsarBaseLoader {
|
|
6
6
|
repositoryURL: string;
|
|
7
7
|
constructor(githubURL: string);
|
|
8
8
|
initialize(): Promise<PCExporter>;
|
|
9
9
|
downloadZIPFromURL(url: string): Promise<JSZip>;
|
|
10
|
-
processZIP(zip: JSZip): Promise<
|
|
11
|
-
parseUnzippedFile(file: JSZip.JSZipObject): Promise<
|
|
10
|
+
processZIP(zip: JSZip): Promise<PCPulsarFileMap>;
|
|
11
|
+
parseUnzippedFile(file: JSZip.JSZipObject): Promise<PCPulsarFile | null>;
|
|
12
12
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PulsarExporterGitHubLoader.js","sourceRoot":"","sources":["../../../../../../src/pulsar/managers/loaders/remote/PulsarExporterGitHubLoader.ts"],"names":[],"mappings":";AAAA,iCAAiC;AACjC,aAAa;AACb,EAAE;AACF,2BAA2B;AAC3B,sDAAsD;AACtD,EAAE;;;;;;AAEF,8GAA8G;AAC9G,kBAAkB;AAElB,0DAAwD;AAExD,
|
|
1
|
+
{"version":3,"file":"PulsarExporterGitHubLoader.js","sourceRoot":"","sources":["../../../../../../src/pulsar/managers/loaders/remote/PulsarExporterGitHubLoader.ts"],"names":[],"mappings":";AAAA,iCAAiC;AACjC,aAAa;AACb,EAAE;AACF,2BAA2B;AAC3B,sDAAsD;AACtD,EAAE;;;;;;AAEF,8GAA8G;AAC9G,kBAAkB;AAElB,0DAAwD;AAExD,qFAAmF;AACnF,sDAA6B;AAC7B,wEAA0C;AAC1C,kDAAyB;AAGzB,8GAA8G;AAC9G,sBAAsB;AAEtB,8GAA8G;AAC9G,gBAAgB;AAEhB,MAAa,4BAA6B,SAAQ,qCAAkB;IAMlE,8GAA8G;IAC9G,gBAAgB;IAEhB,YAAY,SAAiB;QAC3B,KAAK,EAAE,CAAA;QACP,IAAI,CAAC,aAAa,GAAG,SAAS,CAAA;IAChC,CAAC;IAED,8GAA8G;IAC9G,yCAAyC;IAEzC,KAAK,CAAC,UAAU;QACd,IAAI,GAAG,GAAG,0BAAW,CAAC,IAAI,CAAC,aAAa,CAAC,CAAA;QACzC,IAAI,GAAG,EAAE;YACP,IAAI,KAAK,GAAG,GAAG,CAAC,KAAK,CAAA;YACrB,IAAI,IAAI,GAAG,GAAG,CAAC,IAAI,CAAA;YAEnB,wEAAwE;YACxE,IAAI,MAAM,CAAA;YACV,IAAI;gBACF,IAAI,UAAU,GAAG,sBAAsB,KAAK,IAAI,IAAI,mBAAmB,CAAA;gBACvE,MAAM,GAAG,MAAM,IA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IAAI,CAAC,GAAG,CAAC,CAAA;QAEpC,uDAAuD;QACvD,IAAI,SAAS,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;QACnC,IAAI,SAAiB,CAAA;QACrB,IAAI,IAAY,CAAA;QAChB,IAAI,SAAS,CAAC,MAAM,IAAI,CAAC,EAAE;YACzB,SAAS,GAAG,SAAS,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;YAC3C,SAAS,CAAC,GAAG,EAAE,CAAA;YACf,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;SAC3B;QAED,uDAAuD;QACvD,IAAI,SAAS,KAAK,IAAI,IAAI,SAAS,KAAK,MAAM,EAAE;YAC9C,OAAO,IAAI,CAAA;SACZ;QAED,kBAAkB;QAClB,IAAI,OAAO,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAA;QAExC,OAAO;YACL,GAAG,EAAE,QAAQ;YACb,QAAQ,EAAE,QAAQ;YAClB,IAAI,EAAE,IAAI;YACV,SAAS,EAAE,SAAS;YACpB,SAAS,EAAE,SAAS;YACpB,OAAO,EAAE,OAAO;SACjB,CAAA;IACH,CAAC;CACF;AAxID,oEAwIC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { PCPulsarBaseLoader } from '../PulsarBaseLoader';
|
|
2
2
|
import { PCExporter } from '../../../../model/exporters/Exporter';
|
|
3
|
-
import { ExporterPackageExtractionData, ExporterPackageFileExtractionData } from '../memory/PulsarExporterMemoryLoader';
|
|
4
3
|
import JSZip from 'jszip';
|
|
4
|
+
import { PCPulsarFile, PCPulsarFileMap } from '../../generators/PulsarFileGenerator';
|
|
5
5
|
export declare class PCPulsarExporterZIPLoader extends PCPulsarBaseLoader {
|
|
6
6
|
zipSourceURL: string;
|
|
7
7
|
constructor(sourceZIPURL: string);
|
|
8
8
|
initialize(): Promise<PCExporter>;
|
|
9
9
|
downloadZIPFromURL(url: string): Promise<JSZip>;
|
|
10
|
-
processZIP(zip: JSZip): Promise<
|
|
11
|
-
parseUnzippedFile(file: JSZip.JSZipObject): Promise<
|
|
10
|
+
processZIP(zip: JSZip): Promise<PCPulsarFileMap>;
|
|
11
|
+
parseUnzippedFile(file: JSZip.JSZipObject): Promise<PCPulsarFile | null>;
|
|
12
12
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PulsarExporterZIPLoader.js","sourceRoot":"","sources":["../../../../../../src/pulsar/managers/loaders/remote/PulsarExporterZIPLoader.ts"],"names":[],"mappings":";AAAA,8BAA8B;AAC9B,aAAa;AACb,EAAE;AACF,2BAA2B;AAC3B,sDAAsD;AACtD,EAAE;;;;;;AAEF,8GAA8G;AAC9G,kBAAkB;AAElB,0DAAwD;AAExD,
|
|
1
|
+
{"version":3,"file":"PulsarExporterZIPLoader.js","sourceRoot":"","sources":["../../../../../../src/pulsar/managers/loaders/remote/PulsarExporterZIPLoader.ts"],"names":[],"mappings":";AAAA,8BAA8B;AAC9B,aAAa;AACb,EAAE;AACF,2BAA2B;AAC3B,sDAAsD;AACtD,EAAE;;;;;;AAEF,8GAA8G;AAC9G,kBAAkB;AAElB,0DAAwD;AAExD,qFAAmF;AACnF,sDAA6B;AAC7B,kDAAyB;AAGzB,8GAA8G;AAC9G,sBAAsB;AAEtB,8GAA8G;AAC9G,gBAAgB;AAEhB,MAAa,yBAA0B,SAAQ,qCAAkB;IAM/D,8GAA8G;IAC9G,gBAAgB;IAEhB,YAAY,YAAoB;QAC9B,KAAK,EAAE,CAAA;QACP,IAAI,CAAC,YAAY,GAAG,YAAY,CAAA;IAClC,CAAC;IAED,8GAA8G;IAC9G,yCAAyC;IAEzC,KAAK,CAAC,UAAU;QACd,IAAI,MAAM,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,YAAY,CAAC,CAAA;QAC7D,IAAI,cAAc,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,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,QAAQ,CAAC,CAAA;QAExC,OAAO;YACL,GAAG,EAAE,QAAQ;YACb,QAAQ,EAAE,QAAQ;YAClB,IAAI,EAAE,IAAI;YACV,SAAS,EAAE,SAAS;YACpB,SAAS,EAAE,SAAS;YACpB,OAAO,EAAE,OAAO;SACjB,CAAA;IACH,CAAC;CACF;AAhHD,8DAgHC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PCExporter, PCExporterModel } from '../../../model/exporters/Exporter';
|
|
2
|
+
export declare class PCPulsarExporterConfigurationFileValidator {
|
|
3
|
+
validateExporterConfigFileContent(content: string): PCExporterModel;
|
|
4
|
+
validateOutputConfigFileContent(content: string, exporter: PCExporter): Object;
|
|
5
|
+
validateSourceConfigFileContent(content: string, exporter: PCExporter): Object;
|
|
6
|
+
validateParseJSONContent(content: string): Object;
|
|
7
|
+
}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
//
|
|
3
|
+
// PCPulsarExporterConfigurationFileValidator.ts
|
|
4
|
+
// Supernova
|
|
5
|
+
//
|
|
6
|
+
// Created by Jiri Trecak.
|
|
7
|
+
// Copyright © 2021 Jiri Trecak. All rights reserved.
|
|
8
|
+
//
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.PCPulsarExporterConfigurationFileValidator = void 0;
|
|
11
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
12
|
+
// MARK: - Definitions
|
|
13
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
14
|
+
// MARK: - Class
|
|
15
|
+
class PCPulsarExporterConfigurationFileValidator {
|
|
16
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
17
|
+
// MARK: - Properties
|
|
18
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
19
|
+
// MARK: - Exporter Config Validation
|
|
20
|
+
validateExporterConfigFileContent(content) {
|
|
21
|
+
// Validate correct json structure
|
|
22
|
+
let parsedConfiguration = this.validateParseJSONContent(content);
|
|
23
|
+
// Validate keys of exporter file
|
|
24
|
+
// Required
|
|
25
|
+
if (!parsedConfiguration.id || !(typeof parsedConfiguration.id === 'string')) {
|
|
26
|
+
throw new Error("Invalid exporter.json configuration, missing or invalid 'id'");
|
|
27
|
+
}
|
|
28
|
+
if (!parsedConfiguration.name || !(typeof parsedConfiguration.name === 'string')) {
|
|
29
|
+
throw new Error("Invalid exporter.json configuration, missing or invalid 'name'");
|
|
30
|
+
}
|
|
31
|
+
if (!parsedConfiguration.description || !(typeof parsedConfiguration.description === 'string')) {
|
|
32
|
+
throw new Error("Invalid exporter.json configuration, missing or invalid 'description'");
|
|
33
|
+
}
|
|
34
|
+
if (!parsedConfiguration.source_dir || !(typeof parsedConfiguration.source_dir === 'string')) {
|
|
35
|
+
throw new Error("Invalid exporter.json configuration, missing or invalid 'source_dir'");
|
|
36
|
+
}
|
|
37
|
+
if (!parsedConfiguration.version || !(typeof parsedConfiguration.version === 'string')) {
|
|
38
|
+
throw new Error("Invalid exporter.json configuration, missing or invalid 'version'");
|
|
39
|
+
}
|
|
40
|
+
if (!parsedConfiguration.tags || !(parsedConfiguration.tags instanceof Array)) {
|
|
41
|
+
throw new Error("Invalid exporter.json configuration, missing or invalid 'tags'");
|
|
42
|
+
}
|
|
43
|
+
if (parsedConfiguration.tags.length === 0) {
|
|
44
|
+
throw new Error("Invalid exporter.json configuration, 'tags' must not be empty");
|
|
45
|
+
}
|
|
46
|
+
// Optional
|
|
47
|
+
if (parsedConfiguration.author && !(typeof parsedConfiguration.author === 'string')) {
|
|
48
|
+
throw new Error("Invalid exporter.json configuration, invalid 'author'");
|
|
49
|
+
}
|
|
50
|
+
if (parsedConfiguration.organization && !(typeof parsedConfiguration.organization === 'string')) {
|
|
51
|
+
throw new Error("Invalid exporter.json configuration, invalid 'organization'");
|
|
52
|
+
}
|
|
53
|
+
if (parsedConfiguration.homepage && !(typeof parsedConfiguration.homepage === 'string')) {
|
|
54
|
+
throw new Error("Invalid exporter.json configuration, invalid 'homepage'");
|
|
55
|
+
}
|
|
56
|
+
return parsedConfiguration;
|
|
57
|
+
}
|
|
58
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
59
|
+
// MARK: - Output Config Validation
|
|
60
|
+
validateOutputConfigFileContent(content, exporter) {
|
|
61
|
+
// Validate correct json structure
|
|
62
|
+
let parsedConfiguration = this.validateParseJSONContent(content);
|
|
63
|
+
let outputDefinition = parsedConfiguration['blueprints'];
|
|
64
|
+
if (!outputDefinition) {
|
|
65
|
+
throw Error(`Output configuration file must define 'blueprints' key`);
|
|
66
|
+
}
|
|
67
|
+
if (!(outputDefinition instanceof Array)) {
|
|
68
|
+
throw Error(`Output configuration file 'blueprints' key must be an array`);
|
|
69
|
+
}
|
|
70
|
+
// Create output mapping object from each output entry
|
|
71
|
+
for (let configuration of outputDefinition) {
|
|
72
|
+
if (!(configuration instanceof Object)) {
|
|
73
|
+
throw Error(`Output configuration source entry must be a key/value object`);
|
|
74
|
+
}
|
|
75
|
+
let invoke = configuration['invoke'];
|
|
76
|
+
let writeTo = configuration['write_to'];
|
|
77
|
+
let writeUsing = configuration['write_using'];
|
|
78
|
+
if (!invoke) {
|
|
79
|
+
throw Error(`Output configuration source entry must define 'invoke' key`);
|
|
80
|
+
}
|
|
81
|
+
if (!writeTo && !writeUsing) {
|
|
82
|
+
throw Error(`Output configuration source entry must define either 'write_to' or 'write_using' key`);
|
|
83
|
+
}
|
|
84
|
+
if (writeTo && writeUsing) {
|
|
85
|
+
throw Error(`Output configuration source entry must define one of 'write_to' or 'write_using' keys, but not both`);
|
|
86
|
+
}
|
|
87
|
+
if (writeUsing && !exporter.sources.get(writeUsing)) {
|
|
88
|
+
throw Error(`Output configuration source entry references unknown source '${writeUsing}'`);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
return parsedConfiguration;
|
|
92
|
+
}
|
|
93
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
94
|
+
// MARK: - File Config Validation
|
|
95
|
+
validateSourceConfigFileContent(content, exporter) {
|
|
96
|
+
// Validate correct json structure
|
|
97
|
+
let parsedConfiguration = this.validateParseJSONContent(content);
|
|
98
|
+
// Validate each source. If defined, source is required and must be valid configuration object
|
|
99
|
+
// Note: configuration keys are optional, if user defines something else, it is ignored
|
|
100
|
+
for (const [sourceId, configuration] of Object.entries(parsedConfiguration)) {
|
|
101
|
+
let source = exporter.sourceById(sourceId);
|
|
102
|
+
if (!source) {
|
|
103
|
+
throw Error(`Source configuration file defines source id ${sourceId} but there is no such file`);
|
|
104
|
+
}
|
|
105
|
+
if (!(configuration instanceof Object)) {
|
|
106
|
+
throw Error(`Source configuration for source id ${sourceId} must be key/value object`);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
return parsedConfiguration;
|
|
110
|
+
}
|
|
111
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
112
|
+
// MARK: - Support
|
|
113
|
+
validateParseJSONContent(content) {
|
|
114
|
+
try {
|
|
115
|
+
let file = JSON.parse(content);
|
|
116
|
+
return file;
|
|
117
|
+
}
|
|
118
|
+
catch (error) {
|
|
119
|
+
throw Error('Incorrectly formatted JSON definition');
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
exports.PCPulsarExporterConfigurationFileValidator = PCPulsarExporterConfigurationFileValidator;
|
|
124
|
+
//# sourceMappingURL=PulsarExporterConfigFileValidator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PulsarExporterConfigFileValidator.js","sourceRoot":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,CAAC,CAAA;aACjG;YACD,IAAI,CAAC,CAAC,aAAa,YAAY,MAAM,CAAC,EAAE;gBACtC,MAAM,KAAK,CAAC,sCAAsC,QAAQ,2BAA2B,CAAC,CAAA;aACvF;SACF;QAED,OAAO,mBAAmB,CAAA;IAC5B,CAAC;IAED,8GAA8G;IAC9G,kBAAkB;IAElB,wBAAwB,CAAC,OAAe;QACtC,IAAI;YACF,IAAI,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;YAC9B,OAAO,IAAI,CAAA;SACZ;QAAC,OAAO,KAAK,EAAE;YACd,MAAM,KAAK,CAAC,uCAAuC,CAAC,CAAA;SACrD;IACH,CAAC;CACF;AA9HD,gGA8HC"}
|
|
@@ -16,7 +16,7 @@ class UnitTestConfiguration {
|
|
|
16
16
|
this.dsmPass = '123456';
|
|
17
17
|
this.dsVersionId = '669';
|
|
18
18
|
this.designSystemId = '641';
|
|
19
|
-
this.apiUrl = 'https://
|
|
19
|
+
this.apiUrl = 'https://dev.api2.supernova.io/api';
|
|
20
20
|
this.apiVersion = '0.2';
|
|
21
21
|
this.accessToken = '';
|
|
22
22
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TestConfiguration.js","sourceRoot":"","sources":["../../../src/tests/TestConfiguration.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,4BAA4B;AAC5B,UAAU;AACV,EAAE;AACF,2BAA2B;AAC3B,oDAAoD;AACpD,EAAE;;;AAEF,8GAA8G;AAC9G,8CAA8C;AAE9C,MAAa,qBAAqB;IAAlC;QACE,aAAQ,GAAG,yBAAyB,CAAA;QACpC,YAAO,GAAG,QAAQ,CAAA;QAClB,gBAAW,GAAG,KAAK,CAAA;QACnB,mBAAc,GAAG,KAAK,CAAA;QACtB,WAAM,GAAG,
|
|
1
|
+
{"version":3,"file":"TestConfiguration.js","sourceRoot":"","sources":["../../../src/tests/TestConfiguration.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,4BAA4B;AAC5B,UAAU;AACV,EAAE;AACF,2BAA2B;AAC3B,oDAAoD;AACpD,EAAE;;;AAEF,8GAA8G;AAC9G,8CAA8C;AAE9C,MAAa,qBAAqB;IAAlC;QACE,aAAQ,GAAG,yBAAyB,CAAA;QACpC,YAAO,GAAG,QAAQ,CAAA;QAClB,gBAAW,GAAG,KAAK,CAAA;QACnB,mBAAc,GAAG,KAAK,CAAA;QACtB,WAAM,GAAG,mCAAmC,CAAA;QAC5C,eAAU,GAAG,KAAK,CAAA;QAClB,gBAAW,GAAG,EAAE,CAAA;IAClB,CAAC;CAAA;AARD,sDAQC"}
|