@nfdi4plants/arctrl 3.0.3 → 3.1.0
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/node_modules/@fable-org/fable-library-js/System.Collections.Generic.js +320 -0
- package/dist/ts/ts/ARC.d.ts +3 -3
- package/dist/ts/ts/ARC.d.ts.map +1 -1
- package/dist/ts/ts/ARC.js +72 -93
- package/dist/ts/ts/CWL/Decode.d.ts +13 -10
- package/dist/ts/ts/CWL/Decode.d.ts.map +1 -1
- package/dist/ts/ts/CWL/Decode.js +91 -46
- package/dist/ts/ts/CWL/Encode.d.ts +1 -1
- package/dist/ts/ts/CWL/Encode.d.ts.map +1 -1
- package/dist/ts/ts/CWL/Encode.js +69 -51
- package/dist/ts/ts/CWL/ExpressionToolDescription.d.ts +6 -3
- package/dist/ts/ts/CWL/ExpressionToolDescription.d.ts.map +1 -1
- package/dist/ts/ts/CWL/ExpressionToolDescription.js +13 -4
- package/dist/ts/ts/CWL/OperationDescription.d.ts +6 -3
- package/dist/ts/ts/CWL/OperationDescription.d.ts.map +1 -1
- package/dist/ts/ts/CWL/OperationDescription.js +13 -4
- package/dist/ts/ts/CWL/Requirements.d.ts +6 -5
- package/dist/ts/ts/CWL/Requirements.d.ts.map +1 -1
- package/dist/ts/ts/CWL/Requirements.js +9 -8
- package/dist/ts/ts/CWL/ToolDescription.d.ts +6 -3
- package/dist/ts/ts/CWL/ToolDescription.d.ts.map +1 -1
- package/dist/ts/ts/CWL/ToolDescription.js +13 -4
- package/dist/ts/ts/CWL/WorkflowDescription.d.ts +6 -3
- package/dist/ts/ts/CWL/WorkflowDescription.d.ts.map +1 -1
- package/dist/ts/ts/CWL/WorkflowDescription.js +13 -4
- package/dist/ts/ts/CWL/WorkflowSteps.d.ts +1 -1
- package/dist/ts/ts/CWL/WorkflowSteps.js +1 -1
- package/dist/ts/ts/Contract/Git.d.ts.map +1 -1
- package/dist/ts/ts/Contract/Git.js +1 -1
- package/dist/ts/ts/ContractIO/ContractIO.d.ts +3 -3
- package/dist/ts/ts/ContractIO/ContractIO.d.ts.map +1 -1
- package/dist/ts/ts/ContractIO/ContractIO.js +27 -23
- package/dist/ts/ts/Conversion/Workflow.js +3 -3
- package/dist/ts/ts/Core/Datamap.d.ts.map +1 -1
- package/dist/ts/ts/Core/Datamap.js +4 -2
- package/dist/ts/ts/Core/OntologyAnnotation.d.ts.map +1 -1
- package/dist/ts/ts/Core/OntologyAnnotation.js +76 -2
- package/dist/ts/ts/Core/Table/ArcTableAux.d.ts +3 -0
- package/dist/ts/ts/Core/Table/ArcTableAux.d.ts.map +1 -1
- package/dist/ts/ts/Core/Table/ArcTableAux.js +23 -10
- package/dist/ts/ts/Core/Table/ArcTables.d.ts +1 -0
- package/dist/ts/ts/Core/Table/ArcTables.d.ts.map +1 -1
- package/dist/ts/ts/Core/Table/ArcTables.js +7 -3
- package/dist/ts/ts/Yaml/ValidationPackage.d.ts +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.js +5 -5
- package/dist/ts/ts/Yaml.js +1 -1
- package/dist/ts/ts/fable_modules/{YAMLicious.1.0.0-alpha.5 → YAMLicious.1.0.0-alpha.7}/Decode.fs.js +124 -24
- package/dist/ts/ts/fable_modules/{YAMLicious.1.0.0-alpha.5 → YAMLicious.1.0.0-alpha.7}/Preprocessing.fs.js +66 -24
- package/dist/ts/ts/fable_modules/{YAMLicious.1.0.0-alpha.5 → YAMLicious.1.0.0-alpha.7}/Reader.fs.js +474 -295
- package/dist/ts/ts/fable_modules/YAMLicious.1.0.0-alpha.7/Writer.fs.js +659 -0
- package/package.json +1 -1
- package/dist/ts/ts/fable_modules/YAMLicious.1.0.0-alpha.5/Writer.fs.js +0 -391
- /package/dist/ts/ts/fable_modules/{YAMLicious.1.0.0-alpha.5 → YAMLicious.1.0.0-alpha.7}/Encode.fs.js +0 -0
- /package/dist/ts/ts/fable_modules/{YAMLicious.1.0.0-alpha.5 → YAMLicious.1.0.0-alpha.7}/Escapes.fs.js +0 -0
- /package/dist/ts/ts/fable_modules/{YAMLicious.1.0.0-alpha.5 → YAMLicious.1.0.0-alpha.7}/FlowToBlock.fs.js +0 -0
- /package/dist/ts/ts/fable_modules/{YAMLicious.1.0.0-alpha.5 → YAMLicious.1.0.0-alpha.7}/Interop/JsInterop.fs.js +0 -0
- /package/dist/ts/ts/fable_modules/{YAMLicious.1.0.0-alpha.5 → YAMLicious.1.0.0-alpha.7}/Persil.fs.js +0 -0
- /package/dist/ts/ts/fable_modules/{YAMLicious.1.0.0-alpha.5 → YAMLicious.1.0.0-alpha.7}/Regex.fs.js +0 -0
- /package/dist/ts/ts/fable_modules/{YAMLicious.1.0.0-alpha.5 → YAMLicious.1.0.0-alpha.7}/RegexActivePatterns.fs.js +0 -0
- /package/dist/ts/ts/fable_modules/{YAMLicious.1.0.0-alpha.5 → YAMLicious.1.0.0-alpha.7}/StringBuffer.fs.js +0 -0
- /package/dist/ts/ts/fable_modules/{YAMLicious.1.0.0-alpha.5 → YAMLicious.1.0.0-alpha.7}/YAMLiciousTypes.fs.js +0 -0
|
@@ -0,0 +1,659 @@
|
|
|
1
|
+
import { value, defaultArg, map } from '../../../node_modules/@fable-org/fable-library-js/Option.js';
|
|
2
|
+
import { PreprocessorElement_Line, PreprocessorElement_Level, YAMLContent, ScalarStyle_Plain, PreprocessorElement_Intendation, PreprocessorElement_Nil, WriterOptions_get_Default } from './YAMLiciousTypes.fs.js';
|
|
3
|
+
import { forAll, toList, delay, collect, singleton, map as map$2 } from '../../../node_modules/@fable-org/fable-library-js/Seq.js';
|
|
4
|
+
import { map as map$1, ofArray, isEmpty, empty, head, tail, cons, reverse, singleton as singleton$1 } from '../../../node_modules/@fable-org/fable-library-js/List.js';
|
|
5
|
+
import { replace, join, trimEnd, substring, split } from '../../../node_modules/@fable-org/fable-library-js/String.js';
|
|
6
|
+
import { int32ToString } from '../../../node_modules/@fable-org/fable-library-js/Util.js';
|
|
7
|
+
import { write as write$1 } from './Preprocessing.fs.js';
|
|
8
|
+
|
|
9
|
+
function StyleVerifier_isInlineSimpleScalar(v) {
|
|
10
|
+
if (!(v.Value.indexOf("\n") >= 0) && v.Comment == null) {
|
|
11
|
+
const matchValue = v.Style;
|
|
12
|
+
let matchResult;
|
|
13
|
+
if (matchValue != null) {
|
|
14
|
+
switch (value(matchValue).tag) {
|
|
15
|
+
case /* Block */
|
|
16
|
+
3: {
|
|
17
|
+
matchResult = 1;
|
|
18
|
+
break;
|
|
19
|
+
}
|
|
20
|
+
default:
|
|
21
|
+
matchResult = 0;
|
|
22
|
+
}
|
|
23
|
+
} else {
|
|
24
|
+
matchResult = 0;
|
|
25
|
+
}
|
|
26
|
+
switch (matchResult) {
|
|
27
|
+
case 0:
|
|
28
|
+
return true;
|
|
29
|
+
default:
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
} else {
|
|
33
|
+
return false;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
function StyleVerifier_checkInlineSequence(ele) {
|
|
37
|
+
return forAll((x) => {
|
|
38
|
+
if (x.tag === /* Value */
|
|
39
|
+
1) {
|
|
40
|
+
return StyleVerifier_isInlineSimpleScalar(x.fields[0]);
|
|
41
|
+
} else {
|
|
42
|
+
return false;
|
|
43
|
+
}
|
|
44
|
+
}, ele);
|
|
45
|
+
}
|
|
46
|
+
function Formatting_mkComment(comment) {
|
|
47
|
+
return "#" + comment;
|
|
48
|
+
}
|
|
49
|
+
function Formatting_mkKey(key) {
|
|
50
|
+
return key + ":";
|
|
51
|
+
}
|
|
52
|
+
function Formatting_mkMinusLine(c) {
|
|
53
|
+
return "- " + c;
|
|
54
|
+
}
|
|
55
|
+
const Formatting_continuationPrefix = " ";
|
|
56
|
+
function Formatting_mkTag(tag) {
|
|
57
|
+
let s;
|
|
58
|
+
if (tag != null) {
|
|
59
|
+
if (value(tag) === "!") {
|
|
60
|
+
return "! ";
|
|
61
|
+
} else if (s = value(tag), s.startsWith("!") && !s.startsWith("!!")) {
|
|
62
|
+
const s_1 = value(tag);
|
|
63
|
+
return s_1 + " ";
|
|
64
|
+
} else {
|
|
65
|
+
const s_2 = value(tag);
|
|
66
|
+
return "!<" + s_2 + "> ";
|
|
67
|
+
}
|
|
68
|
+
} else {
|
|
69
|
+
return "";
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
function Formatting_mkAnchor(anchor) {
|
|
73
|
+
return defaultArg(map((s) => "&" + s + " ", anchor), "");
|
|
74
|
+
}
|
|
75
|
+
function Formatting_mkNodePrefix(content) {
|
|
76
|
+
return Formatting_mkTag(content.Tag) + Formatting_mkAnchor(content.Anchor);
|
|
77
|
+
}
|
|
78
|
+
function Formatting_appendOptionalComment(comment, s) {
|
|
79
|
+
return s + defaultArg(map((c) => " " + Formatting_mkComment(c), comment), "");
|
|
80
|
+
}
|
|
81
|
+
function Formatting_appendComment(content, s) {
|
|
82
|
+
return Formatting_appendOptionalComment(content.Comment, s);
|
|
83
|
+
}
|
|
84
|
+
function Formatting_escapeSingleQuoted(s) {
|
|
85
|
+
return replace(s, "'", "''");
|
|
86
|
+
}
|
|
87
|
+
function Formatting_escapeDoubleQuoted(s) {
|
|
88
|
+
return replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(s, "\\", "\\\\"), '"', '\\"'), "\0", "\\0"), "\x07", "\\a"), "\b", "\\b"), " ", "\\t"), "\v", "\\v"), "\f", "\\f"), "\r", "\\r"), "\x1B", "\\e"), "
", "\\N"), " ", "\\_"), "\u2028", "\\L"), "\u2029", "\\P"), "\n", "\\n");
|
|
89
|
+
}
|
|
90
|
+
function Formatting_normalizeNewlines(s) {
|
|
91
|
+
return replace(s, "\r\n", "\n");
|
|
92
|
+
}
|
|
93
|
+
function Formatting_resolveBlockStyle(options, content) {
|
|
94
|
+
const matchValue_1 = content.Style;
|
|
95
|
+
let matchResult, chomp, indent, style;
|
|
96
|
+
if (options.PreserveScalarStyle) {
|
|
97
|
+
if (matchValue_1 != null) {
|
|
98
|
+
if (value(matchValue_1).tag === /* Block */
|
|
99
|
+
3) {
|
|
100
|
+
matchResult = 0;
|
|
101
|
+
chomp = value(matchValue_1).fields[1];
|
|
102
|
+
indent = value(matchValue_1).fields[2];
|
|
103
|
+
style = value(matchValue_1).fields[0];
|
|
104
|
+
} else {
|
|
105
|
+
matchResult = 1;
|
|
106
|
+
}
|
|
107
|
+
} else {
|
|
108
|
+
matchResult = 1;
|
|
109
|
+
}
|
|
110
|
+
} else {
|
|
111
|
+
matchResult = 1;
|
|
112
|
+
}
|
|
113
|
+
switch (matchResult) {
|
|
114
|
+
case 0:
|
|
115
|
+
return [style, chomp, indent];
|
|
116
|
+
default:
|
|
117
|
+
return [options.MultilineFallbackStyle, options.MultilineFallbackChomping, void 0];
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
function Formatting_scalarToInlineText(options, content) {
|
|
121
|
+
const v = content.Value;
|
|
122
|
+
if (options.PreserveScalarStyle) {
|
|
123
|
+
const matchValue = content.Style;
|
|
124
|
+
let matchResult;
|
|
125
|
+
if (matchValue != null) {
|
|
126
|
+
switch (value(matchValue).tag) {
|
|
127
|
+
case /* SingleQuoted */
|
|
128
|
+
1: {
|
|
129
|
+
matchResult = 0;
|
|
130
|
+
break;
|
|
131
|
+
}
|
|
132
|
+
case /* DoubleQuoted */
|
|
133
|
+
2: {
|
|
134
|
+
matchResult = 1;
|
|
135
|
+
break;
|
|
136
|
+
}
|
|
137
|
+
default:
|
|
138
|
+
matchResult = 2;
|
|
139
|
+
}
|
|
140
|
+
} else {
|
|
141
|
+
matchResult = 2;
|
|
142
|
+
}
|
|
143
|
+
switch (matchResult) {
|
|
144
|
+
case 0:
|
|
145
|
+
return "'" + Formatting_escapeSingleQuoted(v) + "'";
|
|
146
|
+
case 1:
|
|
147
|
+
return '"' + Formatting_escapeDoubleQuoted(v) + '"';
|
|
148
|
+
default:
|
|
149
|
+
return v;
|
|
150
|
+
}
|
|
151
|
+
} else {
|
|
152
|
+
return v;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
function Formatting_mkKeyContent(options, content) {
|
|
156
|
+
return Formatting_mkNodePrefix(content) + Formatting_scalarToInlineText(options, content);
|
|
157
|
+
}
|
|
158
|
+
function Formatting_mkMappingKey(options, key) {
|
|
159
|
+
return Formatting_mkKey(Formatting_mkKeyContent(options, key));
|
|
160
|
+
}
|
|
161
|
+
function Formatting_shouldEmitBlockScalar(options, content) {
|
|
162
|
+
const hasMultiline = content.Value.indexOf("\n") >= 0;
|
|
163
|
+
const matchValue_1 = content.Style;
|
|
164
|
+
let matchResult;
|
|
165
|
+
if (options.PreserveScalarStyle) {
|
|
166
|
+
if (matchValue_1 != null) {
|
|
167
|
+
switch (value(matchValue_1).tag) {
|
|
168
|
+
case /* Plain */
|
|
169
|
+
0: {
|
|
170
|
+
matchResult = 0;
|
|
171
|
+
break;
|
|
172
|
+
}
|
|
173
|
+
case /* Block */
|
|
174
|
+
3: {
|
|
175
|
+
matchResult = 1;
|
|
176
|
+
break;
|
|
177
|
+
}
|
|
178
|
+
default:
|
|
179
|
+
matchResult = 2;
|
|
180
|
+
}
|
|
181
|
+
} else {
|
|
182
|
+
matchResult = 2;
|
|
183
|
+
}
|
|
184
|
+
} else {
|
|
185
|
+
matchResult = 2;
|
|
186
|
+
}
|
|
187
|
+
switch (matchResult) {
|
|
188
|
+
case 0:
|
|
189
|
+
return false;
|
|
190
|
+
case 1:
|
|
191
|
+
return true;
|
|
192
|
+
default:
|
|
193
|
+
return hasMultiline;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
function Formatting_shouldEmitPlainMultilineScalar(options, content) {
|
|
197
|
+
if (options.PreserveScalarStyle && content.Value.indexOf("\n") >= 0) {
|
|
198
|
+
const matchValue = content.Style;
|
|
199
|
+
let matchResult;
|
|
200
|
+
if (matchValue != null) {
|
|
201
|
+
if (value(matchValue).tag === /* Plain */
|
|
202
|
+
0) {
|
|
203
|
+
matchResult = 0;
|
|
204
|
+
} else {
|
|
205
|
+
matchResult = 1;
|
|
206
|
+
}
|
|
207
|
+
} else {
|
|
208
|
+
matchResult = 1;
|
|
209
|
+
}
|
|
210
|
+
switch (matchResult) {
|
|
211
|
+
case 0:
|
|
212
|
+
return true;
|
|
213
|
+
default:
|
|
214
|
+
return false;
|
|
215
|
+
}
|
|
216
|
+
} else {
|
|
217
|
+
return false;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
function Formatting_mkInlineContent(options, content) {
|
|
221
|
+
const inlineScalar = Formatting_scalarToInlineText(options, content);
|
|
222
|
+
return Formatting_appendComment(content, Formatting_mkNodePrefix(content) + inlineScalar);
|
|
223
|
+
}
|
|
224
|
+
function Formatting_mkInlineSequence(options, seq) {
|
|
225
|
+
return "[" + join(", ", map$1((x) => {
|
|
226
|
+
if (x.tag === /* Value */
|
|
227
|
+
1) {
|
|
228
|
+
const v = x.fields[0];
|
|
229
|
+
return Formatting_mkNodePrefix(v) + Formatting_scalarToInlineText(options, v);
|
|
230
|
+
} else {
|
|
231
|
+
throw new Error("Invalid sequence element");
|
|
232
|
+
}
|
|
233
|
+
}, seq)) + "]";
|
|
234
|
+
}
|
|
235
|
+
function Formatting_mkBlockHeader(style, chomp, indent) {
|
|
236
|
+
return (style.tag === /* Folded */
|
|
237
|
+
1 ? ">" : "|") + defaultArg(map(int32ToString, indent), "") + (chomp.tag === /* Clip */
|
|
238
|
+
1 ? "" : chomp.tag === /* Keep */
|
|
239
|
+
2 ? "+" : "-");
|
|
240
|
+
}
|
|
241
|
+
function Formatting_bodyTextForChomping(chomp, value) {
|
|
242
|
+
const normalized = Formatting_normalizeNewlines(value);
|
|
243
|
+
switch (chomp.tag) {
|
|
244
|
+
case /* Clip */
|
|
245
|
+
1:
|
|
246
|
+
case /* Keep */
|
|
247
|
+
2:
|
|
248
|
+
if (normalized.endsWith("\n")) {
|
|
249
|
+
return substring(normalized, 0, normalized.length - 1);
|
|
250
|
+
} else {
|
|
251
|
+
return normalized;
|
|
252
|
+
}
|
|
253
|
+
default:
|
|
254
|
+
return trimEnd(normalized, "\n");
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
function Formatting_splitPreservingEmpty(s) {
|
|
258
|
+
return ofArray(split(s, ["\n"], void 0, 0));
|
|
259
|
+
}
|
|
260
|
+
function Formatting_plainMultilineLines(content) {
|
|
261
|
+
return Formatting_splitPreservingEmpty(Formatting_normalizeNewlines(content.Value));
|
|
262
|
+
}
|
|
263
|
+
function Formatting_mkPlainMultilineNode(mkHeader, lines) {
|
|
264
|
+
const patternInput = isEmpty(lines) ? ["", empty()] : [head(lines), tail(lines)];
|
|
265
|
+
const continuationLines = map$1((line) => PreprocessorElement_Line(Formatting_continuationPrefix + line), patternInput[1]);
|
|
266
|
+
return PreprocessorElement_Level(cons(PreprocessorElement_Line(mkHeader(patternInput[0])), continuationLines));
|
|
267
|
+
}
|
|
268
|
+
function Formatting_mkPlainMultilineMapping(options, key, content) {
|
|
269
|
+
return Formatting_mkPlainMultilineNode((firstLine) => Formatting_appendComment(content, Formatting_mkMappingKey(options, key) + " " + Formatting_mkNodePrefix(content) + firstLine), Formatting_plainMultilineLines(content));
|
|
270
|
+
}
|
|
271
|
+
function Formatting_mkPlainMultilineSequenceItem(options, content) {
|
|
272
|
+
return Formatting_mkPlainMultilineNode((firstLine) => Formatting_appendComment(content, "- " + Formatting_mkNodePrefix(content) + firstLine), Formatting_plainMultilineLines(content));
|
|
273
|
+
}
|
|
274
|
+
function Formatting_mkPlainMultilineRoot(options, content) {
|
|
275
|
+
return Formatting_mkPlainMultilineNode((firstLine) => Formatting_appendComment(content, Formatting_mkNodePrefix(content) + firstLine), Formatting_plainMultilineLines(content));
|
|
276
|
+
}
|
|
277
|
+
function Formatting_tryLegacyPlainMultilineContent(items) {
|
|
278
|
+
const loop = (allowMetadata_1_mut, remaining_mut, acc_mut) => {
|
|
279
|
+
let content, matchValue;
|
|
280
|
+
loop:
|
|
281
|
+
while (true) {
|
|
282
|
+
const allowMetadata_1 = allowMetadata_1_mut, remaining = remaining_mut, acc = acc_mut;
|
|
283
|
+
let matchResult, content_2, rest_1;
|
|
284
|
+
if (!isEmpty(remaining)) {
|
|
285
|
+
if (head(remaining).tag === /* Value */
|
|
286
|
+
1) {
|
|
287
|
+
if (content = head(remaining).fields[0], (matchValue = content.Style, matchValue != null ? value(matchValue).tag === /* Plain */
|
|
288
|
+
0 : true) && (allowMetadata_1 ? true : content.Comment == null && content.Anchor == null && content.Tag == null)) {
|
|
289
|
+
matchResult = 1;
|
|
290
|
+
content_2 = head(remaining).fields[0];
|
|
291
|
+
rest_1 = tail(remaining);
|
|
292
|
+
} else {
|
|
293
|
+
matchResult = 2;
|
|
294
|
+
}
|
|
295
|
+
} else {
|
|
296
|
+
matchResult = 2;
|
|
297
|
+
}
|
|
298
|
+
} else {
|
|
299
|
+
matchResult = 0;
|
|
300
|
+
}
|
|
301
|
+
switch (matchResult) {
|
|
302
|
+
case 0:
|
|
303
|
+
return reverse(acc);
|
|
304
|
+
case 1: {
|
|
305
|
+
allowMetadata_1_mut = false;
|
|
306
|
+
remaining_mut = rest_1;
|
|
307
|
+
acc_mut = cons(content_2, acc);
|
|
308
|
+
continue loop;
|
|
309
|
+
}
|
|
310
|
+
default:
|
|
311
|
+
return void 0;
|
|
312
|
+
}
|
|
313
|
+
break;
|
|
314
|
+
}
|
|
315
|
+
};
|
|
316
|
+
const matchValue_1 = loop(true, items, empty());
|
|
317
|
+
let matchResult_1, firstSegment, segments;
|
|
318
|
+
if (matchValue_1 != null) {
|
|
319
|
+
if (!isEmpty(value(matchValue_1))) {
|
|
320
|
+
if (!isEmpty(tail(value(matchValue_1)))) {
|
|
321
|
+
matchResult_1 = 0;
|
|
322
|
+
firstSegment = head(value(matchValue_1));
|
|
323
|
+
segments = value(matchValue_1);
|
|
324
|
+
} else {
|
|
325
|
+
matchResult_1 = 1;
|
|
326
|
+
}
|
|
327
|
+
} else {
|
|
328
|
+
matchResult_1 = 1;
|
|
329
|
+
}
|
|
330
|
+
} else {
|
|
331
|
+
matchResult_1 = 1;
|
|
332
|
+
}
|
|
333
|
+
switch (matchResult_1) {
|
|
334
|
+
case 0:
|
|
335
|
+
return new YAMLContent(join("\n", map$1((segment) => segment.Value, segments)), firstSegment.Comment, firstSegment.Anchor, firstSegment.Tag, ScalarStyle_Plain());
|
|
336
|
+
default:
|
|
337
|
+
return void 0;
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
function Formatting_mkBlockScalarMapping(options, key, content) {
|
|
341
|
+
const patternInput = Formatting_resolveBlockStyle(options, content);
|
|
342
|
+
const chomp = patternInput[1];
|
|
343
|
+
const header = Formatting_mkBlockHeader(patternInput[0], chomp, patternInput[2]);
|
|
344
|
+
const lines = Formatting_splitPreservingEmpty(Formatting_bodyTextForChomping(chomp, content.Value));
|
|
345
|
+
return PreprocessorElement_Level(ofArray([PreprocessorElement_Line(Formatting_appendComment(content, Formatting_mkMappingKey(options, key) + " " + Formatting_mkNodePrefix(content) + header)), PreprocessorElement_Intendation(map$1(PreprocessorElement_Line, lines))]));
|
|
346
|
+
}
|
|
347
|
+
function Formatting_mkBlockScalarSequenceItem(options, content) {
|
|
348
|
+
const patternInput = Formatting_resolveBlockStyle(options, content);
|
|
349
|
+
const chomp = patternInput[1];
|
|
350
|
+
const header = Formatting_mkBlockHeader(patternInput[0], chomp, patternInput[2]);
|
|
351
|
+
const lines = Formatting_splitPreservingEmpty(Formatting_bodyTextForChomping(chomp, content.Value));
|
|
352
|
+
return PreprocessorElement_Level(ofArray([PreprocessorElement_Line(Formatting_appendComment(content, "- " + Formatting_mkNodePrefix(content) + header)), PreprocessorElement_Intendation(map$1(PreprocessorElement_Line, lines))]));
|
|
353
|
+
}
|
|
354
|
+
function Formatting_mkBlockScalarRoot(options, content) {
|
|
355
|
+
const patternInput = Formatting_resolveBlockStyle(options, content);
|
|
356
|
+
const chomp = patternInput[1];
|
|
357
|
+
const header = Formatting_mkBlockHeader(patternInput[0], chomp, patternInput[2]);
|
|
358
|
+
const lines = Formatting_splitPreservingEmpty(Formatting_bodyTextForChomping(chomp, content.Value));
|
|
359
|
+
return PreprocessorElement_Level(ofArray([PreprocessorElement_Line(Formatting_appendComment(content, Formatting_mkNodePrefix(content) + header)), PreprocessorElement_Intendation(map$1(PreprocessorElement_Line, lines))]));
|
|
360
|
+
}
|
|
361
|
+
function detokenizeWithOptions(options, ele) {
|
|
362
|
+
const loop = (ele_1) => {
|
|
363
|
+
switch (ele_1.tag) {
|
|
364
|
+
case /* Mapping */
|
|
365
|
+
0: {
|
|
366
|
+
const key = ele_1.fields[0];
|
|
367
|
+
const v = ele_1.fields[1];
|
|
368
|
+
let matchResult, value_6, value_7, value_8, a, items_5, value_10, value_11, value_12, seq_1, anyElse;
|
|
369
|
+
if (key.Comment != null) {
|
|
370
|
+
matchResult = 0;
|
|
371
|
+
} else {
|
|
372
|
+
switch (v.tag) {
|
|
373
|
+
case /* Object */
|
|
374
|
+
3: {
|
|
375
|
+
if (!isEmpty(v.fields[0])) {
|
|
376
|
+
switch (head(v.fields[0]).tag) {
|
|
377
|
+
case /* Value */
|
|
378
|
+
1: {
|
|
379
|
+
if (isEmpty(tail(v.fields[0]))) {
|
|
380
|
+
if (Formatting_shouldEmitPlainMultilineScalar(options, head(v.fields[0]).fields[0])) {
|
|
381
|
+
matchResult = 1;
|
|
382
|
+
value_6 = head(v.fields[0]).fields[0];
|
|
383
|
+
} else if (Formatting_shouldEmitBlockScalar(options, head(v.fields[0]).fields[0])) {
|
|
384
|
+
matchResult = 2;
|
|
385
|
+
value_7 = head(v.fields[0]).fields[0];
|
|
386
|
+
} else {
|
|
387
|
+
matchResult = 3;
|
|
388
|
+
value_8 = head(v.fields[0]).fields[0];
|
|
389
|
+
}
|
|
390
|
+
} else if (Formatting_tryLegacyPlainMultilineContent(v.fields[0]) != null) {
|
|
391
|
+
matchResult = 5;
|
|
392
|
+
items_5 = v.fields[0];
|
|
393
|
+
} else {
|
|
394
|
+
matchResult = 10;
|
|
395
|
+
anyElse = v;
|
|
396
|
+
}
|
|
397
|
+
break;
|
|
398
|
+
}
|
|
399
|
+
case /* Alias */
|
|
400
|
+
7: {
|
|
401
|
+
if (isEmpty(tail(v.fields[0]))) {
|
|
402
|
+
matchResult = 4;
|
|
403
|
+
a = head(v.fields[0]).fields[0];
|
|
404
|
+
} else if (Formatting_tryLegacyPlainMultilineContent(v.fields[0]) != null) {
|
|
405
|
+
matchResult = 5;
|
|
406
|
+
items_5 = v.fields[0];
|
|
407
|
+
} else {
|
|
408
|
+
matchResult = 10;
|
|
409
|
+
anyElse = v;
|
|
410
|
+
}
|
|
411
|
+
break;
|
|
412
|
+
}
|
|
413
|
+
default:
|
|
414
|
+
if (Formatting_tryLegacyPlainMultilineContent(v.fields[0]) != null) {
|
|
415
|
+
matchResult = 5;
|
|
416
|
+
items_5 = v.fields[0];
|
|
417
|
+
} else {
|
|
418
|
+
matchResult = 10;
|
|
419
|
+
anyElse = v;
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
} else if (Formatting_tryLegacyPlainMultilineContent(v.fields[0]) != null) {
|
|
423
|
+
matchResult = 5;
|
|
424
|
+
items_5 = v.fields[0];
|
|
425
|
+
} else {
|
|
426
|
+
matchResult = 10;
|
|
427
|
+
anyElse = v;
|
|
428
|
+
}
|
|
429
|
+
break;
|
|
430
|
+
}
|
|
431
|
+
case /* Value */
|
|
432
|
+
1: {
|
|
433
|
+
if (Formatting_shouldEmitBlockScalar(options, v.fields[0])) {
|
|
434
|
+
matchResult = 6;
|
|
435
|
+
value_10 = v.fields[0];
|
|
436
|
+
} else if (Formatting_shouldEmitPlainMultilineScalar(options, v.fields[0])) {
|
|
437
|
+
matchResult = 7;
|
|
438
|
+
value_11 = v.fields[0];
|
|
439
|
+
} else {
|
|
440
|
+
matchResult = 8;
|
|
441
|
+
value_12 = v.fields[0];
|
|
442
|
+
}
|
|
443
|
+
break;
|
|
444
|
+
}
|
|
445
|
+
case /* Sequence */
|
|
446
|
+
2: {
|
|
447
|
+
if (StyleVerifier_checkInlineSequence(v.fields[0])) {
|
|
448
|
+
matchResult = 9;
|
|
449
|
+
seq_1 = v.fields[0];
|
|
450
|
+
} else {
|
|
451
|
+
matchResult = 10;
|
|
452
|
+
anyElse = v;
|
|
453
|
+
}
|
|
454
|
+
break;
|
|
455
|
+
}
|
|
456
|
+
default: {
|
|
457
|
+
matchResult = 10;
|
|
458
|
+
anyElse = v;
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
switch (matchResult) {
|
|
463
|
+
case 0:
|
|
464
|
+
return PreprocessorElement_Level(ofArray([PreprocessorElement_Line(Formatting_appendOptionalComment(key.Comment, Formatting_mkMappingKey(options, key))), PreprocessorElement_Intendation(singleton$1(loop(v)))]));
|
|
465
|
+
case 1:
|
|
466
|
+
return Formatting_mkPlainMultilineMapping(options, key, value_6);
|
|
467
|
+
case 2:
|
|
468
|
+
return Formatting_mkBlockScalarMapping(options, key, value_7);
|
|
469
|
+
case 3:
|
|
470
|
+
return PreprocessorElement_Line(Formatting_mkMappingKey(options, key) + " " + Formatting_mkInlineContent(options, value_8));
|
|
471
|
+
case 4:
|
|
472
|
+
return PreprocessorElement_Line(Formatting_mkMappingKey(options, key) + " *" + a);
|
|
473
|
+
case 5:
|
|
474
|
+
return Formatting_mkPlainMultilineMapping(options, key, value(Formatting_tryLegacyPlainMultilineContent(items_5)));
|
|
475
|
+
case 6:
|
|
476
|
+
return Formatting_mkBlockScalarMapping(options, key, value_10);
|
|
477
|
+
case 7:
|
|
478
|
+
return Formatting_mkPlainMultilineMapping(options, key, value_11);
|
|
479
|
+
case 8:
|
|
480
|
+
return PreprocessorElement_Line(Formatting_mkMappingKey(options, key) + " " + Formatting_mkInlineContent(options, value_12));
|
|
481
|
+
case 9:
|
|
482
|
+
return PreprocessorElement_Line(Formatting_mkMappingKey(options, key) + " " + Formatting_mkInlineSequence(options, seq_1));
|
|
483
|
+
default:
|
|
484
|
+
return PreprocessorElement_Level(ofArray([PreprocessorElement_Line(Formatting_mkMappingKey(options, key)), PreprocessorElement_Intendation(singleton$1(loop(anyElse)))]));
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
case /* Object */
|
|
488
|
+
3:
|
|
489
|
+
if (Formatting_tryLegacyPlainMultilineContent(ele_1.fields[0]) != null) {
|
|
490
|
+
const items_6 = ele_1.fields[0];
|
|
491
|
+
return Formatting_mkPlainMultilineRoot(options, value(Formatting_tryLegacyPlainMultilineContent(items_6)));
|
|
492
|
+
} else {
|
|
493
|
+
const seq_2 = ele_1.fields[0];
|
|
494
|
+
return PreprocessorElement_Level(toList(delay(() => map$2(loop, seq_2))));
|
|
495
|
+
}
|
|
496
|
+
case /* Value */
|
|
497
|
+
1:
|
|
498
|
+
if (Formatting_shouldEmitPlainMultilineScalar(options, ele_1.fields[0])) {
|
|
499
|
+
const value_14 = ele_1.fields[0];
|
|
500
|
+
return Formatting_mkPlainMultilineRoot(options, value_14);
|
|
501
|
+
} else if (Formatting_shouldEmitBlockScalar(options, ele_1.fields[0])) {
|
|
502
|
+
const value_15 = ele_1.fields[0];
|
|
503
|
+
return Formatting_mkBlockScalarRoot(options, value_15);
|
|
504
|
+
} else {
|
|
505
|
+
const value_16 = ele_1.fields[0];
|
|
506
|
+
return PreprocessorElement_Line(Formatting_mkInlineContent(options, value_16));
|
|
507
|
+
}
|
|
508
|
+
case /* Sequence */
|
|
509
|
+
2: {
|
|
510
|
+
const seq_3 = ele_1.fields[0];
|
|
511
|
+
return PreprocessorElement_Level(toList(delay(() => collect((element_1) => {
|
|
512
|
+
const matchValue = element_1;
|
|
513
|
+
let matchResult_1, value_21, value_22, value_23, a_1, items_11, value_25, value_26, value_27, nested_1, anyElse_1;
|
|
514
|
+
switch (matchValue.tag) {
|
|
515
|
+
case /* Object */
|
|
516
|
+
3: {
|
|
517
|
+
if (!isEmpty(matchValue.fields[0])) {
|
|
518
|
+
switch (head(matchValue.fields[0]).tag) {
|
|
519
|
+
case /* Value */
|
|
520
|
+
1: {
|
|
521
|
+
if (isEmpty(tail(matchValue.fields[0]))) {
|
|
522
|
+
if (Formatting_shouldEmitPlainMultilineScalar(options, head(matchValue.fields[0]).fields[0])) {
|
|
523
|
+
matchResult_1 = 0;
|
|
524
|
+
value_21 = head(matchValue.fields[0]).fields[0];
|
|
525
|
+
} else if (Formatting_shouldEmitBlockScalar(options, head(matchValue.fields[0]).fields[0])) {
|
|
526
|
+
matchResult_1 = 1;
|
|
527
|
+
value_22 = head(matchValue.fields[0]).fields[0];
|
|
528
|
+
} else {
|
|
529
|
+
matchResult_1 = 2;
|
|
530
|
+
value_23 = head(matchValue.fields[0]).fields[0];
|
|
531
|
+
}
|
|
532
|
+
} else if (Formatting_tryLegacyPlainMultilineContent(matchValue.fields[0]) != null) {
|
|
533
|
+
matchResult_1 = 4;
|
|
534
|
+
items_11 = matchValue.fields[0];
|
|
535
|
+
} else {
|
|
536
|
+
matchResult_1 = 9;
|
|
537
|
+
anyElse_1 = matchValue;
|
|
538
|
+
}
|
|
539
|
+
break;
|
|
540
|
+
}
|
|
541
|
+
case /* Alias */
|
|
542
|
+
7: {
|
|
543
|
+
if (isEmpty(tail(matchValue.fields[0]))) {
|
|
544
|
+
matchResult_1 = 3;
|
|
545
|
+
a_1 = head(matchValue.fields[0]).fields[0];
|
|
546
|
+
} else if (Formatting_tryLegacyPlainMultilineContent(matchValue.fields[0]) != null) {
|
|
547
|
+
matchResult_1 = 4;
|
|
548
|
+
items_11 = matchValue.fields[0];
|
|
549
|
+
} else {
|
|
550
|
+
matchResult_1 = 9;
|
|
551
|
+
anyElse_1 = matchValue;
|
|
552
|
+
}
|
|
553
|
+
break;
|
|
554
|
+
}
|
|
555
|
+
default:
|
|
556
|
+
if (Formatting_tryLegacyPlainMultilineContent(matchValue.fields[0]) != null) {
|
|
557
|
+
matchResult_1 = 4;
|
|
558
|
+
items_11 = matchValue.fields[0];
|
|
559
|
+
} else {
|
|
560
|
+
matchResult_1 = 9;
|
|
561
|
+
anyElse_1 = matchValue;
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
} else if (Formatting_tryLegacyPlainMultilineContent(matchValue.fields[0]) != null) {
|
|
565
|
+
matchResult_1 = 4;
|
|
566
|
+
items_11 = matchValue.fields[0];
|
|
567
|
+
} else {
|
|
568
|
+
matchResult_1 = 9;
|
|
569
|
+
anyElse_1 = matchValue;
|
|
570
|
+
}
|
|
571
|
+
break;
|
|
572
|
+
}
|
|
573
|
+
case /* Value */
|
|
574
|
+
1: {
|
|
575
|
+
if (Formatting_shouldEmitPlainMultilineScalar(options, matchValue.fields[0])) {
|
|
576
|
+
matchResult_1 = 5;
|
|
577
|
+
value_25 = matchValue.fields[0];
|
|
578
|
+
} else if (Formatting_shouldEmitBlockScalar(options, matchValue.fields[0])) {
|
|
579
|
+
matchResult_1 = 6;
|
|
580
|
+
value_26 = matchValue.fields[0];
|
|
581
|
+
} else {
|
|
582
|
+
matchResult_1 = 7;
|
|
583
|
+
value_27 = matchValue.fields[0];
|
|
584
|
+
}
|
|
585
|
+
break;
|
|
586
|
+
}
|
|
587
|
+
case /* Sequence */
|
|
588
|
+
2: {
|
|
589
|
+
if (StyleVerifier_checkInlineSequence(matchValue.fields[0])) {
|
|
590
|
+
matchResult_1 = 8;
|
|
591
|
+
nested_1 = matchValue.fields[0];
|
|
592
|
+
} else {
|
|
593
|
+
matchResult_1 = 9;
|
|
594
|
+
anyElse_1 = matchValue;
|
|
595
|
+
}
|
|
596
|
+
break;
|
|
597
|
+
}
|
|
598
|
+
default: {
|
|
599
|
+
matchResult_1 = 9;
|
|
600
|
+
anyElse_1 = matchValue;
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
switch (matchResult_1) {
|
|
604
|
+
case 0:
|
|
605
|
+
return singleton(Formatting_mkPlainMultilineSequenceItem(options, value_21));
|
|
606
|
+
case 1:
|
|
607
|
+
return singleton(Formatting_mkBlockScalarSequenceItem(options, value_22));
|
|
608
|
+
case 2:
|
|
609
|
+
return singleton(PreprocessorElement_Line(Formatting_mkMinusLine(Formatting_mkInlineContent(options, value_23))));
|
|
610
|
+
case 3:
|
|
611
|
+
return singleton(PreprocessorElement_Line("- *" + a_1));
|
|
612
|
+
case 4:
|
|
613
|
+
return singleton(Formatting_mkPlainMultilineSequenceItem(options, value(Formatting_tryLegacyPlainMultilineContent(items_11))));
|
|
614
|
+
case 5:
|
|
615
|
+
return singleton(Formatting_mkPlainMultilineSequenceItem(options, value_25));
|
|
616
|
+
case 6:
|
|
617
|
+
return singleton(Formatting_mkBlockScalarSequenceItem(options, value_26));
|
|
618
|
+
case 7:
|
|
619
|
+
return singleton(PreprocessorElement_Line(Formatting_mkMinusLine(Formatting_mkInlineContent(options, value_27))));
|
|
620
|
+
case 8:
|
|
621
|
+
return singleton(PreprocessorElement_Line(Formatting_mkMinusLine(Formatting_mkInlineSequence(options, nested_1))));
|
|
622
|
+
default:
|
|
623
|
+
return singleton(PreprocessorElement_Level(ofArray([PreprocessorElement_Line("-"), PreprocessorElement_Intendation(singleton$1(loop(anyElse_1)))])));
|
|
624
|
+
}
|
|
625
|
+
}, seq_3))));
|
|
626
|
+
}
|
|
627
|
+
case /* Comment */
|
|
628
|
+
4: {
|
|
629
|
+
const c = ele_1.fields[0];
|
|
630
|
+
return PreprocessorElement_Line(Formatting_mkComment(c));
|
|
631
|
+
}
|
|
632
|
+
case /* DocumentStart */
|
|
633
|
+
5:
|
|
634
|
+
return PreprocessorElement_Line("---");
|
|
635
|
+
case /* DocumentEnd */
|
|
636
|
+
6:
|
|
637
|
+
return PreprocessorElement_Line("...");
|
|
638
|
+
case /* Alias */
|
|
639
|
+
7: {
|
|
640
|
+
const a_2 = ele_1.fields[0];
|
|
641
|
+
return PreprocessorElement_Line("*" + a_2);
|
|
642
|
+
}
|
|
643
|
+
default:
|
|
644
|
+
return PreprocessorElement_Nil();
|
|
645
|
+
}
|
|
646
|
+
};
|
|
647
|
+
return loop(ele);
|
|
648
|
+
}
|
|
649
|
+
function detokenize(ele) {
|
|
650
|
+
return detokenizeWithOptions(WriterOptions_get_Default(), ele);
|
|
651
|
+
}
|
|
652
|
+
function writeWithOptions(ele, writerOptions, fconfig) {
|
|
653
|
+
return write$1(detokenizeWithOptions(writerOptions, ele), fconfig);
|
|
654
|
+
}
|
|
655
|
+
function write(ele, fconfig) {
|
|
656
|
+
return writeWithOptions(ele, WriterOptions_get_Default(), fconfig);
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
export { Formatting_appendOptionalComment, Formatting_mkBlockScalarMapping, Formatting_mkBlockScalarRoot, Formatting_mkBlockScalarSequenceItem, Formatting_mkComment, Formatting_mkInlineContent, Formatting_mkInlineSequence, Formatting_mkKey, Formatting_mkKeyContent, Formatting_mkMappingKey, Formatting_mkMinusLine, Formatting_mkNodePrefix, Formatting_mkPlainMultilineMapping, Formatting_mkPlainMultilineRoot, Formatting_mkPlainMultilineSequenceItem, Formatting_resolveBlockStyle, Formatting_shouldEmitBlockScalar, Formatting_shouldEmitPlainMultilineScalar, Formatting_tryLegacyPlainMultilineContent, StyleVerifier_checkInlineSequence, detokenize, detokenizeWithOptions, write, writeWithOptions };
|