@galaxy-tool-util/cli 1.0.0 → 1.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/bin/galaxy-tool-cache.js +2 -63
- package/dist/bin/galaxy-tool-cache.js.map +1 -1
- package/dist/bin/gxwf.js +2 -156
- package/dist/bin/gxwf.js.map +1 -1
- package/dist/commands/lint.d.ts.map +1 -1
- package/dist/commands/lint.js +14 -1
- package/dist/commands/lint.js.map +1 -1
- package/dist/commands/repo-search.d.ts +31 -0
- package/dist/commands/repo-search.d.ts.map +1 -0
- package/dist/commands/repo-search.js +100 -0
- package/dist/commands/repo-search.js.map +1 -0
- package/dist/commands/tool-revisions.d.ts +15 -0
- package/dist/commands/tool-revisions.d.ts.map +1 -0
- package/dist/commands/tool-revisions.js +56 -0
- package/dist/commands/tool-revisions.js.map +1 -0
- package/dist/commands/tool-search.d.ts +17 -0
- package/dist/commands/tool-search.d.ts.map +1 -0
- package/dist/commands/tool-search.js +107 -0
- package/dist/commands/tool-search.js.map +1 -0
- package/dist/commands/tool-versions.d.ts +11 -0
- package/dist/commands/tool-versions.d.ts.map +1 -0
- package/dist/commands/tool-versions.js +70 -0
- package/dist/commands/tool-versions.js.map +1 -0
- package/dist/programs/galaxy-tool-cache.d.ts +3 -0
- package/dist/programs/galaxy-tool-cache.d.ts.map +1 -0
- package/dist/programs/galaxy-tool-cache.js +66 -0
- package/dist/programs/galaxy-tool-cache.js.map +1 -0
- package/dist/programs/gxwf.d.ts +3 -0
- package/dist/programs/gxwf.d.ts.map +1 -0
- package/dist/programs/gxwf.js +204 -0
- package/dist/programs/gxwf.js.map +1 -0
- package/package.json +4 -3
|
@@ -1,65 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
import { runList } from "../commands/list.js";
|
|
5
|
-
import { runInfo } from "../commands/info.js";
|
|
6
|
-
import { runClear } from "../commands/clear.js";
|
|
7
|
-
import { runPopulateWorkflow } from "../commands/populate-workflow.js";
|
|
8
|
-
import { runSchema } from "../commands/schema.js";
|
|
9
|
-
import { runStructuralSchema } from "../commands/structural-schema.js";
|
|
10
|
-
const program = new Command();
|
|
11
|
-
program
|
|
12
|
-
.name("galaxy-tool-cache")
|
|
13
|
-
.description("Cache and inspect Galaxy tool metadata")
|
|
14
|
-
.version("1.0.0");
|
|
15
|
-
program
|
|
16
|
-
.command("add")
|
|
17
|
-
.description("Fetch a tool from ToolShed/Galaxy and cache it")
|
|
18
|
-
.argument("<tool_id>", "Tool ID (full toolshed path or TRS ID)")
|
|
19
|
-
.option("--version <ver>", "Tool version")
|
|
20
|
-
.option("--cache-dir <dir>", "Cache directory")
|
|
21
|
-
.option("--galaxy-url <url>", "Galaxy instance URL for fallback")
|
|
22
|
-
.action(runAdd);
|
|
23
|
-
program
|
|
24
|
-
.command("list")
|
|
25
|
-
.description("List cached tools")
|
|
26
|
-
.option("--json", "Output as JSON")
|
|
27
|
-
.option("--cache-dir <dir>", "Cache directory")
|
|
28
|
-
.action(runList);
|
|
29
|
-
program
|
|
30
|
-
.command("info")
|
|
31
|
-
.description("Show metadata for a cached tool")
|
|
32
|
-
.argument("<tool_id>", "Tool ID")
|
|
33
|
-
.option("--version <ver>", "Tool version")
|
|
34
|
-
.option("--cache-dir <dir>", "Cache directory")
|
|
35
|
-
.action(runInfo);
|
|
36
|
-
program
|
|
37
|
-
.command("clear")
|
|
38
|
-
.description("Clear cached tools")
|
|
39
|
-
.argument("[prefix]", "Only clear tools matching this prefix")
|
|
40
|
-
.option("--cache-dir <dir>", "Cache directory")
|
|
41
|
-
.action(runClear);
|
|
42
|
-
program
|
|
43
|
-
.command("schema")
|
|
44
|
-
.description("Export JSON Schema for a cached tool's parameters")
|
|
45
|
-
.argument("<tool_id>", "Tool ID")
|
|
46
|
-
.option("--version <ver>", "Tool version")
|
|
47
|
-
.option("--representation <rep>", "State representation (e.g., workflow_step)", "workflow_step")
|
|
48
|
-
.option("--output <file>", "Output file (default: stdout)")
|
|
49
|
-
.option("--cache-dir <dir>", "Cache directory")
|
|
50
|
-
.action(runSchema);
|
|
51
|
-
program
|
|
52
|
-
.command("populate-workflow")
|
|
53
|
-
.description("Scan a workflow and cache all referenced tools")
|
|
54
|
-
.argument("<file>", "Workflow file (.ga, .gxwf.yml)")
|
|
55
|
-
.option("--cache-dir <dir>", "Cache directory")
|
|
56
|
-
.option("--galaxy-url <url>", "Galaxy instance URL for fallback")
|
|
57
|
-
.action(runPopulateWorkflow);
|
|
58
|
-
program
|
|
59
|
-
.command("structural-schema")
|
|
60
|
-
.description("Export the structural JSON Schema for Galaxy workflows")
|
|
61
|
-
.option("--format <fmt>", "Workflow format: format2 (default) or native", "format2")
|
|
62
|
-
.option("--output <file>", "Output file (default: stdout)")
|
|
63
|
-
.action(runStructuralSchema);
|
|
64
|
-
program.parse();
|
|
2
|
+
import { buildGalaxyToolCacheProgram } from "../programs/galaxy-tool-cache.js";
|
|
3
|
+
buildGalaxyToolCacheProgram().parse();
|
|
65
4
|
//# sourceMappingURL=galaxy-tool-cache.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"galaxy-tool-cache.js","sourceRoot":"","sources":["../../src/bin/galaxy-tool-cache.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"galaxy-tool-cache.js","sourceRoot":"","sources":["../../src/bin/galaxy-tool-cache.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAE/E,2BAA2B,EAAE,CAAC,KAAK,EAAE,CAAC"}
|
package/dist/bin/gxwf.js
CHANGED
|
@@ -1,158 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
import { runCleanTree } from "../commands/clean-tree.js";
|
|
5
|
-
import { runConvert } from "../commands/convert.js";
|
|
6
|
-
import { runConvertTree } from "../commands/convert-tree.js";
|
|
7
|
-
import { runRoundtrip } from "../commands/roundtrip.js";
|
|
8
|
-
import { runRoundtripTree } from "../commands/roundtrip-tree.js";
|
|
9
|
-
import { runLint } from "../commands/lint.js";
|
|
10
|
-
import { runMermaid } from "../commands/mermaid.js";
|
|
11
|
-
import { runLintTree } from "../commands/lint-tree.js";
|
|
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";
|
|
15
|
-
import { runValidateTree } from "../commands/validate-tree.js";
|
|
16
|
-
import { addStrictOptions } from "../commands/strict-options.js";
|
|
17
|
-
const program = new Command();
|
|
18
|
-
program
|
|
19
|
-
.name("gxwf")
|
|
20
|
-
.description("Galaxy workflow operations — validate, clean, lint, convert (single-file and tree)")
|
|
21
|
-
.version("1.0.0");
|
|
22
|
-
addStrictOptions(program
|
|
23
|
-
.command("validate")
|
|
24
|
-
.description("Validate Galaxy workflow files (structure + optional tool state)")
|
|
25
|
-
.argument("<file>", "Workflow file (.ga, .gxwf.yml)")
|
|
26
|
-
.option("--format <fmt>", "Force format: native or format2 (auto-detected by default)")
|
|
27
|
-
.option("--no-tool-state", "Skip tool state validation")
|
|
28
|
-
.option("--cache-dir <dir>", "Tool cache directory")
|
|
29
|
-
.option("--mode <mode>", "Validation backend: effect (default) or json-schema", "effect")
|
|
30
|
-
.option("--tool-schema-dir <dir>", "Directory of pre-exported per-tool JSON Schemas (for offline json-schema mode)")
|
|
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);
|
|
40
|
-
program
|
|
41
|
-
.command("clean")
|
|
42
|
-
.description("Strip stale keys and decode legacy tool_state encoding")
|
|
43
|
-
.argument("<file>", "Workflow file (.ga, .gxwf.yml)")
|
|
44
|
-
.option("--output <file>", "Write cleaned workflow to file (default: stdout)")
|
|
45
|
-
.option("--diff", "Show diff of changes instead of writing output")
|
|
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)")
|
|
50
|
-
.action(runClean);
|
|
51
|
-
addStrictOptions(program
|
|
52
|
-
.command("lint")
|
|
53
|
-
.description("Lint Galaxy workflow — structural checks, best practices, tool state validation")
|
|
54
|
-
.argument("<file>", "Workflow file (.ga, .gxwf.yml)")
|
|
55
|
-
.option("--skip-best-practices", "Skip annotation/creator/license/label checks")
|
|
56
|
-
.option("--skip-state-validation", "Skip tool state validation against cached tool definitions")
|
|
57
|
-
.option("--cache-dir <dir>", "Tool cache directory (for state validation)")
|
|
58
|
-
.option("--format <fmt>", "Force format: native or format2 (auto-detected by default)")
|
|
59
|
-
.option("--json", "Output structured JSON result")
|
|
60
|
-
.option("--report-html [file]", "Write HTML report to file (or stdout if omitted)")).action(runLint);
|
|
61
|
-
addStrictOptions(program
|
|
62
|
-
.command("convert")
|
|
63
|
-
.description("Convert between native (.ga) and format2 (.gxwf.yml) formats")
|
|
64
|
-
.argument("<file>", "Workflow file (.ga, .gxwf.yml)")
|
|
65
|
-
.option("--to <format>", "Target format: native or format2 (infers opposite by default)")
|
|
66
|
-
.option("--output <file>", "Write result to file (default: stdout)")
|
|
67
|
-
.option("--compact", "Omit position info in format2 output")
|
|
68
|
-
.option("--json", "Force JSON output")
|
|
69
|
-
.option("--yaml", "Force YAML output")
|
|
70
|
-
.option("--format <fmt>", "Force source format (auto-detected by default)")
|
|
71
|
-
.option("--stateful", "Use cached tool definitions for schema-aware state re-encoding")
|
|
72
|
-
.option("--cache-dir <dir>", "Tool cache directory (for --stateful)")).action(runConvert);
|
|
73
|
-
addStrictOptions(program
|
|
74
|
-
.command("roundtrip")
|
|
75
|
-
.description("Roundtrip-validate a native workflow: native → format2 → native, diff tool_state")
|
|
76
|
-
.argument("<file>", "Native workflow file (.ga)")
|
|
77
|
-
.option("--cache-dir <dir>", "Tool cache directory")
|
|
78
|
-
.option("--format <fmt>", "Force source format (must resolve to native)")
|
|
79
|
-
.option("--json", "Output structured JSON report")
|
|
80
|
-
.option("--errors-only", "Suppress benign diffs and clean steps from output")
|
|
81
|
-
.option("--benign-only", "Show only steps with benign diffs (no errors, no failures)")
|
|
82
|
-
.option("--brief", "Omit per-diff list; show only the one-line summary")).action(runRoundtrip);
|
|
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
|
|
92
|
-
.command("validate-tree")
|
|
93
|
-
.description("Batch validate all workflows under a directory")
|
|
94
|
-
.argument("<dir>", "Directory to scan for workflows")
|
|
95
|
-
.option("--format <fmt>", "Force format: native or format2 (auto-detected by default)")
|
|
96
|
-
.option("--no-tool-state", "Skip tool state validation")
|
|
97
|
-
.option("--cache-dir <dir>", "Tool cache directory")
|
|
98
|
-
.option("--mode <mode>", "Validation backend: effect (default) or json-schema", "effect")
|
|
99
|
-
.option("--tool-schema-dir <dir>", "Directory of pre-exported per-tool JSON Schemas (for offline json-schema mode)")
|
|
100
|
-
.option("--json", "Output structured JSON report")
|
|
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
|
|
104
|
-
.command("lint-tree")
|
|
105
|
-
.description("Batch lint all workflows under a directory")
|
|
106
|
-
.argument("<dir>", "Directory to scan for workflows")
|
|
107
|
-
.option("--skip-best-practices", "Skip annotation/creator/license/label checks")
|
|
108
|
-
.option("--skip-state-validation", "Skip tool state validation against cached tool definitions")
|
|
109
|
-
.option("--cache-dir <dir>", "Tool cache directory (for state validation)")
|
|
110
|
-
.option("--format <fmt>", "Force format: native or format2 (auto-detected by default)")
|
|
111
|
-
.option("--json", "Output structured JSON report")
|
|
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);
|
|
114
|
-
program
|
|
115
|
-
.command("clean-tree")
|
|
116
|
-
.description("Batch clean all workflows under a directory")
|
|
117
|
-
.argument("<dir>", "Directory to scan for workflows")
|
|
118
|
-
.option("--output-dir <dir>", "Write cleaned workflows to directory (mirrors source tree)")
|
|
119
|
-
.option("--format <fmt>", "Force format: native or format2 (auto-detected by default)")
|
|
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)")
|
|
124
|
-
.action(runCleanTree);
|
|
125
|
-
addStrictOptions(program
|
|
126
|
-
.command("convert-tree")
|
|
127
|
-
.description("Batch convert all workflows under a directory")
|
|
128
|
-
.argument("<dir>", "Directory to scan for workflows")
|
|
129
|
-
.option("--to <format>", "Target format: native or format2 (infers opposite by default)")
|
|
130
|
-
.option("--output-dir <dir>", "Write converted workflows to directory (required)")
|
|
131
|
-
.option("--compact", "Omit position info in format2 output")
|
|
132
|
-
.option("--report-json", "Output structured JSON report")
|
|
133
|
-
.option("--json", "Force JSON output for converted files")
|
|
134
|
-
.option("--yaml", "Force YAML output")
|
|
135
|
-
.option("--format <fmt>", "Force source format (auto-detected by default)")
|
|
136
|
-
.option("--stateful", "Use cached tool definitions for schema-aware state re-encoding")
|
|
137
|
-
.option("--cache-dir <dir>", "Tool cache directory (for --stateful)")).action(runConvertTree);
|
|
138
|
-
addStrictOptions(program
|
|
139
|
-
.command("roundtrip-tree")
|
|
140
|
-
.description("Batch roundtrip-validate native workflows under a directory")
|
|
141
|
-
.argument("<dir>", "Directory to scan for native workflows")
|
|
142
|
-
.option("--cache-dir <dir>", "Tool cache directory")
|
|
143
|
-
.option("--format <fmt>", "Force source format (must resolve to native)")
|
|
144
|
-
.option("--json", "Output structured JSON report")
|
|
145
|
-
.option("--errors-only", "List only files with errors or failures")
|
|
146
|
-
.option("--benign-only", "List only files with benign diffs (no errors, no failures)")
|
|
147
|
-
.option("--brief", "Omit per-file lines; print only the aggregate summary")
|
|
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);
|
|
157
|
-
program.parse();
|
|
2
|
+
import { buildGxwfProgram } from "../programs/gxwf.js";
|
|
3
|
+
buildGxwfProgram().parse();
|
|
158
4
|
//# 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,
|
|
1
|
+
{"version":3,"file":"gxwf.js","sourceRoot":"","sources":["../../src/bin/gxwf.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD,gBAAgB,EAAE,CAAC,KAAK,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lint.d.ts","sourceRoot":"","sources":["../../src/commands/lint.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAExD,OAAO,EAQL,KAAK,UAAU,EAGf,KAAK,oBAAoB,IAAI,oBAAoB,EAClD,MAAM,0BAA0B,CAAC;AAKlC,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,qBAAqB,EAC3B,MAAM,qBAAqB,CAAC;AAS7B,MAAM,WAAW,WAAY,SAAQ,aAAa;IAChD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CAC/B;AAED,MAAM,WAAW,iBAAiB;IAChC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,MAAM,CAAC,EAAE,qBAAq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AAU,CAAC;IACvB,aAAa,EAAE,UAAU,GAAG,IAAI,CAAC;IACjC,eAAe,EAAE,oBAAoB,EAAE,GAAG,IAAI,CAAC;IAC/C,YAAY,EAAE,OAAO,CAAC;IACtB,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,QAAQ,EAAE,MAAM,CAAC;CAClB;AAaD,wBAAsB,OAAO,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAyHhF;AAED,+EAA+E;AAC/E,wBAAsB,kBAAkB,CACtC,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,iBAAiB,GACtB,OAAO,CAAC,UAAU,CAAC,CA8ErB"}
|
package/dist/commands/lint.js
CHANGED
|
@@ -45,6 +45,14 @@ export async function runLint(filePath, opts) {
|
|
|
45
45
|
if (opts.json || opts.reportHtml) {
|
|
46
46
|
const lintErrors = report.structural.error_count + (report.bestPractices?.error_count ?? 0);
|
|
47
47
|
const lintWarnings = report.structural.warn_count + (report.bestPractices?.warn_count ?? 0);
|
|
48
|
+
const lintErrorMessages = [
|
|
49
|
+
...report.structural.errors.map((m) => m.message),
|
|
50
|
+
...(report.bestPractices?.errors.map((m) => m.message) ?? []),
|
|
51
|
+
];
|
|
52
|
+
const lintWarningMessages = [
|
|
53
|
+
...report.structural.warnings.map((m) => m.message),
|
|
54
|
+
...(report.bestPractices?.warnings.map((m) => m.message) ?? []),
|
|
55
|
+
];
|
|
48
56
|
// Effect Schema decode for structure_errors
|
|
49
57
|
const structureErrors = decodeStructureErrors(data, format);
|
|
50
58
|
// Legacy encoding detection for encoding_errors
|
|
@@ -55,7 +63,12 @@ export async function runLint(filePath, opts) {
|
|
|
55
63
|
};
|
|
56
64
|
encodingErrors = await detectEncodingErrors(data, cache, format, expansionOpts);
|
|
57
65
|
}
|
|
58
|
-
const singleReport = buildSingleLintReport(filePath, lintErrors, lintWarnings, report.stateValidation ?? [], {
|
|
66
|
+
const singleReport = buildSingleLintReport(filePath, lintErrors, lintWarnings, report.stateValidation ?? [], {
|
|
67
|
+
structure_errors: structureErrors,
|
|
68
|
+
encoding_errors: encodingErrors,
|
|
69
|
+
lint_error_messages: lintErrorMessages,
|
|
70
|
+
lint_warning_messages: lintWarningMessages,
|
|
71
|
+
});
|
|
59
72
|
if (opts.json) {
|
|
60
73
|
console.log(JSON.stringify(singleReport, null, 2));
|
|
61
74
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lint.js","sourceRoot":"","sources":["../../src/commands/lint.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EACL,YAAY,EACZ,uBAAuB,EACvB,wBAAwB,EACxB,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,GAMtB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACnE,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EACL,oBAAoB,GAGrB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AA4BrD,SAAS,gBAAgB,CAAC,GAAG,OAA8B;IACzD,MAAM,MAAM,GAAkB,EAAE,CAAC;IACjC,MAAM,QAAQ,GAAkB,EAAE,CAAC;IACnC,KAAK,MAAM,CAAC,IAAI,OAAO,EAAE,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QACb,eAAe;QACf,YAAY;QACZ,cAAc;QACd,eAAe;QACf,QAAQ;KACT,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export interface RepoSearchOptions {
|
|
2
|
+
pageSize?: string | number;
|
|
3
|
+
maxResults?: string | number;
|
|
4
|
+
page?: string | number;
|
|
5
|
+
owner?: string;
|
|
6
|
+
category?: string;
|
|
7
|
+
json?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface NormalizedRepoHit {
|
|
10
|
+
toolshedUrl: string;
|
|
11
|
+
repoId: string;
|
|
12
|
+
repoName: string;
|
|
13
|
+
repoOwnerUsername: string;
|
|
14
|
+
description: string | null;
|
|
15
|
+
homepageUrl: string | null;
|
|
16
|
+
remoteRepositoryUrl: string | null;
|
|
17
|
+
categories: string[];
|
|
18
|
+
approved: boolean;
|
|
19
|
+
timesDownloaded: number;
|
|
20
|
+
score: number;
|
|
21
|
+
}
|
|
22
|
+
export interface RepoSearchJsonOutput {
|
|
23
|
+
query: string;
|
|
24
|
+
filters: {
|
|
25
|
+
owner?: string;
|
|
26
|
+
category?: string;
|
|
27
|
+
};
|
|
28
|
+
hits: NormalizedRepoHit[];
|
|
29
|
+
}
|
|
30
|
+
export declare function runRepoSearch(query: string, opts: RepoSearchOptions): Promise<void>;
|
|
31
|
+
//# sourceMappingURL=repo-search.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"repo-search.d.ts","sourceRoot":"","sources":["../../src/commands/repo-search.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,MAAM,WAAW,iBAAiB;IAChC,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC/C,IAAI,EAAE,iBAAiB,EAAE,CAAC;CAC3B;AAgCD,wBAAsB,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CA4CzF"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { DEFAULT_TOOLSHED_URL } from "@galaxy-tool-util/core";
|
|
2
|
+
import { ToolFetchError, iterateRepoSearchPages } from "@galaxy-tool-util/search";
|
|
3
|
+
function toInt(value, fallback) {
|
|
4
|
+
if (value === undefined)
|
|
5
|
+
return fallback;
|
|
6
|
+
const n = typeof value === "number" ? value : parseInt(value, 10);
|
|
7
|
+
return Number.isFinite(n) && n > 0 ? n : fallback;
|
|
8
|
+
}
|
|
9
|
+
function normalize(hit, toolshedUrl) {
|
|
10
|
+
const r = hit.repository;
|
|
11
|
+
const categories = r.categories === null
|
|
12
|
+
? []
|
|
13
|
+
: r.categories
|
|
14
|
+
.split(",")
|
|
15
|
+
.map((c) => c.trim())
|
|
16
|
+
.filter((c) => c.length > 0);
|
|
17
|
+
return {
|
|
18
|
+
toolshedUrl,
|
|
19
|
+
repoId: r.id,
|
|
20
|
+
repoName: r.name,
|
|
21
|
+
repoOwnerUsername: r.repo_owner_username,
|
|
22
|
+
description: r.description,
|
|
23
|
+
homepageUrl: r.homepage_url,
|
|
24
|
+
remoteRepositoryUrl: r.remote_repository_url,
|
|
25
|
+
categories,
|
|
26
|
+
approved: r.approved,
|
|
27
|
+
timesDownloaded: r.times_downloaded,
|
|
28
|
+
score: hit.score,
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
export async function runRepoSearch(query, opts) {
|
|
32
|
+
const pageSize = toInt(opts.pageSize, 20);
|
|
33
|
+
const maxResults = toInt(opts.maxResults, 50);
|
|
34
|
+
const page = toInt(opts.page, 1);
|
|
35
|
+
const toolshedUrl = DEFAULT_TOOLSHED_URL;
|
|
36
|
+
const hits = [];
|
|
37
|
+
try {
|
|
38
|
+
for await (const pageResults of iterateRepoSearchPages(toolshedUrl, query, {
|
|
39
|
+
pageSize,
|
|
40
|
+
page,
|
|
41
|
+
owner: opts.owner,
|
|
42
|
+
category: opts.category,
|
|
43
|
+
})) {
|
|
44
|
+
for (const raw of pageResults.hits) {
|
|
45
|
+
hits.push(normalize(raw, toolshedUrl));
|
|
46
|
+
if (hits.length >= maxResults)
|
|
47
|
+
break;
|
|
48
|
+
}
|
|
49
|
+
if (hits.length >= maxResults)
|
|
50
|
+
break;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
catch (err) {
|
|
54
|
+
if (err instanceof ToolFetchError) {
|
|
55
|
+
console.error(`Tool Shed repo search failed: ${err.message}`);
|
|
56
|
+
process.exitCode = 3;
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
throw err;
|
|
60
|
+
}
|
|
61
|
+
hits.sort((a, b) => b.score - a.score);
|
|
62
|
+
if (opts.json) {
|
|
63
|
+
const filters = {};
|
|
64
|
+
if (opts.owner)
|
|
65
|
+
filters.owner = opts.owner;
|
|
66
|
+
if (opts.category)
|
|
67
|
+
filters.category = opts.category;
|
|
68
|
+
const envelope = { query, filters, hits };
|
|
69
|
+
console.log(JSON.stringify(envelope, null, 2));
|
|
70
|
+
}
|
|
71
|
+
else if (hits.length === 0) {
|
|
72
|
+
console.error(`No repos for query: ${query}`);
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
console.log(formatTable(hits));
|
|
76
|
+
}
|
|
77
|
+
if (hits.length === 0)
|
|
78
|
+
process.exitCode = 2;
|
|
79
|
+
}
|
|
80
|
+
function formatTable(hits) {
|
|
81
|
+
const header = ["score", "downloads", "owner/repo", "categories", "description"];
|
|
82
|
+
const rows = hits.map((h) => [
|
|
83
|
+
h.score.toFixed(2),
|
|
84
|
+
String(h.timesDownloaded),
|
|
85
|
+
`${h.repoOwnerUsername}/${h.repoName}`,
|
|
86
|
+
h.categories.join(",") || "-",
|
|
87
|
+
truncate(h.description ?? "", 60),
|
|
88
|
+
]);
|
|
89
|
+
const widths = header.map((col, i) => Math.max(col.length, ...rows.map((r) => r[i].length)));
|
|
90
|
+
const fmt = (cells) => cells
|
|
91
|
+
.map((c, i) => c.padEnd(widths[i]))
|
|
92
|
+
.join(" ")
|
|
93
|
+
.trimEnd();
|
|
94
|
+
return [fmt(header), fmt(widths.map((w) => "-".repeat(w))), ...rows.map(fmt)].join("\n");
|
|
95
|
+
}
|
|
96
|
+
function truncate(s, max) {
|
|
97
|
+
const flat = s.replace(/\s+/g, " ").trim();
|
|
98
|
+
return flat.length > max ? `${flat.slice(0, max - 1)}…` : flat;
|
|
99
|
+
}
|
|
100
|
+
//# sourceMappingURL=repo-search.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"repo-search.js","sourceRoot":"","sources":["../../src/commands/repo-search.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,OAAO,EAAE,cAAc,EAAE,sBAAsB,EA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?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export interface ToolRevisionsJsonOutput {
|
|
7
|
+
trsToolId: string;
|
|
8
|
+
version?: string;
|
|
9
|
+
revisions: {
|
|
10
|
+
changesetRevision: string;
|
|
11
|
+
toolVersion: string;
|
|
12
|
+
}[];
|
|
13
|
+
}
|
|
14
|
+
export declare function runToolRevisions(toolId: string, opts: ToolRevisionsOptions): Promise<void>;
|
|
15
|
+
//# sourceMappingURL=tool-revisions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-revisions.d.ts","sourceRoot":"","sources":["../../src/commands/tool-revisions.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,oBAAoB;IACnC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,MAAM,WAAW,uBAAuB;IACtC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE;QAAE,iBAAiB,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CACjE;AAED,wBAAsB,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC,IAAI,CAAC,CAkDhG"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { DEFAULT_TOOLSHED_URL } from "@galaxy-tool-util/core";
|
|
2
|
+
import { ToolFetchError, getToolRevisions } from "@galaxy-tool-util/search";
|
|
3
|
+
import { toTrsToolId } from "./tool-versions.js";
|
|
4
|
+
export async function runToolRevisions(toolId, opts) {
|
|
5
|
+
let trsToolId;
|
|
6
|
+
try {
|
|
7
|
+
trsToolId = toTrsToolId(toolId);
|
|
8
|
+
}
|
|
9
|
+
catch (err) {
|
|
10
|
+
console.error(err.message);
|
|
11
|
+
process.exitCode = 1;
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
const [owner, repo, xmlToolId] = trsToolId.split("~");
|
|
15
|
+
let matches;
|
|
16
|
+
try {
|
|
17
|
+
matches = await getToolRevisions(DEFAULT_TOOLSHED_URL, {
|
|
18
|
+
owner,
|
|
19
|
+
repo,
|
|
20
|
+
toolId: xmlToolId,
|
|
21
|
+
version: opts.toolVersion,
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
catch (err) {
|
|
25
|
+
if (err instanceof ToolFetchError) {
|
|
26
|
+
console.error(`Tool Shed request failed: ${err.message}`);
|
|
27
|
+
process.exitCode = 3;
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
throw err;
|
|
31
|
+
}
|
|
32
|
+
const selected = opts.latest ? matches.slice(-1) : matches;
|
|
33
|
+
const revisions = selected.map((m) => ({
|
|
34
|
+
changesetRevision: m.changesetRevision,
|
|
35
|
+
toolVersion: m.toolVersion,
|
|
36
|
+
}));
|
|
37
|
+
if (opts.json) {
|
|
38
|
+
const envelope = {
|
|
39
|
+
trsToolId,
|
|
40
|
+
...(opts.toolVersion !== undefined ? { version: opts.toolVersion } : {}),
|
|
41
|
+
revisions,
|
|
42
|
+
};
|
|
43
|
+
console.log(JSON.stringify(envelope, null, 2));
|
|
44
|
+
}
|
|
45
|
+
else if (revisions.length === 0) {
|
|
46
|
+
const suffix = opts.toolVersion ? ` at version ${opts.toolVersion}` : "";
|
|
47
|
+
console.error(`No revisions found for ${trsToolId}${suffix}`);
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
for (const r of revisions)
|
|
51
|
+
console.log(`${r.changesetRevision}\t${r.toolVersion}`);
|
|
52
|
+
}
|
|
53
|
+
if (revisions.length === 0)
|
|
54
|
+
process.exitCode = 2;
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=tool-revisions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-revisions.js","sourceRoot":"","sources":["../../src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S,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QACrC,iBAAiB,EAAE,CAAC,CAAC,iBAAiB;QACtC,WAAW,EAAE,CAAC,CAAC,WAAW;KAC3B,CAAC,CAAC,CAAC;IAEJ,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;QACd,MAAM,QAAQ,GAA4B;YACxC,SAAS;YACT,GAAG,CAAC,IAAI,CAAC,WAAW,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACxE,SAAS;SACV,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;IACjD,CAAC;SAAM,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAClC,MAAM,MAAM,GAAG,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,eAAe,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACzE,OAAO,CAAC,KAAK,CAAC,0BAA0B,SAAS,GAAG,MAAM,EAAE,CAAC,CAAC;IAChE,CAAC;SAAM,CAAC;QACN,KAAK,MAAM,CAAC,IAAI,SAAS;YAAE,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,iBAAiB,KAAK,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;IACrF,CAAC;IAED,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;AACnD,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { NormalizedToolHit } from "@galaxy-tool-util/search";
|
|
2
|
+
export interface ToolSearchOptions {
|
|
3
|
+
pageSize?: string | number;
|
|
4
|
+
maxResults?: string | number;
|
|
5
|
+
page?: string | number;
|
|
6
|
+
owner?: string;
|
|
7
|
+
matchName?: boolean;
|
|
8
|
+
json?: boolean;
|
|
9
|
+
enrich?: boolean;
|
|
10
|
+
cacheDir?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface ToolSearchJsonOutput {
|
|
13
|
+
query: string;
|
|
14
|
+
hits: NormalizedToolHit[];
|
|
15
|
+
}
|
|
16
|
+
export declare function runToolSearch(query: string, opts: ToolSearchOptions): Promise<void>;
|
|
17
|
+
//# sourceMappingURL=tool-search.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-search.d.ts","sourceRoot":"","sources":["../../src/commands/tool-search.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAGlE,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,iBAAiB,EAAE,CAAC;CAC3B;AAQD,wBAAsB,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CA2DzF"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { DEFAULT_TOOLSHED_URL } from "@galaxy-tool-util/core";
|
|
2
|
+
import { makeNodeToolInfoService } from "@galaxy-tool-util/core/node";
|
|
3
|
+
import { ToolFetchError, iterateToolSearchPages, normalizeHit } from "@galaxy-tool-util/search";
|
|
4
|
+
function toInt(value, fallback) {
|
|
5
|
+
if (value === undefined)
|
|
6
|
+
return fallback;
|
|
7
|
+
const n = typeof value === "number" ? value : parseInt(value, 10);
|
|
8
|
+
return Number.isFinite(n) && n > 0 ? n : fallback;
|
|
9
|
+
}
|
|
10
|
+
export async function runToolSearch(query, opts) {
|
|
11
|
+
const pageSize = toInt(opts.pageSize, 20);
|
|
12
|
+
const maxResults = toInt(opts.maxResults, 50);
|
|
13
|
+
const page = toInt(opts.page, 1);
|
|
14
|
+
const owner = opts.owner?.toLowerCase();
|
|
15
|
+
const matchName = opts.matchName === true;
|
|
16
|
+
const queryTokens = queryNameTokens(query);
|
|
17
|
+
const source = { type: "toolshed", url: DEFAULT_TOOLSHED_URL };
|
|
18
|
+
const hits = [];
|
|
19
|
+
try {
|
|
20
|
+
for await (const pageResults of iterateToolSearchPages(source.url, query, { pageSize, page })) {
|
|
21
|
+
for (const raw of pageResults.hits) {
|
|
22
|
+
const hit = normalizeHit(raw, source);
|
|
23
|
+
if (owner !== undefined && hit.repoOwnerUsername.toLowerCase() !== owner)
|
|
24
|
+
continue;
|
|
25
|
+
if (matchName && !nameMatchesQuery(hit.toolName, queryTokens))
|
|
26
|
+
continue;
|
|
27
|
+
hits.push(hit);
|
|
28
|
+
if (hits.length >= maxResults)
|
|
29
|
+
break;
|
|
30
|
+
}
|
|
31
|
+
if (hits.length >= maxResults)
|
|
32
|
+
break;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
catch (err) {
|
|
36
|
+
if (err instanceof ToolFetchError) {
|
|
37
|
+
console.error(`Tool Shed search failed: ${err.message}`);
|
|
38
|
+
process.exitCode = 3;
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
throw err;
|
|
42
|
+
}
|
|
43
|
+
hits.sort((a, b) => b.score - a.score);
|
|
44
|
+
if (opts.enrich && hits.length > 0) {
|
|
45
|
+
const info = makeNodeToolInfoService({ cacheDir: opts.cacheDir });
|
|
46
|
+
await Promise.all(hits.map(async (hit) => {
|
|
47
|
+
try {
|
|
48
|
+
const parsed = await info.getToolInfo(hit.trsToolId, hit.version ?? null);
|
|
49
|
+
if (parsed !== null)
|
|
50
|
+
hit.parsedTool = parsed;
|
|
51
|
+
}
|
|
52
|
+
catch (err) {
|
|
53
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
54
|
+
console.error(`Enrichment failed for ${hit.trsToolId}: ${msg}`);
|
|
55
|
+
}
|
|
56
|
+
}));
|
|
57
|
+
}
|
|
58
|
+
if (opts.json) {
|
|
59
|
+
const envelope = { query, hits };
|
|
60
|
+
console.log(JSON.stringify(envelope, null, 2));
|
|
61
|
+
}
|
|
62
|
+
else if (hits.length === 0) {
|
|
63
|
+
console.error(`No hits for query: ${query}`);
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
console.log(formatTable(hits));
|
|
67
|
+
}
|
|
68
|
+
if (hits.length === 0) {
|
|
69
|
+
process.exitCode = 2;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
function formatTable(hits) {
|
|
73
|
+
const header = ["score", "owner/repo", "tool_id", "name", "description"];
|
|
74
|
+
const rows = hits.map((h) => [
|
|
75
|
+
h.score.toFixed(2),
|
|
76
|
+
`${h.repoOwnerUsername}/${h.repoName}`,
|
|
77
|
+
h.toolId,
|
|
78
|
+
h.toolName,
|
|
79
|
+
truncate(h.toolDescription ?? "", 60),
|
|
80
|
+
]);
|
|
81
|
+
const widths = header.map((col, i) => Math.max(col.length, ...rows.map((r) => r[i].length)));
|
|
82
|
+
const fmt = (cells) => cells
|
|
83
|
+
.map((c, i) => c.padEnd(widths[i]))
|
|
84
|
+
.join(" ")
|
|
85
|
+
.trimEnd();
|
|
86
|
+
return [fmt(header), fmt(widths.map((w) => "-".repeat(w))), ...rows.map(fmt)].join("\n");
|
|
87
|
+
}
|
|
88
|
+
function truncate(s, max) {
|
|
89
|
+
const flat = s.replace(/\s+/g, " ").trim();
|
|
90
|
+
return flat.length > max ? `${flat.slice(0, max - 1)}…` : flat;
|
|
91
|
+
}
|
|
92
|
+
function tokenize(s) {
|
|
93
|
+
return s
|
|
94
|
+
.toLowerCase()
|
|
95
|
+
.split(/[^a-z0-9+]+/)
|
|
96
|
+
.filter((t) => t.length > 0);
|
|
97
|
+
}
|
|
98
|
+
function queryNameTokens(query) {
|
|
99
|
+
return tokenize(query);
|
|
100
|
+
}
|
|
101
|
+
function nameMatchesQuery(name, queryTokens) {
|
|
102
|
+
if (queryTokens.length === 0)
|
|
103
|
+
return true;
|
|
104
|
+
const nameTokens = new Set(tokenize(name));
|
|
105
|
+
return queryTokens.some((t) => nameTokens.has(t));
|
|
106
|
+
}
|
|
107
|
+
//# sourceMappingURL=tool-search.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-search.js","sourceRoot":"","sources":["../../src/commands/tool-search.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAEtE,OAAO,EAAE,cAAc,EAAE,sBAAsB,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAkBhG,SAAS,KAAK,CAAC,KAAkC,EAAE,QAAgB;IACjE,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,QAAQ,CAAC;IACzC,MAAM,CAAC,GAAG,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IAClE,OAAO,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC;AACpD,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,KAAa,EAAE,IAAuB;IACxE,MAAM,QAAQ,GAAG,KAAK,CAAC,IAAI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AI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AACpD,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface ToolVersionsOptions {
|
|
2
|
+
json?: boolean;
|
|
3
|
+
latest?: boolean;
|
|
4
|
+
}
|
|
5
|
+
export interface ToolVersionsJsonOutput {
|
|
6
|
+
trsToolId: string;
|
|
7
|
+
versions: string[];
|
|
8
|
+
}
|
|
9
|
+
export declare function toTrsToolId(input: string): string;
|
|
10
|
+
export declare function runToolVersions(toolId: string, opts: ToolVersionsOptions): Promise<void>;
|
|
11
|
+
//# sourceMappingURL=tool-versions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-versions.d.ts","sourceRoot":"","sources":["../../src/commands/tool-versions.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,mBAAmB;IAClC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,sBAAsB;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAOjD;AAED,wBAAsB,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,CAwD9F"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { DEFAULT_TOOLSHED_URL } from "@galaxy-tool-util/core";
|
|
2
|
+
import { ToolFetchError, getTRSToolVersions } from "@galaxy-tool-util/search";
|
|
3
|
+
export function toTrsToolId(input) {
|
|
4
|
+
if (input.includes("~"))
|
|
5
|
+
return input;
|
|
6
|
+
const parts = input.split("/").filter((p) => p.length > 0);
|
|
7
|
+
if (parts.length === 3)
|
|
8
|
+
return `${parts[0]}~${parts[1]}~${parts[2]}`;
|
|
9
|
+
throw new Error(`Invalid tool id: expected \`<owner>~<repo>~<tool_id>\` or \`<owner>/<repo>/<tool_id>\`, got: ${input}`);
|
|
10
|
+
}
|
|
11
|
+
export async function runToolVersions(toolId, opts) {
|
|
12
|
+
let trsToolId;
|
|
13
|
+
try {
|
|
14
|
+
trsToolId = toTrsToolId(toolId);
|
|
15
|
+
}
|
|
16
|
+
catch (err) {
|
|
17
|
+
console.error(err.message);
|
|
18
|
+
process.exitCode = 1;
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
let rawVersions;
|
|
22
|
+
try {
|
|
23
|
+
rawVersions = await getTRSToolVersions(DEFAULT_TOOLSHED_URL, trsToolId);
|
|
24
|
+
}
|
|
25
|
+
catch (err) {
|
|
26
|
+
if (err instanceof ToolFetchError) {
|
|
27
|
+
console.error(`TRS request failed: ${err.message}`);
|
|
28
|
+
process.exitCode = 3;
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
throw err;
|
|
32
|
+
}
|
|
33
|
+
// Tool Shed returns oldest-first; we emit newest-last (pass-through).
|
|
34
|
+
const versions = rawVersions.map((v) => v.id);
|
|
35
|
+
if (opts.latest) {
|
|
36
|
+
const latest = versions[versions.length - 1];
|
|
37
|
+
if (latest === undefined) {
|
|
38
|
+
if (opts.json) {
|
|
39
|
+
console.log(JSON.stringify({ trsToolId, versions: [] }, null, 2));
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
console.error(`No versions published for ${trsToolId}`);
|
|
43
|
+
}
|
|
44
|
+
process.exitCode = 2;
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
if (opts.json) {
|
|
48
|
+
console.log(JSON.stringify({ trsToolId, versions: [latest] }, null, 2));
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
console.log(latest);
|
|
52
|
+
}
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
if (opts.json) {
|
|
56
|
+
const envelope = { trsToolId, versions };
|
|
57
|
+
console.log(JSON.stringify(envelope, null, 2));
|
|
58
|
+
}
|
|
59
|
+
else if (versions.length === 0) {
|
|
60
|
+
console.error(`No versions published for ${trsToolId}`);
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
for (const v of versions)
|
|
64
|
+
console.log(v);
|
|
65
|
+
}
|
|
66
|
+
if (versions.length === 0) {
|
|
67
|
+
process.exitCode = 2;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=tool-versions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-versions.js","sourceRoot":"","sources":["../../src/commands/tool-versions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAY9E,MAAM,UAAU,WAAW,CAAC,KAAa;IACvC,IAAI,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC;QAAE,OAAO,KAAK,CAAC;IACtC,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAC3D,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,GAAG,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;IACrE,MAAM,IAAI,KAAK,CACb,gGAAgG,KAAK,EAAE,CACxG,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,MAAc,EAAE,IAAyB;IAC7E,IAAI,SAAiB,CAAC;IACtB,IAAI,CAAC;QACH,SAAS,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC;IAClC,CAAC;IAAC,OAAO,GAAG,E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CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;QAC1E,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QACtB,CAAC;QACD,OAAO;IACT,CAAC;IAED,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;QACd,MAAM,QAAQ,GAA2B,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC;QACjE,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;IACjD,CAAC;SAAM,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACjC,OAAO,CAAC,KAAK,CAAC,6BAA6B,SAAS,EAAE,CAAC,CAAC;IAC1D,CAAC;SAAM,CAAC;QACN,KAAK,MAAM,CAAC,IAAI,QAAQ;YAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAC3C,CAAC;IAED,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC1B,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;IACvB,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"galaxy-tool-cache.d.ts","sourceRoot":"","sources":["../../src/programs/galaxy-tool-cache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AASpC,wBAAgB,2BAA2B,IAAI,OAAO,CAiErD"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { Command } from "commander";
|
|
2
|
+
import { runAdd } from "../commands/add.js";
|
|
3
|
+
import { runList } from "../commands/list.js";
|
|
4
|
+
import { runInfo } from "../commands/info.js";
|
|
5
|
+
import { runClear } from "../commands/clear.js";
|
|
6
|
+
import { runPopulateWorkflow } from "../commands/populate-workflow.js";
|
|
7
|
+
import { runSchema } from "../commands/schema.js";
|
|
8
|
+
import { runStructuralSchema } from "../commands/structural-schema.js";
|
|
9
|
+
export function buildGalaxyToolCacheProgram() {
|
|
10
|
+
const program = new Command();
|
|
11
|
+
program
|
|
12
|
+
.name("galaxy-tool-cache")
|
|
13
|
+
.description("Cache and inspect Galaxy tool metadata")
|
|
14
|
+
.version("1.0.0");
|
|
15
|
+
program
|
|
16
|
+
.command("add")
|
|
17
|
+
.description("Fetch a tool from ToolShed/Galaxy and cache it")
|
|
18
|
+
.argument("<tool_id>", "Tool ID (full toolshed path or TRS ID)")
|
|
19
|
+
.option("--version <ver>", "Tool version")
|
|
20
|
+
.option("--cache-dir <dir>", "Cache directory")
|
|
21
|
+
.option("--galaxy-url <url>", "Galaxy instance URL for fallback")
|
|
22
|
+
.action(runAdd);
|
|
23
|
+
program
|
|
24
|
+
.command("list")
|
|
25
|
+
.description("List cached tools")
|
|
26
|
+
.option("--json", "Output as JSON")
|
|
27
|
+
.option("--cache-dir <dir>", "Cache directory")
|
|
28
|
+
.action(runList);
|
|
29
|
+
program
|
|
30
|
+
.command("info")
|
|
31
|
+
.description("Show metadata for a cached tool")
|
|
32
|
+
.argument("<tool_id>", "Tool ID")
|
|
33
|
+
.option("--version <ver>", "Tool version")
|
|
34
|
+
.option("--cache-dir <dir>", "Cache directory")
|
|
35
|
+
.action(runInfo);
|
|
36
|
+
program
|
|
37
|
+
.command("clear")
|
|
38
|
+
.description("Clear cached tools")
|
|
39
|
+
.argument("[prefix]", "Only clear tools matching this prefix")
|
|
40
|
+
.option("--cache-dir <dir>", "Cache directory")
|
|
41
|
+
.action(runClear);
|
|
42
|
+
program
|
|
43
|
+
.command("schema")
|
|
44
|
+
.description("Export JSON Schema for a cached tool's parameters")
|
|
45
|
+
.argument("<tool_id>", "Tool ID")
|
|
46
|
+
.option("--version <ver>", "Tool version")
|
|
47
|
+
.option("--representation <rep>", "State representation (e.g., workflow_step)", "workflow_step")
|
|
48
|
+
.option("--output <file>", "Output file (default: stdout)")
|
|
49
|
+
.option("--cache-dir <dir>", "Cache directory")
|
|
50
|
+
.action(runSchema);
|
|
51
|
+
program
|
|
52
|
+
.command("populate-workflow")
|
|
53
|
+
.description("Scan a workflow and cache all referenced tools")
|
|
54
|
+
.argument("<file>", "Workflow file (.ga, .gxwf.yml)")
|
|
55
|
+
.option("--cache-dir <dir>", "Cache directory")
|
|
56
|
+
.option("--galaxy-url <url>", "Galaxy instance URL for fallback")
|
|
57
|
+
.action(runPopulateWorkflow);
|
|
58
|
+
program
|
|
59
|
+
.command("structural-schema")
|
|
60
|
+
.description("Export the structural JSON Schema for Galaxy workflows")
|
|
61
|
+
.option("--format <fmt>", "Workflow format: format2 (default) or native", "format2")
|
|
62
|
+
.option("--output <file>", "Output file (default: stdout)")
|
|
63
|
+
.action(runStructuralSchema);
|
|
64
|
+
return program;
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=galaxy-tool-cache.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"galaxy-tool-cache.js","sourceRoot":"","sources":["../../src/programs/galaxy-tool-cache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAEvE,MAAM,UAAU,2BAA2B;IACzC,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;IAE9B,OAAO;SACJ,I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C,wBAAwB,EAAE,4CAA4C,EAAE,eAAe,CAAC;SAC/F,MAAM,CAAC,iBAAiB,EAAE,+BAA+B,CAAC;SAC1D,MAAM,CAAC,mBAAmB,EAAE,iBAAiB,CAAC;SAC9C,MAAM,CAAC,SAAS,CAAC,CAAC;IAErB,OAAO;SACJ,OAAO,CAAC,mBAAmB,CAAC;SAC5B,WAAW,CAAC,gDAAgD,CAAC;SAC7D,QAAQ,CAAC,QAAQ,EAAE,gCAAgC,CAAC;SACpD,MAAM,CAAC,mBAAmB,EAAE,iBAAiB,CAAC;SAC9C,MAAM,CAAC,oBAAoB,EAAE,kCAAkC,CAAC;SAChE,MAAM,CAAC,mBAAmB,CAAC,CAAC;IAE/B,OAAO;SACJ,OAAO,CAAC,mBAAmB,CAAC;SAC5B,WAAW,CAAC,wDAAwD,CAAC;SACrE,MAAM,CAAC,gBAAgB,EAAE,8CAA8C,EAAE,SAAS,CAAC;SACnF,MAAM,CAAC,iBAAiB,EAAE,+BAA+B,CAAC;SAC1D,MAAM,CAAC,mBAAmB,CAAC,CAAC;IAE/B,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gxwf.d.ts","sourceRoot":"","sources":["../../src/programs/gxwf.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAoBpC,wBAAgB,gBAAgB,IAAI,OAAO,CAsQ1C"}
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
import { Command } from "commander";
|
|
2
|
+
import { runClean } from "../commands/clean.js";
|
|
3
|
+
import { runCleanTree } from "../commands/clean-tree.js";
|
|
4
|
+
import { runConvert } from "../commands/convert.js";
|
|
5
|
+
import { runConvertTree } from "../commands/convert-tree.js";
|
|
6
|
+
import { runRoundtrip } from "../commands/roundtrip.js";
|
|
7
|
+
import { runRoundtripTree } from "../commands/roundtrip-tree.js";
|
|
8
|
+
import { runLint } from "../commands/lint.js";
|
|
9
|
+
import { runMermaid } from "../commands/mermaid.js";
|
|
10
|
+
import { runLintTree } from "../commands/lint-tree.js";
|
|
11
|
+
import { runValidateWorkflow } from "../commands/validate-workflow.js";
|
|
12
|
+
import { runValidateTests } from "../commands/validate-tests.js";
|
|
13
|
+
import { runValidateTestsTree } from "../commands/validate-tests-tree.js";
|
|
14
|
+
import { runValidateTree } from "../commands/validate-tree.js";
|
|
15
|
+
import { runToolSearch } from "../commands/tool-search.js";
|
|
16
|
+
import { runToolVersions } from "../commands/tool-versions.js";
|
|
17
|
+
import { runToolRevisions } from "../commands/tool-revisions.js";
|
|
18
|
+
import { runRepoSearch } from "../commands/repo-search.js";
|
|
19
|
+
import { addStrictOptions } from "../commands/strict-options.js";
|
|
20
|
+
export function buildGxwfProgram() {
|
|
21
|
+
const program = new Command();
|
|
22
|
+
program
|
|
23
|
+
.name("gxwf")
|
|
24
|
+
.description("Galaxy workflow operations — validate, clean, lint, convert (single-file and tree)")
|
|
25
|
+
.version("1.0.0");
|
|
26
|
+
addStrictOptions(program
|
|
27
|
+
.command("validate")
|
|
28
|
+
.description("Validate Galaxy workflow files (structure + optional tool state)")
|
|
29
|
+
.argument("<file>", "Workflow file (.ga, .gxwf.yml)")
|
|
30
|
+
.option("--format <fmt>", "Force format: native or format2 (auto-detected by default)")
|
|
31
|
+
.option("--no-tool-state", "Skip tool state validation")
|
|
32
|
+
.option("--cache-dir <dir>", "Tool cache directory")
|
|
33
|
+
.option("--mode <mode>", "Validation backend: effect (default) or json-schema", "effect")
|
|
34
|
+
.option("--tool-schema-dir <dir>", "Directory of pre-exported per-tool JSON Schemas (for offline json-schema mode)")
|
|
35
|
+
.option("--json", "Output structured JSON report")
|
|
36
|
+
.option("--report-html [file]", "Write HTML report to file (or stdout if omitted)")).action(runValidateWorkflow);
|
|
37
|
+
program
|
|
38
|
+
.command("validate-tests")
|
|
39
|
+
.description("Validate a workflow-test file (*-tests.yml, *.gxwf-tests.yml) against the Galaxy Tests schema")
|
|
40
|
+
.argument("<file>", "Tests file (*-tests.yml)")
|
|
41
|
+
.option("--json", "Output structured JSON report")
|
|
42
|
+
.option("--workflow <path>", "Cross-check job inputs + output assertions against a workflow (.ga / .gxwf.yml)")
|
|
43
|
+
.action(runValidateTests);
|
|
44
|
+
program
|
|
45
|
+
.command("clean")
|
|
46
|
+
.description("Strip stale keys and decode legacy tool_state encoding")
|
|
47
|
+
.argument("<file>", "Workflow file (.ga, .gxwf.yml)")
|
|
48
|
+
.option("--output <file>", "Write cleaned workflow to file (default: stdout)")
|
|
49
|
+
.option("--diff", "Show diff of changes instead of writing output")
|
|
50
|
+
.option("--format <fmt>", "Force format: native or format2 (auto-detected by default)")
|
|
51
|
+
.option("--json", "Output structured JSON report")
|
|
52
|
+
.option("--report-html [file]", "Write HTML report to file (or stdout if omitted)")
|
|
53
|
+
.option("--skip-uuid", "Skip stripping uuid fields (errors are always stripped)")
|
|
54
|
+
.action(runClean);
|
|
55
|
+
addStrictOptions(program
|
|
56
|
+
.command("lint")
|
|
57
|
+
.description("Lint Galaxy workflow — structural checks, best practices, tool state validation")
|
|
58
|
+
.argument("<file>", "Workflow file (.ga, .gxwf.yml)")
|
|
59
|
+
.option("--skip-best-practices", "Skip annotation/creator/license/label checks")
|
|
60
|
+
.option("--skip-state-validation", "Skip tool state validation against cached tool definitions")
|
|
61
|
+
.option("--cache-dir <dir>", "Tool cache directory (for state validation)")
|
|
62
|
+
.option("--format <fmt>", "Force format: native or format2 (auto-detected by default)")
|
|
63
|
+
.option("--json", "Output structured JSON result")
|
|
64
|
+
.option("--report-html [file]", "Write HTML report to file (or stdout if omitted)")).action(runLint);
|
|
65
|
+
addStrictOptions(program
|
|
66
|
+
.command("convert")
|
|
67
|
+
.description("Convert between native (.ga) and format2 (.gxwf.yml) formats")
|
|
68
|
+
.argument("<file>", "Workflow file (.ga, .gxwf.yml)")
|
|
69
|
+
.option("--to <format>", "Target format: native or format2 (infers opposite by default)")
|
|
70
|
+
.option("--output <file>", "Write result to file (default: stdout)")
|
|
71
|
+
.option("--compact", "Omit position info in format2 output")
|
|
72
|
+
.option("--json", "Force JSON output")
|
|
73
|
+
.option("--yaml", "Force YAML output")
|
|
74
|
+
.option("--format <fmt>", "Force source format (auto-detected by default)")
|
|
75
|
+
.option("--stateful", "Use cached tool definitions for schema-aware state re-encoding")
|
|
76
|
+
.option("--cache-dir <dir>", "Tool cache directory (for --stateful)")).action(runConvert);
|
|
77
|
+
addStrictOptions(program
|
|
78
|
+
.command("roundtrip")
|
|
79
|
+
.description("Roundtrip-validate a native workflow: native → format2 → native, diff tool_state")
|
|
80
|
+
.argument("<file>", "Native workflow file (.ga)")
|
|
81
|
+
.option("--cache-dir <dir>", "Tool cache directory")
|
|
82
|
+
.option("--format <fmt>", "Force source format (must resolve to native)")
|
|
83
|
+
.option("--json", "Output structured JSON report")
|
|
84
|
+
.option("--errors-only", "Suppress benign diffs and clean steps from output")
|
|
85
|
+
.option("--benign-only", "Show only steps with benign diffs (no errors, no failures)")
|
|
86
|
+
.option("--brief", "Omit per-diff list; show only the one-line summary")).action(runRoundtrip);
|
|
87
|
+
program
|
|
88
|
+
.command("mermaid")
|
|
89
|
+
.description("Render a Galaxy workflow as a Mermaid flowchart diagram")
|
|
90
|
+
.argument("<file>", "Workflow file (.ga, .gxwf.yml)")
|
|
91
|
+
.argument("[output]", "Output path (.mmd for raw, .md for fenced code block); stdout if omitted")
|
|
92
|
+
.option("--comments", "Render frame comments as Mermaid subgraphs")
|
|
93
|
+
.action((file, output, opts) => runMermaid(file, { output, comments: opts.comments }));
|
|
94
|
+
// -- Tree (batch) variants --
|
|
95
|
+
addStrictOptions(program
|
|
96
|
+
.command("validate-tree")
|
|
97
|
+
.description("Batch validate all workflows under a directory")
|
|
98
|
+
.argument("<dir>", "Directory to scan for workflows")
|
|
99
|
+
.option("--format <fmt>", "Force format: native or format2 (auto-detected by default)")
|
|
100
|
+
.option("--no-tool-state", "Skip tool state validation")
|
|
101
|
+
.option("--cache-dir <dir>", "Tool cache directory")
|
|
102
|
+
.option("--mode <mode>", "Validation backend: effect (default) or json-schema", "effect")
|
|
103
|
+
.option("--tool-schema-dir <dir>", "Directory of pre-exported per-tool JSON Schemas (for offline json-schema mode)")
|
|
104
|
+
.option("--json", "Output structured JSON report")
|
|
105
|
+
.option("--report-markdown [file]", "Write Markdown report to file (or stdout if omitted)")
|
|
106
|
+
.option("--report-html [file]", "Write HTML report to file (or stdout if omitted)")).action(runValidateTree);
|
|
107
|
+
addStrictOptions(program
|
|
108
|
+
.command("lint-tree")
|
|
109
|
+
.description("Batch lint all workflows under a directory")
|
|
110
|
+
.argument("<dir>", "Directory to scan for workflows")
|
|
111
|
+
.option("--skip-best-practices", "Skip annotation/creator/license/label checks")
|
|
112
|
+
.option("--skip-state-validation", "Skip tool state validation against cached tool definitions")
|
|
113
|
+
.option("--cache-dir <dir>", "Tool cache directory (for state validation)")
|
|
114
|
+
.option("--format <fmt>", "Force format: native or format2 (auto-detected by default)")
|
|
115
|
+
.option("--json", "Output structured JSON report")
|
|
116
|
+
.option("--report-markdown [file]", "Write Markdown report to file (or stdout if omitted)")
|
|
117
|
+
.option("--report-html [file]", "Write HTML report to file (or stdout if omitted)")).action(runLintTree);
|
|
118
|
+
program
|
|
119
|
+
.command("clean-tree")
|
|
120
|
+
.description("Batch clean all workflows under a directory")
|
|
121
|
+
.argument("<dir>", "Directory to scan for workflows")
|
|
122
|
+
.option("--output-dir <dir>", "Write cleaned workflows to directory (mirrors source tree)")
|
|
123
|
+
.option("--format <fmt>", "Force format: native or format2 (auto-detected by default)")
|
|
124
|
+
.option("--json", "Output structured JSON report")
|
|
125
|
+
.option("--report-markdown [file]", "Write Markdown report to file (or stdout if omitted)")
|
|
126
|
+
.option("--report-html [file]", "Write HTML report to file (or stdout if omitted)")
|
|
127
|
+
.option("--skip-uuid", "Skip stripping uuid fields (errors are always stripped)")
|
|
128
|
+
.action(runCleanTree);
|
|
129
|
+
addStrictOptions(program
|
|
130
|
+
.command("convert-tree")
|
|
131
|
+
.description("Batch convert all workflows under a directory")
|
|
132
|
+
.argument("<dir>", "Directory to scan for workflows")
|
|
133
|
+
.option("--to <format>", "Target format: native or format2 (infers opposite by default)")
|
|
134
|
+
.option("--output-dir <dir>", "Write converted workflows to directory (required)")
|
|
135
|
+
.option("--compact", "Omit position info in format2 output")
|
|
136
|
+
.option("--report-json", "Output structured JSON report")
|
|
137
|
+
.option("--json", "Force JSON output for converted files")
|
|
138
|
+
.option("--yaml", "Force YAML output")
|
|
139
|
+
.option("--format <fmt>", "Force source format (auto-detected by default)")
|
|
140
|
+
.option("--stateful", "Use cached tool definitions for schema-aware state re-encoding")
|
|
141
|
+
.option("--cache-dir <dir>", "Tool cache directory (for --stateful)")).action(runConvertTree);
|
|
142
|
+
addStrictOptions(program
|
|
143
|
+
.command("roundtrip-tree")
|
|
144
|
+
.description("Batch roundtrip-validate native workflows under a directory")
|
|
145
|
+
.argument("<dir>", "Directory to scan for native workflows")
|
|
146
|
+
.option("--cache-dir <dir>", "Tool cache directory")
|
|
147
|
+
.option("--format <fmt>", "Force source format (must resolve to native)")
|
|
148
|
+
.option("--json", "Output structured JSON report")
|
|
149
|
+
.option("--errors-only", "List only files with errors or failures")
|
|
150
|
+
.option("--benign-only", "List only files with benign diffs (no errors, no failures)")
|
|
151
|
+
.option("--brief", "Omit per-file lines; print only the aggregate summary")
|
|
152
|
+
.option("--report-markdown [file]", "Write Markdown report to file (or stdout if omitted)")
|
|
153
|
+
.option("--report-html [file]", "Write HTML report to file (or stdout if omitted)")).action(runRoundtripTree);
|
|
154
|
+
program
|
|
155
|
+
.command("validate-tests-tree")
|
|
156
|
+
.description("Batch validate workflow-test files (*-tests.yml / *.gxwf-tests.yml) under a directory")
|
|
157
|
+
.argument("<dir>", "Directory to scan for test files")
|
|
158
|
+
.option("--json", "Output structured JSON report")
|
|
159
|
+
.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")
|
|
160
|
+
.action(runValidateTestsTree);
|
|
161
|
+
program
|
|
162
|
+
.command("tool-search")
|
|
163
|
+
.description("Search the Galaxy Tool Shed for tools matching a query")
|
|
164
|
+
.argument("<query>", "Search text (e.g. 'fastqc')")
|
|
165
|
+
.option("--page-size <n>", "Server-side page size", "20")
|
|
166
|
+
.option("--max-results <n>", "Hard cap on hits returned", "50")
|
|
167
|
+
.option("--page <n>", "Starting page (1-indexed)", "1")
|
|
168
|
+
.option("--owner <user>", "Filter hits to a single repo owner (client-side)")
|
|
169
|
+
.option("--match-name", "Drop hits where the query is not a token in the tool name")
|
|
170
|
+
.option("--json", "Emit machine-readable JSON envelope")
|
|
171
|
+
.option("--enrich", "Resolve each hit's ParsedTool and attach it as `parsedTool` (one fetch per hit; off by default)")
|
|
172
|
+
.option("--cache-dir <dir>", "Tool cache directory (used by --enrich; shared with galaxy-tool-cache)")
|
|
173
|
+
.action(runToolSearch);
|
|
174
|
+
program
|
|
175
|
+
.command("tool-versions")
|
|
176
|
+
.description("List TRS-published versions of a Tool Shed tool (newest last)")
|
|
177
|
+
.argument("<tool-id>", "TRS id (owner~repo~tool_id) or pretty form (owner/repo/tool_id)")
|
|
178
|
+
.option("--json", "Emit machine-readable JSON envelope")
|
|
179
|
+
.option("--latest", "Print only the latest version")
|
|
180
|
+
.action(runToolVersions);
|
|
181
|
+
program
|
|
182
|
+
.command("tool-revisions")
|
|
183
|
+
.description("List changeset revisions that publish a Tool Shed tool (ordered oldest→newest). " +
|
|
184
|
+
"Use for reproducible (name, owner, changeset_revision) workflow pins. " +
|
|
185
|
+
"Caveat: version strings are not monotonic — the same version can appear in multiple changesets.")
|
|
186
|
+
.argument("<tool-id>", "TRS id (owner~repo~tool_id) or pretty form (owner/repo/tool_id)")
|
|
187
|
+
.option("--tool-version <v>", "Restrict to revisions that publish this exact tool version")
|
|
188
|
+
.option("--latest", "Print only the newest matching revision")
|
|
189
|
+
.option("--json", "Emit machine-readable JSON envelope")
|
|
190
|
+
.action(runToolRevisions);
|
|
191
|
+
program
|
|
192
|
+
.command("repo-search")
|
|
193
|
+
.description("Search the Galaxy Tool Shed for repositories. Ranking is popularity-boosted; supports server-side --owner / --category filters via reserved keywords.")
|
|
194
|
+
.argument("<query>", "Search text (e.g. 'fastqc')")
|
|
195
|
+
.option("--page-size <n>", "Server-side page size", "20")
|
|
196
|
+
.option("--max-results <n>", "Hard cap on hits returned", "50")
|
|
197
|
+
.option("--page <n>", "Starting page (1-indexed)", "1")
|
|
198
|
+
.option("--owner <user>", "Restrict to a single owner (server-side `owner:` keyword)")
|
|
199
|
+
.option("--category <name>", "Restrict to a category (server-side `category:` keyword)")
|
|
200
|
+
.option("--json", "Emit machine-readable JSON envelope")
|
|
201
|
+
.action(runRepoSearch);
|
|
202
|
+
return program;
|
|
203
|
+
}
|
|
204
|
+
//# sourceMappingURL=gxwf.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gxwf.js","sourceRoot":"","sources":["../../src/programs/gxwf.ts"],"names":[],"mappings":"AAAA,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,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,E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,gBAAgB,CAAC;SACzB,WAAW,CACV,kFAAkF;QAChF,wEAAwE;QACxE,iGAAiG,CACpG;SACA,QAAQ,CAAC,WAAW,EAAE,iEAAiE,CAAC;SACxF,MAAM,CAAC,oBAAoB,EAAE,4DAA4D,CAAC;SAC1F,MAAM,CAAC,UAAU,EAAE,yCAAyC,CAAC;SAC7D,MAAM,CAAC,QAAQ,EAAE,qCAAqC,CAAC;SACvD,MAAM,CAAC,gBAAgB,CAAC,CAAC;IAE5B,OAAO;SACJ,OAAO,CAAC,aAAa,CAAC;SACtB,WAAW,CACV,uJAAuJ,CACxJ;SACA,QAAQ,CAAC,SAAS,EAAE,6BAA6B,CAAC;SAClD,MAAM,CAAC,iBAAiB,EAAE,uBAAuB,EAAE,IAAI,CAAC;SACxD,MAAM,CAAC,mBAAmB,EAAE,2BAA2B,EAAE,IAAI,CAAC;SAC9D,MAAM,CAAC,YAAY,EAAE,2BAA2B,EAAE,GAAG,CAAC;SACtD,MAAM,CAAC,gBAAgB,EAAE,2DAA2D,CAAC;SACrF,MAAM,CAAC,mBAAmB,EAAE,0DAA0D,CAAC;SACvF,MAAM,CAAC,QAAQ,EAAE,qCAAqC,CAAC;SACvD,MAAM,CAAC,aAAa,CAAC,CAAC;IAEzB,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@galaxy-tool-util/cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "galaxy-tool-cache CLI — cache and inspect Galaxy tool metadata",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -34,8 +34,9 @@
|
|
|
34
34
|
"effect": "^3.21.0",
|
|
35
35
|
"nunjucks": "^3.2.4",
|
|
36
36
|
"yaml": "^2.8.3",
|
|
37
|
-
"@galaxy-tool-util/core": "1.
|
|
38
|
-
"@galaxy-tool-util/schema": "1.
|
|
37
|
+
"@galaxy-tool-util/core": "1.1.0",
|
|
38
|
+
"@galaxy-tool-util/schema": "1.1.0",
|
|
39
|
+
"@galaxy-tool-util/search": "1.1.0"
|
|
39
40
|
},
|
|
40
41
|
"devDependencies": {
|
|
41
42
|
"@types/node": "^25.5.0",
|