@nfdi4plants/arctrl 3.0.0-beta.11 → 3.0.0-beta.13
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/README.md +30 -3
- package/dist/ts/index.d.ts +15 -15
- package/dist/ts/index.d.ts.map +1 -1
- package/dist/ts/index.js +16 -16
- package/dist/ts/ts/ARC.d.ts +6 -1
- package/dist/ts/ts/ARC.d.ts.map +1 -1
- package/dist/ts/ts/ARC.js +30 -6
- package/dist/ts/ts/CWL/CWLProcessingUnit.d.ts +19 -0
- package/dist/ts/ts/CWL/CWLProcessingUnit.d.ts.map +1 -0
- package/dist/ts/ts/CWL/CWLProcessingUnit.js +26 -0
- package/dist/ts/ts/CWL/CWLTypes.d.ts +92 -0
- package/dist/ts/ts/CWL/CWLTypes.d.ts.map +1 -0
- package/dist/ts/ts/CWL/CWLTypes.js +173 -0
- package/dist/ts/ts/CWL/Decode.d.ts +94 -0
- package/dist/ts/ts/CWL/Decode.d.ts.map +1 -0
- package/dist/ts/ts/CWL/Decode.js +649 -0
- package/dist/ts/ts/CWL/Encode.d.ts +28 -0
- package/dist/ts/ts/CWL/Encode.d.ts.map +1 -0
- package/dist/ts/ts/CWL/Encode.js +546 -0
- package/dist/ts/ts/CWL/HashHelpers.d.ts +9 -0
- package/dist/ts/ts/CWL/HashHelpers.d.ts.map +1 -0
- package/dist/ts/ts/CWL/HashHelpers.js +35 -0
- package/dist/ts/ts/CWL/Inputs.d.ts +28 -0
- package/dist/ts/ts/CWL/Inputs.d.ts.map +1 -0
- package/dist/ts/ts/CWL/Inputs.js +62 -0
- package/dist/ts/ts/CWL/Outputs.d.ts +25 -0
- package/dist/ts/ts/CWL/Outputs.d.ts.map +1 -0
- package/dist/ts/ts/CWL/Outputs.js +59 -0
- package/dist/ts/ts/CWL/ParameterReference.d.ts +23 -0
- package/dist/ts/ts/CWL/ParameterReference.d.ts.map +1 -0
- package/dist/ts/ts/CWL/ParameterReference.js +60 -0
- package/dist/ts/ts/CWL/Requirements.d.ts +71 -0
- package/dist/ts/ts/CWL/Requirements.d.ts.map +1 -0
- package/dist/ts/ts/CWL/Requirements.js +116 -0
- package/dist/ts/ts/CWL/ToolDescription.d.ts +33 -0
- package/dist/ts/ts/CWL/ToolDescription.d.ts.map +1 -0
- package/dist/ts/ts/CWL/ToolDescription.js +80 -0
- package/dist/ts/ts/CWL/WorkflowDescription.d.ts +34 -0
- package/dist/ts/ts/CWL/WorkflowDescription.d.ts.map +1 -0
- package/dist/ts/ts/CWL/WorkflowDescription.js +80 -0
- package/dist/ts/ts/CWL/WorkflowSteps.d.ts +45 -0
- package/dist/ts/ts/CWL/WorkflowSteps.d.ts.map +1 -0
- package/dist/ts/ts/CWL/WorkflowSteps.js +99 -0
- package/dist/ts/ts/Contract/ARC.d.ts.map +1 -1
- package/dist/ts/ts/Contract/ARC.js +27 -9
- package/dist/ts/ts/Contract/ArcRun.d.ts +6 -0
- package/dist/ts/ts/Contract/ArcRun.d.ts.map +1 -1
- package/dist/ts/ts/Contract/ArcRun.js +131 -4
- package/dist/ts/ts/Contract/ArcWorkflow.d.ts +3 -0
- package/dist/ts/ts/Contract/ArcWorkflow.d.ts.map +1 -1
- package/dist/ts/ts/Contract/ArcWorkflow.js +70 -4
- package/dist/ts/ts/ContractIO/ContractIO.d.ts.map +1 -1
- package/dist/ts/ts/ContractIO/ContractIO.js +3 -1
- package/dist/ts/ts/Conversion/Assay.d.ts +13 -0
- package/dist/ts/ts/Conversion/Assay.d.ts.map +1 -0
- package/dist/ts/ts/Conversion/Assay.js +69 -0
- package/dist/ts/ts/Conversion/Basic.d.ts +105 -0
- package/dist/ts/ts/Conversion/Basic.d.ts.map +1 -0
- package/dist/ts/ts/Conversion/Basic.js +452 -0
- package/dist/ts/ts/Conversion/ColumnIndex.d.ts +10 -0
- package/dist/ts/ts/Conversion/ColumnIndex.d.ts.map +1 -0
- package/dist/ts/ts/Conversion/ColumnIndex.js +52 -0
- package/dist/ts/ts/Conversion/Datamap.d.ts +11 -0
- package/dist/ts/ts/Conversion/Datamap.d.ts.map +1 -0
- package/dist/ts/ts/Conversion/Datamap.js +21 -0
- package/dist/ts/ts/Conversion/DateTime.d.ts +4 -0
- package/dist/ts/ts/Conversion/DateTime.d.ts.map +1 -0
- package/dist/ts/ts/Conversion/DateTime.js +23 -0
- package/dist/ts/ts/Conversion/Investigation.d.ts +12 -0
- package/dist/ts/ts/Conversion/Investigation.d.ts.map +1 -0
- package/dist/ts/ts/Conversion/Investigation.js +59 -0
- package/dist/ts/ts/Conversion/Person.d.ts +16 -0
- package/dist/ts/ts/Conversion/Person.d.ts.map +1 -0
- package/dist/ts/ts/Conversion/Person.js +100 -0
- package/dist/ts/ts/Conversion/Process.d.ts +84 -0
- package/dist/ts/ts/Conversion/Process.d.ts.map +1 -0
- package/dist/ts/ts/Conversion/Process.js +455 -0
- package/dist/ts/ts/Conversion/Run.d.ts +26 -0
- package/dist/ts/ts/Conversion/Run.d.ts.map +1 -0
- package/dist/ts/ts/Conversion/Run.js +190 -0
- package/dist/ts/ts/Conversion/ScholarlyArticle.d.ts +16 -0
- package/dist/ts/ts/Conversion/ScholarlyArticle.d.ts.map +1 -0
- package/dist/ts/ts/Conversion/ScholarlyArticle.js +116 -0
- package/dist/ts/ts/Conversion/Study.d.ts +12 -0
- package/dist/ts/ts/Conversion/Study.d.ts.map +1 -0
- package/dist/ts/ts/Conversion/Study.js +51 -0
- package/dist/ts/ts/Conversion/Table.d.ts +45 -0
- package/dist/ts/ts/Conversion/Table.d.ts.map +1 -0
- package/dist/ts/ts/Conversion/Table.js +203 -0
- package/dist/ts/ts/Conversion/Workflow.d.ts +45 -0
- package/dist/ts/ts/Conversion/Workflow.d.ts.map +1 -0
- package/dist/ts/ts/Conversion/Workflow.js +305 -0
- package/dist/ts/ts/Conversion.d.ts +23 -274
- package/dist/ts/ts/Conversion.d.ts.map +1 -1
- package/dist/ts/ts/Conversion.js +62 -1475
- package/dist/ts/ts/Core/ArcTypes.d.ts +48 -38
- package/dist/ts/ts/Core/ArcTypes.d.ts.map +1 -1
- package/dist/ts/ts/Core/ArcTypes.js +183 -103
- package/dist/ts/ts/Core/Helper/Identifier.d.ts +24 -0
- package/dist/ts/ts/Core/Helper/Identifier.d.ts.map +1 -1
- package/dist/ts/ts/Core/Helper/Identifier.js +35 -2
- package/dist/ts/ts/FileSystem/FileSystemTree.d.ts +2 -2
- package/dist/ts/ts/FileSystem/FileSystemTree.d.ts.map +1 -1
- package/dist/ts/ts/FileSystem/FileSystemTree.js +8 -15
- package/dist/ts/ts/Json/ROCrate/LDContext.d.ts.map +1 -1
- package/dist/ts/ts/Json/ROCrate/LDContext.js +21 -11
- package/dist/ts/ts/Json/Run.js +2 -2
- package/dist/ts/ts/Json/Workflow.d.ts.map +1 -1
- package/dist/ts/ts/Json/Workflow.js +8 -9
- package/dist/ts/ts/ROCrate/LDContext.d.ts.map +1 -1
- package/dist/ts/ts/ROCrate/LDContext.js +35 -31
- package/dist/ts/ts/ROCrate/LDObject.d.ts +2 -2
- package/dist/ts/ts/ROCrate/LDObject.js +2 -2
- package/dist/ts/ts/ROCrate/{Generic → LDTypes}/Comment.d.ts.map +1 -1
- package/dist/ts/ts/ROCrate/LDTypes/ComputationalWorkflow.d.ts +61 -0
- package/dist/ts/ts/ROCrate/LDTypes/ComputationalWorkflow.d.ts.map +1 -0
- package/dist/ts/ts/ROCrate/LDTypes/ComputationalWorkflow.js +338 -0
- package/dist/ts/ts/ROCrate/LDTypes/ComputerLanguage.d.ts +39 -0
- package/dist/ts/ts/ROCrate/LDTypes/ComputerLanguage.d.ts.map +1 -0
- package/dist/ts/ts/ROCrate/LDTypes/ComputerLanguage.js +219 -0
- package/dist/ts/ts/ROCrate/LDTypes/CreateAction.d.ts +43 -0
- package/dist/ts/ts/ROCrate/LDTypes/CreateAction.d.ts.map +1 -0
- package/dist/ts/ts/ROCrate/LDTypes/CreateAction.js +224 -0
- package/dist/ts/ts/ROCrate/{Generic → LDTypes}/CreativeWork.d.ts.map +1 -1
- package/dist/ts/ts/ROCrate/{Generic → LDTypes}/CreativeWork.js +1 -1
- package/dist/ts/ts/ROCrate/{Generic → LDTypes}/Dataset.d.ts +32 -22
- package/dist/ts/ts/ROCrate/LDTypes/Dataset.d.ts.map +1 -0
- package/dist/ts/ts/ROCrate/{Generic → LDTypes}/Dataset.js +45 -0
- package/dist/ts/ts/ROCrate/{Generic → LDTypes}/DefinedTerm.d.ts.map +1 -1
- package/dist/ts/ts/ROCrate/{Generic → LDTypes}/File.d.ts +10 -4
- package/dist/ts/ts/ROCrate/LDTypes/File.d.ts.map +1 -0
- package/dist/ts/ts/ROCrate/{Generic → LDTypes}/File.js +34 -1
- package/dist/ts/ts/ROCrate/LDTypes/FormalParameter.d.ts +59 -0
- package/dist/ts/ts/ROCrate/LDTypes/FormalParameter.d.ts.map +1 -0
- package/dist/ts/ts/ROCrate/LDTypes/FormalParameter.js +344 -0
- package/dist/ts/ts/ROCrate/{Generic → LDTypes}/LabProcess.d.ts +2 -0
- package/dist/ts/ts/ROCrate/LDTypes/LabProcess.d.ts.map +1 -0
- package/dist/ts/ts/ROCrate/{Generic → LDTypes}/LabProcess.js +31 -5
- package/dist/ts/ts/ROCrate/{Generic → LDTypes}/LabProtocol.d.ts +6 -2
- package/dist/ts/ts/ROCrate/LDTypes/LabProtocol.d.ts.map +1 -0
- package/dist/ts/ts/ROCrate/{Generic → LDTypes}/LabProtocol.js +66 -15
- package/dist/ts/ts/ROCrate/{Generic → LDTypes}/Organization.d.ts.map +1 -1
- package/dist/ts/ts/ROCrate/{Generic → LDTypes}/Person.d.ts.map +1 -1
- package/dist/ts/ts/ROCrate/{Generic → LDTypes}/PostalAddress.d.ts.map +1 -1
- package/dist/ts/ts/ROCrate/{Generic → LDTypes}/PropertyValue.d.ts +35 -11
- package/dist/ts/ts/ROCrate/LDTypes/PropertyValue.d.ts.map +1 -0
- package/dist/ts/ts/ROCrate/{Generic → LDTypes}/PropertyValue.js +191 -1
- package/dist/ts/ts/ROCrate/{Generic → LDTypes}/Sample.d.ts.map +1 -1
- package/dist/ts/ts/ROCrate/{Generic → LDTypes}/ScholarlyArticle.d.ts.map +1 -1
- package/dist/ts/ts/ROCrate/LDTypes/SoftwareSourceCode.d.ts +46 -0
- package/dist/ts/ts/ROCrate/LDTypes/SoftwareSourceCode.d.ts.map +1 -0
- package/dist/ts/ts/ROCrate/LDTypes/SoftwareSourceCode.js +247 -0
- package/dist/ts/ts/ROCrate/LDTypes/WorkflowInvocation.d.ts +12 -0
- package/dist/ts/ts/ROCrate/LDTypes/WorkflowInvocation.d.ts.map +1 -0
- package/dist/ts/ts/ROCrate/LDTypes/WorkflowInvocation.js +40 -0
- package/dist/ts/ts/ROCrate/LDTypes/WorkflowProtocol.d.ts +11 -0
- package/dist/ts/ts/ROCrate/LDTypes/WorkflowProtocol.d.ts.map +1 -0
- package/dist/ts/ts/ROCrate/LDTypes/WorkflowProtocol.js +46 -0
- package/dist/ts/ts/ROCrate/ROCrateContext.d.ts +2 -2
- package/dist/ts/ts/ROCrate/ROCrateContext.d.ts.map +1 -1
- package/dist/ts/ts/ROCrate/ROCrateContext.js +6 -6
- package/dist/ts/ts/ROCrateIO.js +6 -6
- package/dist/ts/ts/Spreadsheet/Metadata/Run.js +1 -1
- package/dist/ts/ts/Spreadsheet/Metadata/Workflow.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/Metadata/Workflow.js +4 -4
- package/dist/ts/ts/fable_modules/DynamicObj.7.1.0/DynObj.fs.js +109 -0
- package/package.json +1 -1
- package/dist/ts/ts/ROCrate/Generic/Dataset.d.ts.map +0 -1
- package/dist/ts/ts/ROCrate/Generic/File.d.ts.map +0 -1
- package/dist/ts/ts/ROCrate/Generic/LabProcess.d.ts.map +0 -1
- package/dist/ts/ts/ROCrate/Generic/LabProtocol.d.ts.map +0 -1
- package/dist/ts/ts/ROCrate/Generic/PropertyValue.d.ts.map +0 -1
- /package/dist/ts/ts/ROCrate/{Generic → LDTypes}/Comment.d.ts +0 -0
- /package/dist/ts/ts/ROCrate/{Generic → LDTypes}/Comment.js +0 -0
- /package/dist/ts/ts/ROCrate/{Generic → LDTypes}/CreativeWork.d.ts +0 -0
- /package/dist/ts/ts/ROCrate/{Generic → LDTypes}/DefinedTerm.d.ts +0 -0
- /package/dist/ts/ts/ROCrate/{Generic → LDTypes}/DefinedTerm.js +0 -0
- /package/dist/ts/ts/ROCrate/{Generic → LDTypes}/Organization.d.ts +0 -0
- /package/dist/ts/ts/ROCrate/{Generic → LDTypes}/Organization.js +0 -0
- /package/dist/ts/ts/ROCrate/{Generic → LDTypes}/Person.d.ts +0 -0
- /package/dist/ts/ts/ROCrate/{Generic → LDTypes}/Person.js +0 -0
- /package/dist/ts/ts/ROCrate/{Generic → LDTypes}/PostalAddress.d.ts +0 -0
- /package/dist/ts/ts/ROCrate/{Generic → LDTypes}/PostalAddress.js +0 -0
- /package/dist/ts/ts/ROCrate/{Generic → LDTypes}/Sample.d.ts +0 -0
- /package/dist/ts/ts/ROCrate/{Generic → LDTypes}/Sample.js +0 -0
- /package/dist/ts/ts/ROCrate/{Generic → LDTypes}/ScholarlyArticle.d.ts +0 -0
- /package/dist/ts/ts/ROCrate/{Generic → LDTypes}/ScholarlyArticle.js +0 -0
- /package/dist/ts/ts/fable_modules/{DynamicObj.7.0.1 → DynamicObj.7.1.0}/DynamicObj.fs.js +0 -0
- /package/dist/ts/ts/fable_modules/{DynamicObj.7.0.1 → DynamicObj.7.1.0}/FableJS.fs.js +0 -0
- /package/dist/ts/ts/fable_modules/{DynamicObj.7.0.1 → DynamicObj.7.1.0}/HashCodes.fs.js +0 -0
- /package/dist/ts/ts/fable_modules/{DynamicObj.7.0.1 → DynamicObj.7.1.0}/PropertyHelper.fs.js +0 -0
- /package/dist/ts/ts/fable_modules/{DynamicObj.7.0.1 → DynamicObj.7.1.0}/ReflectionUtils.fs.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Encode.d.ts","sourceRoot":"","sources":["../../../../src/ARCtrl/ts/CWL/Encode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyE,kBAAkB,EAAkC,MAAM,yDAAyD,CAAC;AACpM,OAAO,EAA2E,UAAU,EAA4B,MAAM,qCAAqC,CAAC;AAEpK,OAAO,EAAmB,wBAAwB,EAAE,cAAc,EAAkB,MAAM,eAAe,CAAC;AAE1G,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAExD,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAErD,OAAO,EAAE,kBAAkB,EAAkE,MAAM,mBAAmB,CAAC;AAIvH,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAIzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAElE,wBAAgB,KAAK,CAAC,CAAC,EAAE,OAAO,GAAG,kBAAkB,CAEpD;AAED,wBAAgB,IAAI,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC,GAAG,kBAAkB,CAKxF;AAED,wBAAgB,aAAa,CAAC,CAAC,EAAE,cAAc,GAAG,kBAAkB,CAsCnE;AAED,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,aAAa,GAAG,kBAAkB,CAEzE;AAED,wBAAgB,eAAe,CAAC,CAAC,EAAE,SAAS,GAAG,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAqC1E;AAED,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,YAAY,GAAG,kBAAkB,CAGvE;AAED,wBAAgB,cAAc,CAAC,CAAC,EAAE,QAAQ,GAAG,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAqCxE;AAED,wBAAgB,8BAA8B,CAAC,CAAC,EAAE,wBAAwB,GAAG,kBAAkB,CAW9F;AAED,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,kBAAkB,GAAG,kBAAkB,CA2F3E;AAED,wBAAgB,eAAe,CAAC,EAAE,EAAE,SAAS,GAAG,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAwC3E;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,SAAS,EAAE,GAAG,kBAAkB,CAExE;AAED,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,UAAU,GAAG,kBAAkB,CAEnE;AAED,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,YAAY,GAAG,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAkDjF;AAED,wBAAgB,SAAS,CAAC,OAAO,EAAE,kBAAkB,GAAG,MAAM,CAE7D;AAED,wBAAgB,qBAAqB,CAAC,EAAE,EAAE,kBAAkB,GAAG,MAAM,CAgGpE;AAED,wBAAgB,yBAAyB,CAAC,EAAE,EAAE,sBAAsB,GAAG,MAAM,CAsF5E;AAED,wBAAgB,oBAAoB,CAAC,EAAE,EAAE,wBAAwB,GAAG,MAAM,CAOzE"}
|
|
@@ -0,0 +1,546 @@
|
|
|
1
|
+
import { YAMLElement_Value, YAMLContent, YAMLElement_Object, YAMLElement_Mapping, YAMLElement_Sequence, Config } from '../fable_modules/YAMLicious.0.0.3/YAMLiciousTypes.fs.js';
|
|
2
|
+
import { map, isEmpty, tail, head, ofArray, append, singleton, choose, empty, ofSeq, reverse, cons, length } from '../../node_modules/@fable-org/fable-library-js/List.js';
|
|
3
|
+
import { string, int, float } from '../fable_modules/YAMLicious.0.0.3/Encode.fs.js';
|
|
4
|
+
import { value, map as map$1 } from '../../node_modules/@fable-org/fable-library-js/Option.js';
|
|
5
|
+
import { toList, choose as choose$1, map as map$2, delay, append as append$1, singleton as singleton$1, empty as empty$1 } from '../../node_modules/@fable-org/fable-library-js/Seq.js';
|
|
6
|
+
import { toList as toList$1 } from '../../node_modules/@fable-org/fable-library-js/Map.js';
|
|
7
|
+
import { split, trimEnd, replace, trimStart, join } from '../../node_modules/@fable-org/fable-library-js/String.js';
|
|
8
|
+
import { item } from '../../node_modules/@fable-org/fable-library-js/Array.js';
|
|
9
|
+
import { write } from '../fable_modules/YAMLicious.0.0.3/Writer.fs.js';
|
|
10
|
+
import { toString } from '../../node_modules/@fable-org/fable-library-js/Types.js';
|
|
11
|
+
|
|
12
|
+
function yBool(b) {
|
|
13
|
+
return YAMLElement_Value(new YAMLContent(b ? "true" : "false", void 0));
|
|
14
|
+
}
|
|
15
|
+
function yMap(pairs) {
|
|
16
|
+
return YAMLElement_Object(map((tupledArg) => {
|
|
17
|
+
let _arg, single;
|
|
18
|
+
return YAMLElement_Mapping(new YAMLContent(tupledArg[0], void 0), (_arg = tupledArg[1], _arg.tag === /* Object */
|
|
19
|
+
3 ? !isEmpty(_arg.fields[0]) ? isEmpty(tail(_arg.fields[0])) ? (single = head(_arg.fields[0]), single) : _arg : _arg : _arg));
|
|
20
|
+
}, pairs));
|
|
21
|
+
}
|
|
22
|
+
function encodeCWLType(t) {
|
|
23
|
+
let value_4, acc_3, value_2, acc_1;
|
|
24
|
+
switch (t.tag) {
|
|
25
|
+
case /* Directory */
|
|
26
|
+
1:
|
|
27
|
+
return string("Directory");
|
|
28
|
+
case /* Dirent */
|
|
29
|
+
2: {
|
|
30
|
+
const d = t.fields[0];
|
|
31
|
+
return yMap((value_4 = d.Writable, acc_3 = (value_2 = d.Entryname, acc_1 = singleton(["entry", string(d.Entry)]), value_2 == null ? acc_1 : append(acc_1, singleton(["entryname", string(value(value_2))]))), value_4 == null ? acc_3 : append(acc_3, singleton(["writable", yBool(value(value_4))]))));
|
|
32
|
+
}
|
|
33
|
+
case /* String */
|
|
34
|
+
3:
|
|
35
|
+
return string("string");
|
|
36
|
+
case /* Int */
|
|
37
|
+
4:
|
|
38
|
+
return string("int");
|
|
39
|
+
case /* Long */
|
|
40
|
+
5:
|
|
41
|
+
return string("long");
|
|
42
|
+
case /* Float */
|
|
43
|
+
6:
|
|
44
|
+
return string("float");
|
|
45
|
+
case /* Double */
|
|
46
|
+
7:
|
|
47
|
+
return string("double");
|
|
48
|
+
case /* Boolean */
|
|
49
|
+
8:
|
|
50
|
+
return string("boolean");
|
|
51
|
+
case /* Stdout */
|
|
52
|
+
9:
|
|
53
|
+
return string("stdout");
|
|
54
|
+
case /* Null */
|
|
55
|
+
10:
|
|
56
|
+
return string("null");
|
|
57
|
+
case /* Array */
|
|
58
|
+
11: {
|
|
59
|
+
const inner = t.fields[0];
|
|
60
|
+
const shortForm = inner.tag === /* File */
|
|
61
|
+
0 ? "File[]" : inner.tag === /* Directory */
|
|
62
|
+
1 ? "Directory[]" : inner.tag === /* Dirent */
|
|
63
|
+
2 ? "Dirent[]" : inner.tag === /* String */
|
|
64
|
+
3 ? "string[]" : inner.tag === /* Int */
|
|
65
|
+
4 ? "int[]" : inner.tag === /* Long */
|
|
66
|
+
5 ? "long[]" : inner.tag === /* Float */
|
|
67
|
+
6 ? "float[]" : inner.tag === /* Double */
|
|
68
|
+
7 ? "double[]" : inner.tag === /* Boolean */
|
|
69
|
+
8 ? "boolean[]" : void 0;
|
|
70
|
+
if (shortForm == null) {
|
|
71
|
+
return yMap(ofArray([["type", string("array")], ["items", encodeCWLType(inner)]]));
|
|
72
|
+
} else {
|
|
73
|
+
return string(value(shortForm));
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
default:
|
|
77
|
+
return string("File");
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
function encodeOutputBinding(ob) {
|
|
81
|
+
return yMap(choose((x) => x, singleton(map$1((g) => ["glob", string(g)], ob.Glob))));
|
|
82
|
+
}
|
|
83
|
+
function encodeCWLOutput(o) {
|
|
84
|
+
let pairs;
|
|
85
|
+
let acc_4;
|
|
86
|
+
let acc_2;
|
|
87
|
+
const value_1 = o.Type_;
|
|
88
|
+
const acc_1 = empty();
|
|
89
|
+
acc_2 = value_1 == null ? acc_1 : append(acc_1, singleton(["type", encodeCWLType(value(value_1))]));
|
|
90
|
+
const value_3 = o.OutputBinding;
|
|
91
|
+
const acc_3 = acc_2;
|
|
92
|
+
acc_4 = value_3 == null ? acc_3 : append(acc_3, singleton(["outputBinding", encodeOutputBinding(value(value_3))]));
|
|
93
|
+
const value_6 = o.OutputSource;
|
|
94
|
+
const acc_5 = acc_4;
|
|
95
|
+
pairs = value_6 == null ? acc_5 : append(acc_5, singleton(["outputSource", string(value(value_6))]));
|
|
96
|
+
let matchResult, t_1;
|
|
97
|
+
if (!isEmpty(pairs)) {
|
|
98
|
+
if (head(pairs)[0] === "type") {
|
|
99
|
+
if (isEmpty(tail(pairs))) {
|
|
100
|
+
matchResult = 0;
|
|
101
|
+
t_1 = head(pairs)[1];
|
|
102
|
+
} else {
|
|
103
|
+
matchResult = 1;
|
|
104
|
+
}
|
|
105
|
+
} else {
|
|
106
|
+
matchResult = 1;
|
|
107
|
+
}
|
|
108
|
+
} else {
|
|
109
|
+
matchResult = 1;
|
|
110
|
+
}
|
|
111
|
+
switch (matchResult) {
|
|
112
|
+
case 0:
|
|
113
|
+
return [o.Name, t_1];
|
|
114
|
+
default:
|
|
115
|
+
return [o.Name, yMap(pairs)];
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
function encodeInputBinding(ib) {
|
|
119
|
+
let value_9, acc_7, value_7, acc_5, value_4, acc_3, value_2, acc_1;
|
|
120
|
+
return yMap((value_9 = ib.Separate, acc_7 = (value_7 = ib.ItemSeparator, acc_5 = (value_4 = ib.Position, acc_3 = (value_2 = ib.Prefix, acc_1 = empty(), value_2 == null ? acc_1 : append(acc_1, singleton(["prefix", string(value(value_2))]))), value_4 == null ? acc_3 : append(acc_3, singleton(["position", int(value(value_4))]))), value_7 == null ? acc_5 : append(acc_5, singleton(["itemSeparator", string(value(value_7))]))), value_9 == null ? acc_7 : append(acc_7, singleton(["separate", yBool(value(value_9))]))));
|
|
121
|
+
}
|
|
122
|
+
function encodeCWLInput(i) {
|
|
123
|
+
let pairs;
|
|
124
|
+
let acc_4;
|
|
125
|
+
let acc_2;
|
|
126
|
+
const value_1 = i.Type_;
|
|
127
|
+
const acc_1 = empty();
|
|
128
|
+
acc_2 = value_1 == null ? acc_1 : append(acc_1, singleton(["type", encodeCWLType(value(value_1))]));
|
|
129
|
+
const value_3 = i.InputBinding;
|
|
130
|
+
const acc_3 = acc_2;
|
|
131
|
+
acc_4 = value_3 == null ? acc_3 : append(acc_3, singleton(["inputBinding", encodeInputBinding(value(value_3))]));
|
|
132
|
+
const value_5 = i.Optional;
|
|
133
|
+
const acc_5 = acc_4;
|
|
134
|
+
pairs = value_5 == null ? acc_5 : append(acc_5, singleton(["optional", yBool(value(value_5))]));
|
|
135
|
+
let matchResult, t_1;
|
|
136
|
+
if (!isEmpty(pairs)) {
|
|
137
|
+
if (head(pairs)[0] === "type") {
|
|
138
|
+
if (isEmpty(tail(pairs))) {
|
|
139
|
+
matchResult = 0;
|
|
140
|
+
t_1 = head(pairs)[1];
|
|
141
|
+
} else {
|
|
142
|
+
matchResult = 1;
|
|
143
|
+
}
|
|
144
|
+
} else {
|
|
145
|
+
matchResult = 1;
|
|
146
|
+
}
|
|
147
|
+
} else {
|
|
148
|
+
matchResult = 1;
|
|
149
|
+
}
|
|
150
|
+
switch (matchResult) {
|
|
151
|
+
case 0:
|
|
152
|
+
return [i.Name, t_1];
|
|
153
|
+
default:
|
|
154
|
+
return [i.Name, yMap(pairs)];
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
function encodeSchemaDefRequirementType(s) {
|
|
158
|
+
return yMap(toList(choose$1((kvp) => {
|
|
159
|
+
const matchValue = kvp[1];
|
|
160
|
+
if (typeof matchValue === "string") {
|
|
161
|
+
const str = matchValue;
|
|
162
|
+
return [kvp[0], string(str)];
|
|
163
|
+
} else {
|
|
164
|
+
return void 0;
|
|
165
|
+
}
|
|
166
|
+
}, s.GetProperties(false))));
|
|
167
|
+
}
|
|
168
|
+
function encodeRequirement(r) {
|
|
169
|
+
let value_7, acc_5, value_4, acc_3, value_2, acc_1;
|
|
170
|
+
switch (r.tag) {
|
|
171
|
+
case /* SchemaDefRequirement */
|
|
172
|
+
1: {
|
|
173
|
+
const types = r.fields[0];
|
|
174
|
+
return yMap(ofArray([["class", string("SchemaDefRequirement")], ["types", YAMLElement_Sequence(ofSeq(map$2(encodeSchemaDefRequirementType, types)))]]));
|
|
175
|
+
}
|
|
176
|
+
case /* DockerRequirement */
|
|
177
|
+
2: {
|
|
178
|
+
const dr = r.fields[0];
|
|
179
|
+
return yMap((value_7 = dr.DockerImageId, acc_5 = (value_4 = dr.DockerFile, acc_3 = (value_2 = dr.DockerPull, acc_1 = singleton(["class", string("DockerRequirement")]), value_2 == null ? acc_1 : append(acc_1, singleton(["dockerPull", string(value(value_2))]))), value_4 == null ? acc_3 : append(acc_3, singleton(["dockerFile", yMap(map((tupledArg) => [tupledArg[0], string(tupledArg[1])], toList$1(value(value_4))))]))), value_7 == null ? acc_5 : append(acc_5, singleton(["dockerImageId", string(value(value_7))]))));
|
|
180
|
+
}
|
|
181
|
+
case /* SoftwareRequirement */
|
|
182
|
+
3: {
|
|
183
|
+
const pkgs = r.fields[0];
|
|
184
|
+
return yMap(ofArray([["class", string("SoftwareRequirement")], ["packages", YAMLElement_Sequence(ofSeq(map$2((p) => {
|
|
185
|
+
let value_13, acc_10, value_10, acc_8;
|
|
186
|
+
return yMap((value_13 = p.Specs, acc_10 = (value_10 = p.Version, acc_8 = append(empty(), singleton(["package", string(p.Package)])), value_10 == null ? acc_8 : append(acc_8, singleton(["version", YAMLElement_Sequence(ofSeq(map$2(string, value(value_10))))]))), value_13 == null ? acc_10 : append(acc_10, singleton(["specs", YAMLElement_Sequence(ofSeq(map$2(string, value(value_13))))]))));
|
|
187
|
+
}, pkgs)))]]));
|
|
188
|
+
}
|
|
189
|
+
case /* InitialWorkDirRequirement */
|
|
190
|
+
4: {
|
|
191
|
+
const listing = r.fields[0];
|
|
192
|
+
return yMap(ofArray([["class", string("InitialWorkDirRequirement")], ["listing", YAMLElement_Sequence(ofSeq(map$2((_arg) => {
|
|
193
|
+
let value_18, acc_15, value_16, acc_12;
|
|
194
|
+
if (_arg.tag === /* Dirent */
|
|
195
|
+
2) {
|
|
196
|
+
const d = _arg.fields[0];
|
|
197
|
+
let entryElement;
|
|
198
|
+
if (d.Entry.indexOf(": ") >= 0) {
|
|
199
|
+
const parts = split(d.Entry, [": "], 2, 0);
|
|
200
|
+
entryElement = parts.length === 2 ? yMap(singleton([item(0, parts), string(item(1, parts))])) : string(d.Entry);
|
|
201
|
+
} else {
|
|
202
|
+
entryElement = string(d.Entry);
|
|
203
|
+
}
|
|
204
|
+
return yMap((value_18 = d.Writable, acc_15 = append((value_16 = d.Entryname, acc_12 = empty(), value_16 == null ? acc_12 : append(acc_12, singleton(["entryname", string(value(value_16))]))), singleton(["entry", entryElement])), value_18 == null ? acc_15 : append(acc_15, singleton(["writable", yBool(value(value_18))]))));
|
|
205
|
+
} else {
|
|
206
|
+
return encodeCWLType(_arg);
|
|
207
|
+
}
|
|
208
|
+
}, listing)))]]));
|
|
209
|
+
}
|
|
210
|
+
case /* EnvVarRequirement */
|
|
211
|
+
5: {
|
|
212
|
+
const envs = r.fields[0];
|
|
213
|
+
return yMap(ofArray([["class", string("EnvVarRequirement")], ["envDef", YAMLElement_Sequence(ofSeq(map$2((e) => {
|
|
214
|
+
const v_8 = (e.EnvValue === "true" ? true : e.EnvValue === "false") ? '"' + e.EnvValue + '"' : e.EnvValue;
|
|
215
|
+
return yMap(ofArray([["envName", string(e.EnvName)], ["envValue", string(v_8)]]));
|
|
216
|
+
}, envs)))]]));
|
|
217
|
+
}
|
|
218
|
+
case /* ShellCommandRequirement */
|
|
219
|
+
6:
|
|
220
|
+
return yMap(singleton(["class", string("ShellCommandRequirement")]));
|
|
221
|
+
case /* ResourceRequirement */
|
|
222
|
+
7: {
|
|
223
|
+
const rr = r.fields[0];
|
|
224
|
+
const dynamicPairs = toList(choose$1((kvp) => {
|
|
225
|
+
const matchValue = kvp[1];
|
|
226
|
+
if (typeof matchValue === "number") {
|
|
227
|
+
return [kvp[0], int(matchValue)];
|
|
228
|
+
} else if (typeof matchValue === "number") {
|
|
229
|
+
return [kvp[0], float(matchValue)];
|
|
230
|
+
} else if (typeof matchValue === "string") {
|
|
231
|
+
return [kvp[0], string(matchValue)];
|
|
232
|
+
} else if (typeof matchValue === "boolean") {
|
|
233
|
+
return [kvp[0], yBool(matchValue)];
|
|
234
|
+
} else {
|
|
235
|
+
return void 0;
|
|
236
|
+
}
|
|
237
|
+
}, rr.GetProperties(false)));
|
|
238
|
+
return yMap(append(singleton(["class", string("ResourceRequirement")]), dynamicPairs));
|
|
239
|
+
}
|
|
240
|
+
case /* WorkReuseRequirement */
|
|
241
|
+
8:
|
|
242
|
+
return yMap(singleton(["class", string("WorkReuse")]));
|
|
243
|
+
case /* NetworkAccessRequirement */
|
|
244
|
+
9:
|
|
245
|
+
return yMap(ofArray([["class", string("NetworkAccess")], ["networkAccess", yBool(true)]]));
|
|
246
|
+
case /* InplaceUpdateRequirement */
|
|
247
|
+
10:
|
|
248
|
+
return yMap(singleton(["class", string("InplaceUpdateRequirement")]));
|
|
249
|
+
case /* ToolTimeLimitRequirement */
|
|
250
|
+
11: {
|
|
251
|
+
const tl = r.fields[0];
|
|
252
|
+
return yMap(ofArray([["class", string("ToolTimeLimit")], ["timelimit", float(tl)]]));
|
|
253
|
+
}
|
|
254
|
+
case /* SubworkflowFeatureRequirement */
|
|
255
|
+
12:
|
|
256
|
+
return yMap(singleton(["class", string("SubworkflowFeatureRequirement")]));
|
|
257
|
+
case /* ScatterFeatureRequirement */
|
|
258
|
+
13:
|
|
259
|
+
return yMap(singleton(["class", string("ScatterFeatureRequirement")]));
|
|
260
|
+
case /* MultipleInputFeatureRequirement */
|
|
261
|
+
14:
|
|
262
|
+
return yMap(singleton(["class", string("MultipleInputFeatureRequirement")]));
|
|
263
|
+
case /* StepInputExpressionRequirement */
|
|
264
|
+
15:
|
|
265
|
+
return yMap(singleton(["class", string("StepInputExpressionRequirement")]));
|
|
266
|
+
default:
|
|
267
|
+
return yMap(singleton(["class", string("InlineJavascriptRequirement")]));
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
function encodeStepInput(si) {
|
|
271
|
+
let pairs;
|
|
272
|
+
const value_8 = si.ValueFrom;
|
|
273
|
+
let acc_5;
|
|
274
|
+
const value_5 = si.DefaultValue;
|
|
275
|
+
let acc_3;
|
|
276
|
+
const value_2 = si.Source;
|
|
277
|
+
const acc_1 = empty();
|
|
278
|
+
acc_3 = value_2 == null ? acc_1 : append(acc_1, singleton(["source", string(value(value_2))]));
|
|
279
|
+
acc_5 = value_5 == null ? acc_3 : append(acc_3, singleton(["default", string(value(value_5))]));
|
|
280
|
+
pairs = value_8 == null ? acc_5 : append(acc_5, singleton(["valueFrom", string(value(value_8))]));
|
|
281
|
+
let matchResult, s_1;
|
|
282
|
+
if (!isEmpty(pairs)) {
|
|
283
|
+
if (head(pairs)[0] === "source") {
|
|
284
|
+
if (isEmpty(tail(pairs))) {
|
|
285
|
+
if (si.DefaultValue == null && si.ValueFrom == null) {
|
|
286
|
+
matchResult = 0;
|
|
287
|
+
s_1 = head(pairs)[1];
|
|
288
|
+
} else {
|
|
289
|
+
matchResult = 1;
|
|
290
|
+
}
|
|
291
|
+
} else {
|
|
292
|
+
matchResult = 1;
|
|
293
|
+
}
|
|
294
|
+
} else {
|
|
295
|
+
matchResult = 1;
|
|
296
|
+
}
|
|
297
|
+
} else {
|
|
298
|
+
matchResult = 1;
|
|
299
|
+
}
|
|
300
|
+
switch (matchResult) {
|
|
301
|
+
case 0:
|
|
302
|
+
return [si.Id, s_1];
|
|
303
|
+
default:
|
|
304
|
+
return [si.Id, yMap(pairs)];
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
function encodeStepInputs(inputs) {
|
|
308
|
+
return yMap(toList(map$2(encodeStepInput, inputs)));
|
|
309
|
+
}
|
|
310
|
+
function encodeStepOutput(so) {
|
|
311
|
+
return YAMLElement_Sequence(ofSeq(map$2(string, so.Id)));
|
|
312
|
+
}
|
|
313
|
+
function encodeWorkflowStep(ws) {
|
|
314
|
+
let r, h;
|
|
315
|
+
const basePairs = ofArray([["run", string(ws.Run)], ["in", encodeStepInputs(ws.In)], ["out", encodeStepOutput(ws.Out)]]);
|
|
316
|
+
let withReq;
|
|
317
|
+
const matchValue = ws.Requirements;
|
|
318
|
+
let matchResult, r_1;
|
|
319
|
+
if (matchValue != null) {
|
|
320
|
+
if (r = value(matchValue), r.length > 0) {
|
|
321
|
+
matchResult = 0;
|
|
322
|
+
r_1 = value(matchValue);
|
|
323
|
+
} else {
|
|
324
|
+
matchResult = 1;
|
|
325
|
+
}
|
|
326
|
+
} else {
|
|
327
|
+
matchResult = 1;
|
|
328
|
+
}
|
|
329
|
+
switch (matchResult) {
|
|
330
|
+
case 0: {
|
|
331
|
+
withReq = append(basePairs, singleton(["requirements", YAMLElement_Sequence(ofSeq(map$2(encodeRequirement, r_1)))]));
|
|
332
|
+
break;
|
|
333
|
+
}
|
|
334
|
+
default:
|
|
335
|
+
withReq = basePairs;
|
|
336
|
+
}
|
|
337
|
+
let withHints;
|
|
338
|
+
const matchValue_1 = ws.Hints;
|
|
339
|
+
let matchResult_1, h_1;
|
|
340
|
+
if (matchValue_1 != null) {
|
|
341
|
+
if (h = value(matchValue_1), h.length > 0) {
|
|
342
|
+
matchResult_1 = 0;
|
|
343
|
+
h_1 = value(matchValue_1);
|
|
344
|
+
} else {
|
|
345
|
+
matchResult_1 = 1;
|
|
346
|
+
}
|
|
347
|
+
} else {
|
|
348
|
+
matchResult_1 = 1;
|
|
349
|
+
}
|
|
350
|
+
switch (matchResult_1) {
|
|
351
|
+
case 0: {
|
|
352
|
+
withHints = append(withReq, singleton(["hints", YAMLElement_Sequence(ofSeq(map$2(encodeRequirement, h_1)))]));
|
|
353
|
+
break;
|
|
354
|
+
}
|
|
355
|
+
default:
|
|
356
|
+
withHints = withReq;
|
|
357
|
+
}
|
|
358
|
+
return [ws.Id, yMap(withHints)];
|
|
359
|
+
}
|
|
360
|
+
function writeYaml(element) {
|
|
361
|
+
return write(element, (c) => new Config(2, c.Level));
|
|
362
|
+
}
|
|
363
|
+
function encodeToolDescription(td) {
|
|
364
|
+
const section = (pairs) => {
|
|
365
|
+
const s = writeYaml(yMap(pairs));
|
|
366
|
+
return ofArray(trimEnd(replace(s, "\r\n", "\n"), "\n").split("\n"));
|
|
367
|
+
};
|
|
368
|
+
const baseLines = section(ofArray([["cwlVersion", string(td.CWLVersion)], ["class", string("CommandLineTool")]]));
|
|
369
|
+
const hintsLines = map$1((h) => section(singleton(["hints", YAMLElement_Sequence(ofSeq(map$2(encodeRequirement, h)))])), td.Hints);
|
|
370
|
+
const reqLines = map$1((r_1) => section(singleton(["requirements", YAMLElement_Sequence(ofSeq(map$2(encodeRequirement, r_1)))])), td.Requirements);
|
|
371
|
+
const baseCommandLines = map$1((bc) => section(singleton(["baseCommand", YAMLElement_Sequence(ofSeq(map$2(string, bc)))])), td.BaseCommand);
|
|
372
|
+
const inputsLines = map$1((i) => section(singleton(["inputs", yMap(toList(map$2(encodeCWLInput, i)))])), td.Inputs);
|
|
373
|
+
const outputsLines = section(singleton(["outputs", yMap(toList(map$2(encodeCWLOutput, td.Outputs)))]));
|
|
374
|
+
const metadataLines = map$1((md) => {
|
|
375
|
+
const s_2 = writeYaml(yMap(toList(map$2((kvp) => {
|
|
376
|
+
let matchValue, s_1;
|
|
377
|
+
return [kvp[0], (matchValue = kvp[1], typeof matchValue === "string" ? (s_1 = matchValue, string(s_1)) : string(toString(kvp[1])))];
|
|
378
|
+
}, md.GetProperties(false)))));
|
|
379
|
+
return ofArray(trimEnd(replace(s_2, "\r\n", "\n"), "\n").split("\n"));
|
|
380
|
+
}, td.Metadata);
|
|
381
|
+
const merge = (acc_mut, remaining_mut) => {
|
|
382
|
+
merge:
|
|
383
|
+
while (true) {
|
|
384
|
+
const acc = acc_mut, remaining = remaining_mut;
|
|
385
|
+
let matchResult, a_1, b_1, rest_1, l_6, rest_2;
|
|
386
|
+
if (isEmpty(remaining)) {
|
|
387
|
+
matchResult = 2;
|
|
388
|
+
} else if (!isEmpty(tail(remaining))) {
|
|
389
|
+
if (head(remaining).trim() === "-" && trimStart(head(tail(remaining))).indexOf(":") >= 0) {
|
|
390
|
+
matchResult = 0;
|
|
391
|
+
a_1 = head(remaining);
|
|
392
|
+
b_1 = head(tail(remaining));
|
|
393
|
+
rest_1 = tail(tail(remaining));
|
|
394
|
+
} else {
|
|
395
|
+
matchResult = 1;
|
|
396
|
+
l_6 = head(remaining);
|
|
397
|
+
rest_2 = tail(remaining);
|
|
398
|
+
}
|
|
399
|
+
} else {
|
|
400
|
+
matchResult = 1;
|
|
401
|
+
l_6 = head(remaining);
|
|
402
|
+
rest_2 = tail(remaining);
|
|
403
|
+
}
|
|
404
|
+
switch (matchResult) {
|
|
405
|
+
case 0: {
|
|
406
|
+
acc_mut = cons(a_1 + " " + b_1.trim(), acc);
|
|
407
|
+
remaining_mut = rest_1;
|
|
408
|
+
continue merge;
|
|
409
|
+
}
|
|
410
|
+
case 1: {
|
|
411
|
+
acc_mut = cons(l_6, acc);
|
|
412
|
+
remaining_mut = rest_2;
|
|
413
|
+
continue merge;
|
|
414
|
+
}
|
|
415
|
+
default:
|
|
416
|
+
return reverse(acc);
|
|
417
|
+
}
|
|
418
|
+
break;
|
|
419
|
+
}
|
|
420
|
+
};
|
|
421
|
+
return join("\r\n", merge(empty(), ofArray(split(join("\r\n", toList(delay(() => append$1(baseLines, delay(() => append$1(singleton$1(""), delay(() => {
|
|
422
|
+
let matchValue_1;
|
|
423
|
+
return append$1((matchValue_1 = hintsLines, matchValue_1 == null ? empty$1() : append$1(value(matchValue_1), delay(() => singleton$1("")))), delay(() => {
|
|
424
|
+
let matchValue_2;
|
|
425
|
+
return append$1((matchValue_2 = reqLines, matchValue_2 == null ? empty$1() : append$1(value(matchValue_2), delay(() => singleton$1("")))), delay(() => {
|
|
426
|
+
let matchValue_3;
|
|
427
|
+
return append$1((matchValue_3 = baseCommandLines, matchValue_3 == null ? empty$1() : append$1(value(matchValue_3), delay(() => singleton$1("")))), delay(() => {
|
|
428
|
+
let matchValue_4;
|
|
429
|
+
return append$1((matchValue_4 = inputsLines, matchValue_4 == null ? empty$1() : append$1(value(matchValue_4), delay(() => singleton$1("")))), delay(() => append$1(outputsLines, delay(() => {
|
|
430
|
+
const matchValue_5 = metadataLines;
|
|
431
|
+
let matchResult_1, l_5;
|
|
432
|
+
if (matchValue_5 != null) {
|
|
433
|
+
if (length(value(matchValue_5)) > 0) {
|
|
434
|
+
matchResult_1 = 0;
|
|
435
|
+
l_5 = value(matchValue_5);
|
|
436
|
+
} else {
|
|
437
|
+
matchResult_1 = 1;
|
|
438
|
+
}
|
|
439
|
+
} else {
|
|
440
|
+
matchResult_1 = 1;
|
|
441
|
+
}
|
|
442
|
+
switch (matchResult_1) {
|
|
443
|
+
case 0:
|
|
444
|
+
return append$1(singleton$1(""), delay(() => l_5));
|
|
445
|
+
default: {
|
|
446
|
+
return empty$1();
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
}))));
|
|
450
|
+
}));
|
|
451
|
+
}));
|
|
452
|
+
}));
|
|
453
|
+
}))))))), ["\r\n"], void 0, 0))));
|
|
454
|
+
}
|
|
455
|
+
function encodeWorkflowDescription(wd) {
|
|
456
|
+
const section = (pairs) => {
|
|
457
|
+
const s = writeYaml(yMap(pairs));
|
|
458
|
+
return ofArray(trimEnd(replace(s, "\r\n", "\n"), "\n").split("\n"));
|
|
459
|
+
};
|
|
460
|
+
const baseLines = section(ofArray([["cwlVersion", string(wd.CWLVersion)], ["class", string("Workflow")]]));
|
|
461
|
+
const reqLines = map$1((r) => section(singleton(["requirements", YAMLElement_Sequence(ofSeq(map$2(encodeRequirement, r)))])), wd.Requirements);
|
|
462
|
+
const inputsLines = section(singleton(["inputs", yMap(toList(map$2(encodeCWLInput, wd.Inputs)))]));
|
|
463
|
+
const stepsLines = section(singleton(["steps", yMap(toList(map$2(encodeWorkflowStep, wd.Steps)))]));
|
|
464
|
+
const outputsLines = section(singleton(["outputs", yMap(toList(map$2(encodeCWLOutput, wd.Outputs)))]));
|
|
465
|
+
const metadataLines = map$1((md) => {
|
|
466
|
+
const s_2 = writeYaml(yMap(toList(map$2((kvp) => {
|
|
467
|
+
let matchValue, s_1;
|
|
468
|
+
return [kvp[0], (matchValue = kvp[1], typeof matchValue === "string" ? (s_1 = matchValue, string(s_1)) : string(toString(kvp[1])))];
|
|
469
|
+
}, md.GetProperties(false)))));
|
|
470
|
+
return ofArray(trimEnd(replace(s_2, "\r\n", "\n"), "\n").split("\n"));
|
|
471
|
+
}, wd.Metadata);
|
|
472
|
+
const merge = (acc_mut, remaining_mut) => {
|
|
473
|
+
merge:
|
|
474
|
+
while (true) {
|
|
475
|
+
const acc = acc_mut, remaining = remaining_mut;
|
|
476
|
+
let matchResult, a_1, b_1, rest_1, l_3, rest_2;
|
|
477
|
+
if (isEmpty(remaining)) {
|
|
478
|
+
matchResult = 2;
|
|
479
|
+
} else if (!isEmpty(tail(remaining))) {
|
|
480
|
+
if (head(remaining).trim() === "-" && trimStart(head(tail(remaining))).indexOf(":") >= 0) {
|
|
481
|
+
matchResult = 0;
|
|
482
|
+
a_1 = head(remaining);
|
|
483
|
+
b_1 = head(tail(remaining));
|
|
484
|
+
rest_1 = tail(tail(remaining));
|
|
485
|
+
} else {
|
|
486
|
+
matchResult = 1;
|
|
487
|
+
l_3 = head(remaining);
|
|
488
|
+
rest_2 = tail(remaining);
|
|
489
|
+
}
|
|
490
|
+
} else {
|
|
491
|
+
matchResult = 1;
|
|
492
|
+
l_3 = head(remaining);
|
|
493
|
+
rest_2 = tail(remaining);
|
|
494
|
+
}
|
|
495
|
+
switch (matchResult) {
|
|
496
|
+
case 0: {
|
|
497
|
+
acc_mut = cons(a_1 + " " + b_1.trim(), acc);
|
|
498
|
+
remaining_mut = rest_1;
|
|
499
|
+
continue merge;
|
|
500
|
+
}
|
|
501
|
+
case 1: {
|
|
502
|
+
acc_mut = cons(l_3, acc);
|
|
503
|
+
remaining_mut = rest_2;
|
|
504
|
+
continue merge;
|
|
505
|
+
}
|
|
506
|
+
default:
|
|
507
|
+
return reverse(acc);
|
|
508
|
+
}
|
|
509
|
+
break;
|
|
510
|
+
}
|
|
511
|
+
};
|
|
512
|
+
return join("\r\n", merge(empty(), ofArray(split(join("\r\n", toList(delay(() => append$1(baseLines, delay(() => append$1(singleton$1(""), delay(() => {
|
|
513
|
+
let matchValue_1;
|
|
514
|
+
return append$1((matchValue_1 = reqLines, matchValue_1 == null ? empty$1() : append$1(value(matchValue_1), delay(() => singleton$1("")))), delay(() => append$1(inputsLines, delay(() => append$1(singleton$1(""), delay(() => append$1(stepsLines, delay(() => append$1(singleton$1(""), delay(() => append$1(outputsLines, delay(() => {
|
|
515
|
+
const matchValue_2 = metadataLines;
|
|
516
|
+
let matchResult_1, l_2;
|
|
517
|
+
if (matchValue_2 != null) {
|
|
518
|
+
if (length(value(matchValue_2)) > 0) {
|
|
519
|
+
matchResult_1 = 0;
|
|
520
|
+
l_2 = value(matchValue_2);
|
|
521
|
+
} else {
|
|
522
|
+
matchResult_1 = 1;
|
|
523
|
+
}
|
|
524
|
+
} else {
|
|
525
|
+
matchResult_1 = 1;
|
|
526
|
+
}
|
|
527
|
+
switch (matchResult_1) {
|
|
528
|
+
case 0:
|
|
529
|
+
return append$1(singleton$1(""), delay(() => l_2));
|
|
530
|
+
default: {
|
|
531
|
+
return empty$1();
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
}))))))))))));
|
|
535
|
+
}))))))), ["\r\n"], void 0, 0))));
|
|
536
|
+
}
|
|
537
|
+
function encodeProcessingUnit(pu) {
|
|
538
|
+
if (pu.tag === /* Workflow */
|
|
539
|
+
1) {
|
|
540
|
+
return encodeWorkflowDescription(pu.fields[0]);
|
|
541
|
+
} else {
|
|
542
|
+
return encodeToolDescription(pu.fields[0]);
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
export { encodeCWLInput, encodeCWLOutput, encodeCWLType, encodeInputBinding, encodeOutputBinding, encodeProcessingUnit, encodeRequirement, encodeSchemaDefRequirementType, encodeStepInput, encodeStepInputs, encodeStepOutput, encodeToolDescription, encodeWorkflowDescription, encodeWorkflowStep, writeYaml, yBool, yMap };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { int32 } from '@fable-org/fable-library-js/Int32.js';
|
|
2
|
+
import { Option } from '@fable-org/fable-library-js/Option.js';
|
|
3
|
+
export declare function mergeHashes(hash1: int32, hash2: int32): int32;
|
|
4
|
+
export declare function hashDateTime(dt: Date): int32;
|
|
5
|
+
export declare function hash<$a>(obj: $a): int32;
|
|
6
|
+
export declare function boxHashOption<a>(a: Option<a>): any;
|
|
7
|
+
export declare function boxHashArray<a>(a: a[]): any;
|
|
8
|
+
export declare function boxHashSeq<a>(a: Iterable<a>): any;
|
|
9
|
+
//# sourceMappingURL=HashHelpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HashHelpers.d.ts","sourceRoot":"","sources":["../../../../src/ARCtrl/ts/CWL/HashHelpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAC;AAG7D,OAAO,EAAE,MAAM,EAAoB,MAAM,uCAAuC,CAAC;AAIjF,wBAAgB,WAAW,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,GAAG,KAAK,CAE7D;AAED,wBAAgB,YAAY,CAAC,EAAE,EAAE,IAAI,GAAG,KAAK,CAS5C;AAED,wBAAgB,IAAI,CAAC,EAAE,EAAE,GAAG,EAAE,EAAE,GAAG,KAAK,CAGvC;AAED,wBAAgB,aAAa,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,GAAG,GAAG,CAGlD;AAED,wBAAgB,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,GAAG,CAE3C;AAED,wBAAgB,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,GAAG,CAEjD"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { year, month, day, hour, minute, second } from '../../node_modules/@fable-org/fable-library-js/Date.js';
|
|
2
|
+
import { identityHash, numberHash } from '../../node_modules/@fable-org/fable-library-js/Util.js';
|
|
3
|
+
import { value } from '../../node_modules/@fable-org/fable-library-js/Option.js';
|
|
4
|
+
import { fold } from '../../node_modules/@fable-org/fable-library-js/Array.js';
|
|
5
|
+
import { fold as fold$1 } from '../../node_modules/@fable-org/fable-library-js/Seq.js';
|
|
6
|
+
|
|
7
|
+
function mergeHashes(hash1, hash2) {
|
|
8
|
+
return -1640531527 + hash2 + (hash1 << 6) + (hash1 >> 2);
|
|
9
|
+
}
|
|
10
|
+
function hashDateTime(dt) {
|
|
11
|
+
let acc = 0;
|
|
12
|
+
acc = mergeHashes(acc, year(dt)) | 0;
|
|
13
|
+
acc = mergeHashes(acc, month(dt)) | 0;
|
|
14
|
+
acc = mergeHashes(acc, day(dt)) | 0;
|
|
15
|
+
acc = mergeHashes(acc, hour(dt)) | 0;
|
|
16
|
+
acc = mergeHashes(acc, minute(dt)) | 0;
|
|
17
|
+
acc = mergeHashes(acc, second(dt)) | 0;
|
|
18
|
+
return acc | 0;
|
|
19
|
+
}
|
|
20
|
+
function hash(obj) {
|
|
21
|
+
let copyOfStruct = obj;
|
|
22
|
+
return identityHash(copyOfStruct) | 0;
|
|
23
|
+
}
|
|
24
|
+
function boxHashOption(a) {
|
|
25
|
+
let copyOfStruct, copyOfStruct_1;
|
|
26
|
+
return a != null ? (copyOfStruct = value(a), identityHash(copyOfStruct)) : (copyOfStruct_1 = 0, numberHash(copyOfStruct_1));
|
|
27
|
+
}
|
|
28
|
+
function boxHashArray(a) {
|
|
29
|
+
return fold((acc, o) => mergeHashes(acc, hash(o)), 0, a);
|
|
30
|
+
}
|
|
31
|
+
function boxHashSeq(a) {
|
|
32
|
+
return fold$1((acc, o) => mergeHashes(acc, hash(o)), 0, a);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export { boxHashArray, boxHashOption, boxHashSeq, hash, hashDateTime, mergeHashes };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Record } from '@fable-org/fable-library-js/Types.js';
|
|
2
|
+
import { Option } from '@fable-org/fable-library-js/Option.js';
|
|
3
|
+
import { int32 } from '@fable-org/fable-library-js/Int32.js';
|
|
4
|
+
import { IComparable, IEquatable } from '@fable-org/fable-library-js/Util.js';
|
|
5
|
+
import { TypeInfo } from '@fable-org/fable-library-js/Reflection.js';
|
|
6
|
+
import { CWLType_$union } from './CWLTypes.js';
|
|
7
|
+
import { DynamicObj } from '../fable_modules/DynamicObj.7.1.0/DynamicObj.fs.js';
|
|
8
|
+
export declare class InputBinding extends Record implements IEquatable<InputBinding>, IComparable<InputBinding> {
|
|
9
|
+
readonly Prefix: Option<string>;
|
|
10
|
+
readonly Position: Option<int32>;
|
|
11
|
+
readonly ItemSeparator: Option<string>;
|
|
12
|
+
readonly Separate: Option<boolean>;
|
|
13
|
+
constructor(Prefix: Option<string>, Position: Option<int32>, ItemSeparator: Option<string>, Separate: Option<boolean>);
|
|
14
|
+
}
|
|
15
|
+
export declare function InputBinding_$reflection(): TypeInfo;
|
|
16
|
+
export declare function InputBinding_create_ZAC0108A(prefix?: string, position?: int32, itemSeparator?: string, separate?: boolean): InputBinding;
|
|
17
|
+
export declare class CWLInput extends DynamicObj {
|
|
18
|
+
readonly name: string;
|
|
19
|
+
"init@31": int32;
|
|
20
|
+
constructor(name: string, type_?: CWLType_$union, inputBinding?: InputBinding, optional?: boolean);
|
|
21
|
+
get Name(): string;
|
|
22
|
+
get Type_(): CWLType_$union | undefined;
|
|
23
|
+
get InputBinding(): InputBinding | undefined;
|
|
24
|
+
get Optional(): boolean | undefined;
|
|
25
|
+
}
|
|
26
|
+
export declare function CWLInput_$reflection(): TypeInfo;
|
|
27
|
+
export declare function CWLInput_$ctor_Z3A15BEDB(name: string, type_?: CWLType_$union, inputBinding?: InputBinding, optional?: boolean): CWLInput;
|
|
28
|
+
//# sourceMappingURL=Inputs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Inputs.d.ts","sourceRoot":"","sources":["../../../../src/ARCtrl/ts/CWL/Inputs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,MAAM,EAAE,MAAM,sCAAsC,CAAC;AACzE,OAAO,EAAiB,MAAM,EAAE,MAAM,uCAAuC,CAAC;AAC9E,OAAO,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAC;AAC7D,OAAO,EAAa,WAAW,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AACzF,OAAO,EAA4E,QAAQ,EAAE,MAAM,2CAA2C,CAAC;AAC/I,OAAO,EAAE,cAAc,EAAW,MAAM,eAAe,CAAC;AACxD,OAAO,EAA0B,UAAU,EAAE,MAAM,oDAAoD,CAAC;AAGxG,qBAAa,YAAa,SAAQ,MAAO,YAAW,UAAU,CAAC,YAAY,CAAC,EAAE,WAAW,CAAC,YAAY,CAAC;IACnG,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;IAChC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;IACjC,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;IACvC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;gBACvB,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,MAAM,CAAC,KAAK,CAAC,EAAE,aAAa,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,MAAM,CAAC,OAAO,CAAC;CAOxH;AAED,wBAAgB,wBAAwB,IAAI,QAAQ,CAEnD;AAED,wBAAgB,4BAA4B,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,KAAK,EAAE,aAAa,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,OAAO,GAAG,YAAY,CAExI;AAED,qBAAa,QAAS,SAAQ,UAAU;IACpC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,KAAK,CAAC;gBACL,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,cAAc,EAAE,YAAY,CAAC,EAAE,YAAY,EAAE,QAAQ,CAAC,EAAE,OAAO;IAUjG,IAAI,IAAI,IAAI,MAAM,CAGjB;IACD,IAAI,KAAK,IAAI,cAAc,GAAG,SAAS,CAItC;IACD,IAAI,YAAY,IAAI,YAAY,GAAG,SAAS,CAI3C;IACD,IAAI,QAAQ,IAAI,OAAO,GAAG,SAAS,CAIlC;CACJ;AAED,wBAAgB,oBAAoB,IAAI,QAAQ,CAE/C;AAED,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,cAAc,EAAE,YAAY,CAAC,EAAE,YAAY,EAAE,QAAQ,CAAC,EAAE,OAAO,GAAG,QAAQ,CAExI"}
|