@galaxy-tool-util/cli 0.2.0 → 1.0.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/bin/gxwf.js +51 -19
- package/dist/bin/gxwf.js.map +1 -1
- package/dist/commands/add.js +2 -2
- package/dist/commands/add.js.map +1 -1
- package/dist/commands/clean-tree.d.ts +3 -17
- package/dist/commands/clean-tree.d.ts.map +1 -1
- package/dist/commands/clean-tree.js +30 -29
- package/dist/commands/clean-tree.js.map +1 -1
- package/dist/commands/clean.d.ts +3 -0
- package/dist/commands/clean.d.ts.map +1 -1
- package/dist/commands/clean.js +12 -2
- package/dist/commands/clean.js.map +1 -1
- package/dist/commands/clear.js +4 -4
- package/dist/commands/clear.js.map +1 -1
- package/dist/commands/convert-tree.d.ts +2 -1
- package/dist/commands/convert-tree.d.ts.map +1 -1
- package/dist/commands/convert-tree.js +23 -7
- package/dist/commands/convert-tree.js.map +1 -1
- package/dist/commands/convert.d.ts +2 -1
- package/dist/commands/convert.d.ts.map +1 -1
- package/dist/commands/convert.js +36 -4
- package/dist/commands/convert.js.map +1 -1
- package/dist/commands/info.d.ts.map +1 -1
- package/dist/commands/info.js +5 -4
- package/dist/commands/info.js.map +1 -1
- package/dist/commands/lint-tree.d.ts +3 -19
- package/dist/commands/lint-tree.d.ts.map +1 -1
- package/dist/commands/lint-tree.js +46 -58
- package/dist/commands/lint-tree.js.map +1 -1
- package/dist/commands/lint.d.ts +8 -4
- package/dist/commands/lint.d.ts.map +1 -1
- package/dist/commands/lint.js +61 -13
- package/dist/commands/lint.js.map +1 -1
- package/dist/commands/list.js +3 -3
- package/dist/commands/list.js.map +1 -1
- package/dist/commands/mermaid.d.ts +6 -0
- package/dist/commands/mermaid.d.ts.map +1 -0
- package/dist/commands/mermaid.js +22 -0
- package/dist/commands/mermaid.js.map +1 -0
- package/dist/commands/populate-workflow.js +2 -2
- package/dist/commands/populate-workflow.js.map +1 -1
- package/dist/commands/render-results.d.ts +3 -3
- package/dist/commands/render-results.d.ts.map +1 -1
- package/dist/commands/render-results.js +8 -4
- package/dist/commands/render-results.js.map +1 -1
- package/dist/commands/report-output.d.ts +34 -0
- package/dist/commands/report-output.d.ts.map +1 -0
- package/dist/commands/report-output.js +70 -0
- package/dist/commands/report-output.js.map +1 -0
- package/dist/commands/resolve-tool.d.ts +2 -1
- package/dist/commands/resolve-tool.d.ts.map +1 -1
- package/dist/commands/resolve-tool.js +1 -1
- package/dist/commands/resolve-tool.js.map +1 -1
- package/dist/commands/roundtrip-tree.d.ts +3 -1
- package/dist/commands/roundtrip-tree.d.ts.map +1 -1
- package/dist/commands/roundtrip-tree.js +67 -5
- package/dist/commands/roundtrip-tree.js.map +1 -1
- package/dist/commands/roundtrip.d.ts +2 -1
- package/dist/commands/roundtrip.d.ts.map +1 -1
- package/dist/commands/roundtrip.js +30 -8
- package/dist/commands/roundtrip.js.map +1 -1
- package/dist/commands/schema.js +2 -2
- package/dist/commands/schema.js.map +1 -1
- package/dist/commands/strict-options.d.ts +22 -0
- package/dist/commands/strict-options.d.ts.map +1 -0
- package/dist/commands/strict-options.js +18 -0
- package/dist/commands/strict-options.js.map +1 -0
- package/dist/commands/validate-tests-tree.d.ts +36 -0
- package/dist/commands/validate-tests-tree.d.ts.map +1 -0
- package/dist/commands/validate-tests-tree.js +191 -0
- package/dist/commands/validate-tests-tree.js.map +1 -0
- package/dist/commands/validate-tests.d.ts +21 -0
- package/dist/commands/validate-tests.d.ts.map +1 -0
- package/dist/commands/validate-tests.js +83 -0
- package/dist/commands/validate-tests.js.map +1 -0
- package/dist/commands/validate-tree.d.ts +3 -20
- package/dist/commands/validate-tree.d.ts.map +1 -1
- package/dist/commands/validate-tree.js +53 -47
- package/dist/commands/validate-tree.js.map +1 -1
- package/dist/commands/validate-workflow-json-schema.d.ts +8 -2
- package/dist/commands/validate-workflow-json-schema.d.ts.map +1 -1
- package/dist/commands/validate-workflow-json-schema.js +104 -58
- package/dist/commands/validate-workflow-json-schema.js.map +1 -1
- package/dist/commands/validate-workflow.d.ts +17 -10
- package/dist/commands/validate-workflow.d.ts.map +1 -1
- package/dist/commands/validate-workflow.js +185 -59
- package/dist/commands/validate-workflow.js.map +1 -1
- package/dist/commands/workflow-io.d.ts +2 -11
- package/dist/commands/workflow-io.d.ts.map +1 -1
- package/dist/commands/workflow-io.js +7 -16
- package/dist/commands/workflow-io.js.map +1 -1
- package/dist/index.d.ts +15 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -1
- package/dist/workflow/_templates-bundled.d.ts +2 -0
- package/dist/workflow/_templates-bundled.d.ts.map +1 -0
- package/dist/workflow/_templates-bundled.js +324 -0
- package/dist/workflow/_templates-bundled.js.map +1 -0
- package/dist/workflow/report-templates.d.ts +13 -0
- package/dist/workflow/report-templates.d.ts.map +1 -0
- package/dist/workflow/report-templates.js +91 -0
- package/dist/workflow/report-templates.js.map +1 -0
- package/package.json +7 -5
package/dist/bin/gxwf.js
CHANGED
|
@@ -7,15 +7,19 @@ import { runConvertTree } from "../commands/convert-tree.js";
|
|
|
7
7
|
import { runRoundtrip } from "../commands/roundtrip.js";
|
|
8
8
|
import { runRoundtripTree } from "../commands/roundtrip-tree.js";
|
|
9
9
|
import { runLint } from "../commands/lint.js";
|
|
10
|
+
import { runMermaid } from "../commands/mermaid.js";
|
|
10
11
|
import { runLintTree } from "../commands/lint-tree.js";
|
|
11
12
|
import { runValidateWorkflow } from "../commands/validate-workflow.js";
|
|
13
|
+
import { runValidateTests } from "../commands/validate-tests.js";
|
|
14
|
+
import { runValidateTestsTree } from "../commands/validate-tests-tree.js";
|
|
12
15
|
import { runValidateTree } from "../commands/validate-tree.js";
|
|
16
|
+
import { addStrictOptions } from "../commands/strict-options.js";
|
|
13
17
|
const program = new Command();
|
|
14
18
|
program
|
|
15
19
|
.name("gxwf")
|
|
16
20
|
.description("Galaxy workflow operations — validate, clean, lint, convert (single-file and tree)")
|
|
17
21
|
.version("1.0.0");
|
|
18
|
-
program
|
|
22
|
+
addStrictOptions(program
|
|
19
23
|
.command("validate")
|
|
20
24
|
.description("Validate Galaxy workflow files (structure + optional tool state)")
|
|
21
25
|
.argument("<file>", "Workflow file (.ga, .gxwf.yml)")
|
|
@@ -24,7 +28,15 @@ program
|
|
|
24
28
|
.option("--cache-dir <dir>", "Tool cache directory")
|
|
25
29
|
.option("--mode <mode>", "Validation backend: effect (default) or json-schema", "effect")
|
|
26
30
|
.option("--tool-schema-dir <dir>", "Directory of pre-exported per-tool JSON Schemas (for offline json-schema mode)")
|
|
27
|
-
.
|
|
31
|
+
.option("--json", "Output structured JSON report")
|
|
32
|
+
.option("--report-html [file]", "Write HTML report to file (or stdout if omitted)")).action(runValidateWorkflow);
|
|
33
|
+
program
|
|
34
|
+
.command("validate-tests")
|
|
35
|
+
.description("Validate a workflow-test file (*-tests.yml, *.gxwf-tests.yml) against the Galaxy Tests schema")
|
|
36
|
+
.argument("<file>", "Tests file (*-tests.yml)")
|
|
37
|
+
.option("--json", "Output structured JSON report")
|
|
38
|
+
.option("--workflow <path>", "Cross-check job inputs + output assertions against a workflow (.ga / .gxwf.yml)")
|
|
39
|
+
.action(runValidateTests);
|
|
28
40
|
program
|
|
29
41
|
.command("clean")
|
|
30
42
|
.description("Strip stale keys and decode legacy tool_state encoding")
|
|
@@ -32,8 +44,11 @@ program
|
|
|
32
44
|
.option("--output <file>", "Write cleaned workflow to file (default: stdout)")
|
|
33
45
|
.option("--diff", "Show diff of changes instead of writing output")
|
|
34
46
|
.option("--format <fmt>", "Force format: native or format2 (auto-detected by default)")
|
|
47
|
+
.option("--json", "Output structured JSON report")
|
|
48
|
+
.option("--report-html [file]", "Write HTML report to file (or stdout if omitted)")
|
|
49
|
+
.option("--skip-uuid", "Skip stripping uuid fields (errors are always stripped)")
|
|
35
50
|
.action(runClean);
|
|
36
|
-
program
|
|
51
|
+
addStrictOptions(program
|
|
37
52
|
.command("lint")
|
|
38
53
|
.description("Lint Galaxy workflow — structural checks, best practices, tool state validation")
|
|
39
54
|
.argument("<file>", "Workflow file (.ga, .gxwf.yml)")
|
|
@@ -42,8 +57,8 @@ program
|
|
|
42
57
|
.option("--cache-dir <dir>", "Tool cache directory (for state validation)")
|
|
43
58
|
.option("--format <fmt>", "Force format: native or format2 (auto-detected by default)")
|
|
44
59
|
.option("--json", "Output structured JSON result")
|
|
45
|
-
.action(runLint);
|
|
46
|
-
program
|
|
60
|
+
.option("--report-html [file]", "Write HTML report to file (or stdout if omitted)")).action(runLint);
|
|
61
|
+
addStrictOptions(program
|
|
47
62
|
.command("convert")
|
|
48
63
|
.description("Convert between native (.ga) and format2 (.gxwf.yml) formats")
|
|
49
64
|
.argument("<file>", "Workflow file (.ga, .gxwf.yml)")
|
|
@@ -54,9 +69,8 @@ program
|
|
|
54
69
|
.option("--yaml", "Force YAML output")
|
|
55
70
|
.option("--format <fmt>", "Force source format (auto-detected by default)")
|
|
56
71
|
.option("--stateful", "Use cached tool definitions for schema-aware state re-encoding")
|
|
57
|
-
.option("--cache-dir <dir>", "Tool cache directory (for --stateful)")
|
|
58
|
-
|
|
59
|
-
program
|
|
72
|
+
.option("--cache-dir <dir>", "Tool cache directory (for --stateful)")).action(runConvert);
|
|
73
|
+
addStrictOptions(program
|
|
60
74
|
.command("roundtrip")
|
|
61
75
|
.description("Roundtrip-validate a native workflow: native → format2 → native, diff tool_state")
|
|
62
76
|
.argument("<file>", "Native workflow file (.ga)")
|
|
@@ -65,10 +79,16 @@ program
|
|
|
65
79
|
.option("--json", "Output structured JSON report")
|
|
66
80
|
.option("--errors-only", "Suppress benign diffs and clean steps from output")
|
|
67
81
|
.option("--benign-only", "Show only steps with benign diffs (no errors, no failures)")
|
|
68
|
-
.option("--brief", "Omit per-diff list; show only the one-line summary")
|
|
69
|
-
.action(runRoundtrip);
|
|
70
|
-
// -- Tree (batch) variants --
|
|
82
|
+
.option("--brief", "Omit per-diff list; show only the one-line summary")).action(runRoundtrip);
|
|
71
83
|
program
|
|
84
|
+
.command("mermaid")
|
|
85
|
+
.description("Render a Galaxy workflow as a Mermaid flowchart diagram")
|
|
86
|
+
.argument("<file>", "Workflow file (.ga, .gxwf.yml)")
|
|
87
|
+
.argument("[output]", "Output path (.mmd for raw, .md for fenced code block); stdout if omitted")
|
|
88
|
+
.option("--comments", "Render frame comments as Mermaid subgraphs")
|
|
89
|
+
.action((file, output, opts) => runMermaid(file, { output, comments: opts.comments }));
|
|
90
|
+
// -- Tree (batch) variants --
|
|
91
|
+
addStrictOptions(program
|
|
72
92
|
.command("validate-tree")
|
|
73
93
|
.description("Batch validate all workflows under a directory")
|
|
74
94
|
.argument("<dir>", "Directory to scan for workflows")
|
|
@@ -78,8 +98,9 @@ program
|
|
|
78
98
|
.option("--mode <mode>", "Validation backend: effect (default) or json-schema", "effect")
|
|
79
99
|
.option("--tool-schema-dir <dir>", "Directory of pre-exported per-tool JSON Schemas (for offline json-schema mode)")
|
|
80
100
|
.option("--json", "Output structured JSON report")
|
|
81
|
-
.
|
|
82
|
-
|
|
101
|
+
.option("--report-markdown [file]", "Write Markdown report to file (or stdout if omitted)")
|
|
102
|
+
.option("--report-html [file]", "Write HTML report to file (or stdout if omitted)")).action(runValidateTree);
|
|
103
|
+
addStrictOptions(program
|
|
83
104
|
.command("lint-tree")
|
|
84
105
|
.description("Batch lint all workflows under a directory")
|
|
85
106
|
.argument("<dir>", "Directory to scan for workflows")
|
|
@@ -88,7 +109,8 @@ program
|
|
|
88
109
|
.option("--cache-dir <dir>", "Tool cache directory (for state validation)")
|
|
89
110
|
.option("--format <fmt>", "Force format: native or format2 (auto-detected by default)")
|
|
90
111
|
.option("--json", "Output structured JSON report")
|
|
91
|
-
.
|
|
112
|
+
.option("--report-markdown [file]", "Write Markdown report to file (or stdout if omitted)")
|
|
113
|
+
.option("--report-html [file]", "Write HTML report to file (or stdout if omitted)")).action(runLintTree);
|
|
92
114
|
program
|
|
93
115
|
.command("clean-tree")
|
|
94
116
|
.description("Batch clean all workflows under a directory")
|
|
@@ -96,8 +118,11 @@ program
|
|
|
96
118
|
.option("--output-dir <dir>", "Write cleaned workflows to directory (mirrors source tree)")
|
|
97
119
|
.option("--format <fmt>", "Force format: native or format2 (auto-detected by default)")
|
|
98
120
|
.option("--json", "Output structured JSON report")
|
|
121
|
+
.option("--report-markdown [file]", "Write Markdown report to file (or stdout if omitted)")
|
|
122
|
+
.option("--report-html [file]", "Write HTML report to file (or stdout if omitted)")
|
|
123
|
+
.option("--skip-uuid", "Skip stripping uuid fields (errors are always stripped)")
|
|
99
124
|
.action(runCleanTree);
|
|
100
|
-
program
|
|
125
|
+
addStrictOptions(program
|
|
101
126
|
.command("convert-tree")
|
|
102
127
|
.description("Batch convert all workflows under a directory")
|
|
103
128
|
.argument("<dir>", "Directory to scan for workflows")
|
|
@@ -109,9 +134,8 @@ program
|
|
|
109
134
|
.option("--yaml", "Force YAML output")
|
|
110
135
|
.option("--format <fmt>", "Force source format (auto-detected by default)")
|
|
111
136
|
.option("--stateful", "Use cached tool definitions for schema-aware state re-encoding")
|
|
112
|
-
.option("--cache-dir <dir>", "Tool cache directory (for --stateful)")
|
|
113
|
-
|
|
114
|
-
program
|
|
137
|
+
.option("--cache-dir <dir>", "Tool cache directory (for --stateful)")).action(runConvertTree);
|
|
138
|
+
addStrictOptions(program
|
|
115
139
|
.command("roundtrip-tree")
|
|
116
140
|
.description("Batch roundtrip-validate native workflows under a directory")
|
|
117
141
|
.argument("<dir>", "Directory to scan for native workflows")
|
|
@@ -121,6 +145,14 @@ program
|
|
|
121
145
|
.option("--errors-only", "List only files with errors or failures")
|
|
122
146
|
.option("--benign-only", "List only files with benign diffs (no errors, no failures)")
|
|
123
147
|
.option("--brief", "Omit per-file lines; print only the aggregate summary")
|
|
124
|
-
.
|
|
148
|
+
.option("--report-markdown [file]", "Write Markdown report to file (or stdout if omitted)")
|
|
149
|
+
.option("--report-html [file]", "Write HTML report to file (or stdout if omitted)")).action(runRoundtripTree);
|
|
150
|
+
program
|
|
151
|
+
.command("validate-tests-tree")
|
|
152
|
+
.description("Batch validate workflow-test files (*-tests.yml / *.gxwf-tests.yml) under a directory")
|
|
153
|
+
.argument("<dir>", "Directory to scan for test files")
|
|
154
|
+
.option("--json", "Output structured JSON report")
|
|
155
|
+
.option("--auto-workflow", "Pair each tests file with a sibling workflow by filename convention (foo.gxwf-tests.yml ↔ foo.gxwf.yml/foo.ga) and cross-check inputs/outputs")
|
|
156
|
+
.action(runValidateTestsTree);
|
|
125
157
|
program.parse();
|
|
126
158
|
//# sourceMappingURL=gxwf.js.map
|
package/dist/bin/gxwf.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gxwf.js","sourceRoot":"","sources":["../../src/bin/gxwf.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"gxwf.js","sourceRoot":"","sources":["../../src/bin/gxwf.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,E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AAE,sBAAsB,CAAC;KACnD,MAAM,CAAC,gBAAgB,EAAE,8CAA8C,CAAC;KACxE,MAAM,CAAC,QAAQ,EAAE,+BAA+B,CAAC;KACjD,MAAM,CAAC,eAAe,EAAE,yCAAyC,CAAC;KAClE,MAAM,CAAC,eAAe,EAAE,4DAA4D,CAAC;KACrF,MAAM,CAAC,SAAS,EAAE,uDAAuD,CAAC;KAC1E,MAAM,CAAC,0BAA0B,EAAE,sDAAsD,CAAC;KAC1F,MAAM,CAAC,sBAAsB,EAAE,kDAAkD,CAAC,CACtF,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC;AAE3B,OAAO;KACJ,OAAO,CAAC,qBAAqB,CAAC;KAC9B,WAAW,CACV,uFAAuF,CACxF;KACA,QAAQ,CAAC,OAAO,EAAE,kCAAkC,CAAC;KACrD,MAAM,CAAC,QAAQ,EAAE,+BAA+B,CAAC;KACjD,MAAM,CACL,iBAAiB,EACjB,+IAA+I,CAChJ;KACA,MAAM,CAAC,oBAAoB,CAAC,CAAC;AAEhC,OAAO,CAAC,KAAK,EAAE,CAAC"}
|
package/dist/commands/add.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { makeNodeToolInfoService } from "@galaxy-tool-util/core/node";
|
|
2
2
|
export async function runAdd(toolId, opts) {
|
|
3
|
-
const service =
|
|
3
|
+
const service = makeNodeToolInfoService({
|
|
4
4
|
cacheDir: opts.cacheDir,
|
|
5
5
|
galaxyUrl: opts.galaxyUrl,
|
|
6
6
|
});
|
package/dist/commands/add.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add.js","sourceRoot":"","sources":["../../src/commands/add.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"add.js","sourceRoot":"","sources":["../../src/commands/add.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAQtE,MAAM,CAAC,KAAK,UAAU,MAAM,CAAC,MAAc,EAAE,IAAgB;IAC3D,MAAM,OAAO,GAAG,uBAAuB,CAAC;QACtC,QAAQ,EAAE,IAAI,CAAC,QAAQ;QACvB,SAAS,EAAE,IAAI,CAAC,SAAS;KAC1B,CAAC,CAAC;IAEH,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,WAAW,CAAC,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;IAC/D,IAAI,MAAM,KAAK,IAAI,EAAE,CAAC;QACpB,OAAO,CAAC,KAAK,CAAC,yBAAyB,MAAM,EAAE,CAAC,CAAC;QACjD,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;QACrB,OAAO;IACT,CAAC;IACD,OAAO,CAAC,GAAG,CAAC,WAAW,MAAM,CAAC,IAAI,KAAK,MAAM,CAAC,EAAE,KAAK,MAAM,CAAC,OAAO,GAAG,CAAC,CAAC;AAC1E,CAAC"}
|
|
@@ -1,23 +1,9 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
export interface CleanTreeOptions {
|
|
1
|
+
import { type ReportOutputOptions } from "./report-output.js";
|
|
2
|
+
export interface CleanTreeOptions extends ReportOutputOptions {
|
|
3
3
|
outputDir?: string;
|
|
4
4
|
format?: string;
|
|
5
5
|
json?: boolean;
|
|
6
|
-
|
|
7
|
-
export interface WorkflowCleanResult {
|
|
8
|
-
relativePath: string;
|
|
9
|
-
changed: boolean;
|
|
10
|
-
}
|
|
11
|
-
export interface CleanTreeReport {
|
|
12
|
-
root: string;
|
|
13
|
-
results: (WorkflowCleanResult | {
|
|
14
|
-
relativePath: string;
|
|
15
|
-
error: string;
|
|
16
|
-
})[];
|
|
17
|
-
summary: TreeSummary & {
|
|
18
|
-
changed: number;
|
|
19
|
-
unchanged: number;
|
|
20
|
-
};
|
|
6
|
+
skipUuid?: boolean;
|
|
21
7
|
}
|
|
22
8
|
export declare function runCleanTree(dir: string, opts: CleanTreeOptions): Promise<void>;
|
|
23
9
|
//# sourceMappingURL=clean-tree.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clean-tree.d.ts","sourceRoot":"","sources":["../../src/commands/clean-tree.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"clean-tree.d.ts","sourceRoot":"","sources":["../../src/commands/clean-tree.ts"],"names":[],"mappings":"AAeA,OAAO,EAAsC,KAAK,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAElG,MAAM,WAAW,gBAAiB,SAAQ,mBAAmB;IAC3D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,wBAAsB,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAmDrF"}
|
|
@@ -1,68 +1,69 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* `gxwf clean-tree` — batch clean all workflows under a directory.
|
|
3
3
|
*/
|
|
4
|
-
import { cleanWorkflow } from "@galaxy-tool-util/schema";
|
|
4
|
+
import { cleanWorkflow, buildWorkflowCleanResult, buildTreeCleanReport, } from "@galaxy-tool-util/schema";
|
|
5
5
|
import { mkdir, writeFile } from "node:fs/promises";
|
|
6
6
|
import { dirname, join } from "node:path";
|
|
7
7
|
import { resolveFormat, serializeWorkflow } from "./workflow-io.js";
|
|
8
|
-
import { collectTree
|
|
8
|
+
import { collectTree } from "./tree.js";
|
|
9
|
+
import { writeReportOutput, writeReportHtml } from "./report-output.js";
|
|
9
10
|
export async function runCleanTree(dir, opts) {
|
|
10
11
|
const outputDir = opts.outputDir;
|
|
11
12
|
const treeResult = await collectTree(dir, async (info, data) => {
|
|
12
13
|
const format = resolveFormat(data, opts.format);
|
|
13
|
-
const
|
|
14
|
-
cleanWorkflow(data);
|
|
15
|
-
const changed = JSON.stringify(data) !== before;
|
|
14
|
+
const cleanOpts = { skipUuid: opts.skipUuid };
|
|
15
|
+
const { results: stepResults } = await cleanWorkflow(data, cleanOpts);
|
|
16
16
|
if (outputDir) {
|
|
17
17
|
const outPath = join(outputDir, info.relativePath);
|
|
18
18
|
await mkdir(dirname(outPath), { recursive: true });
|
|
19
19
|
const serialized = serializeWorkflow(data, format);
|
|
20
20
|
await writeFile(outPath, serialized, "utf-8");
|
|
21
21
|
}
|
|
22
|
-
return
|
|
22
|
+
return buildWorkflowCleanResult(info.relativePath, stepResults);
|
|
23
23
|
});
|
|
24
|
-
const report =
|
|
24
|
+
const report = buildReport(treeResult);
|
|
25
|
+
await writeReportOutput("clean_tree.md.j2", report, { reportMarkdown: opts.reportMarkdown });
|
|
26
|
+
await writeReportHtml("clean-tree", report, opts.reportHtml);
|
|
25
27
|
if (opts.json) {
|
|
26
28
|
console.log(JSON.stringify(report, null, 2));
|
|
27
|
-
process.exitCode = report.summary.
|
|
29
|
+
process.exitCode = report.summary.affected > 0 ? 1 : 0;
|
|
28
30
|
return;
|
|
29
31
|
}
|
|
30
32
|
// Text output
|
|
31
|
-
for (const
|
|
32
|
-
if (
|
|
33
|
-
console.error(` ${
|
|
33
|
+
for (const wf of report.workflows) {
|
|
34
|
+
if (wf.error) {
|
|
35
|
+
console.error(` ${wf.path}: ERROR (${wf.error})`);
|
|
34
36
|
continue;
|
|
35
37
|
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
+
if (wf.skipped_reason) {
|
|
39
|
+
console.warn(` ${wf.path}: SKIPPED (${wf.skipped_reason})`);
|
|
40
|
+
continue;
|
|
41
|
+
}
|
|
42
|
+
const changed = wf.total_removed > 0;
|
|
43
|
+
console.log(` ${wf.path}: ${changed ? "CHANGED" : "clean"}`);
|
|
38
44
|
}
|
|
39
45
|
const s = report.summary;
|
|
46
|
+
const total = report.workflows.length;
|
|
40
47
|
const suffix = outputDir ? ` (written to ${outputDir})` : "";
|
|
41
|
-
console.log(`\nSummary: ${
|
|
48
|
+
console.log(`\nSummary: ${total} workflows | ${s.affected} changed, ${s.clean} unchanged${suffix}`);
|
|
42
49
|
// Exit 1 if any workflows had stale keys (like Python's clean-tree)
|
|
43
|
-
process.exitCode = s.
|
|
50
|
+
process.exitCode = s.affected > 0 ? 1 : 0;
|
|
44
51
|
}
|
|
45
|
-
function
|
|
46
|
-
const
|
|
47
|
-
let changed = 0;
|
|
48
|
-
let unchanged = 0;
|
|
52
|
+
function buildReport(treeResult) {
|
|
53
|
+
const workflows = [];
|
|
49
54
|
for (const o of treeResult.outcomes) {
|
|
50
55
|
if (o.error) {
|
|
51
|
-
|
|
56
|
+
workflows.push(buildWorkflowCleanResult(o.info.relativePath, [], { error: o.error }));
|
|
52
57
|
continue;
|
|
53
58
|
}
|
|
54
59
|
if (o.skipped) {
|
|
55
|
-
|
|
60
|
+
workflows.push(buildWorkflowCleanResult(o.info.relativePath, [], {
|
|
61
|
+
skipped_reason: o.skipReason ?? null,
|
|
62
|
+
}));
|
|
56
63
|
continue;
|
|
57
64
|
}
|
|
58
|
-
|
|
59
|
-
results.push(r);
|
|
60
|
-
if (r.changed)
|
|
61
|
-
changed++;
|
|
62
|
-
else
|
|
63
|
-
unchanged++;
|
|
65
|
+
workflows.push(o.result);
|
|
64
66
|
}
|
|
65
|
-
|
|
66
|
-
return { root: treeResult.root, results, summary: { ...wfSummary, changed, unchanged } };
|
|
67
|
+
return buildTreeCleanReport(treeResult.root, workflows);
|
|
67
68
|
}
|
|
68
69
|
//# sourceMappingURL=clean-tree.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clean-tree.js","sourceRoot":"","sources":["../../src/commands/clean-tree.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,
|
|
1
|
+
{"version":3,"file":"clean-tree.js","sourceRoot":"","sources":["../../src/commands/clean-tree.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EACL,aAAa,EAIb,wBAAwB,EACxB,oBAAoB,G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
|
|
5
|
+
json?: boolean;
|
|
6
|
+
reportHtml?: string | boolean;
|
|
7
|
+
skipUuid?: boolean;
|
|
5
8
|
}
|
|
6
9
|
export declare function runClean(filePath: string, opts: CleanOptions): Promise<void>;
|
|
7
10
|
//# sourceMappingURL=clean.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clean.d.ts","sourceRoot":"","sources":["../../src/commands/clean.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"clean.d.ts","sourceRoot":"","sources":["../../src/commands/clean.ts"],"names":[],"mappings":"AAgBA,MAAM,WAAW,YAAY;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC9B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,wBAAsB,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CA0ClF"}
|
package/dist/commands/clean.js
CHANGED
|
@@ -1,15 +1,25 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* `gxwf clean` — strip stale keys and decode legacy tool_state encoding.
|
|
3
3
|
*/
|
|
4
|
-
import { cleanWorkflow } from "@galaxy-tool-util/schema";
|
|
4
|
+
import { cleanWorkflow, buildSingleCleanReport, } from "@galaxy-tool-util/schema";
|
|
5
5
|
import { readWorkflowFile, resolveFormat, serializeWorkflow, writeWorkflowOutput, } from "./workflow-io.js";
|
|
6
|
+
import { writeReportHtml } from "./report-output.js";
|
|
6
7
|
export async function runClean(filePath, opts) {
|
|
7
8
|
const data = await readWorkflowFile(filePath);
|
|
8
9
|
if (!data)
|
|
9
10
|
return;
|
|
10
11
|
const format = resolveFormat(data, opts.format);
|
|
11
12
|
const before = opts.diff ? JSON.stringify(data, null, 2) : null;
|
|
12
|
-
|
|
13
|
+
const cleanOpts = { skipUuid: opts.skipUuid };
|
|
14
|
+
const { results } = await cleanWorkflow(data, cleanOpts);
|
|
15
|
+
if (opts.json || opts.reportHtml) {
|
|
16
|
+
const report = buildSingleCleanReport(filePath, results);
|
|
17
|
+
if (opts.json) {
|
|
18
|
+
console.log(JSON.stringify(report, null, 2));
|
|
19
|
+
}
|
|
20
|
+
await writeReportHtml("clean", report, opts.reportHtml);
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
13
23
|
if (opts.diff) {
|
|
14
24
|
const after = JSON.stringify(data, null, 2);
|
|
15
25
|
if (before === after) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clean.js","sourceRoot":"","sources":["../../src/commands/clean.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,
|
|
1
|
+
{"version":3,"file":"clean.js","sourceRoot":"","sources":["../../src/commands/clean.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EACL,aAAa,EACb,sBAAsB,GAEvB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,gBAAgB,EAChB,aAAa,EACb,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAWrD,MAAM,CAAC,KAAK,UAAU,QAAQ,CAAC,QAAgB,EAAE,IAAkB;IACjE,MAAM,IAAI,GAAG,MAAM,gBAAgB,CAAC,QAAQ,CAAC,CAAC;IAC9C,IAAI,CAAC,IAAI;QAAE,OAAO;IAElB,MAAM,MAAM,GAAG,aAAa,CAAC,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IAChD,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;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CAAC,CAAC,CAAC;YAC5B,IAAI,KAAK,KAAK,KAAK,EAAE,CAAC;gBACpB,IAAI,KAAK,KAAK,SAAS;oBAAE,OAAO,CAAC,GAAG,CAAC,KAAK,KAAK,EAAE,CAAC,CAAC;gBACnD,IAAI,KAAK,KAAK,SAAS;oBAAE,OAAO,CAAC,GAAG,CAAC,KAAK,KAAK,EAAE,CAAC,CAAC;YACrD,CAAC;QACH,CAAC;QACD,OAAO;IACT,CAAC;IAED,MAAM,MAAM,GAAG,iBAAiB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAC/C,MAAM,mBAAmB,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC;AACrE,CAAC"}
|
package/dist/commands/clear.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { makeNodeToolCache } from "@galaxy-tool-util/core/node";
|
|
2
2
|
export async function runClear(prefix, opts) {
|
|
3
|
-
const cache =
|
|
3
|
+
const cache = makeNodeToolCache({ cacheDir: opts.cacheDir });
|
|
4
4
|
await cache.index.load();
|
|
5
|
-
const before = cache.listCached().length;
|
|
5
|
+
const before = (await cache.listCached()).length;
|
|
6
6
|
await cache.clearCache(prefix);
|
|
7
|
-
const after = cache.listCached().length;
|
|
7
|
+
const after = (await cache.listCached()).length;
|
|
8
8
|
const removed = before - after;
|
|
9
9
|
if (prefix) {
|
|
10
10
|
console.log(`Removed ${removed} entries matching "${prefix}".`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clear.js","sourceRoot":"","sources":["../../src/commands/clear.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"clear.js","sourceRoot":"","sources":["../../src/commands/clear.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAMhE,MAAM,CAAC,KAAK,UAAU,QAAQ,CAAC,MAA0B,EAAE,IAAkB;IAC3E,MAAM,KAAK,GAAG,iBAAiB,CAAC,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC7D,MAAM,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;IACzB,MAAM,MAAM,GAAG,CAAC,MAAM,KAAK,CAAC,UAAU,EAAE,CAAC,CAAC,MAAM,CAAC;IACjD,MAAM,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;IAC/B,MAAM,KAAK,GAAG,CAAC,MAAM,KAAK,CAAC,UAAU,EAAE,CAAC,CAAC,MAAM,CAAC;IAChD,MAAM,OAAO,GAAG,MAAM,GAAG,KAAK,CAAC;IAC/B,IAAI,MAAM,EAAE,CAAC;QACX,OAAO,CAAC,GAAG,CAAC,WAAW,OAAO,sBAAsB,MAAM,IAAI,CAAC,CAAC;IAClE,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,WAAW,OAAO,sBAAsB,CAAC,CAAC;IACxD,CAAC;AACH,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { type StepConversionStatus } from "@galaxy-tool-util/schema";
|
|
2
2
|
import { type ToolLoadStatus } from "./stateful-tool-inputs.js";
|
|
3
|
+
import { type StrictOptions } from "./strict-options.js";
|
|
3
4
|
import { type TreeSummary } from "./tree.js";
|
|
4
|
-
export interface ConvertTreeOptions {
|
|
5
|
+
export interface ConvertTreeOptions extends StrictOptions {
|
|
5
6
|
to?: string;
|
|
6
7
|
outputDir?: string;
|
|
7
8
|
compact?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"convert-tree.d.ts","sourceRoot":"","sources":["../../src/commands/convert-tree.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"convert-tree.d.ts","sourceRoot":"","sources":["../../src/commands/convert-tree.ts"],"names":[],"mappings":"AAKA,OAAO,EAQL,KAAK,oBAAoB,EAE1B,MAAM,0BAA0B,CAAC;AA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} from "@galaxy-tool-util/schema";
|
|
1
|
+
import { makeNodeToolCache } from "@galaxy-tool-util/core/node";
|
|
2
|
+
import { toFormat2, toFormat2Stateful, toNative, toNativeStateful, checkStrictEncoding, checkStrictStructure, } from "@galaxy-tool-util/schema";
|
|
6
3
|
import { mkdir, writeFile } from "node:fs/promises";
|
|
7
4
|
import { dirname, join, basename } from "node:path";
|
|
8
5
|
import { loadToolInputsForWorkflow } from "./stateful-tool-inputs.js";
|
|
9
6
|
import { createDefaultResolver } from "./url-resolver.js";
|
|
7
|
+
import { resolveStrictOptions } from "./strict-options.js";
|
|
10
8
|
import { resolveFormat, serializeWorkflow } from "./workflow-io.js";
|
|
11
9
|
import { collectTree, summarizeOutcomes } from "./tree.js";
|
|
12
10
|
export async function runConvertTree(dir, opts) {
|
|
@@ -19,15 +17,29 @@ export async function runConvertTree(dir, opts) {
|
|
|
19
17
|
// Shared tool cache for stateful mode (loaded once per run)
|
|
20
18
|
let cache = null;
|
|
21
19
|
if (opts.stateful) {
|
|
22
|
-
cache =
|
|
20
|
+
cache = makeNodeToolCache({ cacheDir: opts.cacheDir });
|
|
23
21
|
await cache.index.load();
|
|
24
|
-
if (cache.index.listAll().length === 0) {
|
|
22
|
+
if ((await cache.index.listAll()).length === 0) {
|
|
25
23
|
console.warn("Tool cache is empty — stateful conversion will fall back for every step");
|
|
26
24
|
}
|
|
27
25
|
}
|
|
26
|
+
const strict = resolveStrictOptions(opts);
|
|
28
27
|
const treeResult = await collectTree(dir, async (info, data) => {
|
|
29
28
|
const sourceFormat = resolveFormat(data, opts.format);
|
|
30
29
|
const targetFormat = resolveTargetFormat(sourceFormat, opts.to);
|
|
30
|
+
// Per-file strict checks on input
|
|
31
|
+
if (strict.strictEncoding) {
|
|
32
|
+
const encErrors = checkStrictEncoding(data, sourceFormat);
|
|
33
|
+
if (encErrors.length > 0) {
|
|
34
|
+
throw new Error(`Encoding: ${encErrors.join("; ")}`);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
if (strict.strictStructure) {
|
|
38
|
+
const structErrors = checkStrictStructure(data, sourceFormat);
|
|
39
|
+
if (structErrors.length > 0) {
|
|
40
|
+
throw new Error(`Structure: ${structErrors.join("; ")}`);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
31
43
|
if (sourceFormat === targetFormat) {
|
|
32
44
|
return {
|
|
33
45
|
relativePath: info.relativePath,
|
|
@@ -79,6 +91,10 @@ export async function runConvertTree(dir, opts) {
|
|
|
79
91
|
const outPath = join(outputDir, outName);
|
|
80
92
|
await mkdir(dirname(outPath), { recursive: true });
|
|
81
93
|
await writeFile(outPath, serialized, "utf-8");
|
|
94
|
+
// --strict-state: require all stateful steps to convert successfully
|
|
95
|
+
if (strict.strictState && statefulSteps?.some((s) => !s.converted)) {
|
|
96
|
+
throw new Error("Strict state: all steps must convert successfully");
|
|
97
|
+
}
|
|
82
98
|
return {
|
|
83
99
|
relativePath: info.relativePath,
|
|
84
100
|
sourceFormat,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"convert-tree.js","sourceRoot":"","sources":["../../src/commands/convert-tree.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"convert-tree.js","sourceRoot":"","sources":["../../src/commands/convert-tree.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EACL,SAAS,EACT,iBAAiB,EACjB,QAAQ,EACR,gBAAgB,EAChB,mBAAmB,EACnB,oBAAoB,GAIrB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACpD,OAAO,EAAE,yBAAyB,EAAuB,MAAM,2BAA2B,CAAC;AAC3F,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,oBAAoB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C,IAAI,CAAC,YAAY,EAAE,KAAK,EAAE,YAAY,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;YACvF,SAAS;QACX,CAAC;QACD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,MAAO,CAAC,CAAC;IAC1B,CAAC;IAED,MAAM,SAAS,GAAG,iBAAiB,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;IACzD,OAAO,EAAE,IAAI,EAAE,UAAU,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;AAChE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"convert.d.ts","sourceRoot":"","sources":["../../src/commands/convert.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"convert.d.ts","sourceRoot":"","sources":["../../src/commands/convert.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAwB,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAQ/E,MAAM,WAAW,cAAe,SAAQ,aAAa;IACnD,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,wBAAsB,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAkGtF"}
|