{"_id":"@alt-javascript/camel-lite-component-timer","_rev":"3-e8c438e74b94569a0059bfb086605cb1","name":"@alt-javascript/camel-lite-component-timer","dist-tags":{"latest":"1.1.1"},"versions":{"1.0.2":{"name":"@alt-javascript/camel-lite-component-timer","version":"1.0.2","keywords":["alt-javascript","camel","camel-lite","eai","eip","integration","timer","scheduler","component"],"author":{"name":"Craig Parravicini"},"_id":"@alt-javascript/camel-lite-component-timer@1.0.2","maintainers":[{"name":"craigparra","email":"craigparra@gmail.com"}],"contributors":[{"url":"Anthropic","name":"Claude"},{"name":"Apache Camel — design inspiration and pattern source"}],"homepage":"https://github.com/alt-javascript/camel-lite#readme","bugs":{"url":"https://github.com/alt-javascript/camel-lite/issues"},"dist":{"shasum":"7a7b95cfbec789d0d0c7175a6b4f35d34fa282b1","tarball":"https://registry.npmjs.org/@alt-javascript/camel-lite-component-timer/-/camel-lite-component-timer-1.0.2.tgz","fileCount":7,"integrity":"sha512-JxlW0mulNPxzBCi9ZcnBArk+WFYJkplfdA9uAfji9DCBpUPo2vHQ4GaGR1yQeYudaop9keI8YHgfkCXf1eWxcg==","signatures":[{"sig":"MEYCIQDzSc3330AG3tKfPbqG+egoGo7bbsy+Z0dubkTvzWBvowIhAN0vHxUs7w7DSvf0KiP8BV0N+KJsr6ozPts9CdT26J6w","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@alt-javascript%2fcamel-lite-component-timer@1.0.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":12304},"type":"module","exports":{".":"./src/index.js"},"gitHead":"9f948b9f02d85c9f593229684c475cd209369f2c","scripts":{"test":"node --test"},"_npmUser":{"name":"craigparra","email":"craigparra@gmail.com"},"repository":{"url":"git+https://github.com/alt-javascript/camel-lite.git","type":"git"},"_npmVersion":"11.9.0","description":"[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)","directories":{},"_nodeVersion":"24.14.0","dependencies":{"@alt-javascript/common":"^3.0.7","@alt-javascript/config":"^3.0.7","@alt-javascript/logger":"^3.0.7","@alt-javascript/camel-lite-core":"1.0.2"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/camel-lite-component-timer_1.0.2_1774595629241_0.9255423397709908","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@alt-javascript/camel-lite-component-timer","version":"1.1.0","keywords":["alt-javascript","camel","camel-lite","eai","eip","integration","timer","scheduler","component"],"author":{"name":"Craig Parravicini"},"_id":"@alt-javascript/camel-lite-component-timer@1.1.0","maintainers":[{"name":"craigparra","email":"craigparra@gmail.com"}],"contributors":[{"url":"Anthropic","name":"Claude"}],"homepage":"https://github.com/alt-javascript/camel-lite#readme","bugs":{"url":"https://github.com/alt-javascript/camel-lite/issues"},"dist":{"shasum":"0b49d433fcc59fbdef186d67aadca304f6ffbf4f","tarball":"https://registry.npmjs.org/@alt-javascript/camel-lite-component-timer/-/camel-lite-component-timer-1.1.0.tgz","fileCount":7,"integrity":"sha512-b+mRO9FWQanqy8sjxAXMu12kRIilqZKCU4KY0phbd+MvB8WjrpM8YOBIZ8ATtLDfu6i8Pqe0OtoNYJzjVxk12g==","signatures":[{"sig":"MEUCIQCr2y9Z5aKCAn4R/+/fGzrrJOCiuLAXs9jwVxmfTXIQ6AIgL79BdjKhGlzr9l4j3hox5JdxRleA8YAC1m0NwFzO8OQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@alt-javascript%2fcamel-lite-component-timer@1.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":12242},"type":"module","exports":{".":"./src/index.js"},"gitHead":"c227a03632d4b1e2f93b4562c7e74f52ba87d340","scripts":{"test":"node --test"},"_npmUser":{"name":"craigparra","email":"craigparra@gmail.com"},"repository":{"url":"git+https://github.com/alt-javascript/camel-lite.git","type":"git"},"_npmVersion":"11.9.0","description":"[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)","directories":{},"_nodeVersion":"24.14.0","dependencies":{"@alt-javascript/common":"^3.0.7","@alt-javascript/config":"^3.0.7","@alt-javascript/logger":"^3.0.7","@alt-javascript/camel-lite-core":"1.1.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/camel-lite-component-timer_1.1.0_1774763528904_0.5197881650805858","host":"s3://npm-registry-packages-npm-production"}},"1.1.1":{"name":"@alt-javascript/camel-lite-component-timer","version":"1.1.1","type":"module","exports":{".":"./src/index.js"},"dependencies":{"@alt-javascript/common":"^3.0.7","@alt-javascript/config":"^3.0.7","@alt-javascript/logger":"^3.0.7","@alt-javascript/camel-lite-core":"1.1.1"},"scripts":{"test":"node --test"},"repository":{"type":"git","url":"git+https://github.com/alt-javascript/camel-lite.git"},"author":{"name":"Craig Parravicini"},"contributors":[{"name":"Claude","url":"Anthropic"}],"keywords":["alt-javascript","camel","camel-lite","eai","eip","integration","timer","scheduler","component"],"publishConfig":{"registry":"https://registry.npmjs.org/","access":"public"},"gitHead":"ff8501eed381d38ac20f56aea721274466d64212","_id":"@alt-javascript/camel-lite-component-timer@1.1.1","description":"[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)","bugs":{"url":"https://github.com/alt-javascript/camel-lite/issues"},"homepage":"https://github.com/alt-javascript/camel-lite#readme","_nodeVersion":"24.14.0","_npmVersion":"11.9.0","dist":{"integrity":"sha512-Ve4aALjQK4fRMtu+AnCQNByU+ybNaiuvaQdgVl5UCsCpGaxfhzTxoHPqPljwcrdOd0Fvw1oA4qv60yh5JVnUAQ==","shasum":"de5688239cbc589c664f172d4976db6296ed9063","tarball":"https://registry.npmjs.org/@alt-javascript/camel-lite-component-timer/-/camel-lite-component-timer-1.1.1.tgz","fileCount":7,"unpackedSize":12242,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@alt-javascript%2fcamel-lite-component-timer@1.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDcQbdwYo3TjLcjJlSQR30nOtmgMB+fjjUVdvVbLOV6JwIgR+L5PuhlNpyu407t4tyUW6R0skZRTaAzWFnfoaFlJoM="}]},"_npmUser":{"name":"craigparra","email":"craigparra@gmail.com"},"directories":{},"maintainers":[{"name":"craigparra","email":"craigparra@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/camel-lite-component-timer_1.1.1_1774764481635_0.6614692416283843"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-27T07:13:49.176Z","modified":"2026-03-29T06:08:02.081Z","1.0.2":"2026-03-27T07:13:49.384Z","1.1.0":"2026-03-29T05:52:09.042Z","1.1.1":"2026-03-29T06:08:01.774Z"},"bugs":{"url":"https://github.com/alt-javascript/camel-lite/issues"},"author":{"name":"Craig Parravicini"},"homepage":"https://github.com/alt-javascript/camel-lite#readme","keywords":["alt-javascript","camel","camel-lite","eai","eip","integration","timer","scheduler","component"],"repository":{"type":"git","url":"git+https://github.com/alt-javascript/camel-lite.git"},"description":"[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)","contributors":[{"name":"Claude","url":"Anthropic"}],"maintainers":[{"name":"craigparra","email":"craigparra@gmail.com"}],"readme":"[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n## What\n\nPeriodic exchange trigger with no external dependencies. Fires on a fixed interval, optionally with a startup delay and a maximum fire count.\n\n## Install\n\n```sh\nnpm install camel-lite-component-timer\n```\n\n## URI Syntax\n\n```\ntimer:name[?period=1000&delay=0&repeatCount=0]\n```\n\n| Parameter     | Default | Description |\n|---------------|---------|-------------|\n| `period`      | `1000`  | Interval between firings in milliseconds. |\n| `delay`       | `0`     | Delay before the first firing in milliseconds. |\n| `repeatCount` | `0`     | Number of times to fire. `0` = infinite. |\n\n### Headers Set on Each Exchange\n\n| Header                | Type     | Description |\n|-----------------------|----------|-------------|\n| `CamelTimerName`      | `string` | The timer name from the URI. |\n| `CamelTimerFiredTime` | `Date`   | Timestamp of the firing. |\n| `CamelTimerCounter`   | `number` | Fire count (1-based). |\n\n## Usage\n\n```js\nimport { CamelContext } from 'camel-lite-core';\nimport { TimerComponent } from 'camel-lite-component-timer';\n\nconst context = new CamelContext();\ncontext.addComponent('timer', new TimerComponent());\n\ncontext.addRoutes({\n  configure(ctx) {\n    ctx.from('timer:tick?period=5000&repeatCount=3')\n      .process(exchange => {\n        const counter = exchange.in.getHeader('CamelTimerCounter');\n        const firedAt = exchange.in.getHeader('CamelTimerFiredTime');\n        console.log(`Tick #${counter} at ${firedAt.toISOString()}`);\n      });\n  }\n});\n\nawait context.start();\n// Fires 3 times at 5-second intervals, then stops.\n```\n\n## See Also\n\n[camel-lite — root README](../../README.md)\n","readmeFilename":"README.md"}