@galaxy-tool-util/core 0.1.0 → 0.3.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.
Files changed (62) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +33 -0
  3. package/dist/cache/cache-index.d.ts +16 -12
  4. package/dist/cache/cache-index.d.ts.map +1 -1
  5. package/dist/cache/cache-index.js +34 -55
  6. package/dist/cache/cache-index.js.map +1 -1
  7. package/dist/cache/cache-key.d.ts +2 -1
  8. package/dist/cache/cache-key.d.ts.map +1 -1
  9. package/dist/cache/cache-key.js +7 -3
  10. package/dist/cache/cache-key.js.map +1 -1
  11. package/dist/cache/index.d.ts +5 -1
  12. package/dist/cache/index.d.ts.map +1 -1
  13. package/dist/cache/index.js +3 -1
  14. package/dist/cache/index.js.map +1 -1
  15. package/dist/cache/node.d.ts +30 -0
  16. package/dist/cache/node.d.ts.map +1 -0
  17. package/dist/cache/node.js +37 -0
  18. package/dist/cache/node.js.map +1 -0
  19. package/dist/cache/storage/filesystem.d.ts +17 -0
  20. package/dist/cache/storage/filesystem.d.ts.map +1 -0
  21. package/dist/cache/storage/filesystem.js +61 -0
  22. package/dist/cache/storage/filesystem.js.map +1 -0
  23. package/dist/cache/storage/indexeddb.d.ts +21 -0
  24. package/dist/cache/storage/indexeddb.d.ts.map +1 -0
  25. package/dist/cache/storage/indexeddb.js +87 -0
  26. package/dist/cache/storage/indexeddb.js.map +1 -0
  27. package/dist/cache/storage/interface.d.ts +17 -0
  28. package/dist/cache/storage/interface.d.ts.map +1 -0
  29. package/dist/cache/storage/interface.js +2 -0
  30. package/dist/cache/storage/interface.js.map +1 -0
  31. package/dist/cache/tool-cache-defaults.d.ts +7 -0
  32. package/dist/cache/tool-cache-defaults.d.ts.map +1 -0
  33. package/dist/cache/tool-cache-defaults.js +7 -0
  34. package/dist/cache/tool-cache-defaults.js.map +1 -0
  35. package/dist/cache/tool-cache.d.ts +15 -20
  36. package/dist/cache/tool-cache.d.ts.map +1 -1
  37. package/dist/cache/tool-cache.js +32 -46
  38. package/dist/cache/tool-cache.js.map +1 -1
  39. package/dist/cache/tool-id.d.ts +5 -5
  40. package/dist/cache/tool-id.d.ts.map +1 -1
  41. package/dist/cache/tool-id.js +4 -4
  42. package/dist/config-node.d.ts +7 -0
  43. package/dist/config-node.d.ts.map +1 -0
  44. package/dist/config-node.js +14 -0
  45. package/dist/config-node.js.map +1 -0
  46. package/dist/config.d.ts +75 -0
  47. package/dist/config.d.ts.map +1 -0
  48. package/dist/config.js +60 -0
  49. package/dist/config.js.map +1 -0
  50. package/dist/index.d.ts +11 -7
  51. package/dist/index.d.ts.map +1 -1
  52. package/dist/index.js +9 -6
  53. package/dist/index.js.map +1 -1
  54. package/dist/node.d.ts +12 -0
  55. package/dist/node.d.ts.map +1 -0
  56. package/dist/node.js +11 -0
  57. package/dist/node.js.map +1 -0
  58. package/dist/tool-info.d.ts +4 -2
  59. package/dist/tool-info.d.ts.map +1 -1
  60. package/dist/tool-info.js +9 -10
  61. package/dist/tool-info.js.map +1 -1
  62. package/package.json +28 -13
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Pluggable storage backend for the tool cache.
3
+ * Implementations: FilesystemCacheStorage (Node.js), IndexedDBCacheStorage (browser/Web Worker).
4
+ */
5
+ export interface CacheStorage {
6
+ /** Load a value by key. Returns null if not found. */
7
+ load(key: string): Promise<unknown | null>;
8
+ /** Persist a value under key. Creates storage if needed. */
9
+ save(key: string, data: unknown): Promise<void>;
10
+ /** Remove a key. No-op if not found. */
11
+ delete(key: string): Promise<void>;
12
+ /** List all tool keys (excludes internal metadata keys). */
13
+ list(): Promise<string[]>;
14
+ /** Optional bulk insert — single transaction for efficiency (e.g. pre-populating from bundle). */
15
+ saveAll?(entries: ReadonlyArray<[string, unknown]>): Promise<void>;
16
+ }
17
+ //# sourceMappingURL=interface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../src/cache/storage/interface.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,sDAAsD;IACtD,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC;IAC3C,4DAA4D;IAC5D,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAChD,wCAAwC;IACxC,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACnC,4DAA4D;IAC5D,IAAI,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAC1B,kGAAkG;IAClG,OAAO,CAAC,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACpE"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interface.js","sourceRoot":"","sources":["../../../src/cache/storage/interface.ts"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ /** Default Galaxy ToolShed URL. */
2
+ export declare const DEFAULT_TOOLSHED_URL = "https://toolshed.g2.bx.psu.edu";
3
+ /** Environment variable to override the default ToolShed URL. */
4
+ export declare const TOOLSHED_URL_ENV_VAR = "GALAXY_TOOLSHED_URL";
5
+ /** Environment variable to override the cache directory. */
6
+ export declare const CACHE_DIR_ENV_VAR = "GALAXY_TOOL_CACHE_DIR";
7
+ //# sourceMappingURL=tool-cache-defaults.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tool-cache-defaults.d.ts","sourceRoot":"","sources":["../../src/cache/tool-cache-defaults.ts"],"names":[],"mappings":"AAAA,mCAAmC;AACnC,eAAO,MAAM,oBAAoB,mCAAmC,CAAC;AACrE,iEAAiE;AACjE,eAAO,MAAM,oBAAoB,wBAAwB,CAAC;AAC1D,4DAA4D;AAC5D,eAAO,MAAM,iBAAiB,0BAA0B,CAAC"}
@@ -0,0 +1,7 @@
1
+ /** Default Galaxy ToolShed URL. */
2
+ export const DEFAULT_TOOLSHED_URL = "https://toolshed.g2.bx.psu.edu";
3
+ /** Environment variable to override the default ToolShed URL. */
4
+ export const TOOLSHED_URL_ENV_VAR = "GALAXY_TOOLSHED_URL";
5
+ /** Environment variable to override the cache directory. */
6
+ export const CACHE_DIR_ENV_VAR = "GALAXY_TOOL_CACHE_DIR";
7
+ //# sourceMappingURL=tool-cache-defaults.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tool-cache-defaults.js","sourceRoot":"","sources":["../../src/cache/tool-cache-defaults.ts"],"names":[],"mappings":"AAAA,mCAAmC;AACnC,MAAM,CAAC,MAAM,oBAAoB,GAAG,gCAAgC,CAAC;AACrE,iEAAiE;AACjE,MAAM,CAAC,MAAM,oBAAoB,GAAG,qBAAqB,CAAC;AAC1D,4DAA4D;AAC5D,MAAM,CAAC,MAAM,iBAAiB,GAAG,uBAAuB,CAAC"}
@@ -1,48 +1,43 @@
1
1
  import { ParsedTool } from "../models/parsed-tool.js";
2
2
  import { CacheIndex } from "./cache-index.js";
3
- /** Default cache directory: `~/.galaxy/tool_info_cache`. */
4
- export declare const DEFAULT_CACHE_DIR: string;
5
- /** Environment variable to override the cache directory. */
6
- export declare const CACHE_DIR_ENV_VAR = "GALAXY_TOOL_CACHE_DIR";
7
- /** Default Galaxy ToolShed URL. */
8
- export declare const DEFAULT_TOOLSHED_URL = "https://toolshed.g2.bx.psu.edu";
9
- /** Environment variable to override the default ToolShed URL. */
10
- export declare const TOOLSHED_URL_ENV_VAR = "GALAXY_TOOLSHED_URL";
11
- /** Resolve cache directory: explicit override > env var > default. */
12
- export declare function getCacheDir(override?: string): string;
13
- interface ResolvedCoordinates {
3
+ import type { CacheStorage } from "./storage/interface.js";
4
+ import { DEFAULT_TOOLSHED_URL, TOOLSHED_URL_ENV_VAR } from "./tool-cache-defaults.js";
5
+ export { DEFAULT_TOOLSHED_URL, TOOLSHED_URL_ENV_VAR };
6
+ export interface ResolvedCoordinates {
14
7
  toolshedUrl: string;
15
8
  trsToolId: string;
16
9
  version: string | null;
17
10
  readableId: string;
18
11
  }
19
12
  /**
20
- * Two-layer cache (memory + filesystem) for parsed Galaxy tool metadata.
13
+ * Two-layer cache (memory + storage) for parsed Galaxy tool metadata.
21
14
  * Resolves tool IDs to cache keys, loads/saves tool JSON, and manages the cache index.
15
+ *
16
+ * `storage` is required — pass a `FilesystemCacheStorage` (Node.js) or
17
+ * `IndexedDBCacheStorage` (browser). Node callers can use `makeNodeToolCache`
18
+ * from `@galaxy-tool-util/core/node` to get the default filesystem setup.
22
19
  */
23
20
  export declare class ToolCache {
24
- readonly cacheDir: string;
25
21
  readonly defaultToolshedUrl: string;
26
22
  readonly index: CacheIndex;
23
+ private readonly storage;
27
24
  private memoryCache;
28
- constructor(opts?: {
29
- cacheDir?: string;
25
+ constructor(opts: {
26
+ storage: CacheStorage;
30
27
  defaultToolshedUrl?: string;
31
28
  });
32
29
  resolveToolCoordinates(toolId: string, toolVersion?: string | null): ResolvedCoordinates;
33
- private cachePath;
34
- hasCached(toolId: string, toolVersion?: string | null): boolean;
30
+ hasCached(toolId: string, toolVersion?: string | null): Promise<boolean>;
35
31
  loadCached(key: string): Promise<ParsedTool | null>;
36
32
  saveTool(key: string, parsedTool: ParsedTool, toolId: string, toolVersion: string, source: string, sourceUrl?: string): Promise<void>;
37
- listCached(): Array<{
33
+ listCached(): Promise<Array<{
38
34
  cache_key: string;
39
35
  tool_id: string;
40
36
  tool_version: string;
41
37
  source: string;
42
38
  source_url: string;
43
39
  cached_at: string;
44
- }>;
40
+ }>>;
45
41
  clearCache(toolIdPrefix?: string): Promise<void>;
46
42
  }
47
- export {};
48
43
  //# sourceMappingURL=tool-cache.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tool-cache.d.ts","sourceRoot":"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YAAY,CAAC;QAAC,kBAAkB,CAAC,EAAE,MAAM,CAAA;KAAE;IAMxE,sBAAsB,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,mBAAmB;IAkBlF,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC;IAOxE,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC;IAoBnD,QAAQ,CACZ,GAAG,EAAE,MAAM,EACX,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,MAAM,EACd,SAAS,GAAE,MAAW,GACrB,OAAO,CAAC,IAAI,CAAC;IAMV,UAAU,IAAI,OAAO,CACzB,KAAK,CAAC;QACJ,SAAS,EAAE,MAAM,CAAC;QAClB,OAAO,EAAE,MAAM,CAAC;QAChB,YAAY,EAAE,MAAM,CAAC;QACrB,MAAM,EAAE,MAAM,CAAC;QACf,UAAU,EAAE,MAAM,CAAC;QACnB,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC,CACH;IAIK,UAAU,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAkBvD"}
@@ -1,38 +1,33 @@
1
- import { readFile, writeFile, mkdir, unlink } from "node:fs/promises";
2
- import { existsSync } from "node:fs";
3
- import { join } from "node:path";
4
- import { homedir } from "node:os";
5
1
  import * as S from "effect/Schema";
6
2
  import { ParsedTool } from "../models/parsed-tool.js";
7
3
  import { CacheIndex } from "./cache-index.js";
8
4
  import { cacheKey } from "./cache-key.js";
9
5
  import { parseToolshedToolId, toolIdFromTrs } from "./tool-id.js";
10
- /** Default cache directory: `~/.galaxy/tool_info_cache`. */
11
- export const DEFAULT_CACHE_DIR = join(homedir(), ".galaxy", "tool_info_cache");
12
- /** Environment variable to override the cache directory. */
13
- export const CACHE_DIR_ENV_VAR = "GALAXY_TOOL_CACHE_DIR";
14
- /** Default Galaxy ToolShed URL. */
15
- export const DEFAULT_TOOLSHED_URL = "https://toolshed.g2.bx.psu.edu";
16
- /** Environment variable to override the default ToolShed URL. */
17
- export const TOOLSHED_URL_ENV_VAR = "GALAXY_TOOLSHED_URL";
18
- /** Resolve cache directory: explicit override > env var > default. */
19
- export function getCacheDir(override) {
20
- return override ?? process.env[CACHE_DIR_ENV_VAR] ?? DEFAULT_CACHE_DIR;
6
+ import { DEFAULT_TOOLSHED_URL, TOOLSHED_URL_ENV_VAR } from "./tool-cache-defaults.js";
7
+ export { DEFAULT_TOOLSHED_URL, TOOLSHED_URL_ENV_VAR };
8
+ function envToolshedUrl() {
9
+ if (typeof process !== "undefined" && process.env) {
10
+ return process.env[TOOLSHED_URL_ENV_VAR];
11
+ }
12
+ return undefined;
21
13
  }
22
14
  /**
23
- * Two-layer cache (memory + filesystem) for parsed Galaxy tool metadata.
15
+ * Two-layer cache (memory + storage) for parsed Galaxy tool metadata.
24
16
  * Resolves tool IDs to cache keys, loads/saves tool JSON, and manages the cache index.
17
+ *
18
+ * `storage` is required — pass a `FilesystemCacheStorage` (Node.js) or
19
+ * `IndexedDBCacheStorage` (browser). Node callers can use `makeNodeToolCache`
20
+ * from `@galaxy-tool-util/core/node` to get the default filesystem setup.
25
21
  */
26
22
  export class ToolCache {
27
- cacheDir;
28
23
  defaultToolshedUrl;
29
24
  index;
25
+ storage;
30
26
  memoryCache = new Map();
31
27
  constructor(opts) {
32
- this.cacheDir = getCacheDir(opts?.cacheDir);
33
- this.defaultToolshedUrl =
34
- opts?.defaultToolshedUrl ?? process.env[TOOLSHED_URL_ENV_VAR] ?? DEFAULT_TOOLSHED_URL;
35
- this.index = new CacheIndex(this.cacheDir);
28
+ this.defaultToolshedUrl = opts.defaultToolshedUrl ?? envToolshedUrl() ?? DEFAULT_TOOLSHED_URL;
29
+ this.storage = opts.storage;
30
+ this.index = new CacheIndex(this.storage);
36
31
  }
37
32
  resolveToolCoordinates(toolId, toolVersion) {
38
33
  const parsed = parseToolshedToolId(toolId);
@@ -51,29 +46,25 @@ export class ToolCache {
51
46
  readableId: toolIdFromTrs(this.defaultToolshedUrl, toolId),
52
47
  };
53
48
  }
54
- cachePath(key) {
55
- return join(this.cacheDir, `${key}.json`);
56
- }
57
- hasCached(toolId, toolVersion) {
49
+ async hasCached(toolId, toolVersion) {
58
50
  const coords = this.resolveToolCoordinates(toolId, toolVersion);
59
51
  if (coords.version === null)
60
52
  return false;
61
- const key = cacheKey(coords.toolshedUrl, coords.trsToolId, coords.version);
62
- return this.memoryCache.has(key) || existsSync(this.cachePath(key));
53
+ const key = await cacheKey(coords.toolshedUrl, coords.trsToolId, coords.version);
54
+ return this.memoryCache.has(key) || (await this.storage.load(key)) !== null;
63
55
  }
64
56
  async loadCached(key) {
65
57
  if (this.memoryCache.has(key)) {
66
58
  return this.memoryCache.get(key);
67
59
  }
68
- const path = this.cachePath(key);
69
- if (!existsSync(path))
70
- return null;
71
60
  try {
72
- const raw = await readFile(path, "utf-8");
73
- const data = JSON.parse(raw);
61
+ const data = await this.storage.load(key);
62
+ if (data === null)
63
+ return null;
74
64
  const parsedTool = S.decodeUnknownSync(ParsedTool)(data);
75
- if (!this.index.has(key)) {
76
- await this.index.add(key, data.id ?? "unknown", data.version ?? "unknown", "unknown");
65
+ if (!(await this.index.has(key))) {
66
+ const d = data;
67
+ await this.index.add(key, d.id ?? "unknown", d.version ?? "unknown", "unknown");
77
68
  }
78
69
  this.memoryCache.set(key, parsedTool);
79
70
  return parsedTool;
@@ -84,32 +75,27 @@ export class ToolCache {
84
75
  }
85
76
  }
86
77
  async saveTool(key, parsedTool, toolId, toolVersion, source, sourceUrl = "") {
87
- await mkdir(this.cacheDir, { recursive: true });
88
- const path = this.cachePath(key);
89
- await writeFile(path, JSON.stringify(parsedTool, null, 2));
78
+ await this.storage.save(key, parsedTool);
90
79
  await this.index.add(key, toolId, toolVersion, source, sourceUrl);
91
80
  this.memoryCache.set(key, parsedTool);
92
81
  }
93
- listCached() {
82
+ async listCached() {
94
83
  return this.index.listAll();
95
84
  }
96
85
  async clearCache(toolIdPrefix) {
97
86
  if (toolIdPrefix === undefined) {
98
- for (const entry of this.index.listAll()) {
99
- const path = this.cachePath(entry.cache_key);
100
- if (existsSync(path))
101
- await unlink(path);
87
+ const keys = await this.storage.list();
88
+ for (const key of keys) {
89
+ await this.storage.delete(key);
102
90
  }
103
91
  await this.index.clear();
104
92
  this.memoryCache.clear();
105
93
  }
106
94
  else {
107
95
  const prefix = toolIdPrefix.replace(/\*$/, "");
108
- const toRemove = this.index.listAll().filter((e) => e.tool_id.startsWith(prefix));
96
+ const toRemove = (await this.index.listAll()).filter((e) => e.tool_id.startsWith(prefix));
109
97
  for (const entry of toRemove) {
110
- const path = this.cachePath(entry.cache_key);
111
- if (existsSync(path))
112
- await unlink(path);
98
+ await this.storage.delete(entry.cache_key);
113
99
  await this.index.remove(entry.cache_key);
114
100
  this.memoryCache.delete(entry.cache_key);
115
101
  }
@@ -1 +1 @@
1
- {"version":3,"file":"tool-cache.js","sourceRoot":"","sources":["../../src/cache/tool-cache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AACtE,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,KAAK,CAAC,MAAM,eAAe,CAAC;AAEnC,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,aAAa,E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E,CAAC;YACvC,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;gBACvB,MAAM,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;YACjC,CAAC;YACD,MAAM,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;YACzB,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,CAAC;QAC3B,CAAC;aAAM,CAAC;YACN,MAAM,MAAM,GAAG,YAAY,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;YAC/C,MAAM,QAAQ,GAAG,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;YAC1F,KAAK,MAAM,KAAK,IAAI,QAAQ,EAAE,CAAC;gBAC7B,MAAM,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;gBAC3C,MAAM,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;gBACzC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;YAC3C,CAAC;QACH,CAAC;IACH,CAAC;CACF"}
@@ -1,14 +1,14 @@
1
1
  /**
2
2
  * Parse and manipulate Galaxy toolshed tool IDs.
3
3
  *
4
- * Input format: toolshed.g2.bx.psu.edu/repos/owner/repo/tool_name/version
5
- * Or with scheme: https://toolshed.g2.bx.psu.edu/repos/owner/repo/tool_name/version
4
+ * Input format: toolshed.g2.bx.psu.edu/repos/owner/repo/tool_id/version
5
+ * Or with scheme: https://toolshed.g2.bx.psu.edu/repos/owner/repo/tool_id/version
6
6
  */
7
7
  /** Parsed components of a ToolShed tool ID. */
8
8
  export interface ToolCoordinates {
9
9
  /** ToolShed base URL (with https:// scheme). */
10
10
  toolshedUrl: string;
11
- /** TRS-style tool ID: `owner~repo~tool_name`. */
11
+ /** TRS-style tool ID: `owner~repo~tool_id`. */
12
12
  trsToolId: string;
13
13
  /** Tool version, or null if not present in the ID. */
14
14
  toolVersion: string | null;
@@ -16,8 +16,8 @@ export interface ToolCoordinates {
16
16
  /**
17
17
  * Parse a full ToolShed tool ID into its components.
18
18
  * Accepts both scheme-prefixed and bare formats:
19
- * - `toolshed.g2.bx.psu.edu/repos/owner/repo/tool_name/version`
20
- * - `https://toolshed.g2.bx.psu.edu/repos/owner/repo/tool_name/version`
19
+ * - `toolshed.g2.bx.psu.edu/repos/owner/repo/tool_id/version`
20
+ * - `https://toolshed.g2.bx.psu.edu/repos/owner/repo/tool_id/version`
21
21
  * @returns Parsed coordinates, or null if the ID doesn't match the ToolShed format.
22
22
  */
23
23
  export declare function parseToolshedToolId(toolId: string): ToolCoordinates | null;
@@ -1 +1 @@
1
- {"version":3,"file":"tool-id.d.ts","sourceRoot":"","sources":["../../src/cache/tool-id.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,+CAA+C;AAC/C,MAAM,WAAW,eAAe;IAC9B,gDAAgD;IAChD,WAAW,EAAE,MAAM,CAAC;IACpB,iDAAiD;IACjD,SAAS,EAAE,MAAM,CAAC;IAClB,sDAAsD;IACtD,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,eAAe,GAAG,IAAI,CAa1E;AAED,gFAAgF;AAChF,wBAAgB,aAAa,CAAC,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAI5E"}
1
+ {"version":3,"file":"tool-id.d.ts","sourceRoot":"","sources":["../../src/cache/tool-id.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,+CAA+C;AAC/C,MAAM,WAAW,eAAe;IAC9B,gDAAgD;IAChD,WAAW,EAAE,MAAM,CAAC;IACpB,+CAA+C;IAC/C,SAAS,EAAE,MAAM,CAAC;IAClB,sDAAsD;IACtD,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,eAAe,GAAG,IAAI,CAa1E;AAED,gFAAgF;AAChF,wBAAgB,aAAa,CAAC,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAI5E"}
@@ -1,14 +1,14 @@
1
1
  /**
2
2
  * Parse and manipulate Galaxy toolshed tool IDs.
3
3
  *
4
- * Input format: toolshed.g2.bx.psu.edu/repos/owner/repo/tool_name/version
5
- * Or with scheme: https://toolshed.g2.bx.psu.edu/repos/owner/repo/tool_name/version
4
+ * Input format: toolshed.g2.bx.psu.edu/repos/owner/repo/tool_id/version
5
+ * Or with scheme: https://toolshed.g2.bx.psu.edu/repos/owner/repo/tool_id/version
6
6
  */
7
7
  /**
8
8
  * Parse a full ToolShed tool ID into its components.
9
9
  * Accepts both scheme-prefixed and bare formats:
10
- * - `toolshed.g2.bx.psu.edu/repos/owner/repo/tool_name/version`
11
- * - `https://toolshed.g2.bx.psu.edu/repos/owner/repo/tool_name/version`
10
+ * - `toolshed.g2.bx.psu.edu/repos/owner/repo/tool_id/version`
11
+ * - `https://toolshed.g2.bx.psu.edu/repos/owner/repo/tool_id/version`
12
12
  * @returns Parsed coordinates, or null if the ID doesn't match the ToolShed format.
13
13
  */
14
14
  export function parseToolshedToolId(toolId) {
@@ -0,0 +1,7 @@
1
+ import { WorkflowToolConfig } from "./config.js";
2
+ /**
3
+ * Load the shared tool configuration portion from a YAML file.
4
+ * Unknown fields (e.g. `port`, `host`) are silently ignored.
5
+ */
6
+ export declare function loadWorkflowToolConfig(configPath: string): Promise<WorkflowToolConfig>;
7
+ //# sourceMappingURL=config-node.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config-node.d.ts","sourceRoot":"","sources":["../src/config-node.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEjD;;;GAGG;AACH,wBAAsB,sBAAsB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAI5F"}
@@ -0,0 +1,14 @@
1
+ import { readFile } from "node:fs/promises";
2
+ import * as S from "effect/Schema";
3
+ import YAML from "yaml";
4
+ import { WorkflowToolConfig } from "./config.js";
5
+ /**
6
+ * Load the shared tool configuration portion from a YAML file.
7
+ * Unknown fields (e.g. `port`, `host`) are silently ignored.
8
+ */
9
+ export async function loadWorkflowToolConfig(configPath) {
10
+ const raw = await readFile(configPath, "utf-8");
11
+ const parsed = YAML.parse(raw);
12
+ return S.decodeUnknownSync(WorkflowToolConfig)(parsed);
13
+ }
14
+ //# sourceMappingURL=config-node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config-node.js","sourceRoot":"","sources":["../src/config-node.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,KAAK,CAAC,MAAM,eAAe,CAAC;AACnC,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEjD;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAAC,UAAkB;IAC7D,MAAM,GAAG,GAAG,MAAM,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IAChD,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAY,CAAC;IAC1C,OAAO,CAAC,CAAC,iBAAiB,CAAC,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC;AACzD,CAAC"}
@@ -0,0 +1,75 @@
1
+ /**
2
+ * Shared YAML configuration schema for Galaxy workflow tool settings.
3
+ *
4
+ * Both `galaxy-tool-proxy` and `gxwf-web` read the same `galaxy.workflows.*`
5
+ * sections from their config files. This module defines those shared schemas
6
+ * so the field names, types, and defaults stay in sync.
7
+ *
8
+ * Each server may extend this with its own fields (e.g. `port`/`host` for the
9
+ * proxy). Use `S.Struct({ ...WorkflowToolConfig.fields, myField: ... })`.
10
+ */
11
+ import * as S from "effect/Schema";
12
+ import type { ToolSource } from "./tool-info.js";
13
+ /** Effect Schema for a tool source entry. */
14
+ export declare const ToolSourceConfig: S.Struct<{
15
+ type: S.Union<[S.Literal<["toolshed"]>, S.Literal<["galaxy"]>]>;
16
+ url: typeof S.String;
17
+ /** Whether the source is active. Disabled sources are skipped at runtime. */
18
+ enabled: S.optionalWith<typeof S.Boolean, {
19
+ default: () => true;
20
+ }>;
21
+ }>;
22
+ export type ToolSourceConfig = S.Schema.Type<typeof ToolSourceConfig>;
23
+ /** Effect Schema for the cache directory setting. */
24
+ export declare const ToolCacheConfig: S.Struct<{
25
+ directory: S.optional<typeof S.String>;
26
+ }>;
27
+ export type ToolCacheConfig = S.Schema.Type<typeof ToolCacheConfig>;
28
+ /**
29
+ * Shared Galaxy workflow tool configuration — the portion of the YAML config
30
+ * common to both `galaxy-tool-proxy` and `gxwf-web`.
31
+ *
32
+ * ```yaml
33
+ * galaxy.workflows.toolSources:
34
+ * - type: toolshed
35
+ * url: https://toolshed.g2.bx.psu.edu
36
+ * - type: galaxy
37
+ * url: https://usegalaxy.org
38
+ * enabled: false
39
+ * galaxy.workflows.toolCache:
40
+ * directory: /tmp/galaxy-tool-cache
41
+ * ```
42
+ */
43
+ export declare const WorkflowToolConfig: S.Struct<{
44
+ "galaxy.workflows.toolSources": S.optionalWith<S.Array$<S.Struct<{
45
+ type: S.Union<[S.Literal<["toolshed"]>, S.Literal<["galaxy"]>]>;
46
+ url: typeof S.String;
47
+ /** Whether the source is active. Disabled sources are skipped at runtime. */
48
+ enabled: S.optionalWith<typeof S.Boolean, {
49
+ default: () => true;
50
+ }>;
51
+ }>>, {
52
+ default: () => never[];
53
+ }>;
54
+ "galaxy.workflows.toolCache": S.optionalWith<S.Struct<{
55
+ directory: S.optional<typeof S.String>;
56
+ }>, {
57
+ default: () => S.Schema.Type<typeof ToolCacheConfig>;
58
+ }>;
59
+ }>;
60
+ export type WorkflowToolConfig = S.Schema.Type<typeof WorkflowToolConfig>;
61
+ /**
62
+ * Config-derived runtime options. Narrow subset of tool-info + cache options
63
+ * that come from a YAML config, without any backend/storage choice.
64
+ */
65
+ export interface ConfigToolInfoOptions {
66
+ cacheDir?: string;
67
+ sources?: ToolSource[];
68
+ }
69
+ /**
70
+ * Convert a WorkflowToolConfig to runtime options. Filters out disabled sources.
71
+ * Node callers pair this with `makeNodeToolInfoService` (from `/node`) to
72
+ * construct a ToolInfoService with filesystem storage.
73
+ */
74
+ export declare function toolInfoOptionsFromConfig(config: WorkflowToolConfig): ConfigToolInfoOptions;
75
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,CAAC,MAAM,eAAe,CAAC;AACnC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEjD,6CAA6C;AAC7C,eAAO,MAAM,gBAAgB;;;IAG3B,6EAA6E;;;;EAE7E,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAEtE,qDAAqD;AACrD,eAAO,MAAM,eAAe;;EAE1B,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,eAAe,CAAC,CAAC;AAEpE;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,kBAAkB;;;;QA1B7B,6EAA6E;;;;;;;;;;uBA+BpD,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,eAAe,CAAC;;EAE9D,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE1E;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,UAAU,EAAE,CAAC;CACxB;AAED;;;;GAIG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,kBAAkB,GAAG,qBAAqB,CAQ3F"}
package/dist/config.js ADDED
@@ -0,0 +1,60 @@
1
+ /**
2
+ * Shared YAML configuration schema for Galaxy workflow tool settings.
3
+ *
4
+ * Both `galaxy-tool-proxy` and `gxwf-web` read the same `galaxy.workflows.*`
5
+ * sections from their config files. This module defines those shared schemas
6
+ * so the field names, types, and defaults stay in sync.
7
+ *
8
+ * Each server may extend this with its own fields (e.g. `port`/`host` for the
9
+ * proxy). Use `S.Struct({ ...WorkflowToolConfig.fields, myField: ... })`.
10
+ */
11
+ import * as S from "effect/Schema";
12
+ /** Effect Schema for a tool source entry. */
13
+ export const ToolSourceConfig = S.Struct({
14
+ type: S.Union(S.Literal("toolshed"), S.Literal("galaxy")),
15
+ url: S.String,
16
+ /** Whether the source is active. Disabled sources are skipped at runtime. */
17
+ enabled: S.optionalWith(S.Boolean, { default: () => true }),
18
+ });
19
+ /** Effect Schema for the cache directory setting. */
20
+ export const ToolCacheConfig = S.Struct({
21
+ directory: S.optional(S.String),
22
+ });
23
+ /**
24
+ * Shared Galaxy workflow tool configuration — the portion of the YAML config
25
+ * common to both `galaxy-tool-proxy` and `gxwf-web`.
26
+ *
27
+ * ```yaml
28
+ * galaxy.workflows.toolSources:
29
+ * - type: toolshed
30
+ * url: https://toolshed.g2.bx.psu.edu
31
+ * - type: galaxy
32
+ * url: https://usegalaxy.org
33
+ * enabled: false
34
+ * galaxy.workflows.toolCache:
35
+ * directory: /tmp/galaxy-tool-cache
36
+ * ```
37
+ */
38
+ export const WorkflowToolConfig = S.Struct({
39
+ "galaxy.workflows.toolSources": S.optionalWith(S.Array(ToolSourceConfig), {
40
+ default: () => [],
41
+ }),
42
+ "galaxy.workflows.toolCache": S.optionalWith(ToolCacheConfig, {
43
+ default: () => ({}),
44
+ }),
45
+ });
46
+ /**
47
+ * Convert a WorkflowToolConfig to runtime options. Filters out disabled sources.
48
+ * Node callers pair this with `makeNodeToolInfoService` (from `/node`) to
49
+ * construct a ToolInfoService with filesystem storage.
50
+ */
51
+ export function toolInfoOptionsFromConfig(config) {
52
+ const enabledSources = config["galaxy.workflows.toolSources"]
53
+ .filter((s) => s.enabled)
54
+ .map((s) => ({ type: s.type, url: s.url }));
55
+ return {
56
+ cacheDir: config["galaxy.workflows.toolCache"]?.directory,
57
+ sources: enabledSources.length > 0 ? enabledSources : undefined,
58
+ };
59
+ }
60
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,CAAC,MAAM,eAAe,CAAC;AAGnC,6CAA6C;AAC7C,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IACzD,GAAG,EAAE,CAAC,CAAC,MAAM;IACb,6EAA6E;IAC7E,OAAO,EAAE,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,EAAE,CAAC;CAC5D,CAAC,CAAC;AAGH,qDAAqD;AACrD,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IACtC,SAAS,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC;CAChC,CAAC,CAAC;AAGH;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,8BAA8B,EAAE,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,gBAAgB,CAAC,EAAE;QACxE,OAAO,EAAE,GAAG,EAAE,CAAC,EAAE;KAClB,CAAC;IACF,4BAA4B,EAAE,CAAC,CAAC,YAAY,CAAC,eAAe,EAAE;QAC5D,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,CAA0C;KAC7D,CAAC;CACH,CAAC,CAAC;AAYH;;;;GAIG;AACH,MAAM,UAAU,yBAAyB,CAAC,MAA0B;IAClE,MAAM,cAAc,GAAiB,MAAM,CAAC,8BAA8B,CAAC;SACxE,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC;SACxB,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;IAC9C,OAAO;QACL,QAAQ,EAAE,MAAM,CAAC,4BAA4B,CAAC,EAAE,SAAS;QACzD,OAAO,EAAE,cAAc,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,SAAS;KAChE,CAAC;AACJ,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,8 +1,9 @@
1
1
  /**
2
2
  * @module @galaxy-tool-util/core
3
3
  *
4
- * Galaxy tool cache, ToolShed/Galaxy API client, and ParsedTool model.
5
- * Handles fetching tool metadata from remote sources and caching locally.
4
+ * Universal entry safe to import in Node or browser. Symbols that require
5
+ * Node built-ins (filesystem cache storage, YAML config loading) live under
6
+ * `@galaxy-tool-util/core/node`.
6
7
  */
7
8
  /** Effect Schema for parsed tool metadata (id, version, name, inputs, outputs, etc.). */
8
9
  export { ParsedTool, HelpContent, XrefDict, Citation } from "./models/parsed-tool.js";
@@ -15,14 +16,17 @@ toolIdFromTrs,
15
16
  cacheKey,
16
17
  /** Cache metadata index — tracks tool IDs, versions, sources, and timestamps. */
17
18
  CacheIndex,
18
- /** Two-layer cache (memory + filesystem) for parsed tool metadata. */
19
- ToolCache,
20
- /** Resolve cache directory from explicit override, env var, or default. */
21
- getCacheDir, DEFAULT_CACHE_DIR, CACHE_DIR_ENV_VAR, DEFAULT_TOOLSHED_URL, TOOLSHED_URL_ENV_VAR, } from "./cache/index.js";
22
- export type { ToolCoordinates, CacheIndexEntry, CacheIndexData } from "./cache/index.js";
19
+ /** Two-layer cache (memory + storage) for parsed tool metadata. */
20
+ ToolCache, DEFAULT_TOOLSHED_URL, TOOLSHED_URL_ENV_VAR, } from "./cache/index.js";
21
+ export type { ToolCoordinates, CacheIndexEntry, CacheIndexData, CacheStorage, ResolvedCoordinates, } from "./cache/index.js";
22
+ /** IndexedDB-backed cache storage for browser/Web Worker contexts. */
23
+ export { IndexedDBCacheStorage } from "./cache/index.js";
23
24
  /** Fetch parsed tool metadata from a ToolShed instance via TRS API. */
24
25
  export { fetchFromToolShed, fetchFromGalaxy, ToolFetchError } from "./client/index.js";
25
26
  /** High-level service: fetch tools from multiple sources with automatic caching. */
26
27
  export { ToolInfoService } from "./tool-info.js";
27
28
  export type { ToolInfoOptions, ToolSource } from "./tool-info.js";
29
+ /** Shared YAML config schema for tool sources and cache settings. */
30
+ export { WorkflowToolConfig, ToolSourceConfig, ToolCacheConfig, toolInfoOptionsFromConfig, } from "./config.js";
31
+ export type { ConfigToolInfoOptions } from "./config.js";
28
32
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,yFAAyF;AACzF,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACtF,O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AAM,gBAAgB,CAAC;AACjD,YAAY,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAClE,qEAAqE;AACrE,OAAO,EACL,kBAAkB,EAClB,gBAAgB,EAChB,eAAe,EACf,yBAAyB,GAC1B,MAAM,aAAa,CAAC;AACrB,YAAY,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC"}
package/dist/index.js CHANGED
@@ -1,8 +1,9 @@
1
1
  /**
2
2
  * @module @galaxy-tool-util/core
3
3
  *
4
- * Galaxy tool cache, ToolShed/Galaxy API client, and ParsedTool model.
5
- * Handles fetching tool metadata from remote sources and caching locally.
4
+ * Universal entry safe to import in Node or browser. Symbols that require
5
+ * Node built-ins (filesystem cache storage, YAML config loading) live under
6
+ * `@galaxy-tool-util/core/node`.
6
7
  */
7
8
  /** Effect Schema for parsed tool metadata (id, version, name, inputs, outputs, etc.). */
8
9
  export { ParsedTool, HelpContent, XrefDict, Citation } from "./models/parsed-tool.js";
@@ -15,12 +16,14 @@ toolIdFromTrs,
15
16
  cacheKey,
16
17
  /** Cache metadata index — tracks tool IDs, versions, sources, and timestamps. */
17
18
  CacheIndex,
18
- /** Two-layer cache (memory + filesystem) for parsed tool metadata. */
19
- ToolCache,
20
- /** Resolve cache directory from explicit override, env var, or default. */
21
- getCacheDir, DEFAULT_CACHE_DIR, CACHE_DIR_ENV_VAR, DEFAULT_TOOLSHED_URL, TOOLSHED_URL_ENV_VAR, } from "./cache/index.js";
19
+ /** Two-layer cache (memory + storage) for parsed tool metadata. */
20
+ ToolCache, DEFAULT_TOOLSHED_URL, TOOLSHED_URL_ENV_VAR, } from "./cache/index.js";
21
+ /** IndexedDB-backed cache storage for browser/Web Worker contexts. */
22
+ export { IndexedDBCacheStorage } from "./cache/index.js";
22
23
  /** Fetch parsed tool metadata from a ToolShed instance via TRS API. */
23
24
  export { fetchFromToolShed, fetchFromGalaxy, ToolFetchError } from "./client/index.js";
24
25
  /** High-level service: fetch tools from multiple sources with automatic caching. */
25
26
  export { ToolInfoService } from "./tool-info.js";
27
+ /** Shared YAML config schema for tool sources and cache settings. */
28
+ export { WorkflowToolConfig, ToolSourceConfig, ToolCacheConfig, toolInfoOptionsFromConfig, } from "./config.js";
26
29
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,yFAAyF;AACzF,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACtF,OAAO;AACL,4FAA4F;AAC5F,mBAAmB;AACnB,oEAAoE;AACpE,aAAa;AACb,sFAAsF;AACtF,QAAQ;AACR,iFAAiF;AACjF,UAAU;AACV,sEAAsE;AACtE,SAAS;AACT,2EAA2E;AAC3E,WAAW,EACX,iBAAiB,EACjB,iBAAiB,EACjB,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,kBAAkB,CAAC;AAE1B,uEAAuE;AACvE,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACvF,oFAAoF;AACpF,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,yFAAyF;AACzF,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACtF,OAAO;AACL,4FAA4F;AAC5F,mBAAmB;AACnB,oEAAoE;AACpE,aAAa;AACb,sFAAsF;AACtF,QAAQ;AACR,iFAAiF;AACjF,UAAU;AACV,mEAAmE;AACnE,SAAS,EACT,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,kBAAkB,CAAC;AAQ1B,sEAAsE;AACtE,OAAO,EAAE,qBAAqB,EAAE,MAA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