@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
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
//
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
10
|
exports.PCPulsarExporterJSONGenerator = void 0;
|
|
11
|
-
const
|
|
11
|
+
const PulsarExporterConfigFileGenerator_1 = require("./PulsarExporterConfigFileGenerator");
|
|
12
|
+
const PulsarExporterSourceFileGenerator_1 = require("./PulsarExporterSourceFileGenerator");
|
|
12
13
|
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
13
14
|
// MARK: - Definitions
|
|
14
15
|
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
@@ -22,251 +23,23 @@ class PCPulsarExporterJSONGenerator {
|
|
|
22
23
|
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
23
24
|
// MARK: - Interface
|
|
24
25
|
constructBlob() {
|
|
25
|
-
// Create
|
|
26
|
-
let
|
|
27
|
-
let
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
let
|
|
26
|
+
// Create file generator
|
|
27
|
+
let configGenerator = new PulsarExporterConfigFileGenerator_1.PCPulsarExporterConfigurationGenerator(this.exporter);
|
|
28
|
+
let sourceGenerator = new PulsarExporterSourceFileGenerator_1.PCPulsarExporterSourceFileGenerator(this.exporter);
|
|
29
|
+
// Generate configuration files
|
|
30
|
+
let exporterConfigurationFile = configGenerator.exporterConfigurationFile();
|
|
31
|
+
let sourceConfigurationFile = configGenerator.sourceConfigurationFile();
|
|
32
|
+
let outputConfigurationFile = configGenerator.outputConfigurationFile();
|
|
33
|
+
// Generate source files
|
|
34
|
+
let sourceFiles = sourceGenerator.sourceFiles();
|
|
31
35
|
// Merge everything and retrieve as object
|
|
32
|
-
return [
|
|
36
|
+
return [exporterConfigurationFile, sourceConfigurationFile, outputConfigurationFile, ...sourceFiles];
|
|
33
37
|
}
|
|
34
38
|
constructBlobJSON() {
|
|
35
39
|
let blob = this.constructBlob();
|
|
36
40
|
let json = JSON.stringify(blob);
|
|
37
41
|
return json;
|
|
38
42
|
}
|
|
39
|
-
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
40
|
-
// MARK: - Blob Construction
|
|
41
|
-
constructConfigurationFile() {
|
|
42
|
-
// Create description of exporter.json main configuration file
|
|
43
|
-
let name = 'exporter';
|
|
44
|
-
let extension = 'json';
|
|
45
|
-
let directory = '';
|
|
46
|
-
let content = this.exporterConfigurationDescriptor();
|
|
47
|
-
return this.constructFileExtractionData(name, extension, directory, content);
|
|
48
|
-
}
|
|
49
|
-
exporterConfigurationDescriptor() {
|
|
50
|
-
/* Example output
|
|
51
|
-
|
|
52
|
-
{
|
|
53
|
-
"id": "io.supernova.dark_matter.flutter",
|
|
54
|
-
"name": "Flutter Exporter",
|
|
55
|
-
"description": "Huehuehue",
|
|
56
|
-
"author": "Artem Ufimtcev",
|
|
57
|
-
"organization": "Supernova",
|
|
58
|
-
"homepage": "https://supernova.io",
|
|
59
|
-
"source_dir": "src",
|
|
60
|
-
"version": "1.0",
|
|
61
|
-
"config": {
|
|
62
|
-
"blueprints": "blueprints.json",
|
|
63
|
-
"output": "output.json"
|
|
64
|
-
},
|
|
65
|
-
"engines": {
|
|
66
|
-
"pulsar": "1.2.3",
|
|
67
|
-
"supernova": "1.2.3"
|
|
68
|
-
},
|
|
69
|
-
"tags": [
|
|
70
|
-
"Flutter"
|
|
71
|
-
]
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
*/
|
|
75
|
-
let data = {
|
|
76
|
-
id: this.exporter.id,
|
|
77
|
-
name: this.exporter.name,
|
|
78
|
-
description: this.exporter.description,
|
|
79
|
-
source_dir: this.exporter.sourceDirectory,
|
|
80
|
-
version: this.exporter.version,
|
|
81
|
-
tags: this.exporter.tags
|
|
82
|
-
};
|
|
83
|
-
if (this.exporter.author) {
|
|
84
|
-
data['author'] = this.exporter.author;
|
|
85
|
-
}
|
|
86
|
-
if (this.exporter.organization) {
|
|
87
|
-
data['organization'] = this.exporter.organization;
|
|
88
|
-
}
|
|
89
|
-
if (this.exporter.homepage) {
|
|
90
|
-
data['homepage'] = this.exporter.homepage;
|
|
91
|
-
}
|
|
92
|
-
if (this.exporter.icon) {
|
|
93
|
-
data['icon'] = this.exporter.icon;
|
|
94
|
-
}
|
|
95
|
-
if (this.exporter.outputConfigFilePath !== null || this.exporter.sourceConfigFilePath !== null) {
|
|
96
|
-
let config = {};
|
|
97
|
-
if (this.exporter.outputConfigFilePath !== null) {
|
|
98
|
-
config['output'] = this.exporter.outputConfigFilePath;
|
|
99
|
-
}
|
|
100
|
-
if (this.exporter.sourceConfigFilePath !== null) {
|
|
101
|
-
config['sources'] = this.exporter.sourceConfigFilePath;
|
|
102
|
-
}
|
|
103
|
-
data['config'] = config;
|
|
104
|
-
}
|
|
105
|
-
if (this.exporter.pulsarEngineVersion !== null || this.exporter.supernovaEngineVersion !== null) {
|
|
106
|
-
let engines = {};
|
|
107
|
-
if (this.exporter.pulsarEngineVersion !== null) {
|
|
108
|
-
engines['pulsar'] = this.exporter.pulsarEngineVersion;
|
|
109
|
-
}
|
|
110
|
-
if (this.exporter.supernovaEngineVersion !== null) {
|
|
111
|
-
engines['supernova'] = this.exporter.supernovaEngineVersion;
|
|
112
|
-
}
|
|
113
|
-
data['engines'] = engines;
|
|
114
|
-
}
|
|
115
|
-
return data;
|
|
116
|
-
}
|
|
117
|
-
constructBlueprintConfigurationFile() {
|
|
118
|
-
// Create description of blueprint configuration file
|
|
119
|
-
let content = this.blueprintConfigurationDescriptor();
|
|
120
|
-
let descriptor = this.exporter.sourceConfigFilePath
|
|
121
|
-
? this.fileDescriptorOfPath(this.exporter.sourceConfigFilePath)
|
|
122
|
-
: this.fileDescriptorOfPath('blueprints.json');
|
|
123
|
-
return this.constructFileExtractionData(descriptor.name, descriptor.extension, descriptor.directory, content);
|
|
124
|
-
}
|
|
125
|
-
blueprintConfigurationDescriptor() {
|
|
126
|
-
/* Example output
|
|
127
|
-
|
|
128
|
-
{
|
|
129
|
-
"components.pr": {
|
|
130
|
-
"context": "component",
|
|
131
|
-
"target_ci": false,
|
|
132
|
-
"target_sandbox": true
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
*/
|
|
137
|
-
// Create non-default configuration entries for each source
|
|
138
|
-
let data = new Object();
|
|
139
|
-
for (let source of this.exporter.sources.values()) {
|
|
140
|
-
let object = new Object();
|
|
141
|
-
if (source.context != ExporterSource_1.PCExporterSourceContextType.generic) {
|
|
142
|
-
object['context'] = source.context.toString();
|
|
143
|
-
}
|
|
144
|
-
if (source.targetsCI) {
|
|
145
|
-
object['targets_ci'] = true;
|
|
146
|
-
}
|
|
147
|
-
if (source.targetsSandbox) {
|
|
148
|
-
object['targets_sandbox'] = true;
|
|
149
|
-
}
|
|
150
|
-
if (source.targetsDocumentation) {
|
|
151
|
-
object['targets_docs'] = true;
|
|
152
|
-
}
|
|
153
|
-
data[source.id] = object;
|
|
154
|
-
}
|
|
155
|
-
return data;
|
|
156
|
-
}
|
|
157
|
-
constructOutputConfigurationFile() {
|
|
158
|
-
// Create description of output configuration file
|
|
159
|
-
let content = this.outputConfigurationDescriptor();
|
|
160
|
-
let descriptor = this.exporter.outputConfigFilePath
|
|
161
|
-
? this.fileDescriptorOfPath(this.exporter.outputConfigFilePath)
|
|
162
|
-
: this.fileDescriptorOfPath('output.json');
|
|
163
|
-
return this.constructFileExtractionData(descriptor.name, descriptor.extension, descriptor.directory, content);
|
|
164
|
-
}
|
|
165
|
-
outputConfigurationDescriptor() {
|
|
166
|
-
/* Example output
|
|
167
|
-
|
|
168
|
-
"blueprints": [
|
|
169
|
-
{
|
|
170
|
-
"invoke": "colors.pr",
|
|
171
|
-
"write_to": "styles/colors.dart"
|
|
172
|
-
},
|
|
173
|
-
{
|
|
174
|
-
"invoke": "component.pr",
|
|
175
|
-
"write_to": "components/{{ componentName }}.dart"
|
|
176
|
-
},
|
|
177
|
-
{
|
|
178
|
-
"invoke": "complicated_stuff.pr",
|
|
179
|
-
"write_using": "complicated_stuff_name.pr"
|
|
180
|
-
}
|
|
181
|
-
]
|
|
182
|
-
|
|
183
|
-
*/
|
|
184
|
-
let blueprintOutput = new Array();
|
|
185
|
-
for (let map of this.exporter.outputs) {
|
|
186
|
-
let object = {
|
|
187
|
-
invoke: map.invoke
|
|
188
|
-
};
|
|
189
|
-
if (map.write_to !== null) {
|
|
190
|
-
object['write_to'] = map.write_to;
|
|
191
|
-
}
|
|
192
|
-
if (map.write_using !== null) {
|
|
193
|
-
object['write_using'] = map.write_using;
|
|
194
|
-
}
|
|
195
|
-
blueprintOutput.push(object);
|
|
196
|
-
}
|
|
197
|
-
return {
|
|
198
|
-
blueprints: blueprintOutput
|
|
199
|
-
};
|
|
200
|
-
}
|
|
201
|
-
constructBlueprintSourceFiles() {
|
|
202
|
-
var files = new Array();
|
|
203
|
-
for (let source of this.exporter.sources.values()) {
|
|
204
|
-
let name = source.id;
|
|
205
|
-
let directory = source.path ? `${source.path}` : ``;
|
|
206
|
-
let content = source.content;
|
|
207
|
-
let nameComponents = name.split('.');
|
|
208
|
-
let extension = nameComponents[nameComponents.length - 1];
|
|
209
|
-
let file = this.constructFileExtractionData(name, extension, directory, content);
|
|
210
|
-
files.push(file);
|
|
211
|
-
}
|
|
212
|
-
return files;
|
|
213
|
-
}
|
|
214
|
-
fileDescriptorOfPath(filePath) {
|
|
215
|
-
let components = filePath.split('/');
|
|
216
|
-
if (components.length == 0) {
|
|
217
|
-
return null;
|
|
218
|
-
}
|
|
219
|
-
// Extract filename, extension and paths
|
|
220
|
-
let filename = components[components.length - 1];
|
|
221
|
-
// Extract directory
|
|
222
|
-
components.pop();
|
|
223
|
-
let directory = components.join('/');
|
|
224
|
-
// Get extension and check whether it is correct format
|
|
225
|
-
let nameParts = filename.split('.');
|
|
226
|
-
let extension;
|
|
227
|
-
let name;
|
|
228
|
-
if (nameParts.length >= 2) {
|
|
229
|
-
extension = nameParts[nameParts.length - 1];
|
|
230
|
-
nameParts.pop();
|
|
231
|
-
name = nameParts.join('.');
|
|
232
|
-
}
|
|
233
|
-
// Only pr and json extension are of interest to us
|
|
234
|
-
if (extension !== 'pr' && extension !== 'json') {
|
|
235
|
-
return null;
|
|
236
|
-
}
|
|
237
|
-
return {
|
|
238
|
-
filename: filename,
|
|
239
|
-
name: name,
|
|
240
|
-
extension: extension,
|
|
241
|
-
directory: directory
|
|
242
|
-
};
|
|
243
|
-
}
|
|
244
|
-
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
245
|
-
// MARK: - File builder
|
|
246
|
-
constructFileExtractionData(name, extension, directory, content) {
|
|
247
|
-
// Prepare filenames and unique key
|
|
248
|
-
let filename = `${name}.${extension}`;
|
|
249
|
-
let key = filename;
|
|
250
|
-
if (directory) {
|
|
251
|
-
key = `${directory}/${key}`;
|
|
252
|
-
}
|
|
253
|
-
// Stringify content if it is object
|
|
254
|
-
let resultingContent;
|
|
255
|
-
if (content instanceof Object) {
|
|
256
|
-
resultingContent = JSON.stringify(content);
|
|
257
|
-
}
|
|
258
|
-
else {
|
|
259
|
-
resultingContent = content;
|
|
260
|
-
}
|
|
261
|
-
return {
|
|
262
|
-
key: key,
|
|
263
|
-
directory: directory !== null && directory !== void 0 ? directory : '',
|
|
264
|
-
filename: filename,
|
|
265
|
-
name: name,
|
|
266
|
-
extension: extension,
|
|
267
|
-
content: resultingContent
|
|
268
|
-
};
|
|
269
|
-
}
|
|
270
43
|
}
|
|
271
44
|
exports.PCPulsarExporterJSONGenerator = PCPulsarExporterJSONGenerator;
|
|
272
45
|
//# sourceMappingURL=PulsarExporterJSONGenerator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PulsarExporterJSONGenerator.js","sourceRoot":"","sources":["../../../../../src/pulsar/managers/generators/PulsarExporterJSONGenerator.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,kCAAkC;AAClC,aAAa;AACb,EAAE;AACF,2BAA2B;AAC3B,sDAAsD;AACtD,EAAE;;;
|
|
1
|
+
{"version":3,"file":"PulsarExporterJSONGenerator.js","sourceRoot":"","sources":["../../../../../src/pulsar/managers/generators/PulsarExporterJSONGenerator.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,kCAAkC;AAClC,aAAa;AACb,EAAE;AACF,2BAA2B;AAC3B,sDAAsD;AACtD,EAAE;;;AAMF,2FAA4F;AAE5F,2FAAyF;AAEzF,8GAA8G;AAC9G,sBAAsB;AAEtB,8GAA8G;AAC9G,gBAAgB;AAEhB,MAAa,6BAA6B;IAMxC,8GAA8G;IAC9G,gBAAgB;IAEhB,YAAY,QAAoB;QAC9B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;IAC1B,CAAC;IAED,8GAA8G;IAC9G,oBAAoB;IAEpB,aAAa;QACX,wBAAwB;QACxB,IAAI,eAAe,GAAG,IAAI,0EAAsC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;QAC/E,IAAI,eAAe,GAAG,IAAI,uEAAmC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;QAE5E,+BAA+B;QAC/B,IAAI,yBAAyB,GAAG,eAAe,CAAC,yBAAyB,EAAE,CAAA;QAC3E,IAAI,uBAAuB,GAAG,eAAe,CAAC,uBAAuB,EAAE,CAAA;QACvE,IAAI,uBAAuB,GAAG,eAAe,CAAC,uBAAuB,EAAE,CAAA;QAEvE,wBAAwB;QACxB,IAAI,WAAW,GAAG,eAAe,CAAC,WAAW,EAAE,CAAA;QAE/C,0CAA0C;QAC1C,OAAO,CAAC,yBAAyB,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,GAAG,WAAW,CAAC,CAAA;IACtG,CAAC;IAED,iBAAiB;QACf,IAAI,IAAI,GAAG,IAAI,CAAC,aAAa,EAAE,CAAA;QAC/B,IAAI,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAA;QAC/B,OAAO,IAAI,CAAA;IACb,CAAC;CACF;AAtCD,sEAsCC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PCExporter } from '../../../model/exporters/Exporter';
|
|
2
|
+
import { PCExporterSource } from '../../../model/sources/ExporterSource';
|
|
3
|
+
import { PCPulsarFile } from './PulsarFileGenerator';
|
|
4
|
+
export declare class PCPulsarExporterSourceFileGenerator {
|
|
5
|
+
exporter: PCExporter;
|
|
6
|
+
constructor(exporter: PCExporter);
|
|
7
|
+
sourceFiles(): Array<PCPulsarFile>;
|
|
8
|
+
sourceFile(source: PCExporterSource, name: string): PCPulsarFile;
|
|
9
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
//
|
|
3
|
+
// PCPulsarExporterSourceFileGenerator.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.PCPulsarExporterSourceFileGenerator = void 0;
|
|
11
|
+
const PulsarFileGenerator_1 = require("./PulsarFileGenerator");
|
|
12
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
13
|
+
// MARK: - Definitions
|
|
14
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
15
|
+
// MARK: - Class
|
|
16
|
+
class PCPulsarExporterSourceFileGenerator {
|
|
17
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
18
|
+
// MARK: - Setup
|
|
19
|
+
constructor(exporter) {
|
|
20
|
+
this.exporter = exporter;
|
|
21
|
+
}
|
|
22
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
23
|
+
// MARK: - Source Files
|
|
24
|
+
sourceFiles() {
|
|
25
|
+
var files = new Array();
|
|
26
|
+
for (let [name, source] of this.exporter.sources) {
|
|
27
|
+
let file = this.sourceFile(source, name);
|
|
28
|
+
files.push(file);
|
|
29
|
+
}
|
|
30
|
+
return files;
|
|
31
|
+
}
|
|
32
|
+
sourceFile(source, name) {
|
|
33
|
+
let fileGenerator = new PulsarFileGenerator_1.PCPulsarFileGenerator();
|
|
34
|
+
let directory = source.path ? `${source.path}` : ``;
|
|
35
|
+
let content = source.content;
|
|
36
|
+
let nameComponents = name.split('.');
|
|
37
|
+
let extension = nameComponents[nameComponents.length - 1];
|
|
38
|
+
nameComponents.pop();
|
|
39
|
+
name = nameComponents.join('.');
|
|
40
|
+
let file = fileGenerator.pulsarFileDescriptorForFileWrite(name, extension, directory, content);
|
|
41
|
+
return file;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
exports.PCPulsarExporterSourceFileGenerator = PCPulsarExporterSourceFileGenerator;
|
|
45
|
+
//# sourceMappingURL=PulsarExporterSourceFileGenerator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PulsarExporterSourceFileGenerator.js","sourceRoot":"","sources":["../../../../../src/pulsar/managers/generators/PulsarExporterSourceFileGenerator.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0CAA0C;AAC1C,aAAa;AACb,EAAE;AACF,2BAA2B;AAC3B,sDAAsD;AACtD,EAAE;;;AAOF,+DAA2E;AAE3E,8GAA8G;AAC9G,sBAAsB;AAEtB,8GAA8G;AAC9G,gBAAgB;AAEhB,MAAa,mCAAmC;IAM9C,8GAA8G;IAC9G,gBAAgB;IAEhB,YAAY,QAAoB;QAC9B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;IAC1B,CAAC;IAED,8GAA8G;IAC9G,uBAAuB;IAEvB,WAAW;QACT,IAAI,KAAK,GAAG,IAAI,KAAK,EAAgB,CAAA;QACrC,KAAK,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE;YAChD,IAAI,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA;YACxC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;SACjB;QAED,OAAO,KAAK,CAAA;IACd,CAAC;IAED,UAAU,CAAC,MAAwB,EAAE,IAAY;QAC/C,IAAI,aAAa,GAAG,IAAI,2CAAqB,EAAE,CAAA;QAC/C,IAAI,SAAS,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAA;QACnD,IAAI,OAAO,GAAG,MAAM,CAAC,OAAO,CAAA;QAC5B,IAAI,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;QACpC,IAAI,SAAS,GAAG,cAAc,CAAC,cAAc,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;QACzD,cAAc,CAAC,GAAG,EAAE,CAAA;QACpB,IAAI,GAAG,cAAc,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;QAE/B,IAAI,IAAI,GAAG,aAAa,CAAC,gCAAgC,CAAC,IAAI,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,CAAC,CAAA;QAC9F,OAAO,IAAI,CAAA;IACb,CAAC;CACF;AAtCD,kFAsCC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PulsarExporterZIPGenerator.js","sourceRoot":"","sources":["../../../../../src/pulsar/managers/generators/PulsarExporterZIPGenerator.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,yBAAyB;AACzB,aAAa;AACb,EAAE;AACF,2BAA2B;AAC3B,sDAAsD;AACtD,EAAE;;;;;;
|
|
1
|
+
{"version":3,"file":"PulsarExporterZIPGenerator.js","sourceRoot":"","sources":["../../../../../src/pulsar/managers/generators/PulsarExporterZIPGenerator.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,yBAAyB;AACzB,aAAa;AACb,EAAE;AACF,2BAA2B;AAC3B,sDAAsD;AACtD,EAAE;;;;;;AAMF,+EAA6E;AAG7E,kDAAyB;AAEzB,8GAA8G;AAC9G,sBAAsB;AAEtB,8GAA8G;AAC9G,gBAAgB;AAEhB,MAAa,oBAAoB;IAC/B,8GAA8G;IA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Map<string, PCPulsarFile>;
|
|
2
|
+
export declare type PCPulsarFileDescriptor = {
|
|
3
|
+
filename: string;
|
|
4
|
+
name: string;
|
|
5
|
+
extension: string;
|
|
6
|
+
directory: string;
|
|
7
|
+
};
|
|
8
|
+
export declare type PCPulsarFile = {
|
|
9
|
+
directory: string;
|
|
10
|
+
filename: string;
|
|
11
|
+
name: string;
|
|
12
|
+
extension: string;
|
|
13
|
+
content: string;
|
|
14
|
+
key: string;
|
|
15
|
+
};
|
|
16
|
+
export declare class PCPulsarFileGenerator {
|
|
17
|
+
constructor();
|
|
18
|
+
pulsarFileDescriptorForFileWrite(name: string, extension: string, directory: string | null, content: string | Object): PCPulsarFile;
|
|
19
|
+
pulsarFileDescriptorFromFilePath(filePath: string): PCPulsarFileDescriptor;
|
|
20
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
//
|
|
3
|
+
// PCPulsarFileGenerator.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.PCPulsarFileGenerator = void 0;
|
|
11
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
12
|
+
// MARK: - Class
|
|
13
|
+
class PCPulsarFileGenerator {
|
|
14
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
15
|
+
// MARK: - Properties
|
|
16
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
17
|
+
// MARK: - Setup
|
|
18
|
+
constructor() { }
|
|
19
|
+
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
|
|
20
|
+
// MARK: - File builder
|
|
21
|
+
pulsarFileDescriptorForFileWrite(name, extension, directory, content) {
|
|
22
|
+
// Prepare filenames and unique key
|
|
23
|
+
let filename = `${name}.${extension}`;
|
|
24
|
+
let key = filename;
|
|
25
|
+
if (directory) {
|
|
26
|
+
key = `${directory}/${key}`;
|
|
27
|
+
}
|
|
28
|
+
// Stringify content if it is object
|
|
29
|
+
let resultingContent;
|
|
30
|
+
if (content instanceof Object) {
|
|
31
|
+
resultingContent = JSON.stringify(content);
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
resultingContent = content;
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
key: key,
|
|
38
|
+
directory: directory !== null && directory !== void 0 ? directory : '',
|
|
39
|
+
filename: filename,
|
|
40
|
+
name: name,
|
|
41
|
+
extension: extension,
|
|
42
|
+
content: resultingContent
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
pulsarFileDescriptorFromFilePath(filePath) {
|
|
46
|
+
let components = filePath.split('/');
|
|
47
|
+
if (components.length == 0) {
|
|
48
|
+
return null;
|
|
49
|
+
}
|
|
50
|
+
// Extract filename, extension and paths
|
|
51
|
+
let filename = components[components.length - 1];
|
|
52
|
+
// Extract directory
|
|
53
|
+
components.pop();
|
|
54
|
+
let directory = components.join('/');
|
|
55
|
+
// Get extension and check whether it is correct format
|
|
56
|
+
let nameParts = filename.split('.');
|
|
57
|
+
let extension;
|
|
58
|
+
let name;
|
|
59
|
+
if (nameParts.length >= 2) {
|
|
60
|
+
extension = nameParts[nameParts.length - 1];
|
|
61
|
+
nameParts.pop();
|
|
62
|
+
name = nameParts.join('.');
|
|
63
|
+
}
|
|
64
|
+
// Only pr and json extension are of interest to us
|
|
65
|
+
if (extension !== 'pr' && extension !== 'json') {
|
|
66
|
+
return null;
|
|
67
|
+
}
|
|
68
|
+
return {
|
|
69
|
+
filename: filename,
|
|
70
|
+
name: name,
|
|
71
|
+
extension: extension,
|
|
72
|
+
directory: directory
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
exports.PCPulsarFileGenerator = PCPulsarFileGenerator;
|
|
77
|
+
//# sourceMappingURL=PulsarFileGenerator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PulsarFileGenerator.js","sourceRoot":"","sources":["../../../../../src/pulsar/managers/generators/PulsarFileGenerator.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,4BAA4B;AAC5B,aAAa;AACb,EAAE;AACF,2BAA2B;AAC3B,sDAAsD;AACtD,EAAE;;;AA0BF,8GAA8G;AAC9G,gBAAgB;AAEhB,MAAa,qBAAqB;IAChC,8GAA8G;IAC9G,qBAAqB;IAErB,8GAA8G;IAC9G,gBAAgB;IAEhB,gBAAe,CAAC;IAEhB,8GAA8G;IAC9G,uBAAuB;IAEvB,gCAAgC,CAC9B,IAAY,EACZ,SAAiB,EACjB,SAAwB,EACxB,OAAwB;QAExB,mCAAmC;QACnC,IAAI,QAAQ,GAAG,GAAG,IAAI,IAAI,SAAS,EAAE,CAAA;QACrC,IAAI,GAAG,GAAG,QAAQ,CAAA;QAClB,IAAI,SAAS,EAAE;YACb,GAAG,GAAG,GAAG,SAAS,IAAI,GAAG,EAAE,CAAA;SAC5B;QAED,oCAAoC;QACpC,IAAI,gBAAwB,CAAA;QAC5B,IAAI,OAAO,YAAY,MAAM,EAAE;YAC7B,gBAAgB,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAA;SAC3C;aAAM;YACL,gBAAgB,GAAG,OAAO,CAAA;SAC3B;QAED,OAAO;YACL,GAAG,EAAE,GAAG;YACR,SAAS,EAAE,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,EAAE;YAC1B,QAAQ,EAAE,QAAQ;YAClB,IAAI,EAAE,IAAI;YACV,SAAS,EAAE,SAAS;YACpB,OAAO,EAAE,gBAAgB;SAC1B,CAAA;IACH,CAAC;IAED,gCAAgC,CAAC,QAAgB;QAC/C,IAAI,UAAU,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;QACpC,IAAI,UAAU,CAAC,MAAM,IAAI,CAAC,EAAE;YAC1B,OAAO,IAAI,CAAA;SACZ;QAED,wCAAwC;QACxC,IAAI,QAAQ,GAAG,UAAU,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;QAEhD,oBAAoB;QACpB,UAAU,CAAC,GAAG,EAAE,CAAA;QAChB,IAAI,SAAS,GAAG,UAAU,CAAC,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,mDAAmD;QACnD,IAAI,SAAS,KAAK,IAAI,IAAI,SAAS,KAAK,MAAM,EAAE;YAC9C,OAAO,IAAI,CAAA;SACZ;QAED,OAAO;YACL,QAAQ,EAAE,QAAQ;YAClB,IAAI,EAAE,IAAI;YACV,SAAS,EAAE,SAAS;YACpB,SAAS,EAAE,SAAS;SACrB,CAAA;IACH,CAAC;CACF;AA9ED,sDA8EC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { PCPulsarBaseLoader } from '../PulsarBaseLoader';
|
|
2
2
|
import { PCExporter } from '../../../../model/exporters/Exporter';
|
|
3
|
-
import {
|
|
3
|
+
import { PCPulsarFile, PCPulsarFileMap } from '../../generators/PulsarFileGenerator';
|
|
4
4
|
export declare class PCPulsarFSLoader extends PCPulsarBaseLoader {
|
|
5
5
|
exporterRootURL: string;
|
|
6
6
|
constructor(sourceZIPURL: string);
|
|
7
7
|
initialize(): Promise<PCExporter>;
|
|
8
|
-
loadFilesFromRootDirectory(rootDirectory: string): Promise<
|
|
8
|
+
loadFilesFromRootDirectory(rootDirectory: string): Promise<PCPulsarFileMap>;
|
|
9
9
|
getFiles(directory: string): any;
|
|
10
|
-
loadFileAtUrl(filePath: string, rootDirectory: string): Promise<
|
|
10
|
+
loadFileAtUrl(filePath: string, rootDirectory: string): Promise<PCPulsarFile | null>;
|
|
11
11
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PulsarFSLoader.js","sourceRoot":"","sources":["../../../../../../src/pulsar/managers/loaders/local/PulsarFSLoader.ts"],"names":[],"mappings":";AAAA,uBAAuB;AACvB,aAAa;AACb,EAAE;AACF,2BAA2B;AAC3B,sDAAsD;AACtD,EAAE;;;;;;AAEF,8GAA8G;AAC9G,kBAAkB;AAElB,0DAAwD;AAExD,
|
|
1
|
+
{"version":3,"file":"PulsarFSLoader.js","sourceRoot":"","sources":["../../../../../../src/pulsar/managers/loaders/local/PulsarFSLoader.ts"],"names":[],"mappings":";AAAA,uBAAuB;AACvB,aAAa;AACb,EAAE;AACF,2BAA2B;AAC3B,sDAAsD;AACtD,EAAE;;;;;;AAEF,8GAA8G;AAC9G,kBAAkB;AAElB,0DAAwD;AAExD,qFAAmF;AACnF,4CAAmB;AACnB,+BAAgC;AAChC,+BAA8B;AAG9B,yGAAyG;AACzG,MAAM,OAAO,GAAG,gBAAS,KAAI,YAAE,aAAF,YAAE,uBAAF,YAAE,CAAE,OAAO,CAAA,CAAC,CAAC,CAAC,gBAAS,CAAC,YAAE,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAA;AACvE,MAAM,IAAI,GAAG,gBAAS,KAAI,YAAE,aAAF,YAAE,uBAAF,YAAE,CAAE,IAAI,CAAA,CAAC,CAAC,CAAC,gBAAS,CAAC,YAAE,CAAC,IAAI,CAAC,CAAC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SAAS,KAAK,MAAM,EAAE;YAC9C,OAAO,IAAI,CAAA;SACZ;QAED,kBAAkB;QAClB,IAAI,OAAO,GAAG,YAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAA;QAEhD,OAAO;YACL,GAAG,EAAE,QAAQ,CAAC,SAAS,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC;YACjD,QAAQ,EAAE,QAAQ;YAClB,IAAI,EAAE,IAAI;YACV,SAAS,EAAE,SAAS;YACpB,SAAS,EAAE,SAAS,CAAC,SAAS,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC;YACxD,OAAO,EAAE,OAAO;SACjB,CAAA;IACH,CAAC;CACF;AA7FD,4CA6FC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { PCPulsarBaseLoader } from '../PulsarBaseLoader';
|
|
2
2
|
import { PCExporter } from '../../../../model/exporters/Exporter';
|
|
3
|
-
import {
|
|
3
|
+
import { PCPulsarFile } from '../../generators/PulsarFileGenerator';
|
|
4
4
|
export declare class PCPulsarExporterJSONLoader extends PCPulsarBaseLoader {
|
|
5
5
|
blob: string | Object;
|
|
6
6
|
constructor(blob: string | Object);
|
|
7
7
|
initialize(): Promise<PCExporter>;
|
|
8
|
-
validateBlobEntry(entry:
|
|
8
|
+
validateBlobEntry(entry: PCPulsarFile): void;
|
|
9
9
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PulsarExporterJSONLoader.js","sourceRoot":"","sources":["../../../../../../src/pulsar/managers/loaders/memory/PulsarExporterJSONLoader.ts"],"names":[],"mappings":";AAAA,+BAA+B;AAC/B,aAAa;AACb,EAAE;AACF,2BAA2B;AAC3B,sDAAsD;AACtD,EAAE;;;AAEF,8GAA8G;AAC9G,kBAAkB;AAElB,0DAAwD;AAExD,
|
|
1
|
+
{"version":3,"file":"PulsarExporterJSONLoader.js","sourceRoot":"","sources":["../../../../../../src/pulsar/managers/loaders/memory/PulsarEx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AAgC,EAAE,CAAA;YAClE,OAAO,QAAQ,CAAA;SAChB;aAAM;YACL,MAAM,IAAI,KAAK,CAAC,6CAA6C,CAAC,CAAA;SAC/D;IACH,CAAC;IAED,iBAAiB,CAAC,KAAmB;QACnC,IAAI,CAAC,CAAC,KAAK,YAAY,MAAM,CAAC,EAAE;YAC9B,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAA;SACvE;QAED,IAAI,OAAO,KAAK,CAAC,SAAS,KAAK,QAAQ,EAAE;YACvC,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAA;SACpE;QACD,IAAI,OAAO,KAAK,CAAC,OAAO,KAAK,QAAQ,EAAE;YACrC,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAA;SAClE;QACD,IAAI,OAAO,KAAK,CAAC,SAAS,KAAK,QAAQ,EAAE;YACvC,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAA;SACpE;QACD,IAAI,OAAO,KAAK,CAAC,QAAQ,KAAK,QAAQ,EAAE;YACtC,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAA;SACnE;QACD,IAAI,OAAO,KAAK,CAAC,GAAG,KAAK,QAAQ,EAAE;YACjC,MAAM,IAAI,KAAK,CAAC,4CAA4C,CAAC,CAAA;SAC9D;QACD,IAAI,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ,EAAE;YAClC,MAAM,IAAI,KAAK,CAAC,6CAA6C,CAAC,CAAA;SAC/D;IACH,CAAC;CACF;AAxED,gEAwEC"}
|
|
@@ -1,20 +1,11 @@
|
|
|
1
1
|
import { PCPulsarBaseLoader } from '../PulsarBaseLoader';
|
|
2
2
|
import { PCExporter } from '../../../../model/exporters/Exporter';
|
|
3
|
-
|
|
4
|
-
export declare type ExporterPackageFileExtractionData = {
|
|
5
|
-
directory: string;
|
|
6
|
-
filename: string;
|
|
7
|
-
name: string;
|
|
8
|
-
extension: string;
|
|
9
|
-
content: string;
|
|
10
|
-
key: string;
|
|
11
|
-
};
|
|
3
|
+
import { PCPulsarFileMap } from '../../generators/PulsarFileGenerator';
|
|
12
4
|
export declare class PCPulsarExporterMemoryLoader extends PCPulsarBaseLoader {
|
|
13
|
-
sourceFiles:
|
|
14
|
-
constructor(sourceFiles:
|
|
5
|
+
sourceFiles: PCPulsarFileMap;
|
|
6
|
+
constructor(sourceFiles: PCPulsarFileMap);
|
|
15
7
|
constructExporterFromSourceFiles(): Promise<PCExporter>;
|
|
16
8
|
private loadSourcesFromSourceDirectory;
|
|
17
9
|
private enhanceSourcesWithConfiguration;
|
|
18
10
|
private loadOutputMapping;
|
|
19
|
-
private validateExporterConfiguration;
|
|
20
11
|
}
|