@ls-stack/utils 3.40.0 → 3.41.0

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 (158) hide show
  1. package/dist/arrayUtils.d.cts +70 -57
  2. package/dist/arrayUtils.d.ts +70 -57
  3. package/dist/assertions.d.cts +128 -117
  4. package/dist/assertions.d.ts +128 -117
  5. package/dist/asyncQueue.cjs +117 -112
  6. package/dist/asyncQueue.d.cts +217 -215
  7. package/dist/asyncQueue.d.ts +217 -215
  8. package/dist/asyncQueue.js +117 -112
  9. package/dist/awaitDebounce.d.cts +26 -23
  10. package/dist/awaitDebounce.d.ts +26 -23
  11. package/dist/cache.cjs +2 -1
  12. package/dist/cache.d.cts +15 -9
  13. package/dist/cache.d.ts +15 -9
  14. package/dist/cache.js +2 -1
  15. package/dist/{chunk-GHAQOUA6.js → chunk-23KPGKDT.js} +22 -1
  16. package/dist/{chunk-ADM37GSC.js → chunk-7L4KCZJJ.js} +12 -10
  17. package/dist/{chunk-KW55OTUG.js → chunk-B3KFV2MH.js} +2 -2
  18. package/dist/chunk-DTE2QMWE.js +48 -0
  19. package/dist/concurrentCalls.d.cts +8 -4
  20. package/dist/concurrentCalls.d.ts +8 -4
  21. package/dist/concurrentCalls.js +1 -1
  22. package/dist/debounce.d.cts +12 -20
  23. package/dist/debounce.d.ts +12 -20
  24. package/dist/dedent.d.cts +31 -31
  25. package/dist/dedent.d.ts +31 -31
  26. package/dist/deepEqual.d.cts +10 -9
  27. package/dist/deepEqual.d.ts +10 -9
  28. package/dist/filterObjectOrArrayKeys.d.cts +44 -19
  29. package/dist/filterObjectOrArrayKeys.d.ts +44 -19
  30. package/dist/getAutoIncrementId.d.cts +25 -23
  31. package/dist/getAutoIncrementId.d.ts +25 -23
  32. package/dist/getCompositeKey.d.cts +2 -1
  33. package/dist/getCompositeKey.d.ts +2 -1
  34. package/dist/getValueStableKey.d.cts +4 -3
  35. package/dist/getValueStableKey.d.ts +4 -3
  36. package/dist/mutationUtils.d.cts +2 -2
  37. package/dist/mutationUtils.d.ts +2 -2
  38. package/dist/objUtils.cjs +51 -2
  39. package/dist/objUtils.d.cts +8 -3
  40. package/dist/objUtils.d.ts +8 -3
  41. package/dist/objUtils.js +11 -3
  42. package/dist/parallelAsyncCalls.cjs +2 -1
  43. package/dist/parallelAsyncCalls.d.cts +5 -4
  44. package/dist/parallelAsyncCalls.d.ts +5 -4
  45. package/dist/parallelAsyncCalls.js +2 -1
  46. package/dist/retryOnError.d.cts +23 -20
  47. package/dist/retryOnError.d.ts +23 -20
  48. package/dist/runShellCmd.d.cts +40 -40
  49. package/dist/runShellCmd.d.ts +40 -40
  50. package/dist/safeJson.d.cts +6 -2
  51. package/dist/safeJson.d.ts +6 -2
  52. package/dist/saferTyping.d.cts +21 -14
  53. package/dist/saferTyping.d.ts +21 -14
  54. package/dist/shallowEqual.d.cts +1 -1
  55. package/dist/shallowEqual.d.ts +1 -1
  56. package/dist/stringUtils.cjs +2 -2
  57. package/dist/stringUtils.d.cts +6 -7
  58. package/dist/stringUtils.d.ts +6 -7
  59. package/dist/stringUtils.js +1 -1
  60. package/dist/testUtils.cjs +11 -9
  61. package/dist/testUtils.d.cts +32 -14
  62. package/dist/testUtils.d.ts +32 -14
  63. package/dist/testUtils.js +4 -3
  64. package/dist/throttle.d.cts +57 -48
  65. package/dist/throttle.d.ts +57 -48
  66. package/dist/timers.d.cts +68 -63
  67. package/dist/timers.d.ts +68 -63
  68. package/dist/tsResult.d.cts +7 -6
  69. package/dist/tsResult.d.ts +7 -6
  70. package/dist/typeGuards.d.cts +65 -64
  71. package/dist/typeGuards.d.ts +65 -64
  72. package/dist/typeUtils.d.cts +18 -4
  73. package/dist/typeUtils.d.ts +18 -4
  74. package/dist/typedStrings.d.cts +68 -57
  75. package/dist/typedStrings.d.ts +68 -57
  76. package/dist/typingFnUtils.d.cts +12 -6
  77. package/dist/typingFnUtils.d.ts +12 -6
  78. package/dist/typingFnUtils.js +12 -35
  79. package/dist/typingTestUtils.cjs +7 -1
  80. package/dist/typingTestUtils.d.cts +52 -11
  81. package/dist/typingTestUtils.d.ts +52 -11
  82. package/dist/typingTestUtils.js +7 -1
  83. package/dist/typingUtils.d.cts +4 -1
  84. package/dist/typingUtils.d.ts +4 -1
  85. package/dist/yamlStringify.cjs +11 -9
  86. package/dist/yamlStringify.js +2 -2
  87. package/package.json +5 -1
  88. package/docs/README.md +0 -72
  89. package/docs/_media/modules.md +0 -58
  90. package/docs/arrayUtils/-internal-.md +0 -179
  91. package/docs/arrayUtils/README.md +0 -550
  92. package/docs/assertions/-internal-.md +0 -63
  93. package/docs/assertions/README.md +0 -565
  94. package/docs/asyncQueue/-internal-.md +0 -297
  95. package/docs/asyncQueue/README.md +0 -1485
  96. package/docs/awaitDebounce.md +0 -66
  97. package/docs/cache/-internal-.md +0 -168
  98. package/docs/cache/README.md +0 -360
  99. package/docs/castValues.md +0 -47
  100. package/docs/concurrentCalls/-internal-.md +0 -490
  101. package/docs/concurrentCalls/README.md +0 -299
  102. package/docs/consoleFmt.md +0 -115
  103. package/docs/conversions.md +0 -27
  104. package/docs/createThrottleController/-internal-.md +0 -73
  105. package/docs/createThrottleController/README.md +0 -31
  106. package/docs/debounce.md +0 -188
  107. package/docs/dedent/-internal-.md +0 -17
  108. package/docs/dedent/README.md +0 -204
  109. package/docs/deepEqual.md +0 -94
  110. package/docs/enhancedMap.md +0 -358
  111. package/docs/exhaustiveMatch/-internal-.md +0 -39
  112. package/docs/exhaustiveMatch/README.md +0 -146
  113. package/docs/filterObjectOrArrayKeys.md +0 -109
  114. package/docs/getAutoIncrementId.md +0 -93
  115. package/docs/getCompositeKey.md +0 -39
  116. package/docs/getValueStableKey.md +0 -57
  117. package/docs/hash.md +0 -31
  118. package/docs/interpolate/-internal-.md +0 -61
  119. package/docs/interpolate/README.md +0 -62
  120. package/docs/keepPrevIfUnchanged.md +0 -43
  121. package/docs/levenshtein.md +0 -93
  122. package/docs/main.md +0 -21
  123. package/docs/mathUtils.md +0 -137
  124. package/docs/modules.md +0 -58
  125. package/docs/mutationUtils.md +0 -44
  126. package/docs/objUtils.md +0 -237
  127. package/docs/parallelAsyncCalls/-internal-.md +0 -347
  128. package/docs/parallelAsyncCalls/README.md +0 -45
  129. package/docs/promiseUtils/-internal-.md +0 -69
  130. package/docs/promiseUtils/README.md +0 -31
  131. package/docs/retryOnError/-internal-.md +0 -111
  132. package/docs/retryOnError/README.md +0 -168
  133. package/docs/runShellCmd/-internal-.md +0 -111
  134. package/docs/runShellCmd/README.md +0 -201
  135. package/docs/safeJson.md +0 -51
  136. package/docs/saferTyping.md +0 -228
  137. package/docs/serializeXML.md +0 -100
  138. package/docs/shallowEqual.md +0 -33
  139. package/docs/sleep.md +0 -27
  140. package/docs/stringUtils/-internal-.md +0 -17
  141. package/docs/stringUtils/README.md +0 -270
  142. package/docs/testUtils.md +0 -382
  143. package/docs/throttle/-internal-.md +0 -47
  144. package/docs/throttle/README.md +0 -178
  145. package/docs/time.md +0 -274
  146. package/docs/timers.md +0 -256
  147. package/docs/tsResult/-internal-.md +0 -327
  148. package/docs/tsResult/README.md +0 -702
  149. package/docs/typeGuards.md +0 -399
  150. package/docs/typeUtils/-internal-.md +0 -99
  151. package/docs/typeUtils/README.md +0 -195
  152. package/docs/typeUtils.typesTest.md +0 -7
  153. package/docs/typedStrings.md +0 -458
  154. package/docs/typingFnUtils/-internal-.md +0 -43
  155. package/docs/typingFnUtils/README.md +0 -317
  156. package/docs/typingTestUtils.md +0 -172
  157. package/docs/typingUtils.md +0 -135
  158. package/docs/yamlStringify.md +0 -83
@@ -1,297 +0,0 @@
1
- [**@ls-stack/utils**](../README.md)
2
-
3
- ***
4
-
5
- [@ls-stack/utils](../modules.md) / [asyncQueue](README.md) / \<internal\>
6
-
7
- # \<internal\>
8
-
9
- ## Type Aliases
10
-
11
- ### AddOptions\<I, T, E\>
12
-
13
- ```ts
14
- type AddOptions<I, T, E> = object;
15
- ```
16
-
17
- Defined in: [packages/utils/src/asyncQueue.ts:96](https://github.com/lucasols/utils/blob/main/packages/utils/src/asyncQueue.ts#L96)
18
-
19
- Options for adding individual tasks to the queue
20
-
21
- #### Type Parameters
22
-
23
- ##### I
24
-
25
- `I`
26
-
27
- ##### T
28
-
29
- `T`
30
-
31
- ##### E
32
-
33
- `E` *extends* `ResultValidErrors`
34
-
35
- #### Properties
36
-
37
- ##### meta?
38
-
39
- ```ts
40
- optional meta: I;
41
- ```
42
-
43
- Defined in: [packages/utils/src/asyncQueue.ts:102](https://github.com/lucasols/utils/blob/main/packages/utils/src/asyncQueue.ts#L102)
44
-
45
- Metadata to associate with this task
46
-
47
- ##### onComplete()?
48
-
49
- ```ts
50
- optional onComplete: (value) => void;
51
- ```
52
-
53
- Defined in: [packages/utils/src/asyncQueue.ts:104](https://github.com/lucasols/utils/blob/main/packages/utils/src/asyncQueue.ts#L104)
54
-
55
- Callback invoked when task completes successfully
56
-
57
- ###### Parameters
58
-
59
- ###### value
60
-
61
- `T`
62
-
63
- ###### Returns
64
-
65
- `void`
66
-
67
- ##### onError()?
68
-
69
- ```ts
70
- optional onError: (error) => void;
71
- ```
72
-
73
- Defined in: [packages/utils/src/asyncQueue.ts:106](https://github.com/lucasols/utils/blob/main/packages/utils/src/asyncQueue.ts#L106)
74
-
75
- Callback invoked when task fails
76
-
77
- ###### Parameters
78
-
79
- ###### error
80
-
81
- `E` | `Error`
82
-
83
- ###### Returns
84
-
85
- `void`
86
-
87
- ##### signal?
88
-
89
- ```ts
90
- optional signal: AbortSignal;
91
- ```
92
-
93
- Defined in: [packages/utils/src/asyncQueue.ts:98](https://github.com/lucasols/utils/blob/main/packages/utils/src/asyncQueue.ts#L98)
94
-
95
- AbortSignal to cancel this specific task
96
-
97
- ##### timeout?
98
-
99
- ```ts
100
- optional timeout: number;
101
- ```
102
-
103
- Defined in: [packages/utils/src/asyncQueue.ts:100](https://github.com/lucasols/utils/blob/main/packages/utils/src/asyncQueue.ts#L100)
104
-
105
- Timeout for this specific task in milliseconds
106
-
107
- ***
108
-
109
- ### AddOptionsWithId\<I, T, E\>
110
-
111
- ```ts
112
- type AddOptionsWithId<I, T, E> = Omit<AddOptions<I, T, E>, "meta"> & object;
113
- ```
114
-
115
- Defined in: [packages/utils/src/asyncQueue.ts:918](https://github.com/lucasols/utils/blob/main/packages/utils/src/asyncQueue.ts#L918)
116
-
117
- AddOptions variant that requires metadata to be provided
118
-
119
- #### Type declaration
120
-
121
- ##### meta
122
-
123
- ```ts
124
- meta: I;
125
- ```
126
-
127
- #### Type Parameters
128
-
129
- ##### I
130
-
131
- `I`
132
-
133
- ##### T
134
-
135
- `T`
136
-
137
- ##### E
138
-
139
- `E` *extends* `ResultValidErrors`
140
-
141
- ***
142
-
143
- ### AsyncQueueOptions
144
-
145
- ```ts
146
- type AsyncQueueOptions = object;
147
- ```
148
-
149
- Defined in: [packages/utils/src/asyncQueue.ts:76](https://github.com/lucasols/utils/blob/main/packages/utils/src/asyncQueue.ts#L76)
150
-
151
- Configuration options for AsyncQueue initialization
152
-
153
- #### Properties
154
-
155
- ##### autoStart?
156
-
157
- ```ts
158
- optional autoStart: boolean;
159
- ```
160
-
161
- Defined in: [packages/utils/src/asyncQueue.ts:88](https://github.com/lucasols/utils/blob/main/packages/utils/src/asyncQueue.ts#L88)
162
-
163
- Start processing tasks immediately when added (default: true)
164
-
165
- ##### concurrency?
166
-
167
- ```ts
168
- optional concurrency: number;
169
- ```
170
-
171
- Defined in: [packages/utils/src/asyncQueue.ts:78](https://github.com/lucasols/utils/blob/main/packages/utils/src/asyncQueue.ts#L78)
172
-
173
- Maximum number of tasks to run concurrently (default: 1)
174
-
175
- ##### rateLimit?
176
-
177
- ```ts
178
- optional rateLimit: RateLimit;
179
- ```
180
-
181
- Defined in: [packages/utils/src/asyncQueue.ts:90](https://github.com/lucasols/utils/blob/main/packages/utils/src/asyncQueue.ts#L90)
182
-
183
- Rate limit configuration to limit tasks per time interval
184
-
185
- ##### rejectPendingOnError?
186
-
187
- ```ts
188
- optional rejectPendingOnError: boolean;
189
- ```
190
-
191
- Defined in: [packages/utils/src/asyncQueue.ts:86](https://github.com/lucasols/utils/blob/main/packages/utils/src/asyncQueue.ts#L86)
192
-
193
- Reject all pending tasks when stopping on error (default: false)
194
-
195
- ##### signal?
196
-
197
- ```ts
198
- optional signal: AbortSignal;
199
- ```
200
-
201
- Defined in: [packages/utils/src/asyncQueue.ts:80](https://github.com/lucasols/utils/blob/main/packages/utils/src/asyncQueue.ts#L80)
202
-
203
- AbortSignal to cancel the entire queue
204
-
205
- ##### stopOnError?
206
-
207
- ```ts
208
- optional stopOnError: boolean;
209
- ```
210
-
211
- Defined in: [packages/utils/src/asyncQueue.ts:84](https://github.com/lucasols/utils/blob/main/packages/utils/src/asyncQueue.ts#L84)
212
-
213
- Stop processing new tasks when any task fails (default: false)
214
-
215
- ##### timeout?
216
-
217
- ```ts
218
- optional timeout: number;
219
- ```
220
-
221
- Defined in: [packages/utils/src/asyncQueue.ts:82](https://github.com/lucasols/utils/blob/main/packages/utils/src/asyncQueue.ts#L82)
222
-
223
- Default timeout for all tasks in milliseconds
224
-
225
- ***
226
-
227
- ### RateLimit
228
-
229
- ```ts
230
- type RateLimit = object;
231
- ```
232
-
233
- Defined in: [packages/utils/src/asyncQueue.ts:66](https://github.com/lucasols/utils/blob/main/packages/utils/src/asyncQueue.ts#L66)
234
-
235
- Configuration for rate limiting task execution
236
-
237
- #### Properties
238
-
239
- ##### interval
240
-
241
- ```ts
242
- interval: DurationObj | number;
243
- ```
244
-
245
- Defined in: [packages/utils/src/asyncQueue.ts:70](https://github.com/lucasols/utils/blob/main/packages/utils/src/asyncQueue.ts#L70)
246
-
247
- Time interval in milliseconds or as a duration object
248
-
249
- ##### maxTasks
250
-
251
- ```ts
252
- maxTasks: number;
253
- ```
254
-
255
- Defined in: [packages/utils/src/asyncQueue.ts:68](https://github.com/lucasols/utils/blob/main/packages/utils/src/asyncQueue.ts#L68)
256
-
257
- Maximum number of tasks to execute within the interval
258
-
259
- ***
260
-
261
- ### RunCtx\<I\>
262
-
263
- ```ts
264
- type RunCtx<I> = object;
265
- ```
266
-
267
- Defined in: [packages/utils/src/asyncQueue.ts:112](https://github.com/lucasols/utils/blob/main/packages/utils/src/asyncQueue.ts#L112)
268
-
269
- Runtime context passed to task functions
270
-
271
- #### Type Parameters
272
-
273
- ##### I
274
-
275
- `I`
276
-
277
- #### Properties
278
-
279
- ##### meta?
280
-
281
- ```ts
282
- optional meta: I;
283
- ```
284
-
285
- Defined in: [packages/utils/src/asyncQueue.ts:116](https://github.com/lucasols/utils/blob/main/packages/utils/src/asyncQueue.ts#L116)
286
-
287
- Metadata associated with this task
288
-
289
- ##### signal?
290
-
291
- ```ts
292
- optional signal: AbortSignal;
293
- ```
294
-
295
- Defined in: [packages/utils/src/asyncQueue.ts:114](https://github.com/lucasols/utils/blob/main/packages/utils/src/asyncQueue.ts#L114)
296
-
297
- Combined AbortSignal from task, queue, and timeout signals