@cldmv/holdmytask 2.0.6 → 2.1.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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hold-my-task.d.mts","sourceRoot":"","sources":["../../src/hold-my-task.mjs"],"names":[],"mappings":"AAkBA;;;;;GAKG;AACH;IACC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAgEG;IAEH;;;;;;;;OAQG;IACH,yCAwCC;IAwTD;;;;;;;;;OASG;IACH,uBAGC;IA5QD,0BAaC;IApED;;;;;;;;;;OAUG;IACH,mCAqBC;IAED;;;;;;;OAOG;IACH,kCAWC;IAiBD;;;;;;;;;;;OAWG;IACH,4BAqBC;IAED;;;;OAIG;IACH,wBAGC;IAFA,+BAAqB;IAItB;;;;;OAKG;IACH,yBAUC;IAED;;;;OAIG;IACH,0BA0KC;IA9DA;;;;;;;;;;;;;;;;;;;;;;;;kBAuBC;IAGD,iCAA+D;IAC/D,+BAIE;IAEF,8BAAwB;IACxB,6CAAkC;IAClC,iCAAsB;IACtB,2BAAe;IACf,+BAAmB;IACnB,8BAAqB;IACrB,+BAAsB;IACtB,2BAAiC;IACjC,uBAA0B;IAG1B,4CAA4B;IAC5B,2CAA2B;IAC3B,qCAAyB;IAGzB,sCAAsB;IAGtB,4CAAiC;IACjC,qDAA0C;IAC1C,gCAAoB;IAGpB,yCAAmC;IAsBpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8CG;IACH,4CA5CW,WAAS,MAAM,YAEvB;QAAgC,EAAE;QACT,QAAQ;QACR,SAAS;QACT,UAAU;QACV,KAAK;QACA,MAAM;QACX,OAAO;QACP,MAAM;QACN,SAAS;QACT,KAAK;QACJ,WAAW;QACZ,aAAa;QACb,wBAAwB;QACxB,kBAAkB;QACjB,2BAA2B;QAC3B,4BAA4B;QAClC,QA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ED;;;;OAIG;IACH,YAHW,MAAM,GAAC,MAAM,GACX,OAAO,CAInB;IAMD;;;OAGG;IACH,WAFa,MAAM,CAiIlB;IAED;;;OAGG;IACH,iBAFa,MAAM,CAqBlB;IAED;;;OAGG;IACH,gBAFa,MAAM,CAiGlB;IAED;;;OAGG;IACH,oBAFa,MAAM,CA2GlB;IAED;;;OAGG;IACH,oBAFW,OAAO,QAuEjB;CACD;wBAt8FuB,aAAa"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Creates a HoldMyTask instance for task queue management
3
+ * @param {object} [options={}] - Configuration options
4
+ * @returns {Promise<HoldMyTask>} HoldMyTask instance
5
+ */
6
+ export function createHoldMyTask(options?: object): Promise<HoldMyTask>;
7
+ /**
8
+ * Create a task queue instance
9
+ * @param {object} [options={}] - Configuration options
10
+ * @returns {Promise<HoldMyTask>} HoldMyTask instance
11
+ */
12
+ export function createQueue(options?: object): Promise<HoldMyTask>;
13
+ /**
14
+ * Create a task manager instance
15
+ * @param {object} [options={}] - Configuration options
16
+ * @returns {Promise<HoldMyTask>} HoldMyTask instance
17
+ */
18
+ export function createTaskManager(options?: object): Promise<HoldMyTask>;
19
+ /**
20
+ * Create a task processor instance
21
+ * @param {object} [options={}] - Configuration options
22
+ * @returns {Promise<HoldMyTask>} HoldMyTask instance
23
+ */
24
+ export function createTaskProcessor(options?: object): Promise<HoldMyTask>;
25
+ import { HoldMyTask } from "./hold-my-task.mjs";
26
+ export { HoldMyTask, HoldMyTask as default, HoldMyTask as queue, HoldMyTask as Queue, HoldMyTask as TaskManager, HoldMyTask as TaskQueue, HoldMyTask as QueueManager, HoldMyTask as TaskProcessor };
27
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/index.mjs"],"names":[],"mappings":"AAiBA;;;;GAIG;AACH,2CAHW,MAAM,GACJ,OAAO,CAAC,UAAU,CAAC,CAI/B;AAED;;;;GAIG;AACH,sCAHW,MAAM,GACJ,OAAO,CAAC,UAAU,CAAC,CAI/B;AAED;;;;GAIG;AACH,4CAHW,MAAM,GACJ,OAAO,CAAC,UAAU,CAAC,CAI/B;AAED;;;;GAIG;AACH,8CAHW,MAAM,GACJ,OAAO,CAAC,UAAU,CAAC,CAI/B;2BApC0B,oBAAoB"}
@@ -0,0 +1,3 @@
1
+ export * from "./index.mjs";
2
+ export { default } from "./index.mjs";
3
+ //# sourceMappingURL=main.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"main.d.mts","sourceRoot":"","sources":["../../src/main.mjs"],"names":[],"mappings":""}
@@ -0,0 +1,74 @@
1
+ /**
2
+ *
3
+ * @Project: @cldmv/holdmytask
4
+ * @Filename: /src/utils.mjs
5
+ * @Date: 2025-11-08T17:43:09-08:00 (1762652589)
6
+ * @Author: Nate Corcoran <CLDMV>
7
+ * @Email: <Shinrai@users.noreply.github.com>
8
+ * -----
9
+ * @Last modified by: Nate Corcoran <CLDMV> (Shinrai@users.noreply.github.com)
10
+ * @Last modified time: 2026-10-02T12:20:29-07:00 (1790968829)
11
+ * -----
12
+ * @Copyright: Copyright (c) 2013-2026 Catalyzed Motivation Inc. All rights reserved.
13
+ *
14
+ */
15
+ /**
16
+ * A min-heap implementation with custom comparison function.
17
+ * Maintains the heap property where parent nodes are smaller than their children.
18
+ */
19
+ export class MinHeap {
20
+ /**
21
+ * Creates a new MinHeap with a custom comparison function.
22
+ * @param {Function} compare - Comparison function that returns negative if a < b, positive if a > b, 0 if equal
23
+ * @example
24
+ * // Priority queue (higher priority = smaller value)
25
+ * const heap = new MinHeap((a, b) => a.priority - b.priority);
26
+ */
27
+ constructor(compare: Function);
28
+ heap: any[];
29
+ compare: Function;
30
+ /**
31
+ * Adds an item to the heap, maintaining heap property.
32
+ * @param {*} item - The item to add to the heap
33
+ * @returns {void}
34
+ * @example
35
+ * heap.push({ value: 5, priority: 1 });
36
+ */
37
+ push(item: any): void;
38
+ /**
39
+ * Removes and returns the minimum item from the heap.
40
+ * @returns {*|undefined} The minimum item, or undefined if heap is empty
41
+ * @example
42
+ * const min = heap.pop(); // Returns item with smallest comparison value
43
+ */
44
+ pop(): any | undefined;
45
+ /**
46
+ * Returns the minimum item without removing it from the heap.
47
+ * @returns {*|undefined} The minimum item, or undefined if heap is empty
48
+ * @example
49
+ * const min = heap.peek(); // Look at minimum without removing
50
+ */
51
+ peek(): any | undefined;
52
+ /**
53
+ * Returns the number of items in the heap.
54
+ * @returns {number} The size of the heap
55
+ * @example
56
+ * const count = heap.size(); // 5
57
+ */
58
+ size(): number;
59
+ /**
60
+ * Moves an item up the heap to maintain heap property after insertion.
61
+ * @param {number} index - Index of the item to bubble up
62
+ * @returns {void}
63
+ * @private
64
+ */
65
+ private bubbleUp;
66
+ /**
67
+ * Moves an item down the heap to maintain heap property after removal.
68
+ * @param {number} index - Index of the item to sink down
69
+ * @returns {void}
70
+ * @private
71
+ */
72
+ private sinkDown;
73
+ }
74
+ //# sourceMappingURL=utils.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.mts","sourceRoot":"","sources":["../../src/utils.mjs"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH;;;GAGG;AACH;IACC;;;;;;OAMG;IACH,+BAGC;IAFA,YAAc;IACd,kBAAsB;IAGvB;;;;;;OAMG;IACH,WALW,GAAC,GACC,IAAI,CAOhB;IAED;;;;;OAKG;IACH,OAJa,GAAC,GAAC,SAAS,CAavB;IAED;;;;;OAKG;IACH,QAJa,GAAC,GAAC,SAAS,CAMvB;IAED;;;;;OAKG;IACH,QAJa,MAAM,CAMlB;IAED;;;;;OAKG;IACH,iBAOC;IAED;;;;;OAKG;IACH,iBAkBC;CACD"}