{"id":18269682,"url":"https://github.com/skyfe79/jobpipeline","last_synced_at":"2025-04-09T03:15:18.602Z","repository":{"id":146985454,"uuid":"618381529","full_name":"skyfe79/JobPipeline","owner":"skyfe79","description":"A simple job pipeline package for processing tasks in sequence.","archived":false,"fork":false,"pushed_at":"2023-03-24T11:00:59.000Z","size":34,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-04-26T03:02:31.862Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/jobpipeline","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/skyfe79.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2023-03-24T10:50:36.000Z","updated_at":"2023-03-24T11:04:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"fb78f71b-3afe-4bd7-b62b-c735c97aad73","html_url":"https://github.com/skyfe79/JobPipeline","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skyfe79%2FJobPipeline","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skyfe79%2FJobPipeline/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skyfe79%2FJobPipeline/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skyfe79%2FJobPipeline/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skyfe79","download_url":"https://codeload.github.com/skyfe79/JobPipeline/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247968377,"owners_count":21025823,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":"2024-11-05T11:36:50.879Z","updated_at":"2025-04-09T03:15:18.586Z","avatar_url":"https://github.com/skyfe79.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JobPipeline\n\nA simple job pipeline package for processing tasks in sequence.\n\n## Installation\n\n```bash\nnpm install jobpipeline\n```\n\n## Usage\n\nFirst, import the necessary classes:\n\n```ts\nimport { Pipeline } from \"jobpipeline\";\nimport { AddJob } from \"jobpipeline/dist/exampleJobs/AddJob\";\nimport { MulJob } from \"jobpipeline/dist/exampleJobs/MulJob\";\n```\n\nNext, create a new Pipeline instance and add jobs to it:\n\n```ts\nconst pipeline = new Pipeline();\nconst addJob = new AddJob();\nconst mulJob = new MulJob();\n\npipeline.addJob(addJob);\npipeline.addJob(mulJob);\n```\n\nFinally, run the pipeline:\n\n```ts\nconst input = 5;\npipeline\n  .run(input)\n  .then((result) =\u003e console.log(`Result: ${result}`))\n  .catch((error) =\u003e console.error(`Error: ${error.message}`));\n```\n\nThis will run the AddJob and MulJob in sequence, adding 1 to the input and then multiplying the result by 2.\n\n## Creating Custom Jobs\n\nTo create a custom job, implement the Job interface:\n\n```ts\nimport { Job } from \"jobpipeline\";\n\nclass CustomJob implements Job\u003cInputType, OutputType\u003e {\n  name = \"CustomJob\";\n\n  async run(input: InputType): Promise\u003cOutputType\u003e {\n    // Your custom processing logic here\n  }\n}\n```\n\nReplace InputType and OutputType with the appropriate types for your job.\n\n## License\n\nThis package is licensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskyfe79%2Fjobpipeline","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskyfe79%2Fjobpipeline","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskyfe79%2Fjobpipeline/lists"}