{"id":17796859,"url":"https://github.com/palcarazm/batchjs","last_synced_at":"2025-03-17T02:31:47.483Z","repository":{"id":249423503,"uuid":"831417935","full_name":"palcarazm/batchjs","owner":"palcarazm","description":"Dependencies free batch processing framework for NodeJS based on streams.","archived":false,"fork":false,"pushed_at":"2025-02-24T02:12:23.000Z","size":204,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"version/v1","last_synced_at":"2025-03-09T19:37:04.325Z","etag":null,"topics":["batch-processing","framework","nodejs","streams-batch-processing-framework"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/palcarazm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["palcarazm"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2024-07-20T13:44:43.000Z","updated_at":"2025-02-19T04:46:53.000Z","dependencies_parsed_at":"2024-10-27T11:55:11.342Z","dependency_job_id":"9b36411a-fc0e-491a-bc84-ae9485845395","html_url":"https://github.com/palcarazm/batchjs","commit_stats":null,"previous_names":["palcarazm/batchjs"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/palcarazm%2Fbatchjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/palcarazm%2Fbatchjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/palcarazm%2Fbatchjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/palcarazm%2Fbatchjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/palcarazm","download_url":"https://codeload.github.com/palcarazm/batchjs/tar.gz/refs/heads/version/v1","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243841125,"owners_count":20356440,"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":["batch-processing","framework","nodejs","streams-batch-processing-framework"],"created_at":"2024-10-27T11:48:47.297Z","updated_at":"2025-03-17T02:31:47.477Z","avatar_url":"https://github.com/palcarazm.png","language":"TypeScript","readme":"[![GitHub license](https://img.shields.io/github/license/palcarazm/batchjs.svg?color=informational)](https://github.com/palcarazm/batchjs/blob/version/v1/LICENSE)\n[![Latest release](https://img.shields.io/github/package-json/v/palcarazm/batchjs/version/v1?logo=github)](https://github.com/palcarazm/batchjs/releases)\n[![NPM Badge](https://img.shields.io/npm/dm/batchjs?logo=npm)](https://www.npmjs.com/package/batchjs)\n[![CI](https://img.shields.io/github/actions/workflow/status/palcarazm/batchjs/ci-workflow.yml?branch=version/v1\u0026label=CI\u0026logo=Node.js\u0026logoColor=white)](https://github.com/palcarazm/batchjs/actions/workflows/ci-workflow.yml)\n[![Coverage](https://coveralls.io/repos/github/palcarazm/batchjs/badge.svg)](https://coveralls.io/github/palcarazm/batchjs)\n[![Funding](https://img.shields.io/badge/sponsor-30363D?style=flat\u0026logo=GitHub-Sponsors\u0026logoColor=#white)](https://github.com/sponsors/palcarazm)\n\n# BatchJS\n\nDependencies free batch processing framework for NodeJS based on streams.\n\n---\n\n- [BatchJS](#batchjs)\n- [Download](#download)\n  - [NPM](#npm)\n  - [Yarn](#yarn)\n- [Usage](#usage)\n- [Documentation](#documentation)\n- [Collaborators welcome!](#collaborators-welcome)\n\n---\n\n# Download\n\n[![Latest release](https://img.shields.io/github/package-json/v/palcarazm/batchjs/version/v1?logo=github)](https://github.com/palcarazm/batchjs/releases)\n\n## NPM\n\n[![NPM Badge](https://img.shields.io/npm/dm/batchjs?logo=npm)](https://www.npmjs.com/package/batchjs)\n\n```ksh\nnpm install batchjs\n```\n\n## Yarn\n\n```ksh\nyarn add batchjs\n```\n\n# Usage\n\n```typescript\nimport { Job, Step } from \"batchjs\";\n\n// Implement a step\nclass StepImplementation extends Step {\n  // Set a name to the step\n  constructor(name: string = \"MockPassingStep\") {\n    super(name);\n  }\n\n  // Implement the reader to load step data source\n  protected _reader() {\n    return new Readable({\n      objectMode: true,\n      read() {\n        this.push(\"data\");\n        this.push(null);\n      },\n    });\n  }\n\n  // Implement the processors to transform data sequently using our streams or your own streams\n  protected _processors() {\n    const opts: TransformOptions = {\n      objectMode: true,\n      transform(\n        chunk: unknown,\n        encoding: BufferEncoding,\n        callback: TransformCallback\n      ) {\n        this.push(chunk);\n        callback();\n      },\n    };\n    return [new Transform(opts), new Transform(opts)];\n  }\n\n  // Implement the write to stock final step data\n  protected _writer() {\n    return new Writable({\n      objectMode: true,\n      write(\n        chunk: unknown,\n        encoding: BufferEncoding,\n        callback: TransformCallback\n      ) {\n        callback();\n      },\n    });\n  }\n}\n\n// Implement a Job\nclass JobImplementation extends Job {\n  // Implement to set the steps to be sequently executed.\n  protected _steps() {\n    return [new StepImplementation(), new StepImplementation()];\n  }\n}\n\n// Instance the Job\nconst job = new JobImplementation(\"My job\");\n\n// Set events listener\njob.on(\"stepStart\", (step: step) =\u003e {\n  console.log(`Starting step ${step.name}`);\n});\n\n// Launch the job\njob\n  .run()\n  .then(() =\u003e {\n    console.log(\"Job completed successfully\");\n  })\n  .catch((error) =\u003e {\n    console.log(\"Job completed with errors\");\n  });\n```\n\n# Documentation\n\n- [Core API](./docs/common-api.md)\n- [Stream API](./docs/streams-api.md)\n\n# Collaborators welcome!\n\n- ¿Do you like the project? Give us a :star: in [GitHub](https://github.com/palcarazm/batchjs).\n- :sos: ¿Do you need some help? Open a discussion in [GitHub help wanted](https://github.com/palcarazm/batchjs/discussions/new?category=q-a)\n- :bug: ¿Do you find a bug? Open a issue in [GitHub bug report](https://github.com/palcarazm/batchjs/issues/new?assignees=\u0026labels=bug\u0026projects=\u0026template=01-BUG_REPORT.yml)\n- :bulb: ¿Do you have a great idea? Open a issue in [GitHub feature request](https://github.com/palcarazm/batchjs/issues/new?assignees=\u0026labels=feature\u0026projects=\u0026template=02-FEATURE_REQUEST.yml)\n- :computer: ¿Do you know how to fix a bug? Open a pull request in [GitHub pull request](https://github.com/palcarazm/batchjs/compare).\n- ¿Do you know a security issue? Take a read to our [security strategy](https://github.com/palcarazm/batchjs/blob/version/v1/SECURITY.md).\n\n[![GitHub Contributors](https://contrib.rocks/image?repo=palcarazm/batchjs)](https://github.com/palcarazm/batchjs/graphs/contributors)\n\n[Subscribe our code of conduct](https://github.com/palcarazm/batchjs/blob/version/v1/CODE_OF_CONDUCT.md) and follow the [Contribution Guidelines](https://github.com/palcarazm/batchjs/blob/version/v1/CONTRIBUTING.md).\n","funding_links":["https://github.com/sponsors/palcarazm"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpalcarazm%2Fbatchjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpalcarazm%2Fbatchjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpalcarazm%2Fbatchjs/lists"}