{"id":43371990,"url":"https://github.com/common-workflow-lab/cwl-ts-auto","last_synced_at":"2026-02-02T05:54:50.960Z","repository":{"id":40469244,"uuid":"425035550","full_name":"common-workflow-lab/cwl-ts-auto","owner":"common-workflow-lab","description":"Autogenerated TypeScript bindings for CWL","archived":false,"fork":false,"pushed_at":"2025-11-21T07:21:09.000Z","size":925,"stargazers_count":6,"open_issues_count":6,"forks_count":4,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-11-21T09:15:42.783Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/common-workflow-lab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-11-05T17:41:37.000Z","updated_at":"2025-11-21T07:21:13.000Z","dependencies_parsed_at":"2024-03-19T04:24:45.647Z","dependency_job_id":"31529b2e-9427-4a1c-8f00-648b3663b653","html_url":"https://github.com/common-workflow-lab/cwl-ts-auto","commit_stats":{"total_commits":13,"total_committers":2,"mean_commits":6.5,"dds":"0.15384615384615385","last_synced_commit":"0c14cfc95a2dab5739e2c84f91026b767fe902d3"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/common-workflow-lab/cwl-ts-auto","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/common-workflow-lab%2Fcwl-ts-auto","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/common-workflow-lab%2Fcwl-ts-auto/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/common-workflow-lab%2Fcwl-ts-auto/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/common-workflow-lab%2Fcwl-ts-auto/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/common-workflow-lab","download_url":"https://codeload.github.com/common-workflow-lab/cwl-ts-auto/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/common-workflow-lab%2Fcwl-ts-auto/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29006550,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-02T04:25:24.522Z","status":"ssl_error","status_checked_at":"2026-02-02T04:24:51.069Z","response_time":58,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-02-02T05:54:50.018Z","updated_at":"2026-02-02T05:54:50.945Z","avatar_url":"https://github.com/common-workflow-lab.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cwl-ts-auto\n![Actions CI](https://github.com/common-workflow-lab/cwl-ts-auto/actions/workflows/workflow.yml/badge.svg)\n[![npm version](https://badge.fury.io/js/cwl-ts-auto.svg)](https://badge.fury.io/js/cwl-ts-auto)\n\nThis project contains TypeScript objects and utilities auto-generated by https://github.com/common-workflow-language/schema_salad for parsing documents corresponding to the https://w3id.org/cwl/cwl schema\n\n## Installation \u0026 Usage\nTo install the latest version of cwl-ts-auto execute:\n\n`npm install cwl-ts-auto`\n\n### Loading Documents\nDocuments can be loaded by specyfying a file path or by string\n```TypeScript\nimport * as cwlTsAuto from 'cwl-ts-auto'\nimport fs from 'fs'\nimport url from 'url'\n\n// Load document by file\ncwlTsAuto.loadDocument('./test.cwl')\n    .then((file) =\u003e {\n        if (file instanceof cwlTsAuto.CommandLineTool) {\n            console.log('This document is a CommandLineTool with baseCommand: ', file.baseCommand)\n        }\n    })\n    .catch((e) =\u003e {\n        if(e instanceof cwlTsAuto.ValidationException) {\n            console.log(e.toString())\n        } else {\n            console.log(e)\n        }\n    })\n\n// Load document by string\nlet docAsString = fs.readFileSync('./test.cwl').toString()\ncwlTsAuto.loadDocumentByString(docAsString, url.pathToFileURL('/your/base/uri/').toString())\n    .then((file) =\u003e {\n        if (file instanceof cwlTsAuto.CommandLineTool) {\n            console.log('This document is a CommandLineTool with baseCommand: ', file.baseCommand)\n        }\n    })\n    .catch((e) =\u003e {\n        if(e instanceof cwlTsAuto.ValidationException) {\n            console.log(e.toString())\n        } else {\n            console.log(e)\n        }\n    })\n\n// Load document by URL\ncwlTsAuto.loadDocument('https://raw.githubusercontent.com/common-workflow-lab/cwl-ts-auto/main/src/test/data/examples/valid-cat-tool.cwl')\n    .then((file) =\u003e {\n        if (file instanceof cwlTsAuto.CommandLineTool) {\n            console.log('This document is a CommandLineTool with baseCommand: ', file.baseCommand)\n        }\n    })\n    .catch((e) =\u003e {\n        if(e instanceof cwlTsAuto.ValidationException) {\n            console.log(e.toString())\n        } else {\n            console.log(e)\n        }\n    })\n```\n\n### Creating, editing and saving Documents\nThis example shows how to create a simple CommandLineTool with one input\n```TypeScript\nimport * as cwlTsAuto from 'cwl-ts-auto'\n\nlet exampleCommandLineTool =\n    new cwlTsAuto.CommandLineTool({\n        class_: cwlTsAuto.CommandLineTool_class.COMMANDLINETOOL,\n        inputs: [],\n        outputs: []\n    })\nexampleCommandLineTool.baseCommand = 'echo'\n\nlet exampleInput =\n    new cwlTsAuto.CommandInputParameter({\n        type: cwlTsAuto.PrimitiveType.STRING\n    })\nexampleInput.default_ = 'Hello World!'\nexampleCommandLineTool.inputs.push(exampleInput)\n\nconsole.log(JSON.stringify(exampleCommandLineTool.save()))\n```\n\n## Documentation\nThe complete documentation, autogenerated by [TypeDoc](https://typedoc.org/) can be found under the following link:\nhttps://common-workflow-lab.github.io/cwl-ts-auto/\n\n## Limitations\ncwl-ts-auto only supports the CWL v1.2 syntax. Other documents have to be upgraded using the [cwl-upgrader](https://pypi.org/project/cwl-upgrader/)\n\n## Running and debugging tests\nTo run tests, install npm and run `npm test`, which launches mocha as defined\nin `package.json`.  Additional options to mocha can be passed afer `--`. To run\na single test run `run npm test -- --grep $my_test_id`. It is occasionally\nhelpful to pass `--allow-uncaught` to mocha to get a better handle on failing\ntest assertions. To debug a test using the chrome inspector insert a\nbreakpoint anywhere in code called by the test. Breakpoints are using the\n`debugger;` instruction. Open chrome and navigate to `chrome://inspect`, then\nrun `npm test -- --grep valid_cond_wf_003_1_nojs --inspect --debug-brk`, switch\nback to chrome and click inspect.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcommon-workflow-lab%2Fcwl-ts-auto","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcommon-workflow-lab%2Fcwl-ts-auto","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcommon-workflow-lab%2Fcwl-ts-auto/lists"}