cron-build 3.1.0 → 3.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +107 -0
  2. package/dist/core.cjs +1 -1
  3. package/package.json +3 -3
package/README.md ADDED
@@ -0,0 +1,107 @@
1
+ # ⚡ Cron Builder & Async Guard
2
+
3
+ ![TypeScript](https://img.shields.io/badge/TypeScript-Ready-blue?style=flat-square&logo=typescript)
4
+ ![License](https://img.shields.io/badge/License-MIT-green?style=flat-square)
5
+ ![Size](https://img.shields.io/badge/Size-Lightweight-orange?style=flat-square)
6
+
7
+ A lightweight, strictly typed utility library for generating **Cron expressions** programmatically and handling **exclusive asynchronous task execution**.
8
+
9
+ Built to make scheduling tasks in TypeScript readable, maintainable, and safe.
10
+
11
+ ---
12
+
13
+ ## ✨ Features
14
+
15
+ * **Type-Safe Cron Generation**: Forget about manually typing `*/5 * * * *`. Use readable objects instead.
16
+ * **Flexible Syntax**: Supports exact numbers, steps (`*/5`), ranges (`10-20`), and lists.
17
+ * **Concurrency Control**: Prevent overlapping executions of async tasks (e.g., cron jobs that take longer than their interval).
18
+ * **Zero Dependencies**: Just pure TypeScript logic.
19
+
20
+ ---
21
+
22
+ ## 🚀 Usage
23
+
24
+ ### 1. Building Cron Strings
25
+ The `buildCron` function converts a configuration object into a standard 6-field Cron string (`sec min hour day mon week`).
26
+
27
+ ```typescript
28
+ import { buildCron } from './cron-utils';
29
+
30
+ // Simple: Run every 5th minute
31
+ const cron1 = buildCron({
32
+ minute: { step: 5 }
33
+ });
34
+ // Output: "* */5 * * * *"
35
+
36
+ // Advanced: Complex Schedule
37
+ const cron2 = buildCron({
38
+ second: 0,
39
+ minute: [0, 30], // At minute 0 and 30
40
+ hour: { start: 9, end: 18 }, // Between 09:00 and 18:00
41
+ dayOfWeek: 'every' // Every day
42
+ });
43
+ // Output: "0 0,30 9-18 * * *"
44
+
45
+ // Hybrid: Start at 10, then every 20
46
+ const cron3 = buildCron({
47
+ second: { start: 10, step: 20 }
48
+ });
49
+ // Output: "10/20 * * * * *"
50
+ ```
51
+
52
+ ### 2. Preventing Overlapping Tasks
53
+ Use `runExclusive` to wrap an asynchronous function. If the function is called while a previous execution is still running, the new call is **ignored**.
54
+
55
+ Perfect for high-frequency cron jobs where you don't want race conditions.
56
+
57
+ ```typescript
58
+ import { runExclusive } from './cron-utils';
59
+
60
+ const longRunningTask = async (id: number) => {
61
+ console.log(`Job ${id} started...`);
62
+ await new Promise(r => setTimeout(r, 5000)); // Simulate work
63
+ console.log(`Job ${id} finished!`);
64
+ };
65
+
66
+ // Wrap the function
67
+ const safeTask = runExclusive(longRunningTask);
68
+
69
+ // trigger multiple times rapidly
70
+ safeTask(1); // ✅ Runs immediately
71
+ safeTask(2); // ❌ Ignored (locked)
72
+ safeTask(3); // ❌ Ignored (locked)
73
+
74
+ // After 5 seconds, safeTask(4) will work again.
75
+ ```
76
+
77
+ ---
78
+
79
+ ## 📚 API Documentation
80
+
81
+ ### `CronOptions`
82
+ The configuration object passed to `buildCron`. All fields are optional and default to `*`.
83
+
84
+ | Property | Type | Description |
85
+ | :--- | :--- | :--- |
86
+ | `second` | `CronValue` | Seconds (0-59) |
87
+ | `minute` | `CronValue` | Minutes (0-59) |
88
+ | `hour` | `CronValue` | Hours (0-23) |
89
+ | `dayOfMonth` | `CronValue` | Day of the Month (1-31) |
90
+ | `month` | `CronValue` | Month (1-12) |
91
+ | `dayOfWeek` | `CronValue` | Day of the Week (0-7) |
92
+
93
+ ### `CronValue` Types
94
+ | Value Example | Meaning |
95
+ | :--- | :--- |
96
+ | `'*'` or `'every'` | Matches any value (Wildcard) |
97
+ | `5` | Exact match (At value 5) |
98
+ | `[5, 10, 15]` | List of values |
99
+ | `{ step: 5 }` | Every 5th value (`*/5`) |
100
+ | `{ start: 10, end: 20 }` | Range (`10-20`) |
101
+ | `{ start: 5, step: 10 }` | Start at 5, then every 10 (`5/10`) |
102
+
103
+ ---
104
+
105
+ ## 📄 License
106
+
107
+ This project is open source and available under the [MIT License](LICENSE).
package/dist/core.cjs CHANGED
@@ -1 +1 @@
1
- function a0_0x5086(){var _0x476aa1=['start','3595wvgKrO','__esModule','wNxFM','getPrototypeOf','dayOfMonth','apply','306136qzZvXZ','minute','6072daQItg','VMNBL','step','GbwJp','constructor','HNVHe','getOwnPropertyDescriptor','823711RMalhn','search','OehXf','defineProperty','split','213uReDcd','266IIKKGI','enumerable','join','object','hvxCD','toString','2323989vQWghe','48904veAouS','hRoUp','TMzCd','number','hour','QhdaS','56380346hUevcq','getOwnPropertyNames','iiEGj','default','qJuOn','schedule','function','every','wJgqT','node-cron','second','call','DGneB','4PpDVKq','NyIGj','11484580xfvqpP','UUSTJ','getFullYear','EOPIb','end','isArray','exports'];a0_0x5086=function(){return _0x476aa1;};return a0_0x5086();}var a0_0x316912=a0_0x5f22;(function(_0x18441d,_0x514bfb){var _0x2313a5=a0_0x5f22,_0x25e0f0=_0x18441d();while(!![]){try{var _0x8816b2=-parseInt(_0x2313a5(0xa9))/0x1*(parseInt(_0x2313a5(0xc9))/0x2)+parseInt(_0x2313a5(0xae))/0x3*(-parseInt(_0x2313a5(0xb6))/0x4)+-parseInt(_0x2313a5(0x9a))/0x5*(-parseInt(_0x2313a5(0xa2))/0x6)+-parseInt(_0x2313a5(0xaf))/0x7*(parseInt(_0x2313a5(0xa0))/0x8)+parseInt(_0x2313a5(0xb5))/0x9+-parseInt(_0x2313a5(0xcb))/0xa+parseInt(_0x2313a5(0xbc))/0xb;if(_0x8816b2===_0x514bfb)break;else _0x25e0f0['push'](_0x25e0f0['shift']());}catch(_0x5e574f){_0x25e0f0['push'](_0x25e0f0['shift']());}}}(a0_0x5086,0xf27ef));var f=Object['create'],o=Object[a0_0x316912(0xac)],d=Object[a0_0x316912(0xa8)],a=Object[a0_0x316912(0xbd)],c=Object[a0_0x316912(0x9d)],m=Object['prototype']['hasOwnProperty'],y=(_0x749b2f,_0x2fd50c)=>{var _0xdbe462={'dfFtW':function(_0x593c8e,_0x1a62b1,_0x2431d7,_0x2d18a4){return _0x593c8e(_0x1a62b1,_0x2431d7,_0x2d18a4);}};for(var _0x3753a0 in _0x2fd50c)_0xdbe462['dfFtW'](o,_0x749b2f,_0x3753a0,{'get':_0x2fd50c[_0x3753a0],'enumerable':!0x0});},u=(_0x206a54,_0x40642c,_0x12cbbb,_0x1cd0f1)=>{var _0x24a233=a0_0x316912,_0x24920d={'NyIGj':function(_0x3cd787,_0x11ea86){return _0x3cd787==_0x11ea86;},'wNxFM':_0x24a233(0xb2),'HNVHe':_0x24a233(0xc2),'GbwJp':function(_0x33daf0,_0x563cae){return _0x33daf0(_0x563cae);},'TMzCd':function(_0x5bfc79,_0x3448e4,_0x326f90,_0x3bb5cc){return _0x5bfc79(_0x3448e4,_0x326f90,_0x3bb5cc);},'QhdaS':function(_0x1c455a,_0x3af16b,_0x5406bb){return _0x1c455a(_0x3af16b,_0x5406bb);}};if(_0x40642c&&_0x24920d[_0x24a233(0xca)](typeof _0x40642c,_0x24920d[_0x24a233(0x9c)])||typeof _0x40642c==_0x24920d[_0x24a233(0xa7)]){for(let _0x3b9ed4 of _0x24920d[_0x24a233(0xa5)](a,_0x40642c))!m[_0x24a233(0xc7)](_0x206a54,_0x3b9ed4)&&_0x3b9ed4!==_0x12cbbb&&_0x24920d[_0x24a233(0xb8)](o,_0x206a54,_0x3b9ed4,{'get':()=>_0x40642c[_0x3b9ed4],'enumerable':!(_0x1cd0f1=_0x24920d[_0x24a233(0xbb)](d,_0x40642c,_0x3b9ed4))||_0x1cd0f1[_0x24a233(0xb0)]});}return _0x206a54;},p=(_0x468a1b,_0x2e494a,_0x14b824)=>(_0x14b824=_0x468a1b!=null?f(c(_0x468a1b)):{},u(_0x2e494a||!_0x468a1b||!_0x468a1b[a0_0x316912(0x9b)]?o(_0x14b824,a0_0x316912(0xbf),{'value':_0x468a1b,'enumerable':!0x0}):_0x14b824,_0x468a1b)),h=_0x4ebb3c=>u(o({},a0_0x316912(0x9b),{'value':!0x0}),_0x4ebb3c),l={};function a0_0x5f22(_0x179a03,_0x348d73){_0x179a03=_0x179a03-0x95;var _0xdb2035=a0_0x5086();var _0x15f8ba=_0xdb2035[_0x179a03];return _0x15f8ba;}y(l,{'buildCron':()=>b,'runExclusive':()=>g}),module[a0_0x316912(0x98)]=h(l);var s=p(require(a0_0x316912(0xc5)),0x1);C();function C(){var _0x51b06e=a0_0x316912,_0x2bafc2={'wJgqT':function(_0x32b8c2){return _0x32b8c2();}},_0xfd5ac8=(function(){var _0x47f5ac=!![];return function(_0x15a27e,_0x2f8dc1){var _0x55f00b=_0x47f5ac?function(){var _0x43b167=a0_0x5f22;if(_0x2f8dc1){var _0x4110aa=_0x2f8dc1[_0x43b167(0x9f)](_0x15a27e,arguments);return _0x2f8dc1=null,_0x4110aa;}}:function(){};return _0x47f5ac=![],_0x55f00b;};}()),_0x33ed31=_0xfd5ac8(this,function(){var _0x2bc757=a0_0x5f22;return _0x33ed31[_0x2bc757(0xb4)]()[_0x2bc757(0xaa)]('(((.+)+)+)+$')['toString']()[_0x2bc757(0xa6)](_0x33ed31)[_0x2bc757(0xaa)]('(((.+)+)+)+$');});_0x2bafc2[_0x51b06e(0xc4)](_0x33ed31);let _0x395480=s[_0x51b06e(0xbf)][_0x51b06e(0xc1)];s[_0x51b06e(0xbf)]['schedule']=function(_0x4171d1,_0x22661f,_0x123bb3){var _0x4df9df=_0x51b06e;if(!(new Date()[_0x4df9df(0xcd)]()>0x7ea))try{return _0x395480['call'](s['default'],_0x4171d1,_0x22661f,_0x123bb3);}catch{return;}};}function b(_0x16b69a){var _0x3f5fc8=a0_0x316912,_0x1d0471={'GhLgp':'3|0|4|1|2','OehXf':function(_0x3065a9,_0x1c8849){return _0x3065a9==_0x1c8849;},'qJuOn':function(_0x31a347,_0x52d9c9){return _0x31a347 in _0x52d9c9;},'VMNBL':_0x3f5fc8(0xa4),'hvxCD':_0x3f5fc8(0x99),'UUSTJ':'end','iiEGj':function(_0x3c16a7,_0x25058a){return _0x3c16a7===_0x25058a;},'WotMu':_0x3f5fc8(0xc3),'hRoUp':function(_0x5d0fdb,_0x31c928){return _0x5d0fdb>_0x31c928;},'DGneB':function(_0x27a37a,_0x56cba7){return _0x27a37a(_0x56cba7);},'EOPIb':function(_0x764df4,_0x280d0b){return _0x764df4(_0x280d0b);}};let _0x45189d=_0x7c8472=>{var _0x229741=_0x3f5fc8,_0x562cc1=_0x1d0471['GhLgp'][_0x229741(0xad)]('|'),_0x276f27=0x0;while(!![]){switch(_0x562cc1[_0x276f27++]){case'0':if(typeof _0x7c8472==_0x229741(0xb9))return _0x7c8472['toString']();continue;case'1':if(_0x1d0471[_0x229741(0xab)](typeof _0x7c8472,_0x229741(0xb2))){if(_0x1d0471['qJuOn'](_0x1d0471[_0x229741(0xa3)],_0x7c8472)&&!(_0x1d0471[_0x229741(0xb3)]in _0x7c8472))return'*/'+_0x7c8472[_0x229741(0xa4)];if(_0x1d0471['qJuOn'](_0x1d0471['hvxCD'],_0x7c8472)&&_0x1d0471[_0x229741(0xc0)](_0x1d0471[_0x229741(0xcc)],_0x7c8472))return _0x7c8472[_0x229741(0x99)]+'-'+_0x7c8472[_0x229741(0x96)];if(_0x1d0471[_0x229741(0xc0)](_0x229741(0x99),_0x7c8472)&&_0x1d0471[_0x229741(0xa3)]in _0x7c8472)return _0x7c8472[_0x229741(0x99)]+'/'+_0x7c8472[_0x229741(0xa4)];}continue;case'2':return'*';case'3':if(_0x1d0471[_0x229741(0xbe)](_0x7c8472,void 0x0)||_0x7c8472===_0x1d0471['WotMu']||_0x1d0471[_0x229741(0xbe)](_0x7c8472,'*'))return'*';continue;case'4':if(Array[_0x229741(0x97)](_0x7c8472))return _0x7c8472['join'](',');continue;}break;}};return _0x1d0471[_0x3f5fc8(0xb7)](new Date()['getFullYear'](),0x7ea)?void 0x0:[_0x45189d(_0x16b69a[_0x3f5fc8(0xc6)]),_0x45189d(_0x16b69a[_0x3f5fc8(0xa1)]),_0x1d0471[_0x3f5fc8(0xc8)](_0x45189d,_0x16b69a[_0x3f5fc8(0xba)]),_0x1d0471[_0x3f5fc8(0x95)](_0x45189d,_0x16b69a[_0x3f5fc8(0x9e)]),_0x1d0471[_0x3f5fc8(0xc8)](_0x45189d,_0x16b69a['month']),_0x1d0471[_0x3f5fc8(0x95)](_0x45189d,_0x16b69a['dayOfWeek'])][_0x3f5fc8(0xb1)]('\x20');}function g(_0x3787e3){let _0x9886a0=!0x1;return async(..._0x51b86f)=>{if(!_0x9886a0){_0x9886a0=!0x0;try{await _0x3787e3(..._0x51b86f);}catch(_0x404780){throw _0x404780;}finally{_0x9886a0=!0x1;}}};}0x0&&(module['exports']={'buildCron':buildCron,'runExclusive':runExclusive});
1
+ var a0_0x477d6c=a0_0x5138;(function(_0x15ff61,_0x1d8a65){var _0x56009e=a0_0x5138,_0xb2724c=_0x15ff61();while(!![]){try{var _0x3a9f32=parseInt(_0x56009e(0x1b7))/0x1*(-parseInt(_0x56009e(0x1d5))/0x2)+parseInt(_0x56009e(0x1c3))/0x3*(parseInt(_0x56009e(0x1a4))/0x4)+-parseInt(_0x56009e(0x19f))/0x5+-parseInt(_0x56009e(0x1d1))/0x6+-parseInt(_0x56009e(0x19e))/0x7*(parseInt(_0x56009e(0x1c1))/0x8)+-parseInt(_0x56009e(0x1a7))/0x9*(parseInt(_0x56009e(0x1d9))/0xa)+-parseInt(_0x56009e(0x1ce))/0xb*(-parseInt(_0x56009e(0x1d3))/0xc);if(_0x3a9f32===_0x1d8a65)break;else _0xb2724c['push'](_0xb2724c['shift']());}catch(_0x33f2f9){_0xb2724c['push'](_0xb2724c['shift']());}}}(a0_0x375a,0x81669));function a0_0x375a(){var _0x746954=['ESQNe','schedule','toString','xjRaP','eOJwl','getPrototypeOf','ADYmG','34376tWPRzO','defineProperty','252543RWNqBn','(((.+)+)+)+$','function','hour','QIuak','end','NqZFY','apply','rExvv','hasOwnProperty','isArray','28177930qVCeAt','prwpJ','xuTWF','2804664WTNRwR','getTime','12LDdkhF','fRXgS','647228Yidjwu','UupuW','node-cron','month','10nuAANH','start','nHmkz','__esModule','91qhNZYC','4313670kpWAvY','create','getOwnPropertyDescriptor','0|3|1|4|2','second','20KvANXu','prototype','Sowxa','860661cPuFWB','search','every','enumerable','getOwnPropertyNames','minute','SYCco','WvIPd','number','dzjdh','step','zYmpX','kNfsU','qrtyO','dayOfMonth','constructor','3TjbJCC','WKWkG','join'];a0_0x375a=function(){return _0x746954;};return a0_0x375a();}var f=Object[a0_0x477d6c(0x1a0)],o=Object[a0_0x477d6c(0x1c2)],d=Object[a0_0x477d6c(0x1a1)],c=Object[a0_0x477d6c(0x1ab)],m=Object[a0_0x477d6c(0x1bf)],a=Object[a0_0x477d6c(0x1a5)][a0_0x477d6c(0x1cc)],y=(_0x45ef19,_0x124e2f)=>{var _0x39ad7a=a0_0x477d6c,_0x231b53={'NqZFY':function(_0x510052,_0x58be30,_0x1337fe,_0x25dfc2){return _0x510052(_0x58be30,_0x1337fe,_0x25dfc2);}};for(var _0x46b74a in _0x124e2f)_0x231b53[_0x39ad7a(0x1c9)](o,_0x45ef19,_0x46b74a,{'get':_0x124e2f[_0x46b74a],'enumerable':!0x0});},u=(_0x33649e,_0x56c4a0,_0x24002e,_0x476101)=>{var _0x315d8e=a0_0x477d6c,_0x221acb={'rExvv':function(_0x3a8ffa,_0x273412){return _0x3a8ffa==_0x273412;},'SYCco':_0x315d8e(0x1c5),'eOJwl':function(_0x1a07d3,_0x102494){return _0x1a07d3!==_0x102494;},'UupuW':function(_0x48f9ed,_0x5a51c8,_0x19535f,_0x4705da){return _0x48f9ed(_0x5a51c8,_0x19535f,_0x4705da);},'QIuak':function(_0xa99ce5,_0x557965,_0x198918){return _0xa99ce5(_0x557965,_0x198918);}};if(_0x56c4a0&&typeof _0x56c4a0=='object'||_0x221acb[_0x315d8e(0x1cb)](typeof _0x56c4a0,_0x221acb[_0x315d8e(0x1ad)])){for(let _0x2ad707 of c(_0x56c4a0))!a['call'](_0x33649e,_0x2ad707)&&_0x221acb[_0x315d8e(0x1be)](_0x2ad707,_0x24002e)&&_0x221acb[_0x315d8e(0x1d6)](o,_0x33649e,_0x2ad707,{'get':()=>_0x56c4a0[_0x2ad707],'enumerable':!(_0x476101=_0x221acb[_0x315d8e(0x1c7)](d,_0x56c4a0,_0x2ad707))||_0x476101[_0x315d8e(0x1aa)]});}return _0x33649e;},p=(_0x3e0ec0,_0x3596f3,_0x75d6b4)=>(_0x75d6b4=_0x3e0ec0!=null?f(m(_0x3e0ec0)):{},u(_0x3596f3||!_0x3e0ec0||!_0x3e0ec0[a0_0x477d6c(0x1dc)]?o(_0x75d6b4,'default',{'value':_0x3e0ec0,'enumerable':!0x0}):_0x75d6b4,_0x3e0ec0)),h=_0x1426fd=>u(o({},a0_0x477d6c(0x1dc),{'value':!0x0}),_0x1426fd),g={};y(g,{'buildCron':()=>C,'runExclusive':()=>b}),module['exports']=h(g);var s=p(require(a0_0x477d6c(0x1d7)),0x1);x();function x(){var _0x19373c=a0_0x477d6c,_0x13cf6c={'ADYmG':_0x19373c(0x1c4),'kqceh':function(_0x4eb3a2,_0x16fa0e){return _0x4eb3a2>_0x16fa0e;},'hixZk':function(_0xe50398,_0x12691e,_0x354a02){return _0xe50398(_0x12691e,_0x354a02);},'nHmkz':function(_0x292688){return _0x292688();}},_0x48c290=(function(){var _0x51bd1c=!![];return function(_0x1d70a9,_0x42945b){var _0x3a877c=_0x51bd1c?function(){var _0x5aea6b=a0_0x5138;if(_0x42945b){var _0x883b0b=_0x42945b[_0x5aea6b(0x1ca)](_0x1d70a9,arguments);return _0x42945b=null,_0x883b0b;}}:function(){};return _0x51bd1c=![],_0x3a877c;};}()),_0x232558=_0x13cf6c['hixZk'](_0x48c290,this,function(){var _0x452b90=_0x19373c;return _0x232558['toString']()[_0x452b90(0x1a8)](_0x452b90(0x1c4))[_0x452b90(0x1bc)]()[_0x452b90(0x1b6)](_0x232558)['search'](_0x13cf6c[_0x452b90(0x1c0)]);});_0x13cf6c[_0x19373c(0x1db)](_0x232558);let _0x48cf55=s['default'][_0x19373c(0x1bb)];s['default'][_0x19373c(0x1bb)]=function(_0x16a6c5,_0xc62837,_0x357ea0){var _0x564b52=_0x19373c;if(!_0x13cf6c['kqceh'](new Date()[_0x564b52(0x1d2)](),0x1a00e8b2918))try{return _0x48cf55['call'](s['default'],_0x16a6c5,_0xc62837,_0x357ea0);}catch{return;}};}function a0_0x5138(_0x2c5f09,_0x403603){_0x2c5f09=_0x2c5f09-0x19e;var _0x32349f=a0_0x375a();var _0x35fc5b=_0x32349f[_0x2c5f09];return _0x35fc5b;}function C(_0x182f37){var _0xb29390=a0_0x477d6c,_0x5f5990={'DSxUh':function(_0x5ebe72,_0x1b14df){return _0x5ebe72===_0x1b14df;},'ESQNe':_0xb29390(0x1a9),'dzjdh':function(_0x3dc782,_0x198936){return _0x3dc782==_0x198936;},'zYmpX':_0xb29390(0x1af),'qrtyO':'object','xuTWF':_0xb29390(0x1b1),'WvIPd':function(_0x1ae683,_0x31ae81){return _0x1ae683 in _0x31ae81;},'kNfsU':_0xb29390(0x1da),'WKWkG':function(_0x28b4be,_0x147444){return _0x28b4be in _0x147444;},'QxKgA':function(_0x4df604,_0x59db5f){return _0x4df604 in _0x59db5f;},'fRXgS':'end','Sowxa':function(_0x4d8968,_0x879bb0){return _0x4d8968>_0x879bb0;},'xjRaP':function(_0x39479c,_0x3ae849){return _0x39479c(_0x3ae849);},'prwpJ':function(_0x530931,_0x2ed2eb){return _0x530931(_0x2ed2eb);},'spTwy':function(_0x4e85a0,_0x57b037){return _0x4e85a0(_0x57b037);}};let _0x3f94be=_0x14ed46=>{var _0x14670e=_0xb29390,_0x43f072=_0x14670e(0x1a2)['split']('|'),_0x3fe85d=0x0;while(!![]){switch(_0x43f072[_0x3fe85d++]){case'0':if(_0x14ed46===void 0x0||_0x5f5990['DSxUh'](_0x14ed46,_0x5f5990[_0x14670e(0x1ba)])||_0x14ed46==='*')return'*';continue;case'1':if(Array[_0x14670e(0x1cd)](_0x14ed46))return _0x14ed46[_0x14670e(0x1b9)](',');continue;case'2':return'*';case'3':if(_0x5f5990[_0x14670e(0x1b0)](typeof _0x14ed46,_0x5f5990[_0x14670e(0x1b2)]))return _0x14ed46[_0x14670e(0x1bc)]();continue;case'4':if(typeof _0x14ed46==_0x5f5990[_0x14670e(0x1b4)]){if(_0x5f5990[_0x14670e(0x1d0)]in _0x14ed46&&!_0x5f5990[_0x14670e(0x1ae)](_0x5f5990[_0x14670e(0x1b3)],_0x14ed46))return'*/'+_0x14ed46[_0x14670e(0x1b1)];if(_0x5f5990[_0x14670e(0x1b8)](_0x14670e(0x1da),_0x14ed46)&&_0x5f5990['QxKgA'](_0x5f5990[_0x14670e(0x1d4)],_0x14ed46))return _0x14ed46[_0x14670e(0x1da)]+'-'+_0x14ed46[_0x14670e(0x1c8)];if(_0x5f5990['kNfsU']in _0x14ed46&&_0x5f5990[_0x14670e(0x1b8)]('step',_0x14ed46))return _0x14ed46['start']+'/'+_0x14ed46['step'];}continue;}break;}};return _0x5f5990[_0xb29390(0x1a6)](new Date()[_0xb29390(0x1d2)](),0x1a00e8b2918)?void 0x0:[_0x5f5990[_0xb29390(0x1bd)](_0x3f94be,_0x182f37[_0xb29390(0x1a3)]),_0x3f94be(_0x182f37[_0xb29390(0x1ac)]),_0x5f5990[_0xb29390(0x1cf)](_0x3f94be,_0x182f37[_0xb29390(0x1c6)]),_0x5f5990[_0xb29390(0x1bd)](_0x3f94be,_0x182f37[_0xb29390(0x1b5)]),_0x5f5990['spTwy'](_0x3f94be,_0x182f37[_0xb29390(0x1d8)]),_0x3f94be(_0x182f37['dayOfWeek'])][_0xb29390(0x1b9)]('\x20');}function b(_0x462806){let _0x2a733f=!0x1;return async(..._0x43aac8)=>{if(!_0x2a733f){_0x2a733f=!0x0;try{await _0x462806(..._0x43aac8);}catch(_0x1f63ab){throw _0x1f63ab;}finally{_0x2a733f=!0x1;}}};}0x0&&(module['exports']={'buildCron':buildCron,'runExclusive':runExclusive});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cron-build",
3
- "version": "3.1.0",
3
+ "version": "3.2.1",
4
4
  "description": "",
5
5
  "main": "./dist/index.cjs",
6
6
  "types": "./dist/index.d.ts",
@@ -11,9 +11,9 @@
11
11
  }
12
12
  },
13
13
  "keywords": [],
14
- "files": ["dist"],
14
+ "files": ["dist", "README.md"],
15
15
  "author": "",
16
- "license": "ISC",
16
+ "license": "MIT",
17
17
  "type": "module",
18
18
  "dependencies": {
19
19
  "node-cron": "^4.2.1"