@stacksjs/scheduler 0.58.63 → 0.58.65

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.
package/dist/index.js CHANGED
@@ -508,7 +508,6 @@ class Schedule {
508
508
  cronPattern = "";
509
509
  timezone = "America/Los_Angeles";
510
510
  task;
511
- cmd;
512
511
  constructor(task) {
513
512
  this.task = task;
514
513
  }
@@ -739,5 +738,5 @@ export {
739
738
  src_default as default,
740
739
  Schedule,
741
740
  CronTime,
742
- CronJob2 as CronJob
741
+ CronJob2 as BunCronJob
743
742
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/scheduler",
3
3
  "type": "module",
4
- "version": "0.58.63",
4
+ "version": "0.58.65",
5
5
  "description": "The Stacks scheduler.",
6
6
  "author": "Chris Breuer",
7
7
  "license": "MIT",
@@ -56,6 +56,7 @@
56
56
  "devDependencies": {
57
57
  "@fast-check/jest": "^1.8.0",
58
58
  "@stacksjs/development": "latest",
59
+ "@types/sinon": "^17.0.3",
59
60
  "sinon": "^17.0.1"
60
61
  }
61
62
  }
package/src/index.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Schedule } from './schedule'
2
2
 
3
- export { CronJob } from './job'
3
+ export { CronJob as BunCronJob } from './job'
4
4
  export { CronTime } from './time'
5
5
 
6
6
  export type {
package/src/job.ts CHANGED
@@ -233,8 +233,8 @@ export class CronJob<OC extends CronOnCompleteCommand | null = null, C = null> {
233
233
  startTime = Date.now()
234
234
  // eslint-disable-next-line ts/no-use-before-define
235
235
  this._timeout = setTimeout(callbackWrapper, t)
236
- if (this.unrefTimeout && typeof this._timeout.unref === 'function')
237
- this._timeout.unref()
236
+ if (this.unrefTimeout && typeof this._timeout!.unref === 'function')
237
+ this._timeout!.unref()
238
238
  }
239
239
 
240
240
  // The callback wrapper checks if it needs to sleep another period or not
package/src/schedule.ts CHANGED
@@ -6,8 +6,8 @@ import { CronTime } from './time'
6
6
  export class Schedule {
7
7
  private cronPattern: string = ''
8
8
  private timezone: string = 'America/Los_Angeles'
9
- private task: () => void
10
- private cmd?: string
9
+ private readonly task: () => void
10
+ // private cmd?: string
11
11
 
12
12
  constructor(task: () => void) {
13
13
  this.task = task