{"_id":"@cemusta/nestjs-pulse","_rev":"2-ef25556ee5fb7d5068cc0dc5e16fc4ef","name":"@cemusta/nestjs-pulse","dist-tags":{"latest":"1.0.9"},"versions":{"1.0.8":{"name":"@cemusta/nestjs-pulse","version":"1.0.8","keywords":["job","jobs","cron","cronjob","mongodb","scheduling","mongodb","mongodb-scheduler","queue","delayed","scheduler","pulse","bull","bee","kue","nest","nestjs"],"author":{"name":"code-xhyun","email":"shh6155@gmail.com"},"license":"MIT","_id":"@cemusta/nestjs-pulse@1.0.8","maintainers":[{"name":"cemusta","email":"nooneelse@gmail.com"}],"homepage":"https://pulsecron.com","bugs":{"url":"https://github.com/pulsecron/nestjs-pulse/issues"},"dist":{"shasum":"685ef1967434f79523f8b56c30db69e45bc4b377","tarball":"https://registry.npmjs.org/@cemusta/nestjs-pulse/-/nestjs-pulse-1.0.8.tgz","fileCount":75,"integrity":"sha512-Lg5fad+daI5hdVuXdiw/jBXfNi47RoH6VeDqRFyAdlN64umPtt8iJKpLUa0WS1bchrgUzxRUvgYJ6Df1I+cVTQ==","signatures":[{"sig":"MEUCIQDCEhLQjbdiMobTVsRIG3uQECOv1+yfanvJMBptgyrXdQIgPIBhsHPwCcoA6VCp7m9Cy8rMl7ibkrGNvJQ2WpeMHbk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":60536},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"e9e53667009c38cbc1c90811637f632c5c98df0b","scripts":{"ncu":"npx npm-check-updates -u","lint":"eslint 'src/**/*.ts'","build":"tsc","dry-run":"npm publish --dry-run","release":"npm run build && semantic-release","test:e2e":"ts-node examples/test/src/main.ts","prepublishOnly":"npm run build","semantic-release":"semantic-release"},"_npmUser":{"name":"cemusta","email":"nooneelse@gmail.com"},"repository":{"url":"git+https://github.com/cemusta/nestjs-pulse.git","type":"git"},"_npmVersion":"10.5.2","description":"The modern MongoDB-powered scheduling library pulse for NestJS","directories":{},"_nodeVersion":"22.13.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"rxjs":"^7.8.1","rimraf":"^6.0.1","ts-node":"^10.9.2","typescript":"^5.7.3","@nestjs/cli":"^11.0.2","@types/node":"^22.13.1","ts-node-dev":"^2.0.0","@nestjs/core":"^11.0.8","@nestjs/common":"^11.0.8","@nestjs/testing":"^11.0.8","@pulsecron/pulse":"^1.6.7","reflect-metadata":"^0.1.13","semantic-release":"^24.2.2","@semantic-release/git":"^10.0.1","@semantic-release/npm":"^12.0.1","mongodb-memory-server":"^10.1.3","@nestjs/platform-express":"^11.0.8","@semantic-release/github":"^11.0.1","@semantic-release/changelog":"^6.0.3","@semantic-release/commit-analyzer":"^13.0.1","@semantic-release/release-notes-generator":"^14.0.3","conventional-changelog-conventionalcommits":"^8.0.0"},"peerDependencies":{"@nestjs/core":"^9.x||^10.x||^11.x","@nestjs/common":"^9.x||^10.x||^11.x","@pulsecron/pulse":"^1.x","reflect-metadata":"^0.1.13","mongodb-memory-server":"^9.1.8"},"_npmOperationalInternal":{"tmp":"tmp/nestjs-pulse_1.0.8_1739371794696_0.48902006848198165","host":"s3://npm-registry-packages-npm-production"}},"1.0.9":{"name":"@cemusta/nestjs-pulse","version":"1.0.9","description":"The modern MongoDB-powered scheduling library pulse for NestJS","main":"dist/index.js","types":"dist/index.d.ts","publishConfig":{"access":"public"},"scripts":{"prepublishOnly":"npm run build","build":"tsc","release":"npm run build && semantic-release","semantic-release":"semantic-release","dry-run":"npm publish --dry-run","lint":"eslint 'src/**/*.ts'","test:e2e":"ts-node examples/test/src/main.ts","ncu":"npx npm-check-updates -u"},"author":{"name":"code-xhyun","email":"shh6155@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/pulsecron/nestjs-pulse/issues"},"homepage":"https://pulsecron.com","repository":{"type":"git","url":"git+https://github.com/cemusta/nestjs-pulse.git"},"keywords":["job","jobs","cron","cronjob","mongodb","scheduling","mongodb","mongodb-scheduler","queue","delayed","scheduler","pulse","bull","bee","kue","nest","nestjs"],"devDependencies":{"@semantic-release/changelog":"^6.0.3","@semantic-release/commit-analyzer":"^13.0.1","@semantic-release/git":"^10.0.1","@semantic-release/github":"^11.0.1","@semantic-release/npm":"^12.0.1","@semantic-release/release-notes-generator":"^14.0.3","conventional-changelog-conventionalcommits":"^8.0.0","@nestjs/cli":"^11.0.2","@nestjs/common":"^11.0.8","@nestjs/core":"^11.0.8","@nestjs/platform-express":"^11.0.8","@nestjs/testing":"^11.0.8","@types/node":"^22.13.1","@pulsecron/pulse":"^1.6.7","reflect-metadata":"^0.1.13","rimraf":"^6.0.1","rxjs":"^7.8.1","ts-node":"^10.9.2","ts-node-dev":"^2.0.0","typescript":"^5.7.3","semantic-release":"^24.2.2","mongodb-memory-server":"^10.1.4"},"peerDependencies":{"@nestjs/common":"^9.x||^10.x||^11.x","@nestjs/core":"^9.x||^10.x||^11.x","@pulsecron/pulse":"^1.x","reflect-metadata":"^0.1.13"},"_id":"@cemusta/nestjs-pulse@1.0.9","gitHead":"70a992de51cfbc32bdb8575c4dc9f66da69f7177","_nodeVersion":"22.14.0","_npmVersion":"10.5.2","dist":{"integrity":"sha512-MNFHz0iKCSua9keYSilRi7aGkpP5aOqoP1D0cnFjZFxtKhUawTM+1N8mPIQzbAh2hNMjZ5GXEyPikNPmPQG8aA==","shasum":"a13b473fd408e44964b8a17c49b4369e566fc55f","tarball":"https://registry.npmjs.org/@cemusta/nestjs-pulse/-/nestjs-pulse-1.0.9.tgz","fileCount":75,"unpackedSize":60497,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDJ+wA90+AAroDgU43yFfRj/Y4p9PNtSe/QkwPmXN8MSgIgeY8r8hpuKoovOdwoapMDkTA4LIrqWj1N9Qgff5ZW/p8="}]},"_npmUser":{"name":"cemusta","email":"nooneelse@gmail.com"},"directories":{},"maintainers":[{"name":"cemusta","email":"nooneelse@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/nestjs-pulse_1.0.9_1741273198188_0.3112389413420331"},"_hasShrinkwrap":false}},"time":{"created":"2025-02-12T14:49:54.597Z","modified":"2025-03-06T14:59:58.565Z","1.0.8":"2025-02-12T14:49:54.898Z","1.0.9":"2025-03-06T14:59:58.389Z"},"bugs":{"url":"https://github.com/pulsecron/nestjs-pulse/issues"},"author":{"name":"code-xhyun","email":"shh6155@gmail.com"},"license":"MIT","homepage":"https://pulsecron.com","keywords":["job","jobs","cron","cronjob","mongodb","scheduling","mongodb","mongodb-scheduler","queue","delayed","scheduler","pulse","bull","bee","kue","nest","nestjs"],"repository":{"type":"git","url":"git+https://github.com/cemusta/nestjs-pulse.git"},"description":"The modern MongoDB-powered scheduling library pulse for NestJS","maintainers":[{"name":"cemusta","email":"nooneelse@gmail.com"}],"readme":"<p align=\"center\">\n  <img src=\"./pulse.png\" width=\"100\" alt=\"project-logo\">\n</p>\n<p align=\"center\">\n    <h1 align=\"center\">Nestjs-PULSE</h1>\n</p>\n<p align=\"center\">\n    <em>The modern MongoDB-powered scheduling library for NestJS</em>\n</p>\n<p align=\"center\">\n <img src=\"https://img.shields.io/github/license/pulsecron/nestjs-pulse?style=default&logo=opensourceinitiative&logoColor=white&color=24E0A4\" alt=\"license\">\n <img src=\"https://img.shields.io/github/last-commit/pulsecron/nestjs-pulse?style=default&logo=git&logoColor=white&color=24E0A4\" alt=\"last-commit\">\n <img src=\"https://img.shields.io/github/languages/top/pulsecron/nestjs-pulse?style=default&color=24E0A4\" alt=\"repo-top-language\">\n <img src=\"https://img.shields.io/github/languages/count/pulsecron/nestjs-pulse?style=default&color=24E0A4\" alt=\"repo-language-count\">\n<p>\n<p align=\"center\">\n <!-- default option, no dependency badges. -->\n</p>\n\n<br><!-- TABLE OF CONTENTS -->\n\n<details>\n  <summary>Table of Contents</summary><br>\n\n- [Overview](#overview)\n- [Getting Started](#getting-started)\n  - [Installation](#installation)\n  - [Example](#example)\n    - [app.module.ts](#appmodulets)\n    - [notification.module.ts](#notificationmodulets)\n    - [notification.processor.ts](#notificationprocessorts)\n    - [notification.service.ts](#notificationservicets)\n- [Contributing](#contributing)\n- [License](#license)\n\n</details>\n<hr>\n\n## Overview\n\n[Pulse](https://github.com/pulsecron/pulse) module for [NestJS](https://nestjs.com/)\n\nSemantic version commits are used to keep track of changes in the library. If you don't use correct commits, release wont be triggered.\n\n---\n<br/>\n<br/>\n\n## Getting Started\n\n#### Installation\n\n ```console\n npm install --save @pulsecron/nestjs-pulse @pulsecron/pulse\n```\n\n#### Example\n\n##### app.module.ts\n\n```typescript\n// src/app.module.ts\n\nimport { Module } from '@nestjs/common';\nimport { PulseModule } from '@pulsecron/nestjs-pulse';\nimport { NotificationsModule } from './notification/notification.module';\n\n@Module({\n  imports: [\n    PulseModule.forRoot({\n      db: {\n        address: 'mongodb://localhost:27017/pulse',\n      },\n    }),\n    NotificationsModule,\n  ],\n  providers: [],\n})\nexport class AppModule {}\n\n```\n\n##### notification.module.ts\n\n```typescript\n// src/notification/notification.module.ts\n\nimport { Module } from '@nestjs/common';\nimport { PulseModule } from '@pulsecron/nestjs-pulse';\nimport { NotificationsQueue } from './notification.processor';\n\n@Module({\n  imports: [\n    PulseModule.registerQueue('notifications', {\n      processEvery: '1 minutes',\n      autoStart: false, // default: true\n    }),\n  ],\n  providers: [NotificationsQueue],\n  exports: [],\n})\nexport class NotificationsModule {}\n\n```\n\n##### notification.processor.ts\n\n```typescript\n// src/notification/notification.processor.ts\n\nimport { Job } from '@pulsecron/pulse';\nimport { Every, Queue, Define, Schedule } from '@pulsecron/nestjs-pulse';\n\n@Queue('notifications')\nexport class NotificationsQueue {\n  @Every({ name: 'send notifications', interval: '1 minutes' })\n  async sendNotifications(job: Job) {\n    console.log('Sending notifications[1]');\n  }\n\n  @Schedule({ name: 'send notifications', when: 'tomorrow at noon' })\n  async sendNotifications(job: Job) {\n    console.log('Sending notifications[2]');\n  }\n\n  @Now()\n  async sendNotifications(job: Job) {\n    console.log('Sending notifications[3]');\n  }\n   \n  @Define({ name: 'emailJob' })\n  async test(job: Job) {\n    console.log('Sending email to:', job.data.to);\n  }\n}\n\n\n\n```\n\n##### notification.service.ts\n\n```typescript\n\nimport { Inject, Injectable } from '@nestjs/common';\nimport { Pulse } from '@pulsecron/pulse';\n\n@Injectable()\nexport class NotificationService {\n  constructor(@Inject('notifications') private pulse: Pulse) {}\n\n  async scheduleEmail(email: string) {\n    const emailJob = this.pulse.create('emailJob', { to: email });\n    emailJob.unique(\n      {\n        'data.to': email,\n      },\n      {\n        insertOnly: true,\n      }\n    );\n    emailJob.schedule('5 seconds').save();\n  }\n}\n\n\n```\n\n---\n<br/>\n<br/>\n\n## Contributing\n\nContributions are welcome! Here are several ways you can contribute:\n\n- **[Report Issues](https://github.com/pulsecron/nestjs-pulse/issues)**: Submit bugs found or log feature requests for the `pulse` project.\n- **[Submit Pull Requests](https://github.com/pulsecron/nestjs-pulse/pulls)**: Review open PRs, and submit your own PRs.\n- **[Join the Discussions](https://github.com/pulsecron/nestjs-pulse/discussions)**: Share your insights, provide feedback, or ask questions.\n\n<details closed>\n<summary>Contributing Guidelines</summary>\n\n1. **Fork the Repository**: Start by forking the project repository to your github account.\n2. **Clone Locally**: Clone the forked repository to your local machine using a git client.\n\n   ```sh\n   git clone https://github.com/pulsecron/nestjs-pulse\n   ```\n\n3. **Create a New Branch**: Always work on a new branch, giving it a descriptive name.\n\n   ```sh\n   git checkout -b new-feature-x\n   ```\n\n4. **Make Your Changes**: Develop and test your changes locally.\n5. **Commit Your Changes**: Commit with a clear message describing your updates.\n\n   ```sh\n   git commit -m 'Implemented new feature x.'\n   ```\n\n6. **Push to github**: Push the changes to your forked repository.\n\n   ```sh\n   git push origin new-feature-x\n   ```\n\n7. **Submit a Pull Request**: Create a PR against the original project repository. Clearly describe the changes and their motivations.\n8. **Review**: Once your PR is reviewed and approved, it will be merged into the main branch. Congratulations on your contribution!\n\n</details>\n\n<details closed>\n<summary>Contributor Graph</summary>\n<br>\n<p align=\"center\">\n   <a href=\"https://github.com{/pulsecron/nestjs-pulse/}graphs/contributors\">\n      <img src=\"https://contrib.rocks/image?repo=pulsecron/nestjs-pulse\">\n   </a>\n</p>\n</details>\n\n---\n<br/>\n<br/>\n\n## License\n\nThis project is protected under the [MIT](https://github.com/pulsecron/nestjs-pulse?tab=MIT-1-ov-file#readme) License. For more details, refer to the [LICENSE](https://github.com/pulsecron/nestjs-pulse?tab=MIT-1-ov-file#readme) file.\n\n---\n<br/>\n<br/>\n","readmeFilename":"README.md"}