@reventlessdev/reventless-local 3.0.0-alpha.285 → 3.0.0-alpha.287

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 (36) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/package.json +11 -11
  3. package/src/adapter/Scheduler/LocalScheduledPublisher.res +11 -51
  4. package/src/adapter/Scheduler/LocalScheduledPublisher.res.mjs +7 -40
  5. package/src/adapter/Scheduler/LocalTimers.res +62 -0
  6. package/src/adapter/Scheduler/LocalTimers.res.mjs +63 -0
  7. package/src/components/AutomationSlice_Builder.res +31 -2
  8. package/src/components/AutomationSlice_Builder.res.mjs +31 -3
  9. package/src/components/LocalAutomationSchedules.res +59 -0
  10. package/src/components/LocalAutomationSchedules.res.mjs +72 -0
  11. package/src/components/LocalAutomationSweep.res +61 -0
  12. package/src/components/LocalAutomationSweep.res.mjs +83 -0
  13. package/src/test/TestRunner.res +2 -0
  14. package/src/test/TestRunner.res.mjs +12 -0
  15. package/tests/adapter/ScheduledPublisherTest.res +156 -155
  16. package/tests/adapter/ScheduledPublisherTest.res.mjs +239 -137
  17. package/tests/components/automationslice/AutomationRescheduleFixtures.res +142 -0
  18. package/tests/components/automationslice/AutomationRescheduleFixtures.res.mjs +259 -0
  19. package/tests/components/automationslice/AutomationRescheduleTest.res +96 -0
  20. package/tests/components/automationslice/AutomationRescheduleTest.res.mjs +177 -0
  21. package/tests/components/automationslice/AutomationScheduleFixtures.res +118 -0
  22. package/tests/components/automationslice/AutomationScheduleFixtures.res.mjs +263 -0
  23. package/tests/components/automationslice/AutomationScheduleTest.res +88 -0
  24. package/tests/components/automationslice/AutomationScheduleTest.res.mjs +108 -0
  25. package/tests/components/automationslice/AutomationSliceFixtures.res +6 -2
  26. package/tests/components/automationslice/AutomationSliceFixtures.res.mjs +16 -4
  27. package/tests/components/automationslice/AutomationSliceSelfDeadlockFixtures.res +6 -1
  28. package/tests/components/automationslice/AutomationSliceSelfDeadlockFixtures.res.mjs +8 -2
  29. package/tests/components/automationslice/AutomationSweepFixtures.res +131 -0
  30. package/tests/components/automationslice/AutomationSweepFixtures.res.mjs +223 -0
  31. package/tests/components/automationslice/AutomationSweepTest.res +107 -0
  32. package/tests/components/automationslice/AutomationSweepTest.res.mjs +116 -0
  33. package/tests/components/automationslice/MixedSourceAutomationSliceFixtures.res +4 -1
  34. package/tests/components/automationslice/MixedSourceAutomationSliceFixtures.res.mjs +14 -3
  35. package/tests/components/scheduler/SchedulerTest.res +5 -5
  36. package/tests/components/scheduler/SchedulerTest.res.mjs +22 -14
@@ -16,9 +16,12 @@ globalThis.describe("Scheduler_Builder.Make:", () => {
16
16
  });
17
17
  ops.createSchedule([SchedulerFixtures$ReventlessLocal.makeTopicResource("sched-recurring")], {
18
18
  name: "test-recurring",
19
- rate: {
20
- TAG: "Minutes",
21
- _0: 1
19
+ time: {
20
+ TAG: "Every",
21
+ _0: {
22
+ TAG: "Minutes",
23
+ _0: 1
24
+ }
22
25
  },
23
26
  payload: "{}"
24
27
  });
@@ -41,17 +44,19 @@ globalThis.describe("Scheduler_Builder.Make:", () => {
41
44
  });
42
45
  ops.createSchedule([SchedulerFixtures$ReventlessLocal.makeTopicResource("sched-single")], {
43
46
  name: "test-single",
44
- rate: {
45
- TAG: "Single",
46
- _0: 2024,
47
- _1: 1,
48
- _2: 1,
49
- _3: 0,
50
- _4: 0
47
+ time: {
48
+ TAG: "Once",
49
+ moment: {
50
+ TAG: "After",
51
+ _0: {
52
+ TAG: "Minutes",
53
+ _0: 1
54
+ }
55
+ }
51
56
  },
52
57
  payload: "{}"
53
58
  });
54
- Globals.jest.advanceTimersByTime(0);
59
+ Globals.jest.advanceTimersByTime(60000);
55
60
  await Promise.resolve();
56
61
  await Promise.resolve();
57
62
  globalThis.expect(count.contents).toBe(1);
@@ -70,9 +75,12 @@ globalThis.describe("Scheduler_Builder.Make:", () => {
70
75
  });
71
76
  ops.createSchedule([SchedulerFixtures$ReventlessLocal.makeTopicResource("sched-delete")], {
72
77
  name: "test-delete",
73
- rate: {
74
- TAG: "Minutes",
75
- _0: 2
78
+ time: {
79
+ TAG: "Every",
80
+ _0: {
81
+ TAG: "Minutes",
82
+ _0: 2
83
+ }
76
84
  },
77
85
  payload: "{}"
78
86
  });