@nfdi4plants/arctrl 3.0.0-beta.14 → 3.0.0-beta.16
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/dist/ts/ts/ARC.d.ts +2 -2
- package/dist/ts/ts/ARC.d.ts.map +1 -1
- package/dist/ts/ts/ARC.js +5 -5
- package/dist/ts/ts/CWL/CWLTypes.d.ts +50 -19
- package/dist/ts/ts/CWL/CWLTypes.d.ts.map +1 -1
- package/dist/ts/ts/CWL/CWLTypes.js +175 -39
- package/dist/ts/ts/CWL/Decode.d.ts +30 -4
- package/dist/ts/ts/CWL/Decode.d.ts.map +1 -1
- package/dist/ts/ts/CWL/Decode.js +679 -44
- package/dist/ts/ts/CWL/Encode.d.ts +13 -2
- package/dist/ts/ts/CWL/Encode.d.ts.map +1 -1
- package/dist/ts/ts/CWL/Encode.js +483 -85
- package/dist/ts/ts/CWL/ToolDescription.d.ts +8 -2
- package/dist/ts/ts/CWL/ToolDescription.d.ts.map +1 -1
- package/dist/ts/ts/CWL/ToolDescription.js +22 -4
- package/dist/ts/ts/CWL/WorkflowDescription.d.ts +8 -2
- package/dist/ts/ts/CWL/WorkflowDescription.d.ts.map +1 -1
- package/dist/ts/ts/CWL/WorkflowDescription.js +22 -4
- package/dist/ts/ts/CWL/WorkflowSteps.d.ts +6 -5
- package/dist/ts/ts/CWL/WorkflowSteps.d.ts.map +1 -1
- package/dist/ts/ts/CWL/WorkflowSteps.js +5 -4
- package/dist/ts/ts/Conversion/Investigation.d.ts +1 -1
- package/dist/ts/ts/Conversion/Investigation.d.ts.map +1 -1
- package/dist/ts/ts/Conversion/Investigation.js +24 -4
- package/dist/ts/ts/Conversion/Run.d.ts.map +1 -1
- package/dist/ts/ts/Conversion/Run.js +74 -10
- package/dist/ts/ts/Conversion/Workflow.d.ts.map +1 -1
- package/dist/ts/ts/Conversion/Workflow.js +17 -8
- package/dist/ts/ts/Conversion.d.ts +2 -2
- package/dist/ts/ts/Conversion.d.ts.map +1 -1
- package/dist/ts/ts/Conversion.js +7 -7
- package/dist/ts/ts/Json/ROCrate/LDNode.d.ts +1 -0
- package/dist/ts/ts/Json/ROCrate/LDNode.d.ts.map +1 -1
- package/dist/ts/ts/Json/ROCrate/LDNode.js +17 -6
- package/dist/ts/ts/Json.d.ts +0 -2
- package/dist/ts/ts/Json.d.ts.map +1 -1
- package/dist/ts/ts/Json.js +1 -7
- package/dist/ts/ts/JsonIO/Investigation.d.ts +0 -6
- package/dist/ts/ts/JsonIO/Investigation.d.ts.map +1 -1
- package/dist/ts/ts/JsonIO/Investigation.js +2 -21
- package/dist/ts/ts/ROCrate/LDTypes/ComputationalWorkflow.d.ts +7 -5
- package/dist/ts/ts/ROCrate/LDTypes/ComputationalWorkflow.d.ts.map +1 -1
- package/dist/ts/ts/ROCrate/LDTypes/ComputationalWorkflow.js +26 -3
- package/dist/ts/ts/ROCrate/LDTypes/Dataset.d.ts +3 -1
- package/dist/ts/ts/ROCrate/LDTypes/Dataset.d.ts.map +1 -1
- package/dist/ts/ts/ROCrate/LDTypes/Dataset.js +16 -4
- package/dist/ts/ts/ROCrateIO.d.ts +7 -3
- package/dist/ts/ts/ROCrateIO.d.ts.map +1 -1
- package/dist/ts/ts/ROCrateIO.js +76 -7
- package/dist/ts/ts/Yaml/ValidationPackage.d.ts +1 -1
- package/dist/ts/ts/Yaml/ValidationPackage.d.ts.map +1 -1
- package/dist/ts/ts/Yaml/ValidationPackage.js +5 -5
- package/dist/ts/ts/Yaml/ValidationPackagesConfig.d.ts +1 -1
- package/dist/ts/ts/Yaml/ValidationPackagesConfig.d.ts.map +1 -1
- package/dist/ts/ts/Yaml/ValidationPackagesConfig.js +5 -5
- package/dist/ts/ts/fable_modules/{YAMLicious.0.0.3 → YAMLicious.1.0.0-alpha.2}/Encode.fs.js +1 -1
- package/dist/ts/ts/fable_modules/{YAMLicious.0.0.3 → YAMLicious.1.0.0-alpha.2}/Reader.fs.js +79 -30
- package/package.json +1 -1
- /package/dist/ts/ts/fable_modules/{YAMLicious.0.0.3 → YAMLicious.1.0.0-alpha.2}/Decode.fs.js +0 -0
- /package/dist/ts/ts/fable_modules/{YAMLicious.0.0.3 → YAMLicious.1.0.0-alpha.2}/Interop/JsInterop.fs.js +0 -0
- /package/dist/ts/ts/fable_modules/{YAMLicious.0.0.3 → YAMLicious.1.0.0-alpha.2}/Persil.fs.js +0 -0
- /package/dist/ts/ts/fable_modules/{YAMLicious.0.0.3 → YAMLicious.1.0.0-alpha.2}/Preprocessing.fs.js +0 -0
- /package/dist/ts/ts/fable_modules/{YAMLicious.0.0.3 → YAMLicious.1.0.0-alpha.2}/Regex.fs.js +0 -0
- /package/dist/ts/ts/fable_modules/{YAMLicious.0.0.3 → YAMLicious.1.0.0-alpha.2}/RegexActivePatterns.fs.js +0 -0
- /package/dist/ts/ts/fable_modules/{YAMLicious.0.0.3 → YAMLicious.1.0.0-alpha.2}/Writer.fs.js +0 -0
- /package/dist/ts/ts/fable_modules/{YAMLicious.0.0.3 → YAMLicious.1.0.0-alpha.2}/YAMLiciousTypes.fs.js +0 -0
package/dist/ts/ts/CWL/Decode.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { getEnumerator, disposeSafe } from '../../node_modules/@fable-org/fable-library-js/Util.js';
|
|
2
|
-
import { YAMLElement_Sequence } from '../fable_modules/YAMLicious.0.0.
|
|
1
|
+
import { getEnumerator, disposeSafe, Lazy } from '../../node_modules/@fable-org/fable-library-js/Util.js';
|
|
2
|
+
import { YAMLElement_Sequence } from '../fable_modules/YAMLicious.1.0.0-alpha.2/YAMLiciousTypes.fs.js';
|
|
3
3
|
import { setProperty, setOptionalProperty } from '../fable_modules/DynamicObj.7.1.0/DynObj.fs.js';
|
|
4
4
|
import { DynamicObj } from '../fable_modules/DynamicObj.7.1.0/DynamicObj.fs.js';
|
|
5
|
-
import { isEmpty, head, tail, iterate, map, empty, ofArray } from '../../node_modules/@fable-org/fable-library-js/List.js';
|
|
6
|
-
import { object, string, bool, map as map$1,
|
|
5
|
+
import { isEmpty, head, tail, iterate, map, empty, exists, ofArray, singleton as singleton$1, tryHead } from '../../node_modules/@fable-org/fable-library-js/List.js';
|
|
6
|
+
import { object, string, bool, resizearray, map as map$1, float, int, read } from '../fable_modules/YAMLicious.1.0.0-alpha.2/Decode.fs.js';
|
|
7
7
|
import { toFail, printf, toText, replace } from '../../node_modules/@fable-org/fable-library-js/String.js';
|
|
8
8
|
import { OutputBinding, CWLOutput } from './Outputs.js';
|
|
9
9
|
import { value, some } from '../../node_modules/@fable-org/fable-library-js/Option.js';
|
|
10
|
-
import { CWLType_Dirent, DirentInstance,
|
|
10
|
+
import { CWLType_Dirent, DirentInstance, InputArraySchema, InputRecordField, InputRecordSchema, InputEnumSchema, CWLType_Null, CWLType_Stdout, CWLType_Boolean, CWLType_Double, CWLType_Float, CWLType_Long, CWLType_Int, CWLType_String, CWLType_Directory, DirectoryInstance_$ctor, CWLType_File, FileInstance_$ctor, CWLType_Array, CWLType_Union, CWLType_Record, CWLType_Enum, SoftwarePackage, SchemaDefRequirementType_$ctor_541DA560 } from './CWLTypes.js';
|
|
11
11
|
import { toArray, delay, collect, append, empty as empty$1, singleton, item, length, map as map$2 } from '../../node_modules/@fable-org/fable-library-js/Seq.js';
|
|
12
12
|
import { getItemFromDict } from '../../node_modules/@fable-org/fable-library-js/MapUtil.js';
|
|
13
13
|
import { FSharpMap__get_Keys, FSharpMap__get_Values } from '../../node_modules/@fable-org/fable-library-js/Map.js';
|
|
@@ -183,41 +183,239 @@ const Decode_direntDecoder = (value_1) => object((get$) => {
|
|
|
183
183
|
let objectArg, objectArg_1, objectArg_2;
|
|
184
184
|
return CWLType_Dirent(new DirentInstance((objectArg = get$.Required, objectArg.Field("entry", Decode_decodeStringOrExpression)), (objectArg_1 = get$.Optional, objectArg_1.Field("entryname", Decode_decodeStringOrExpression)), (objectArg_2 = get$.Optional, objectArg_2.Field("writable", bool))));
|
|
185
185
|
}, value_1);
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
186
|
+
function inputArraySchemaDecoder$004090() {
|
|
187
|
+
return (value_3) => object((get$) => {
|
|
188
|
+
let objectArg, objectArg_1, objectArg_2, objectArg_3;
|
|
189
|
+
return new InputArraySchema(Decode_cwlTypeDecoder$0027((objectArg = get$.Required, objectArg.Field("items", (x) => x))), (objectArg_1 = get$.Optional, objectArg_1.Field("label", string)), (objectArg_2 = get$.Optional, objectArg_2.Field("doc", string)), (objectArg_3 = get$.Optional, objectArg_3.Field("name", string)));
|
|
190
|
+
}, value_3);
|
|
191
|
+
}
|
|
192
|
+
const inputArraySchemaDecoder$004090$002D1 = new Lazy(inputArraySchemaDecoder$004090);
|
|
193
|
+
function inputRecordFieldDecoder$0040104() {
|
|
194
|
+
return (value_3) => object((get$) => {
|
|
195
|
+
let objectArg, objectArg_1, objectArg_2, objectArg_3;
|
|
196
|
+
return new InputRecordField((objectArg = get$.Required, objectArg.Field("name", string)), Decode_cwlTypeDecoder$0027((objectArg_1 = get$.Required, objectArg_1.Field("type", (x) => x))), (objectArg_2 = get$.Optional, objectArg_2.Field("doc", string)), (objectArg_3 = get$.Optional, objectArg_3.Field("label", string)));
|
|
197
|
+
}, value_3);
|
|
198
|
+
}
|
|
199
|
+
const inputRecordFieldDecoder$0040104$002D1 = new Lazy(inputRecordFieldDecoder$0040104);
|
|
200
|
+
function inputRecordSchemaDecoder$0040121() {
|
|
201
|
+
return (value_4) => object((get$) => {
|
|
202
|
+
let fields, enumerator, objectArg_1, objectArg_2, objectArg_3;
|
|
203
|
+
let fieldsDict;
|
|
204
|
+
const objectArg = get$.Optional;
|
|
205
|
+
fieldsDict = objectArg.Field("fields", (value) => object((get2) => get2.Overflow.FieldList(empty()), value));
|
|
206
|
+
return new InputRecordSchema(fieldsDict == null ? void 0 : (fields = [], enumerator = getEnumerator(value(fieldsDict)), (() => {
|
|
207
|
+
try {
|
|
208
|
+
while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
|
|
209
|
+
const kvp = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]();
|
|
210
|
+
const fieldType = Decode_cwlTypeDecoder$0027(kvp[1]);
|
|
211
|
+
void fields.push(new InputRecordField(kvp[0], fieldType, void 0, void 0));
|
|
212
|
+
}
|
|
213
|
+
} finally {
|
|
214
|
+
disposeSafe(enumerator);
|
|
215
|
+
}
|
|
216
|
+
})(), fields), (objectArg_1 = get$.Optional, objectArg_1.Field("label", string)), (objectArg_2 = get$.Optional, objectArg_2.Field("doc", string)), (objectArg_3 = get$.Optional, objectArg_3.Field("name", string)));
|
|
217
|
+
}, value_4);
|
|
218
|
+
}
|
|
219
|
+
const inputRecordSchemaDecoder$0040121$002D1 = new Lazy(inputRecordSchemaDecoder$0040121);
|
|
220
|
+
function inputEnumSchemaDecoder$0040154() {
|
|
221
|
+
return (value_5) => object((get$) => {
|
|
222
|
+
let objectArg, objectArg_1, objectArg_2, objectArg_3;
|
|
223
|
+
return new InputEnumSchema((objectArg = get$.Required, objectArg.Field("symbols", (value) => resizearray(string, value))), (objectArg_1 = get$.Optional, objectArg_1.Field("label", string)), (objectArg_2 = get$.Optional, objectArg_2.Field("doc", string)), (objectArg_3 = get$.Optional, objectArg_3.Field("name", string)));
|
|
224
|
+
}, value_5);
|
|
225
|
+
}
|
|
226
|
+
const inputEnumSchemaDecoder$0040154$002D1 = new Lazy(inputEnumSchemaDecoder$0040154);
|
|
227
|
+
function Decode_cwlSimpleTypeFromString(s) {
|
|
228
|
+
switch (s) {
|
|
192
229
|
case "File":
|
|
193
|
-
return
|
|
230
|
+
return CWLType_File(FileInstance_$ctor());
|
|
194
231
|
case "Directory":
|
|
195
|
-
return
|
|
196
|
-
case "Dirent":
|
|
197
|
-
return CWLType_Array((objectArg_1 = get$.Required, objectArg_1.Field("listing", Decode_direntDecoder)));
|
|
232
|
+
return CWLType_Directory(DirectoryInstance_$ctor());
|
|
198
233
|
case "string":
|
|
199
|
-
return
|
|
234
|
+
return CWLType_String();
|
|
200
235
|
case "int":
|
|
201
|
-
return
|
|
236
|
+
return CWLType_Int();
|
|
202
237
|
case "long":
|
|
203
|
-
return
|
|
238
|
+
return CWLType_Long();
|
|
204
239
|
case "float":
|
|
205
|
-
return
|
|
240
|
+
return CWLType_Float();
|
|
206
241
|
case "double":
|
|
207
|
-
return
|
|
242
|
+
return CWLType_Double();
|
|
208
243
|
case "boolean":
|
|
209
|
-
return
|
|
244
|
+
return CWLType_Boolean();
|
|
245
|
+
case "stdout":
|
|
246
|
+
return CWLType_Stdout();
|
|
247
|
+
case "null":
|
|
248
|
+
return CWLType_Null();
|
|
210
249
|
default:
|
|
211
|
-
throw new Error(
|
|
250
|
+
throw new Error(`Invalid CWL simple type: ${s}`);
|
|
212
251
|
}
|
|
213
|
-
}
|
|
252
|
+
}
|
|
253
|
+
const Decode_inputArraySchemaDecoder = inputArraySchemaDecoder$004090$002D1.Value;
|
|
254
|
+
const Decode_inputRecordFieldDecoder = inputRecordFieldDecoder$0040104$002D1.Value;
|
|
255
|
+
const Decode_inputRecordSchemaDecoder = inputRecordSchemaDecoder$0040121$002D1.Value;
|
|
256
|
+
const Decode_inputEnumSchemaDecoder = inputEnumSchemaDecoder$0040154$002D1.Value;
|
|
257
|
+
function Decode_cwlTypeDecoder$0027(element) {
|
|
258
|
+
let collection;
|
|
259
|
+
const parseTypeString = (typeStr) => {
|
|
260
|
+
const patternInput = typeStr.endsWith("?") ? [replace(typeStr, "?", ""), true] : [typeStr, false];
|
|
261
|
+
const stripped = patternInput[0];
|
|
262
|
+
const baseType_1 = stripped.endsWith("[]") ? CWLType_Array(new InputArraySchema(Decode_cwlSimpleTypeFromString(replace(stripped, "[]", "")), void 0, void 0, void 0)) : Decode_cwlSimpleTypeFromString(stripped);
|
|
263
|
+
if (patternInput[1]) {
|
|
264
|
+
return CWLType_Union([CWLType_Null(), baseType_1]);
|
|
265
|
+
} else {
|
|
266
|
+
return baseType_1;
|
|
267
|
+
}
|
|
268
|
+
};
|
|
269
|
+
let matchResult, v, items;
|
|
270
|
+
switch (element.tag) {
|
|
271
|
+
case /* Value */
|
|
272
|
+
1: {
|
|
273
|
+
matchResult = 0;
|
|
274
|
+
v = element.fields[0];
|
|
275
|
+
break;
|
|
276
|
+
}
|
|
277
|
+
case /* Object */
|
|
278
|
+
3: {
|
|
279
|
+
if (!isEmpty(element.fields[0])) {
|
|
280
|
+
if (head(element.fields[0]).tag === /* Value */
|
|
281
|
+
1) {
|
|
282
|
+
if (isEmpty(tail(element.fields[0]))) {
|
|
283
|
+
matchResult = 0;
|
|
284
|
+
v = head(element.fields[0]).fields[0];
|
|
285
|
+
} else {
|
|
286
|
+
matchResult = 2;
|
|
287
|
+
}
|
|
288
|
+
} else {
|
|
289
|
+
matchResult = 2;
|
|
290
|
+
}
|
|
291
|
+
} else {
|
|
292
|
+
matchResult = 2;
|
|
293
|
+
}
|
|
294
|
+
break;
|
|
295
|
+
}
|
|
296
|
+
case /* Sequence */
|
|
297
|
+
2: {
|
|
298
|
+
matchResult = 1;
|
|
299
|
+
items = element.fields[0];
|
|
300
|
+
break;
|
|
301
|
+
}
|
|
302
|
+
default:
|
|
303
|
+
matchResult = 3;
|
|
304
|
+
}
|
|
305
|
+
switch (matchResult) {
|
|
306
|
+
case 0:
|
|
307
|
+
return parseTypeString(v.Value);
|
|
308
|
+
case 1:
|
|
309
|
+
return CWLType_Union((collection = map(Decode_cwlTypeDecoder$0027, items), Array.from(collection)));
|
|
310
|
+
case 2:
|
|
311
|
+
return object((get$) => {
|
|
312
|
+
let objectArg_1;
|
|
313
|
+
let typeField;
|
|
314
|
+
const objectArg = get$.Optional;
|
|
315
|
+
typeField = objectArg.Field("type", (x) => x);
|
|
316
|
+
let matchResult_1, v_1;
|
|
317
|
+
if (typeField != null) {
|
|
318
|
+
if (value(typeField).tag === /* Object */
|
|
319
|
+
3) {
|
|
320
|
+
if (!isEmpty(value(typeField).fields[0])) {
|
|
321
|
+
if (head(value(typeField).fields[0]).tag === /* Value */
|
|
322
|
+
1) {
|
|
323
|
+
if (isEmpty(tail(value(typeField).fields[0]))) {
|
|
324
|
+
matchResult_1 = 0;
|
|
325
|
+
v_1 = head(value(typeField).fields[0]).fields[0];
|
|
326
|
+
} else {
|
|
327
|
+
matchResult_1 = 1;
|
|
328
|
+
}
|
|
329
|
+
} else {
|
|
330
|
+
matchResult_1 = 1;
|
|
331
|
+
}
|
|
332
|
+
} else {
|
|
333
|
+
matchResult_1 = 1;
|
|
334
|
+
}
|
|
335
|
+
} else {
|
|
336
|
+
matchResult_1 = 2;
|
|
337
|
+
}
|
|
338
|
+
} else {
|
|
339
|
+
matchResult_1 = 2;
|
|
340
|
+
}
|
|
341
|
+
switch (matchResult_1) {
|
|
342
|
+
case 0: {
|
|
343
|
+
const matchValue = v_1.Value;
|
|
344
|
+
return matchValue === "record" ? CWLType_Record(inputRecordSchemaDecoder$0040121$002D1.Value(element)) : matchValue === "enum" ? CWLType_Enum(inputEnumSchemaDecoder$0040154$002D1.Value(element)) : matchValue === "array" ? CWLType_Array(inputArraySchemaDecoder$004090$002D1.Value(element)) : parseTypeString(matchValue);
|
|
345
|
+
}
|
|
346
|
+
case 1:
|
|
347
|
+
return Decode_cwlTypeDecoder$0027((objectArg_1 = get$.Required, objectArg_1.Field("type", (x_1) => x_1)));
|
|
348
|
+
default:
|
|
349
|
+
throw new Error("Unexpected type format in cwlTypeDecoder'");
|
|
350
|
+
}
|
|
351
|
+
}, element);
|
|
352
|
+
default:
|
|
353
|
+
throw new Error("Unexpected YAMLElement in cwlTypeDecoder'");
|
|
354
|
+
}
|
|
355
|
+
}
|
|
214
356
|
function Decode_cwlTypeStringMatcher(t, get$) {
|
|
215
|
-
let objectArg
|
|
357
|
+
let objectArg;
|
|
216
358
|
const patternInput = t.endsWith("?") ? [true, replace(t, "?", "")] : [false, t];
|
|
359
|
+
const optional = patternInput[0];
|
|
217
360
|
const newT = patternInput[1];
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
361
|
+
let cwlType;
|
|
362
|
+
if (newT.endsWith("[]")) {
|
|
363
|
+
const baseType = replace(newT, "[]", "");
|
|
364
|
+
cwlType = CWLType_Array(new InputArraySchema(baseType === "File" ? CWLType_File(FileInstance_$ctor()) : baseType === "Directory" ? CWLType_Directory(DirectoryInstance_$ctor()) : baseType === "Dirent" ? (objectArg = get$.Required, objectArg.Field("listing", Decode_direntDecoder)) : baseType === "string" ? CWLType_String() : baseType === "int" ? CWLType_Int() : baseType === "long" ? CWLType_Long() : baseType === "float" ? CWLType_Float() : baseType === "double" ? CWLType_Double() : baseType === "boolean" ? CWLType_Boolean() : (() => {
|
|
365
|
+
throw new Error("Invalid CWL type");
|
|
366
|
+
})(), void 0, void 0, void 0));
|
|
367
|
+
} else {
|
|
368
|
+
switch (newT) {
|
|
369
|
+
case "File": {
|
|
370
|
+
cwlType = CWLType_File(FileInstance_$ctor());
|
|
371
|
+
break;
|
|
372
|
+
}
|
|
373
|
+
case "Directory": {
|
|
374
|
+
cwlType = CWLType_Directory(DirectoryInstance_$ctor());
|
|
375
|
+
break;
|
|
376
|
+
}
|
|
377
|
+
case "Dirent": {
|
|
378
|
+
const objectArg_1 = get$.Required;
|
|
379
|
+
cwlType = objectArg_1.Field("listing", Decode_direntDecoder);
|
|
380
|
+
break;
|
|
381
|
+
}
|
|
382
|
+
case "string": {
|
|
383
|
+
cwlType = CWLType_String();
|
|
384
|
+
break;
|
|
385
|
+
}
|
|
386
|
+
case "int": {
|
|
387
|
+
cwlType = CWLType_Int();
|
|
388
|
+
break;
|
|
389
|
+
}
|
|
390
|
+
case "long": {
|
|
391
|
+
cwlType = CWLType_Long();
|
|
392
|
+
break;
|
|
393
|
+
}
|
|
394
|
+
case "float": {
|
|
395
|
+
cwlType = CWLType_Float();
|
|
396
|
+
break;
|
|
397
|
+
}
|
|
398
|
+
case "double": {
|
|
399
|
+
cwlType = CWLType_Double();
|
|
400
|
+
break;
|
|
401
|
+
}
|
|
402
|
+
case "boolean": {
|
|
403
|
+
cwlType = CWLType_Boolean();
|
|
404
|
+
break;
|
|
405
|
+
}
|
|
406
|
+
case "stdout": {
|
|
407
|
+
cwlType = CWLType_Stdout();
|
|
408
|
+
break;
|
|
409
|
+
}
|
|
410
|
+
case "null": {
|
|
411
|
+
cwlType = CWLType_Null();
|
|
412
|
+
break;
|
|
413
|
+
}
|
|
414
|
+
default:
|
|
415
|
+
throw new Error("Invalid CWL type");
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
return [optional ? CWLType_Union([CWLType_Null(), cwlType]) : cwlType, optional];
|
|
221
419
|
}
|
|
222
420
|
const Decode_cwlTypeDecoder = (value_1) => object((get$) => {
|
|
223
421
|
let objectArg_1;
|
|
@@ -267,7 +465,7 @@ const Decode_cwlTypeDecoder = (value_1) => object((get$) => {
|
|
|
267
465
|
}
|
|
268
466
|
});
|
|
269
467
|
if (cwlType == null) {
|
|
270
|
-
return [(objectArg_1 = get$.Required, objectArg_1.Field("type",
|
|
468
|
+
return [(objectArg_1 = get$.Required, objectArg_1.Field("type", Decode_cwlTypeDecoder$0027)), false];
|
|
271
469
|
} else {
|
|
272
470
|
return Decode_cwlTypeStringMatcher(value(cwlType), get$);
|
|
273
471
|
}
|
|
@@ -383,14 +581,98 @@ const Decode_inputBindingDecoder = (value_5) => object((get$) => {
|
|
|
383
581
|
const Decode_inputArrayDecoder = (value_1) => object((get$) => {
|
|
384
582
|
const dict = get$.Overflow.FieldList(empty());
|
|
385
583
|
const collection = toArray(delay(() => collect((key) => {
|
|
386
|
-
let v;
|
|
387
584
|
const value = getItemFromDict(dict, key);
|
|
388
585
|
const inputBinding = Decode_inputBindingDecoder(value);
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
586
|
+
let patternInput;
|
|
587
|
+
let matchResult, v, mappings;
|
|
588
|
+
if (value.tag === /* Object */
|
|
589
|
+
3) {
|
|
590
|
+
if (!isEmpty(value.fields[0])) {
|
|
591
|
+
if (head(value.fields[0]).tag === /* Value */
|
|
592
|
+
1) {
|
|
593
|
+
if (isEmpty(tail(value.fields[0]))) {
|
|
594
|
+
matchResult = 0;
|
|
595
|
+
v = head(value.fields[0]).fields[0];
|
|
596
|
+
} else {
|
|
597
|
+
matchResult = 1;
|
|
598
|
+
mappings = value.fields[0];
|
|
599
|
+
}
|
|
600
|
+
} else {
|
|
601
|
+
matchResult = 1;
|
|
602
|
+
mappings = value.fields[0];
|
|
603
|
+
}
|
|
604
|
+
} else {
|
|
605
|
+
matchResult = 1;
|
|
606
|
+
mappings = value.fields[0];
|
|
607
|
+
}
|
|
608
|
+
} else {
|
|
609
|
+
matchResult = 2;
|
|
610
|
+
}
|
|
611
|
+
switch (matchResult) {
|
|
612
|
+
case 0: {
|
|
613
|
+
patternInput = Decode_cwlTypeStringMatcher(v.Value, get$);
|
|
614
|
+
break;
|
|
615
|
+
}
|
|
616
|
+
case 1: {
|
|
617
|
+
if (exists((m) => {
|
|
618
|
+
let matchResult_1, k_1;
|
|
619
|
+
if (m.tag === /* Mapping */
|
|
620
|
+
0) {
|
|
621
|
+
if (m.fields[0].Value === "type") {
|
|
622
|
+
matchResult_1 = 0;
|
|
623
|
+
k_1 = m.fields[0];
|
|
624
|
+
} else {
|
|
625
|
+
matchResult_1 = 1;
|
|
626
|
+
}
|
|
627
|
+
} else {
|
|
628
|
+
matchResult_1 = 1;
|
|
629
|
+
}
|
|
630
|
+
switch (matchResult_1) {
|
|
631
|
+
case 0:
|
|
632
|
+
return true;
|
|
633
|
+
default:
|
|
634
|
+
return false;
|
|
635
|
+
}
|
|
636
|
+
}, mappings)) {
|
|
637
|
+
patternInput = Decode_cwlTypeDecoder(value);
|
|
638
|
+
} else {
|
|
639
|
+
let matchResult_2, v_1;
|
|
640
|
+
if (value.tag === /* Object */
|
|
641
|
+
3) {
|
|
642
|
+
if (!isEmpty(value.fields[0])) {
|
|
643
|
+
if (head(value.fields[0]).tag === /* Value */
|
|
644
|
+
1) {
|
|
645
|
+
if (isEmpty(tail(value.fields[0]))) {
|
|
646
|
+
matchResult_2 = 0;
|
|
647
|
+
v_1 = head(value.fields[0]).fields[0];
|
|
648
|
+
} else {
|
|
649
|
+
matchResult_2 = 1;
|
|
650
|
+
}
|
|
651
|
+
} else {
|
|
652
|
+
matchResult_2 = 1;
|
|
653
|
+
}
|
|
654
|
+
} else {
|
|
655
|
+
matchResult_2 = 1;
|
|
656
|
+
}
|
|
657
|
+
} else {
|
|
658
|
+
matchResult_2 = 1;
|
|
659
|
+
}
|
|
660
|
+
switch (matchResult_2) {
|
|
661
|
+
case 0: {
|
|
662
|
+
patternInput = Decode_cwlTypeStringMatcher(v_1.Value, get$);
|
|
663
|
+
break;
|
|
664
|
+
}
|
|
665
|
+
default:
|
|
666
|
+
throw new Error("Unexpected input format without type field");
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
break;
|
|
670
|
+
}
|
|
671
|
+
default:
|
|
672
|
+
throw new Error("Unexpected input format in inputArrayDecoder");
|
|
673
|
+
}
|
|
392
674
|
const input = new CWLInput(key, patternInput[0]);
|
|
393
|
-
return append(
|
|
675
|
+
return append(patternInput[1] ? (setOptionalProperty("optional", true, input), empty$1()) : empty$1(), delay(() => append(inputBinding != null ? (setOptionalProperty("inputBinding", inputBinding, input), empty$1()) : empty$1(), delay(() => singleton(input)))));
|
|
394
676
|
}, dict.keys())));
|
|
395
677
|
return Array.from(collection);
|
|
396
678
|
}, value_1);
|
|
@@ -399,8 +681,76 @@ const Decode_inputsDecoder = (value) => object((get$) => {
|
|
|
399
681
|
return objectArg.Field("inputs", Decode_inputArrayDecoder);
|
|
400
682
|
}, value);
|
|
401
683
|
const Decode_baseCommandDecoder = (value_2) => object((get$) => {
|
|
684
|
+
let baseCommandField;
|
|
402
685
|
const objectArg = get$.Optional;
|
|
403
|
-
|
|
686
|
+
baseCommandField = objectArg.Field("baseCommand", (x) => x);
|
|
687
|
+
let matchResult, v, v_1, s, s_1;
|
|
688
|
+
if (baseCommandField == null) {
|
|
689
|
+
matchResult = 4;
|
|
690
|
+
} else {
|
|
691
|
+
switch (value(baseCommandField).tag) {
|
|
692
|
+
case /* Object */
|
|
693
|
+
3: {
|
|
694
|
+
if (!isEmpty(value(baseCommandField).fields[0])) {
|
|
695
|
+
switch (head(value(baseCommandField).fields[0]).tag) {
|
|
696
|
+
case /* Value */
|
|
697
|
+
1: {
|
|
698
|
+
if (isEmpty(tail(value(baseCommandField).fields[0]))) {
|
|
699
|
+
matchResult = 0;
|
|
700
|
+
v = head(value(baseCommandField).fields[0]).fields[0];
|
|
701
|
+
} else {
|
|
702
|
+
matchResult = 5;
|
|
703
|
+
}
|
|
704
|
+
break;
|
|
705
|
+
}
|
|
706
|
+
case /* Sequence */
|
|
707
|
+
2: {
|
|
708
|
+
if (isEmpty(tail(value(baseCommandField).fields[0]))) {
|
|
709
|
+
matchResult = 2;
|
|
710
|
+
s = head(value(baseCommandField).fields[0]).fields[0];
|
|
711
|
+
} else {
|
|
712
|
+
matchResult = 5;
|
|
713
|
+
}
|
|
714
|
+
break;
|
|
715
|
+
}
|
|
716
|
+
default:
|
|
717
|
+
matchResult = 5;
|
|
718
|
+
}
|
|
719
|
+
} else {
|
|
720
|
+
matchResult = 5;
|
|
721
|
+
}
|
|
722
|
+
break;
|
|
723
|
+
}
|
|
724
|
+
case /* Value */
|
|
725
|
+
1: {
|
|
726
|
+
matchResult = 1;
|
|
727
|
+
v_1 = value(baseCommandField).fields[0];
|
|
728
|
+
break;
|
|
729
|
+
}
|
|
730
|
+
case /* Sequence */
|
|
731
|
+
2: {
|
|
732
|
+
matchResult = 3;
|
|
733
|
+
s_1 = value(baseCommandField).fields[0];
|
|
734
|
+
break;
|
|
735
|
+
}
|
|
736
|
+
default:
|
|
737
|
+
matchResult = 5;
|
|
738
|
+
}
|
|
739
|
+
}
|
|
740
|
+
switch (matchResult) {
|
|
741
|
+
case 0:
|
|
742
|
+
return [v.Value];
|
|
743
|
+
case 1:
|
|
744
|
+
return [v_1.Value];
|
|
745
|
+
case 2:
|
|
746
|
+
return resizearray(string, YAMLElement_Sequence(s));
|
|
747
|
+
case 3:
|
|
748
|
+
return resizearray(string, YAMLElement_Sequence(s_1));
|
|
749
|
+
case 4:
|
|
750
|
+
return void 0;
|
|
751
|
+
default:
|
|
752
|
+
return void 0;
|
|
753
|
+
}
|
|
404
754
|
}, value_2);
|
|
405
755
|
const Decode_versionDecoder = (value_1) => object((get$) => {
|
|
406
756
|
const objectArg = get$.Required;
|
|
@@ -422,6 +772,79 @@ function Decode_stringFieldDecoder(field) {
|
|
|
422
772
|
return objectArg.Field(field, string);
|
|
423
773
|
}, value_1);
|
|
424
774
|
}
|
|
775
|
+
function Decode_sourceArrayFieldDecoder(field) {
|
|
776
|
+
return (value_2) => object((get$) => {
|
|
777
|
+
let sourceField;
|
|
778
|
+
const objectArg = get$.Optional;
|
|
779
|
+
sourceField = objectArg.Field(field, (x) => x);
|
|
780
|
+
if (sourceField == null) {
|
|
781
|
+
return void 0;
|
|
782
|
+
} else {
|
|
783
|
+
const sourceValue = value(sourceField);
|
|
784
|
+
let matchResult, v, v_1, s, s_1;
|
|
785
|
+
switch (sourceValue.tag) {
|
|
786
|
+
case /* Object */
|
|
787
|
+
3: {
|
|
788
|
+
if (!isEmpty(sourceValue.fields[0])) {
|
|
789
|
+
switch (head(sourceValue.fields[0]).tag) {
|
|
790
|
+
case /* Value */
|
|
791
|
+
1: {
|
|
792
|
+
if (isEmpty(tail(sourceValue.fields[0]))) {
|
|
793
|
+
matchResult = 0;
|
|
794
|
+
v = head(sourceValue.fields[0]).fields[0];
|
|
795
|
+
} else {
|
|
796
|
+
matchResult = 4;
|
|
797
|
+
}
|
|
798
|
+
break;
|
|
799
|
+
}
|
|
800
|
+
case /* Sequence */
|
|
801
|
+
2: {
|
|
802
|
+
if (isEmpty(tail(sourceValue.fields[0]))) {
|
|
803
|
+
matchResult = 2;
|
|
804
|
+
s = head(sourceValue.fields[0]).fields[0];
|
|
805
|
+
} else {
|
|
806
|
+
matchResult = 4;
|
|
807
|
+
}
|
|
808
|
+
break;
|
|
809
|
+
}
|
|
810
|
+
default:
|
|
811
|
+
matchResult = 4;
|
|
812
|
+
}
|
|
813
|
+
} else {
|
|
814
|
+
matchResult = 4;
|
|
815
|
+
}
|
|
816
|
+
break;
|
|
817
|
+
}
|
|
818
|
+
case /* Value */
|
|
819
|
+
1: {
|
|
820
|
+
matchResult = 1;
|
|
821
|
+
v_1 = sourceValue.fields[0];
|
|
822
|
+
break;
|
|
823
|
+
}
|
|
824
|
+
case /* Sequence */
|
|
825
|
+
2: {
|
|
826
|
+
matchResult = 3;
|
|
827
|
+
s_1 = sourceValue.fields[0];
|
|
828
|
+
break;
|
|
829
|
+
}
|
|
830
|
+
default:
|
|
831
|
+
matchResult = 4;
|
|
832
|
+
}
|
|
833
|
+
switch (matchResult) {
|
|
834
|
+
case 0:
|
|
835
|
+
return [v.Value];
|
|
836
|
+
case 1:
|
|
837
|
+
return [v_1.Value];
|
|
838
|
+
case 2:
|
|
839
|
+
return resizearray(string, YAMLElement_Sequence(s));
|
|
840
|
+
case 3:
|
|
841
|
+
return resizearray(string, YAMLElement_Sequence(s_1));
|
|
842
|
+
default:
|
|
843
|
+
return void 0;
|
|
844
|
+
}
|
|
845
|
+
}
|
|
846
|
+
}, value_2);
|
|
847
|
+
}
|
|
425
848
|
const Decode_inputStepDecoder = (value_1) => object((get$) => {
|
|
426
849
|
const dict = get$.Overflow.FieldList(empty());
|
|
427
850
|
const collection = toArray(delay(() => collect((key) => {
|
|
@@ -429,13 +852,91 @@ const Decode_inputStepDecoder = (value_1) => object((get$) => {
|
|
|
429
852
|
const value$1 = getItemFromDict(dict, key);
|
|
430
853
|
return singleton(new StepInput(key, (s1 = value$1.tag === /* Object */
|
|
431
854
|
3 ? !isEmpty(value$1.fields[0]) ? head(value$1.fields[0]).tag === /* Value */
|
|
432
|
-
1 ? isEmpty(tail(value$1.fields[0])) ? (v = head(value$1.fields[0]).fields[0], v.Value) : void 0 : void 0 : void 0 : void 0, s2 =
|
|
855
|
+
1 ? isEmpty(tail(value$1.fields[0])) ? (v = head(value$1.fields[0]).fields[0], [v.Value]) : void 0 : void 0 : void 0 : void 0, s2 = Decode_sourceArrayFieldDecoder("source")(value$1), s1 != null ? value(s1) : s2 != null ? value(s2) : void 0), Decode_stringOptionFieldDecoder("default")(value$1), Decode_stringOptionFieldDecoder("valueFrom")(value$1), Decode_stringOptionFieldDecoder("linkMerge")(value$1)));
|
|
433
856
|
}, dict.keys())));
|
|
434
857
|
return Array.from(collection);
|
|
435
858
|
}, value_1);
|
|
436
859
|
const Decode_outputStepsDecoder = (value_2) => object((get$) => {
|
|
437
|
-
|
|
438
|
-
|
|
860
|
+
let outField;
|
|
861
|
+
const objectArg = get$.Optional;
|
|
862
|
+
outField = objectArg.Field("out", (x) => x);
|
|
863
|
+
let matchResult, v_1, value$1;
|
|
864
|
+
if (outField == null) {
|
|
865
|
+
matchResult = 3;
|
|
866
|
+
} else {
|
|
867
|
+
switch (value(outField).tag) {
|
|
868
|
+
case /* Object */
|
|
869
|
+
3: {
|
|
870
|
+
if (!isEmpty(value(outField).fields[0])) {
|
|
871
|
+
switch (head(value(outField).fields[0]).tag) {
|
|
872
|
+
case /* Value */
|
|
873
|
+
1: {
|
|
874
|
+
if (isEmpty(tail(value(outField).fields[0]))) {
|
|
875
|
+
if (head(value(outField).fields[0]).fields[0].Value === "[]") {
|
|
876
|
+
matchResult = 0;
|
|
877
|
+
v_1 = head(value(outField).fields[0]).fields[0];
|
|
878
|
+
} else {
|
|
879
|
+
matchResult = 2;
|
|
880
|
+
value$1 = value(outField);
|
|
881
|
+
}
|
|
882
|
+
} else {
|
|
883
|
+
matchResult = 2;
|
|
884
|
+
value$1 = value(outField);
|
|
885
|
+
}
|
|
886
|
+
break;
|
|
887
|
+
}
|
|
888
|
+
case /* Sequence */
|
|
889
|
+
2: {
|
|
890
|
+
if (isEmpty(head(value(outField).fields[0]).fields[0])) {
|
|
891
|
+
if (isEmpty(tail(value(outField).fields[0]))) {
|
|
892
|
+
matchResult = 1;
|
|
893
|
+
} else {
|
|
894
|
+
matchResult = 2;
|
|
895
|
+
value$1 = value(outField);
|
|
896
|
+
}
|
|
897
|
+
} else {
|
|
898
|
+
matchResult = 2;
|
|
899
|
+
value$1 = value(outField);
|
|
900
|
+
}
|
|
901
|
+
break;
|
|
902
|
+
}
|
|
903
|
+
default: {
|
|
904
|
+
matchResult = 2;
|
|
905
|
+
value$1 = value(outField);
|
|
906
|
+
}
|
|
907
|
+
}
|
|
908
|
+
} else {
|
|
909
|
+
matchResult = 2;
|
|
910
|
+
value$1 = value(outField);
|
|
911
|
+
}
|
|
912
|
+
break;
|
|
913
|
+
}
|
|
914
|
+
case /* Sequence */
|
|
915
|
+
2: {
|
|
916
|
+
if (isEmpty(value(outField).fields[0])) {
|
|
917
|
+
matchResult = 1;
|
|
918
|
+
} else {
|
|
919
|
+
matchResult = 2;
|
|
920
|
+
value$1 = value(outField);
|
|
921
|
+
}
|
|
922
|
+
break;
|
|
923
|
+
}
|
|
924
|
+
default: {
|
|
925
|
+
matchResult = 2;
|
|
926
|
+
value$1 = value(outField);
|
|
927
|
+
}
|
|
928
|
+
}
|
|
929
|
+
}
|
|
930
|
+
switch (matchResult) {
|
|
931
|
+
case 0:
|
|
932
|
+
return [];
|
|
933
|
+
case 1:
|
|
934
|
+
return [];
|
|
935
|
+
case 2:
|
|
936
|
+
return resizearray(string, value$1);
|
|
937
|
+
default:
|
|
938
|
+
return [];
|
|
939
|
+
}
|
|
439
940
|
}, value_2);
|
|
440
941
|
const Decode_stepArrayDecoder = (value_1) => object((get$) => {
|
|
441
942
|
const dict = get$.Overflow.FieldList(empty());
|
|
@@ -454,6 +955,14 @@ const Decode_stepArrayDecoder = (value_1) => object((get$) => {
|
|
|
454
955
|
}, dict.keys())));
|
|
455
956
|
return Array.from(collection);
|
|
456
957
|
}, value_1);
|
|
958
|
+
const Decode_docDecoder = (value_1) => object((get$) => {
|
|
959
|
+
const objectArg = get$.Optional;
|
|
960
|
+
return objectArg.Field("doc", string);
|
|
961
|
+
}, value_1);
|
|
962
|
+
const Decode_labelDecoder = (value_1) => object((get$) => {
|
|
963
|
+
const objectArg = get$.Optional;
|
|
964
|
+
return objectArg.Field("label", string);
|
|
965
|
+
}, value_1);
|
|
457
966
|
const Decode_stepsDecoder = (value) => object((get$) => {
|
|
458
967
|
const objectArg = get$.Required;
|
|
459
968
|
return objectArg.Field("steps", Decode_stepArrayDecoder);
|
|
@@ -465,12 +974,14 @@ function Decode_commandLineToolDecoder(yamlCWL) {
|
|
|
465
974
|
const requirements = Decode_requirementsDecoder(yamlCWL);
|
|
466
975
|
const hints = Decode_hintsDecoder(yamlCWL);
|
|
467
976
|
const baseCommand = Decode_baseCommandDecoder(yamlCWL);
|
|
977
|
+
const doc = Decode_docDecoder(yamlCWL);
|
|
978
|
+
const label = Decode_labelDecoder(yamlCWL);
|
|
468
979
|
const description = new CWLToolDescription(outputs, cwlVersion);
|
|
469
980
|
let metadata;
|
|
470
981
|
const md = new DynamicObj();
|
|
471
982
|
object((get$) => Decode_overflowDecoder(md, get$.Overflow.FieldList(ofArray(["inputs", "outputs", "class", "id", "label", "doc", "requirements", "hints", "cwlVersion", "baseCommand", "arguments", "stdin", "stderr", "stdout", "successCodes", "temporaryFailCodes", "permanentFailCodes"]))), yamlCWL);
|
|
472
983
|
metadata = md;
|
|
473
|
-
object((get$_1) => Decode_overflowDecoder(description, get$_1.MultipleOptional.FieldList(ofArray(["id", "
|
|
984
|
+
object((get$_1) => Decode_overflowDecoder(description, get$_1.MultipleOptional.FieldList(ofArray(["id", "arguments", "stdin", "stderr", "stdout", "successCodes", "temporaryFailCodes", "permanentFailCodes"]))), yamlCWL);
|
|
474
985
|
if (inputs != null) {
|
|
475
986
|
description.Inputs = inputs;
|
|
476
987
|
}
|
|
@@ -483,6 +994,12 @@ function Decode_commandLineToolDecoder(yamlCWL) {
|
|
|
483
994
|
if (baseCommand != null) {
|
|
484
995
|
description.BaseCommand = baseCommand;
|
|
485
996
|
}
|
|
997
|
+
if (doc != null) {
|
|
998
|
+
description.Doc = doc;
|
|
999
|
+
}
|
|
1000
|
+
if (label != null) {
|
|
1001
|
+
description.Label = label;
|
|
1002
|
+
}
|
|
486
1003
|
if (length(metadata.GetProperties(false)) > 0) {
|
|
487
1004
|
description.Metadata = metadata;
|
|
488
1005
|
}
|
|
@@ -503,18 +1020,27 @@ function Decode_workflowDecoder(yamlCWL) {
|
|
|
503
1020
|
}
|
|
504
1021
|
const requirements = Decode_requirementsDecoder(yamlCWL);
|
|
505
1022
|
const hints = Decode_hintsDecoder(yamlCWL);
|
|
506
|
-
const
|
|
1023
|
+
const steps = Decode_stepsDecoder(yamlCWL);
|
|
1024
|
+
const doc = Decode_docDecoder(yamlCWL);
|
|
1025
|
+
const label = Decode_labelDecoder(yamlCWL);
|
|
1026
|
+
const description = new CWLWorkflowDescription(steps, inputs, outputs, cwlVersion);
|
|
507
1027
|
let metadata;
|
|
508
1028
|
const md = new DynamicObj();
|
|
509
|
-
object((get$) => Decode_overflowDecoder(md, get$.Overflow.FieldList(ofArray(["inputs", "outputs", "
|
|
1029
|
+
object((get$) => Decode_overflowDecoder(md, get$.Overflow.FieldList(ofArray(["inputs", "outputs", "label", "doc", "class", "steps", "id", "requirements", "hints", "cwlVersion"]))), yamlCWL);
|
|
510
1030
|
metadata = md;
|
|
511
|
-
object((get$_1) => Decode_overflowDecoder(description, get$_1.MultipleOptional.FieldList(
|
|
1031
|
+
object((get$_1) => Decode_overflowDecoder(description, get$_1.MultipleOptional.FieldList(singleton$1("id"))), yamlCWL);
|
|
512
1032
|
if (requirements != null) {
|
|
513
1033
|
description.Requirements = requirements;
|
|
514
1034
|
}
|
|
515
1035
|
if (hints != null) {
|
|
516
1036
|
description.Hints = hints;
|
|
517
1037
|
}
|
|
1038
|
+
if (doc != null) {
|
|
1039
|
+
description.Doc = doc;
|
|
1040
|
+
}
|
|
1041
|
+
if (label != null) {
|
|
1042
|
+
description.Label = label;
|
|
1043
|
+
}
|
|
518
1044
|
if (length(metadata.GetProperties(false)) > 0) {
|
|
519
1045
|
description.Metadata = metadata;
|
|
520
1046
|
}
|
|
@@ -536,6 +1062,7 @@ function Decode_decodeCWLProcessingUnit(cwl) {
|
|
|
536
1062
|
}
|
|
537
1063
|
}
|
|
538
1064
|
function DecodeParameters_cwlParameterReferenceDecoder(get$, key, yEle) {
|
|
1065
|
+
let v_1;
|
|
539
1066
|
let matchResult, v, v1, v2, s;
|
|
540
1067
|
if (yEle.tag === /* Object */
|
|
541
1068
|
3) {
|
|
@@ -631,8 +1158,116 @@ function DecodeParameters_cwlParameterReferenceDecoder(get$, key, yEle) {
|
|
|
631
1158
|
return new CWLParameterReference(key, [v.Value]);
|
|
632
1159
|
case 1:
|
|
633
1160
|
return new CWLParameterReference(key, [v2.Value], Decode_cwlTypeStringMatcher(v1.Value, get$)[0]);
|
|
634
|
-
case 2:
|
|
635
|
-
|
|
1161
|
+
case 2: {
|
|
1162
|
+
const matchValue = tryHead(s);
|
|
1163
|
+
let matchResult_1, mappings;
|
|
1164
|
+
if (matchValue != null) {
|
|
1165
|
+
if (value(matchValue).tag === /* Object */
|
|
1166
|
+
3) {
|
|
1167
|
+
matchResult_1 = 0;
|
|
1168
|
+
mappings = value(matchValue).fields[0];
|
|
1169
|
+
} else {
|
|
1170
|
+
matchResult_1 = 1;
|
|
1171
|
+
}
|
|
1172
|
+
} else {
|
|
1173
|
+
matchResult_1 = 1;
|
|
1174
|
+
}
|
|
1175
|
+
switch (matchResult_1) {
|
|
1176
|
+
case 0:
|
|
1177
|
+
if (!exists((_arg) => {
|
|
1178
|
+
if (_arg.tag === /* Mapping */
|
|
1179
|
+
0) {
|
|
1180
|
+
return true;
|
|
1181
|
+
} else {
|
|
1182
|
+
return false;
|
|
1183
|
+
}
|
|
1184
|
+
}, mappings)) {
|
|
1185
|
+
return new CWLParameterReference(key, resizearray(string, YAMLElement_Sequence(s)));
|
|
1186
|
+
} else if (exists((_arg_1) => {
|
|
1187
|
+
let matchResult_2, k_1;
|
|
1188
|
+
if (_arg_1.tag === /* Mapping */
|
|
1189
|
+
0) {
|
|
1190
|
+
if (_arg_1.fields[0].Value === "class") {
|
|
1191
|
+
matchResult_2 = 0;
|
|
1192
|
+
k_1 = _arg_1.fields[0];
|
|
1193
|
+
} else {
|
|
1194
|
+
matchResult_2 = 1;
|
|
1195
|
+
}
|
|
1196
|
+
} else {
|
|
1197
|
+
matchResult_2 = 1;
|
|
1198
|
+
}
|
|
1199
|
+
switch (matchResult_2) {
|
|
1200
|
+
case 0:
|
|
1201
|
+
return true;
|
|
1202
|
+
default:
|
|
1203
|
+
return false;
|
|
1204
|
+
}
|
|
1205
|
+
}, mappings)) {
|
|
1206
|
+
const paths = [];
|
|
1207
|
+
const enumerator = getEnumerator(s);
|
|
1208
|
+
try {
|
|
1209
|
+
while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
|
|
1210
|
+
const item = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]();
|
|
1211
|
+
if (item.tag === /* Object */
|
|
1212
|
+
3) {
|
|
1213
|
+
const enumerator_1 = getEnumerator(item.fields[0]);
|
|
1214
|
+
try {
|
|
1215
|
+
while (enumerator_1["System.Collections.IEnumerator.MoveNext"]()) {
|
|
1216
|
+
const mapping = enumerator_1["System.Collections.Generic.IEnumerator`1.get_Current"]();
|
|
1217
|
+
let matchResult_3, k_3, v_2;
|
|
1218
|
+
if (mapping.tag === /* Mapping */
|
|
1219
|
+
0) {
|
|
1220
|
+
if (mapping.fields[1].tag === /* Object */
|
|
1221
|
+
3) {
|
|
1222
|
+
if (!isEmpty(mapping.fields[1].fields[0])) {
|
|
1223
|
+
if (head(mapping.fields[1].fields[0]).tag === /* Value */
|
|
1224
|
+
1) {
|
|
1225
|
+
if (isEmpty(tail(mapping.fields[1].fields[0]))) {
|
|
1226
|
+
if (v_1 = head(mapping.fields[1].fields[0]).fields[0], mapping.fields[0].Value === "path") {
|
|
1227
|
+
matchResult_3 = 0;
|
|
1228
|
+
k_3 = mapping.fields[0];
|
|
1229
|
+
v_2 = head(mapping.fields[1].fields[0]).fields[0];
|
|
1230
|
+
} else {
|
|
1231
|
+
matchResult_3 = 1;
|
|
1232
|
+
}
|
|
1233
|
+
} else {
|
|
1234
|
+
matchResult_3 = 1;
|
|
1235
|
+
}
|
|
1236
|
+
} else {
|
|
1237
|
+
matchResult_3 = 1;
|
|
1238
|
+
}
|
|
1239
|
+
} else {
|
|
1240
|
+
matchResult_3 = 1;
|
|
1241
|
+
}
|
|
1242
|
+
} else {
|
|
1243
|
+
matchResult_3 = 1;
|
|
1244
|
+
}
|
|
1245
|
+
} else {
|
|
1246
|
+
matchResult_3 = 1;
|
|
1247
|
+
}
|
|
1248
|
+
switch (matchResult_3) {
|
|
1249
|
+
case 0: {
|
|
1250
|
+
void paths.push(v_2.Value);
|
|
1251
|
+
break;
|
|
1252
|
+
}
|
|
1253
|
+
}
|
|
1254
|
+
}
|
|
1255
|
+
} finally {
|
|
1256
|
+
disposeSafe(enumerator_1);
|
|
1257
|
+
}
|
|
1258
|
+
}
|
|
1259
|
+
}
|
|
1260
|
+
} finally {
|
|
1261
|
+
disposeSafe(enumerator);
|
|
1262
|
+
}
|
|
1263
|
+
return new CWLParameterReference(key, paths, CWLType_Array(new InputArraySchema(CWLType_File(FileInstance_$ctor()), void 0, void 0, void 0)));
|
|
1264
|
+
} else {
|
|
1265
|
+
return new CWLParameterReference(key, []);
|
|
1266
|
+
}
|
|
1267
|
+
default:
|
|
1268
|
+
return new CWLParameterReference(key, resizearray(string, YAMLElement_Sequence(s)));
|
|
1269
|
+
}
|
|
1270
|
+
}
|
|
636
1271
|
default:
|
|
637
1272
|
throw new Error(`${yEle}`);
|
|
638
1273
|
}
|
|
@@ -646,4 +1281,4 @@ function DecodeParameters_decodeYAMLParameterFile(yaml) {
|
|
|
646
1281
|
return DecodeParameters_cwlparameterReferenceArrayDecoder(read(yaml));
|
|
647
1282
|
}
|
|
648
1283
|
|
|
649
|
-
export { DecodeParameters_cwlParameterReferenceDecoder, DecodeParameters_cwlparameterReferenceArrayDecoder, DecodeParameters_decodeYAMLParameterFile, Decode_baseCommandDecoder, Decode_classDecoder, Decode_commandLineToolDecoder,
|
|
1284
|
+
export { DecodeParameters_cwlParameterReferenceDecoder, DecodeParameters_cwlparameterReferenceArrayDecoder, DecodeParameters_decodeYAMLParameterFile, Decode_baseCommandDecoder, Decode_classDecoder, Decode_commandLineToolDecoder, Decode_cwlSimpleTypeFromString, Decode_cwlTypeDecoder, Decode_cwlTypeDecoder$0027, Decode_cwlTypeStringMatcher, Decode_decodeCWLProcessingUnit, Decode_decodeCommandLineTool, Decode_decodeStringOrExpression, Decode_decodeWorkflow, Decode_direntDecoder, Decode_docDecoder, Decode_dockerRequirementDecoder, Decode_envVarRequirementDecoder, Decode_hintsDecoder, Decode_initialWorkDirRequirementDecoder, Decode_inputArrayDecoder, Decode_inputArraySchemaDecoder, Decode_inputBindingDecoder, Decode_inputEnumSchemaDecoder, Decode_inputRecordFieldDecoder, Decode_inputRecordSchemaDecoder, Decode_inputStepDecoder, Decode_inputsDecoder, Decode_labelDecoder, Decode_outputArrayDecoder, Decode_outputBindingDecoder, Decode_outputBindingGlobDecoder, Decode_outputSourceDecoder, Decode_outputStepsDecoder, Decode_outputsDecoder, Decode_overflowDecoder, Decode_requirementArrayDecoder, Decode_requirementsDecoder, Decode_resourceRequirementDecoder, Decode_schemaDefRequirementDecoder, Decode_softwareRequirementDecoder, Decode_sourceArrayFieldDecoder, Decode_stepArrayDecoder, Decode_stepsDecoder, Decode_stringFieldDecoder, Decode_stringOptionFieldDecoder, Decode_toolTimeLimitRequirementDecoder, Decode_versionDecoder, Decode_workflowDecoder, ResizeArray_map, inputArraySchemaDecoder$004090, inputArraySchemaDecoder$004090$002D1, inputEnumSchemaDecoder$0040154, inputEnumSchemaDecoder$0040154$002D1, inputRecordFieldDecoder$0040104, inputRecordFieldDecoder$0040104$002D1, inputRecordSchemaDecoder$0040121, inputRecordSchemaDecoder$0040121$002D1 };
|