@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/ROCrateIO.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { class_type } from '../node_modules/@fable-org/fable-library-js/Reflection.js';
|
|
2
|
-
import { LDNode, LDRef } from './ROCrate/LDObject.js';
|
|
2
|
+
import { LDNode, LDRef, DynamicObj_DynamicObj__DynamicObj_HasProperty_Z721C83C5 } from './ROCrate/LDObject.js';
|
|
3
|
+
import { ofArray, filter, isEmpty, map as map$1 } from '../node_modules/@fable-org/fable-library-js/List.js';
|
|
3
4
|
import { LDCreativeWork } from './ROCrate/LDTypes/CreativeWork.js';
|
|
4
|
-
import { value, unwrap, bind } from '../node_modules/@fable-org/fable-library-js/Option.js';
|
|
5
|
+
import { value, unwrap, bind, defaultArg } from '../node_modules/@fable-org/fable-library-js/Option.js';
|
|
5
6
|
import { License } from './License.js';
|
|
6
7
|
import { LDContext } from './ROCrate/LDContext.js';
|
|
7
|
-
import {
|
|
8
|
+
import { ARCtrl_ArcInvestigation__ArcInvestigation_ToROCrateInvestigation_Z7960E96B, ARCtrl_ArcInvestigation__ArcInvestigation_fromROCrateInvestigation_Static_Z6839B9E8, ARCtrl_ArcRun__ArcRun_ToROCrateRun_1695DD5C, ARCtrl_ArcWorkflow__ArcWorkflow_ToROCrateWorkflow_1695DD5C } from './Conversion.js';
|
|
8
9
|
import { LDDataset } from './ROCrate/LDTypes/Dataset.js';
|
|
9
10
|
import { now } from '../node_modules/@fable-org/fable-library-js/Date.js';
|
|
10
11
|
import { initV1_2, initBioschemasContext, initV1_1 } from './ROCrate/ROCrateContext.js';
|
|
@@ -12,7 +13,11 @@ import { encoder, decoder } from './Json/ROCrate/LDGraph.js';
|
|
|
12
13
|
import { map } from './fable_modules/Thoth.Json.Core.0.7.0/Decode.fs.js';
|
|
13
14
|
import { ResizeArray_choose } from './Core/Helper/Collections.js';
|
|
14
15
|
import { LDFile } from './ROCrate/LDTypes/File.js';
|
|
15
|
-
import { exactlyOne } from '../node_modules/@fable-org/fable-library-js/Seq.js';
|
|
16
|
+
import { iterate, tryHead, exactlyOne } from '../node_modules/@fable-org/fable-library-js/Seq.js';
|
|
17
|
+
import { join, replace, toFail, printf } from '../node_modules/@fable-org/fable-library-js/String.js';
|
|
18
|
+
import { LDCreateAction } from './ROCrate/LDTypes/CreateAction.js';
|
|
19
|
+
import { ARCtrl_ROCrate_LDGraph__LDGraph_toROCrateJsonString_Static_71136F3F } from './JsonIO/LDObject.js';
|
|
20
|
+
import { LDComputationalWorkflow } from './ROCrate/LDTypes/ComputationalWorkflow.js';
|
|
16
21
|
import { decoder as decoder$1 } from './Json/ROCrate/LDNode.js';
|
|
17
22
|
|
|
18
23
|
class ROCrate {
|
|
@@ -28,6 +33,12 @@ function ROCrate_get_metadataFileDescriptor() {
|
|
|
28
33
|
node.SetProperty("http://schema.org/about", new LDRef("./"));
|
|
29
34
|
return node;
|
|
30
35
|
}
|
|
36
|
+
function ROCrate_get_metadataFileDescriptorWfRun() {
|
|
37
|
+
const node = new LDNode("ro-crate-metadata.json", ["http://schema.org/CreativeWork"]);
|
|
38
|
+
node.SetProperty("http://purl.org/dc/terms/conformsTo", ofArray([new LDRef("https://w3id.org/ro/crate/1.1"), new LDRef("https://w3id.org/workflowhub/workflow-ro-crate/1.0")]));
|
|
39
|
+
node.SetProperty("http://schema.org/about", new LDRef("./"));
|
|
40
|
+
return node;
|
|
41
|
+
}
|
|
31
42
|
function ROCrate_createLicenseNode_29619109(license) {
|
|
32
43
|
if (license == null) {
|
|
33
44
|
return LDCreativeWork.create("#LICENSE", void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, "ALL RIGHTS RESERVED BY THE AUTHORS");
|
|
@@ -73,9 +84,9 @@ function ROCrate_getLicense_Z2F770004(license, context) {
|
|
|
73
84
|
return new License("fulltext", "", path_1);
|
|
74
85
|
}
|
|
75
86
|
}
|
|
76
|
-
function
|
|
87
|
+
function ROCrate_encoder_Z7FE34C43(isa, license, fs, ignoreBrokenWR) {
|
|
77
88
|
const license_1 = ROCrate_createLicenseNode_29619109(license);
|
|
78
|
-
const isa_1 =
|
|
89
|
+
const isa_1 = ARCtrl_ArcInvestigation__ArcInvestigation_ToROCrateInvestigation_Z7960E96B(isa, unwrap(fs), unwrap(ignoreBrokenWR));
|
|
79
90
|
LDDataset.setSDDatePublishedAsDateTime(isa_1, now());
|
|
80
91
|
LDDataset.setLicenseAsCreativeWork(isa_1, license_1);
|
|
81
92
|
const graph = isa_1.Flatten();
|
|
@@ -104,8 +115,66 @@ function ROCrate_get_decoder() {
|
|
|
104
115
|
}
|
|
105
116
|
}, decoder);
|
|
106
117
|
}
|
|
118
|
+
function ROCrate_packDatasetAsCrate_Z2DB026F7(dataset, datasetName, datasetDescription, metadataFileDescriptor, license) {
|
|
119
|
+
const metadataFileDescriptor_1 = defaultArg(metadataFileDescriptor, ROCrate_get_metadataFileDescriptor());
|
|
120
|
+
const license_1 = ROCrate_createLicenseNode_29619109(license);
|
|
121
|
+
const mainEntity = LDDataset.create("./", void 0, void 0, void 0, void 0, void 0, datasetDescription, void 0, datasetName);
|
|
122
|
+
iterate((kv) => {
|
|
123
|
+
mainEntity.SetProperty(kv[0], kv[1]);
|
|
124
|
+
}, dataset.GetProperties(false));
|
|
125
|
+
LDDataset.setDateCreatedAsDateTime(mainEntity, now());
|
|
126
|
+
LDDataset.setLicenseAsCreativeWork(mainEntity, license_1);
|
|
127
|
+
const graph = mainEntity.Flatten();
|
|
128
|
+
const context = new LDContext(void 0, [initV1_2(), initBioschemasContext()]);
|
|
129
|
+
graph.SetContext(context);
|
|
130
|
+
graph.AddNode(metadataFileDescriptor_1);
|
|
131
|
+
graph.Compact_InPlace();
|
|
132
|
+
return graph;
|
|
133
|
+
}
|
|
134
|
+
function ROCrate_writeRunAsCrate_5E53831D(arcRun, fileSystem, license) {
|
|
135
|
+
const runDataset = ARCtrl_ArcRun__ArcRun_ToROCrateRun_1695DD5C(arcRun, fileSystem);
|
|
136
|
+
const missingDatasetProps = filter((prop) => !DynamicObj_DynamicObj__DynamicObj_HasProperty_Z721C83C5(runDataset, prop), ofArray([LDDataset.identifier, LDDataset.name, LDDataset.description, LDDataset.about, LDDataset.mentions, LDDataset.creator, LDDataset.hasPart]));
|
|
137
|
+
if (!isEmpty(missingDatasetProps)) {
|
|
138
|
+
const missingPropsStr = join(", ", map$1((p) => replace(p, "http://schema.org/", ""), missingDatasetProps));
|
|
139
|
+
toFail(printf("Run dataset is missing required properties: %s"))(missingPropsStr);
|
|
140
|
+
}
|
|
141
|
+
let workflowInvocation;
|
|
142
|
+
const matchValue = tryHead(LDDataset.getAboutsAsWorkflowInvocation(runDataset));
|
|
143
|
+
if (matchValue == null) {
|
|
144
|
+
throw new Error("Run dataset 'about' property must contain a workflowInvocation");
|
|
145
|
+
} else {
|
|
146
|
+
workflowInvocation = value(matchValue);
|
|
147
|
+
}
|
|
148
|
+
const missingWfInvocationProps = filter((prop_1) => !DynamicObj_DynamicObj__DynamicObj_HasProperty_Z721C83C5(workflowInvocation, prop_1), ofArray([LDCreateAction.name, LDCreateAction.instrument, LDCreateAction.result, LDCreateAction.object_]));
|
|
149
|
+
if (!isEmpty(missingWfInvocationProps)) {
|
|
150
|
+
const missingPropsStr_1 = join(", ", map$1((p_1) => replace(p_1, "http://schema.org/", ""), missingWfInvocationProps));
|
|
151
|
+
toFail(printf("WorkflowInvocation is missing required properties: %s"))(missingPropsStr_1);
|
|
152
|
+
}
|
|
153
|
+
return ARCtrl_ROCrate_LDGraph__LDGraph_toROCrateJsonString_Static_71136F3F(2)(ROCrate_packDatasetAsCrate_Z2DB026F7(runDataset, value(arcRun.Title), value(arcRun.Description), ROCrate_get_metadataFileDescriptorWfRun(), license));
|
|
154
|
+
}
|
|
155
|
+
function ROCrate_writeWorkflowAsCrate_Z4A0538D9(arcWorkflow, fileSystem, license) {
|
|
156
|
+
const workflowDataset = ARCtrl_ArcWorkflow__ArcWorkflow_ToROCrateWorkflow_1695DD5C(arcWorkflow, fileSystem);
|
|
157
|
+
const missingDatasetProps = filter((prop) => !DynamicObj_DynamicObj__DynamicObj_HasProperty_Z721C83C5(workflowDataset, prop), ofArray([LDDataset.identifier, LDDataset.name, LDDataset.description, LDDataset.mainEntity, LDDataset.hasPart, LDDataset.creator]));
|
|
158
|
+
if (!isEmpty(missingDatasetProps)) {
|
|
159
|
+
const missingPropsStr = join(", ", map$1((p) => replace(p, "http://schema.org/", ""), missingDatasetProps));
|
|
160
|
+
toFail(printf("Workflow dataset is missing required properties: %s"))(missingPropsStr);
|
|
161
|
+
}
|
|
162
|
+
let workflowProtocol;
|
|
163
|
+
const matchValue = LDDataset.tryGetMainEntityAsWorkflowProtocol(workflowDataset);
|
|
164
|
+
if (matchValue == null) {
|
|
165
|
+
throw new Error("Workflow dataset 'mainEntity' property must contain a workflow protocol");
|
|
166
|
+
} else {
|
|
167
|
+
workflowProtocol = value(matchValue);
|
|
168
|
+
}
|
|
169
|
+
const missingProtocolProps = filter((prop_1) => !DynamicObj_DynamicObj__DynamicObj_HasProperty_Z721C83C5(workflowProtocol, prop_1), ofArray([LDComputationalWorkflow.creator, LDComputationalWorkflow.name, LDComputationalWorkflow.input, LDComputationalWorkflow.output, LDComputationalWorkflow.programmingLanguage, LDComputationalWorkflow.url, LDComputationalWorkflow.version, LDComputationalWorkflow.dateCreated]));
|
|
170
|
+
if (!isEmpty(missingProtocolProps)) {
|
|
171
|
+
const missingPropsStr_1 = join(", ", map$1((p_1) => replace(p_1, "http://schema.org/", ""), missingProtocolProps));
|
|
172
|
+
toFail(printf("Workflow protocol is missing required properties: %s"))(missingPropsStr_1);
|
|
173
|
+
}
|
|
174
|
+
return ARCtrl_ROCrate_LDGraph__LDGraph_toROCrateJsonString_Static_71136F3F(2)(ROCrate_packDatasetAsCrate_Z2DB026F7(workflowDataset, value(arcWorkflow.Title), value(arcWorkflow.Description), ROCrate_get_metadataFileDescriptorWfRun(), license));
|
|
175
|
+
}
|
|
107
176
|
function ROCrate_get_decoderDeprecated() {
|
|
108
177
|
return map((ldnode) => ARCtrl_ArcInvestigation__ArcInvestigation_fromROCrateInvestigation_Static_Z6839B9E8(exactlyOne(LDDataset.getAbouts(ldnode)), void 0, initV1_1()), decoder$1);
|
|
109
178
|
}
|
|
110
179
|
|
|
111
|
-
export { ROCrate, ROCrate_$reflection, ROCrate_createLicenseNode_29619109,
|
|
180
|
+
export { ROCrate, ROCrate_$reflection, ROCrate_createLicenseNode_29619109, ROCrate_encoder_Z7FE34C43, ROCrate_getLicense_Z2F770004, ROCrate_get_decoder, ROCrate_get_decoderDeprecated, ROCrate_get_metadataFileDescriptor, ROCrate_get_metadataFileDescriptorWfRun, ROCrate_packDatasetAsCrate_Z2DB026F7, ROCrate_writeRunAsCrate_5E53831D, ROCrate_writeWorkflowAsCrate_Z4A0538D9 };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { YAMLElement_$union } from '../fable_modules/YAMLicious.0.0.
|
|
1
|
+
import { YAMLElement_$union } from '../fable_modules/YAMLicious.1.0.0-alpha.2/YAMLiciousTypes.fs.js';
|
|
2
2
|
import { Option } from '@fable-org/fable-library-js/Option.js';
|
|
3
3
|
import { ValidationPackage } from '../ValidationPackages/ValidationPackage.js';
|
|
4
4
|
import { int32 } from '@fable-org/fable-library-js/Int32.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ValidationPackage.d.ts","sourceRoot":"","sources":["../../../../src/ARCtrl/ts/Yaml/ValidationPackage.ts"],"names":[],"mappings":"AACA,OAAO,EAAoE,kBAAkB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"ValidationPackage.d.ts","sourceRoot":"","sources":["../../../../src/ARCtrl/ts/Yaml/ValidationPackage.ts"],"names":[],"mappings":"AACA,OAAO,EAAoE,kBAAkB,EAAE,MAAM,iEAAiE,CAAC;AAEvK,OAAO,EAAU,MAAM,EAAE,MAAM,uCAAuC,CAAC;AAIvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,4CAA4C,CAAC;AAI/E,OAAO,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAC;AAG7D,wBAAgB,yBAAyB,CAAC,iBAAiB,EAAE,iBAAiB,GAAG,kBAAkB,CAWlG;AAED,eAAO,MAAM,yBAAyB,GAAI,SAAS,kBAAkB,KAAG,iBAG7D,CAAC;AAEZ,wBAAgB,8FAA8F,CAAC,CAAC,EAAE,MAAM,GAAG,iBAAiB,CAE3I;AAED,wBAAgB,2FAA2F,CAAC,UAAU,CAAC,EAAE,KAAK,GAAG,CAAC,CAAC,IAAI,EAAE,iBAAiB,KAAK,MAAM,CAAC,CAMrK;AAED,wBAAgB,oFAAoF,CAAC,KAAK,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,CAAC,KAAK,CAAC,GAAG,MAAM,CAEhK"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { choose, ofArray } from '../../node_modules/@fable-org/fable-library-js/List.js';
|
|
2
|
-
import { YAMLElement_Nil, YAMLElement_Object, YAMLElement_Mapping, YAMLContent_create_27AED5E3, Config } from '../fable_modules/YAMLicious.0.0.
|
|
2
|
+
import { YAMLElement_Nil, YAMLElement_Object, YAMLElement_Mapping, YAMLContent_create_27AED5E3, Config } from '../fable_modules/YAMLicious.1.0.0-alpha.2/YAMLiciousTypes.fs.js';
|
|
3
3
|
import { equals } from '../../node_modules/@fable-org/fable-library-js/Util.js';
|
|
4
4
|
import { unwrap } from '../../node_modules/@fable-org/fable-library-js/Option.js';
|
|
5
|
-
import { string, tryInclude } from '../fable_modules/YAMLicious.0.0.
|
|
5
|
+
import { string, tryInclude } from '../fable_modules/YAMLicious.1.0.0-alpha.2/Encode.fs.js';
|
|
6
6
|
import { toList, delay, collect, singleton } from '../../node_modules/@fable-org/fable-library-js/Seq.js';
|
|
7
7
|
import { ValidationPackage } from '../ValidationPackages/ValidationPackage.js';
|
|
8
|
-
import { object, string as string$1 } from '../fable_modules/YAMLicious.0.0.
|
|
9
|
-
import { read } from '../fable_modules/YAMLicious.0.0.
|
|
8
|
+
import { object, string as string$1 } from '../fable_modules/YAMLicious.1.0.0-alpha.2/Decode.fs.js';
|
|
9
|
+
import { read } from '../fable_modules/YAMLicious.1.0.0-alpha.2/Reader.fs.js';
|
|
10
10
|
import { defaultWhitespace } from './Encode.js';
|
|
11
|
-
import { write } from '../fable_modules/YAMLicious.0.0.
|
|
11
|
+
import { write } from '../fable_modules/YAMLicious.1.0.0-alpha.2/Writer.fs.js';
|
|
12
12
|
|
|
13
13
|
function ValidationPackage_encoder(validationpackage) {
|
|
14
14
|
const objSeq = choose((tupledArg) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { YAMLElement_$union } from '../fable_modules/YAMLicious.0.0.
|
|
1
|
+
import { YAMLElement_$union } from '../fable_modules/YAMLicious.1.0.0-alpha.2/YAMLiciousTypes.fs.js';
|
|
2
2
|
import { Option } from '@fable-org/fable-library-js/Option.js';
|
|
3
3
|
import { ValidationPackagesConfig } from '../ValidationPackages/ValidationPackagesConfig.js';
|
|
4
4
|
import { int32 } from '@fable-org/fable-library-js/Int32.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ValidationPackagesConfig.d.ts","sourceRoot":"","sources":["../../../../src/ARCtrl/ts/Yaml/ValidationPackagesConfig.ts"],"names":[],"mappings":"AACA,OAAO,EAAoE,kBAAkB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"ValidationPackagesConfig.d.ts","sourceRoot":"","sources":["../../../../src/ARCtrl/ts/Yaml/ValidationPackagesConfig.ts"],"names":[],"mappings":"AACA,OAAO,EAAoE,kBAAkB,EAAE,MAAM,iEAAiE,CAAC;AAEvK,OAAO,EAAU,MAAM,EAAE,MAAM,uCAAuC,CAAC;AAMvE,OAAO,EAAE,wBAAwB,EAAE,MAAM,mDAAmD,CAAC;AAI7F,OAAO,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAC;AAG7D,wBAAgB,gCAAgC,CAAC,iBAAiB,EAAE,wBAAwB,GAAG,kBAAkB,CAWhH;AAED,eAAO,MAAM,gCAAgC,GAAI,SAAS,kBAAkB,KAAG,wBAGpE,CAAC;AAEZ,wBAAgB,4GAA4G,CAAC,CAAC,EAAE,MAAM,GAAG,wBAAwB,CAEhK;AAED,wBAAgB,yGAAyG,CAAC,UAAU,CAAC,EAAE,KAAK,GAAG,CAAC,CAAC,IAAI,EAAE,wBAAwB,KAAK,MAAM,CAAC,CAM1L;AAED,wBAAgB,kGAAkG,CAAC,KAAK,EAAE,wBAAwB,EAAE,UAAU,EAAE,MAAM,CAAC,KAAK,CAAC,GAAG,MAAM,CAErL"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { choose, ofArray } from '../../node_modules/@fable-org/fable-library-js/List.js';
|
|
2
|
-
import { YAMLElement_Nil, YAMLElement_Object, YAMLElement_Mapping, YAMLContent_create_27AED5E3, Config } from '../fable_modules/YAMLicious.0.0.
|
|
2
|
+
import { YAMLElement_Nil, YAMLElement_Object, YAMLElement_Mapping, YAMLContent_create_27AED5E3, Config } from '../fable_modules/YAMLicious.1.0.0-alpha.2/YAMLiciousTypes.fs.js';
|
|
3
3
|
import { equals } from '../../node_modules/@fable-org/fable-library-js/Util.js';
|
|
4
4
|
import { unwrap } from '../../node_modules/@fable-org/fable-library-js/Option.js';
|
|
5
|
-
import { tryInclude, resizearray, string } from '../fable_modules/YAMLicious.0.0.
|
|
5
|
+
import { tryInclude, resizearray, string } from '../fable_modules/YAMLicious.1.0.0-alpha.2/Encode.fs.js';
|
|
6
6
|
import { ValidationPackage_encoder, ValidationPackage_decoder } from './ValidationPackage.js';
|
|
7
7
|
import { toList, delay, collect, singleton } from '../../node_modules/@fable-org/fable-library-js/Seq.js';
|
|
8
8
|
import { ValidationPackagesConfig } from '../ValidationPackages/ValidationPackagesConfig.js';
|
|
9
|
-
import { object, resizearray as resizearray$1, string as string$1 } from '../fable_modules/YAMLicious.0.0.
|
|
10
|
-
import { read } from '../fable_modules/YAMLicious.0.0.
|
|
9
|
+
import { object, resizearray as resizearray$1, string as string$1 } from '../fable_modules/YAMLicious.1.0.0-alpha.2/Decode.fs.js';
|
|
10
|
+
import { read } from '../fable_modules/YAMLicious.1.0.0-alpha.2/Reader.fs.js';
|
|
11
11
|
import { defaultWhitespace } from './Encode.js';
|
|
12
|
-
import { write } from '../fable_modules/YAMLicious.0.0.
|
|
12
|
+
import { write } from '../fable_modules/YAMLicious.1.0.0-alpha.2/Writer.fs.js';
|
|
13
13
|
|
|
14
14
|
function ValidationPackagesConfig_encoder(validationpackage) {
|
|
15
15
|
const objSeq = choose((tupledArg) => {
|
|
@@ -11,7 +11,7 @@ function int(value) {
|
|
|
11
11
|
return YAMLElement_Value(YAMLContent_create_27AED5E3(int32ToString(value)));
|
|
12
12
|
}
|
|
13
13
|
function float(value) {
|
|
14
|
-
return YAMLElement_Value(YAMLContent_create_27AED5E3(
|
|
14
|
+
return YAMLElement_Value(YAMLContent_create_27AED5E3(value.toString()));
|
|
15
15
|
}
|
|
16
16
|
function char(value) {
|
|
17
17
|
return YAMLElement_Value(YAMLContent_create_27AED5E3(value));
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { match } from '../../../node_modules/@fable-org/fable-library-js/RegExp.js';
|
|
1
|
+
import { match, replace } from '../../../node_modules/@fable-org/fable-library-js/RegExp.js';
|
|
2
2
|
import { getItemFromDict } from '../../../node_modules/@fable-org/fable-library-js/MapUtil.js';
|
|
3
3
|
import { parse } from '../../../node_modules/@fable-org/fable-library-js/Int32.js';
|
|
4
4
|
import { map, value, unwrap } from '../../../node_modules/@fable-org/fable-library-js/Option.js';
|
|
5
|
-
import { toList, delay, append, singleton, takeWhile, skipWhile, map as map$1, collect, empty as empty$1 } from '../../../node_modules/@fable-org/fable-library-js/Seq.js';
|
|
5
|
+
import { toList, delay, append, singleton, takeWhile, skipWhile, map as map$1, collect as collect$1, empty as empty$1 } from '../../../node_modules/@fable-org/fable-library-js/Seq.js';
|
|
6
6
|
import { PreprocessorElement_Line, YAMLElement_Object, YAMLElement_Mapping, YAMLContent_create_27AED5E3, YAMLElement_Comment, YAMLElement_Value, YAMLElement_Sequence } from './YAMLiciousTypes.fs.js';
|
|
7
|
-
import { isEmpty, head, tail, empty, singleton as singleton$1, cons, reverse, ofArrayWithTail, append as append$1 } from '../../../node_modules/@fable-org/fable-library-js/List.js';
|
|
7
|
+
import { isEmpty, head, tail, empty, singleton as singleton$1, cons, collect, reverse, ofArrayWithTail, append as append$1 } from '../../../node_modules/@fable-org/fable-library-js/List.js';
|
|
8
8
|
import { $007CSequenceMinusOpener$007C_$007C, $007CYamlComment$007C_$007C, $007CSchemaNamespace$007C_$007C, $007CInlineSequence$007C_$007C, $007CSequenceSquareOpener$007C_$007C, $007CSequenceSquareCloser$007C_$007C, $007CInlineJSON$007C_$007C, $007CJSONKeyOpener$007C_$007C, $007CJSONCloser$007C_$007C, $007CKey$007C_$007C, $007CKeyValue$007C_$007C, $007CYamlValue$007C_$007C } from './RegexActivePatterns.fs.js';
|
|
9
|
-
import { toFail, printf, trimEnd, split } from '../../../node_modules/@fable-org/fable-library-js/String.js';
|
|
9
|
+
import { toFail, printf, join, trimEnd, split } from '../../../node_modules/@fable-org/fable-library-js/String.js';
|
|
10
10
|
import { read as read$1 } from './Preprocessing.fs.js';
|
|
11
11
|
|
|
12
12
|
function restoreStringReplace(stringDict, v) {
|
|
@@ -83,8 +83,20 @@ function isSequenceElement(e) {
|
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
function tokenize(yamlList, stringDict, commentDict) {
|
|
86
|
+
const flattenBlockScalar = (eles) => collect((_arg) => {
|
|
87
|
+
switch (_arg.tag) {
|
|
88
|
+
case /* Line */
|
|
89
|
+
2:
|
|
90
|
+
return singleton$1(replace(replace(_arg.fields[0], "<s f=(?<index>\\d+)\\/>", (m) => getItemFromDict(stringDict, parse(m.groups && m.groups.index || "", 511, false, 32))), "<c f=(?<comment>\\d+)\\/>", (m_1) => "#" + getItemFromDict(commentDict, parse(m_1.groups && m_1.groups.comment || "", 511, false, 32))));
|
|
91
|
+
case /* Intendation */
|
|
92
|
+
1:
|
|
93
|
+
return flattenBlockScalar(_arg.fields[0]);
|
|
94
|
+
default:
|
|
95
|
+
return empty();
|
|
96
|
+
}
|
|
97
|
+
}, eles);
|
|
86
98
|
const loopRead = (restlist_mut, acc_mut) => {
|
|
87
|
-
let c2_2, c1_2, c1_1, c2_1;
|
|
99
|
+
let c2_2, c1_2, c1_1, c2_1, v_9, block;
|
|
88
100
|
loopRead:
|
|
89
101
|
while (true) {
|
|
90
102
|
const restlist = restlist_mut, acc = acc_mut;
|
|
@@ -221,7 +233,7 @@ function tokenize(yamlList, stringDict, commentDict) {
|
|
|
221
233
|
case 1: {
|
|
222
234
|
const c = restoreCommentReplace(commentDict, v_4.Comment);
|
|
223
235
|
const split$1 = split(v_4.Value, [","], void 0, 1);
|
|
224
|
-
const current_4 = YAMLElement_Sequence(toList(delay(() => map$1((
|
|
236
|
+
const current_4 = YAMLElement_Sequence(toList(delay(() => map$1((value_2) => loopRead(singleton$1(PreprocessorElement_Line(value_2.trim())), empty()), split$1))));
|
|
225
237
|
restlist_mut = rest_4;
|
|
226
238
|
acc_mut = c != null ? ofArrayWithTail([current_4, YAMLElement_Comment(value(c))], acc) : cons(current_4, acc);
|
|
227
239
|
continue loopRead;
|
|
@@ -229,7 +241,7 @@ function tokenize(yamlList, stringDict, commentDict) {
|
|
|
229
241
|
case 2: {
|
|
230
242
|
const c1 = restoreCommentReplace(commentDict, opener.Comment);
|
|
231
243
|
const c2 = restoreCommentReplace(commentDict, closer.Comment);
|
|
232
|
-
const current_5 = YAMLElement_Sequence(toList(delay(() => collect((i_4) => singleton(loopRead(singleton$1(i_4.tag === /* Line */
|
|
244
|
+
const current_5 = YAMLElement_Sequence(toList(delay(() => collect$1((i_4) => singleton(loopRead(singleton$1(i_4.tag === /* Line */
|
|
233
245
|
2 ? PreprocessorElement_Line(trimEnd(i_4.fields[0], ",")) : toFail(printf("Unexpected element in MultiLineSquareBrackets: %A"))(i_4)), empty())), iList))));
|
|
234
246
|
restlist_mut = rest_5;
|
|
235
247
|
acc_mut = c1 == null ? c2 == null ? cons(current_5, acc) : (c2_2 = value(c2), ofArrayWithTail([YAMLElement_Comment(c2_2), current_5], acc)) : c2 == null ? (c1_2 = value(c1), ofArrayWithTail([current_5, YAMLElement_Comment(c1_2)], acc)) : (c1_1 = value(c1), c2_1 = value(c2), ofArrayWithTail([YAMLElement_Comment(c2_1), current_5, YAMLElement_Comment(c1_1)], acc));
|
|
@@ -280,8 +292,8 @@ function tokenize(yamlList, stringDict, commentDict) {
|
|
|
280
292
|
case 0: {
|
|
281
293
|
const c_1 = restoreCommentReplace(commentDict, v_5.Comment);
|
|
282
294
|
const split_1 = split(v_5.Value, [","], void 0, 1);
|
|
283
|
-
const current_6 = reverse(toList(delay(() => collect((
|
|
284
|
-
const matchValue_1 = loopRead(singleton$1(PreprocessorElement_Line(
|
|
295
|
+
const current_6 = reverse(toList(delay(() => collect$1((value_3) => {
|
|
296
|
+
const matchValue_1 = loopRead(singleton$1(PreprocessorElement_Line(value_3.trim())), empty());
|
|
285
297
|
if (matchValue_1.tag === /* Object */
|
|
286
298
|
3) {
|
|
287
299
|
return matchValue_1.fields[0];
|
|
@@ -297,7 +309,7 @@ function tokenize(yamlList, stringDict, commentDict) {
|
|
|
297
309
|
case 1: {
|
|
298
310
|
const c1_3 = restoreCommentReplace(commentDict, opener_1.Comment);
|
|
299
311
|
const c2_3 = restoreCommentReplace(commentDict, closer_1.Comment);
|
|
300
|
-
const current_7 = YAMLElement_Mapping(YAMLContent_create_27AED5E3(opener_1.Key, unwrap(c1_3)), YAMLElement_Object(toList(delay(() => collect((i_5) => {
|
|
312
|
+
const current_7 = YAMLElement_Mapping(YAMLContent_create_27AED5E3(opener_1.Key, unwrap(c1_3)), YAMLElement_Object(toList(delay(() => collect$1((i_5) => {
|
|
301
313
|
const matchValue_2 = loopRead(singleton$1(i_5.tag === /* Line */
|
|
302
314
|
2 ? PreprocessorElement_Line(trimEnd(i_5.fields[0], ",")) : toFail(printf("Unexpected element in MultiLineSquareBrackets: %A"))(i_5)), empty());
|
|
303
315
|
if (matchValue_2.tag === /* Object */
|
|
@@ -421,36 +433,73 @@ function tokenize(yamlList, stringDict, commentDict) {
|
|
|
421
433
|
acc_mut = cons(YAMLElement_Mapping(YAMLContent_create_27AED5E3(v_8.Key, unwrap(c_4)), YAMLElement_Object(singleton$1(seq_1))), acc);
|
|
422
434
|
continue loopRead;
|
|
423
435
|
}
|
|
424
|
-
default:
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
} else {
|
|
436
|
+
default: {
|
|
437
|
+
let matchResult_7, block_1, rest_12, v_10;
|
|
438
|
+
if (!isEmpty(restlist)) {
|
|
428
439
|
const activePatternResult_15 = $007CKeyValue$007C_$007C(head(restlist));
|
|
429
440
|
if (activePatternResult_15 != null) {
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
441
|
+
if (!isEmpty(tail(restlist))) {
|
|
442
|
+
if (head(tail(restlist)).tag === /* Intendation */
|
|
443
|
+
1) {
|
|
444
|
+
if (v_9 = value(activePatternResult_15), block = head(tail(restlist)).fields[0], v_9.Value === "|" ? true : v_9.Value === ">") {
|
|
445
|
+
matchResult_7 = 0;
|
|
446
|
+
block_1 = head(tail(restlist)).fields[0];
|
|
447
|
+
rest_12 = tail(tail(restlist));
|
|
448
|
+
v_10 = value(activePatternResult_15);
|
|
449
|
+
} else {
|
|
450
|
+
matchResult_7 = 1;
|
|
451
|
+
}
|
|
452
|
+
} else {
|
|
453
|
+
matchResult_7 = 1;
|
|
454
|
+
}
|
|
455
|
+
} else {
|
|
456
|
+
matchResult_7 = 1;
|
|
457
|
+
}
|
|
434
458
|
} else {
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
459
|
+
matchResult_7 = 1;
|
|
460
|
+
}
|
|
461
|
+
} else {
|
|
462
|
+
matchResult_7 = 1;
|
|
463
|
+
}
|
|
464
|
+
switch (matchResult_7) {
|
|
465
|
+
case 0: {
|
|
466
|
+
const blockValue = join("\n", flattenBlockScalar(block_1));
|
|
467
|
+
restlist_mut = rest_12;
|
|
468
|
+
acc_mut = cons(YAMLElement_Mapping(YAMLContent_create_27AED5E3(v_10.Key), YAMLElement_Value(YAMLContent_create_27AED5E3(blockValue))), acc);
|
|
469
|
+
continue loopRead;
|
|
470
|
+
}
|
|
471
|
+
default:
|
|
472
|
+
if (isEmpty(restlist)) {
|
|
473
|
+
return YAMLElement_Object(reverse(acc));
|
|
441
474
|
} else {
|
|
442
|
-
const
|
|
443
|
-
if (
|
|
444
|
-
const v_11 = value(
|
|
475
|
+
const activePatternResult_16 = $007CKeyValue$007C_$007C(head(restlist));
|
|
476
|
+
if (activePatternResult_16 != null) {
|
|
477
|
+
const v_11 = value(activePatternResult_16);
|
|
445
478
|
restlist_mut = tail(restlist);
|
|
446
|
-
acc_mut = cons(
|
|
479
|
+
acc_mut = cons(YAMLElement_Mapping(YAMLContent_create_27AED5E3(v_11.Key), loopRead(singleton$1(PreprocessorElement_Line(v_11.Value)), empty())), acc);
|
|
447
480
|
continue loopRead;
|
|
448
481
|
} else {
|
|
449
|
-
|
|
482
|
+
const activePatternResult_17 = $007CYamlComment$007C_$007C(head(restlist));
|
|
483
|
+
if (activePatternResult_17 != null) {
|
|
484
|
+
const v_12 = value(activePatternResult_17);
|
|
485
|
+
restlist_mut = tail(restlist);
|
|
486
|
+
acc_mut = cons(YAMLElement_Comment(getItemFromDict(commentDict, v_12.Comment)), acc);
|
|
487
|
+
continue loopRead;
|
|
488
|
+
} else {
|
|
489
|
+
const activePatternResult_18 = $007CYamlValue$007C_$007C(head(restlist));
|
|
490
|
+
if (activePatternResult_18 != null) {
|
|
491
|
+
const v_13 = value(activePatternResult_18);
|
|
492
|
+
restlist_mut = tail(restlist);
|
|
493
|
+
acc_mut = cons(YAMLElement_Value(YAMLContent_create_27AED5E3(restoreStringReplace(stringDict, v_13.Value), unwrap(restoreCommentReplace(commentDict, v_13.Comment)))), acc);
|
|
494
|
+
continue loopRead;
|
|
495
|
+
} else {
|
|
496
|
+
return toFail(printf("Unknown pattern: %A"))(restlist);
|
|
497
|
+
}
|
|
498
|
+
}
|
|
450
499
|
}
|
|
451
500
|
}
|
|
452
|
-
}
|
|
453
501
|
}
|
|
502
|
+
}
|
|
454
503
|
}
|
|
455
504
|
}
|
|
456
505
|
}
|
package/package.json
CHANGED
/package/dist/ts/ts/fable_modules/{YAMLicious.0.0.3 → YAMLicious.1.0.0-alpha.2}/Decode.fs.js
RENAMED
|
File without changes
|
|
File without changes
|
/package/dist/ts/ts/fable_modules/{YAMLicious.0.0.3 → YAMLicious.1.0.0-alpha.2}/Persil.fs.js
RENAMED
|
File without changes
|
/package/dist/ts/ts/fable_modules/{YAMLicious.0.0.3 → YAMLicious.1.0.0-alpha.2}/Preprocessing.fs.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/ts/ts/fable_modules/{YAMLicious.0.0.3 → YAMLicious.1.0.0-alpha.2}/Writer.fs.js
RENAMED
|
File without changes
|
|
File without changes
|