@galaxy-tool-util/core
v1.5.0
Published
Galaxy tool cache, ToolShed client, and ParsedTool models
Readme
@galaxy-tool-util/core
Galaxy tool cache, ToolShed client, and ParsedTool models.
Installation
npm install @galaxy-tool-util/coreUsage
The package ships two entry points:
@galaxy-tool-util/core— universal (browser + Node). Models, schemas,ToolCache(with injected storage),IndexedDBCacheStorage,ToolInfoService,cacheKey, ToolShed/Galaxy clients, YAML config schemas.@galaxy-tool-util/core/node— Node-only helpers that pull infs,path,os:FilesystemCacheStorage,getCacheDir,DEFAULT_CACHE_DIR,CACHE_DIR_ENV_VAR,loadWorkflowToolConfig, plus convenience factoriesmakeNodeToolCacheandmakeNodeToolInfoService.
Browser / Web Worker
import { ToolCache, IndexedDBCacheStorage } from "@galaxy-tool-util/core";
const cache = new ToolCache({
storage: new IndexedDBCacheStorage("gxwf-tool-cache"),
});Node
import { makeNodeToolCache } from "@galaxy-tool-util/core/node";
const cache = makeNodeToolCache(); // defaults to ~/.galaxy/tool_info_cacheBundlers targeting the browser will fail fast if /node is imported — by
design. Keep Node-only imports on the server side of your application.
License
MIT
