@zajno/common 2.4.3 → 2.4.4

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 (294) hide show
  1. package/cjs/api/call.js +5 -5
  2. package/cjs/api/call.js.map +1 -1
  3. package/cjs/api/endpoint.js +9 -9
  4. package/cjs/api/endpoint.js.map +1 -1
  5. package/cjs/api/index.js +12 -12
  6. package/cjs/api/index.js.map +1 -1
  7. package/cjs/api/processor.js +2 -2
  8. package/cjs/api/processor.js.map +1 -1
  9. package/cjs/api/register.js +5 -5
  10. package/cjs/api/register.js.map +1 -1
  11. package/cjs/async/misc.js +1 -1
  12. package/cjs/async/misc.js.map +1 -1
  13. package/cjs/dates/calc.js +9 -9
  14. package/cjs/dates/calc.js.map +1 -1
  15. package/cjs/dates/convert.js +16 -16
  16. package/cjs/dates/convert.js.map +1 -1
  17. package/cjs/dates/datex.js +7 -7
  18. package/cjs/dates/datex.js.map +1 -1
  19. package/cjs/dates/decompose.js +7 -7
  20. package/cjs/dates/decompose.js.map +1 -1
  21. package/cjs/dates/format.js +10 -10
  22. package/cjs/dates/format.js.map +1 -1
  23. package/cjs/dates/index.js +10 -10
  24. package/cjs/dates/index.js.map +1 -1
  25. package/cjs/dates/period.js +3 -3
  26. package/cjs/dates/period.js.map +1 -1
  27. package/cjs/dates/shift.js +17 -17
  28. package/cjs/dates/shift.js.map +1 -1
  29. package/cjs/dates/types.js +2 -2
  30. package/cjs/dates/types.js.map +1 -1
  31. package/cjs/dates/yearDate.js +3 -3
  32. package/cjs/dates/yearDate.js.map +1 -1
  33. package/cjs/fields/index.js +3 -3
  34. package/cjs/fields/index.js.map +1 -1
  35. package/cjs/functions/assert.js +4 -4
  36. package/cjs/functions/assert.js.map +1 -1
  37. package/cjs/functions/disposer.js +2 -2
  38. package/cjs/functions/disposer.js.map +1 -1
  39. package/cjs/functions/throttle.js +8 -8
  40. package/cjs/functions/throttle.js.map +1 -1
  41. package/cjs/logger/console.js +2 -2
  42. package/cjs/logger/console.js.map +1 -1
  43. package/cjs/logger/index.js +8 -8
  44. package/cjs/logger/index.js.map +1 -1
  45. package/cjs/logger/manager.js +8 -8
  46. package/cjs/logger/manager.js.map +1 -1
  47. package/cjs/logger/proxy.js +5 -5
  48. package/cjs/logger/proxy.js.map +1 -1
  49. package/cjs/math/arrays.js +6 -6
  50. package/cjs/math/arrays.js.map +1 -1
  51. package/cjs/math/index.js +3 -3
  52. package/cjs/math/index.js.map +1 -1
  53. package/cjs/math/object/index.js +9 -9
  54. package/cjs/math/object/index.js.map +1 -1
  55. package/cjs/math/object/math.composite.js +13 -13
  56. package/cjs/math/object/math.composite.js.map +1 -1
  57. package/cjs/math/object/math.js +9 -9
  58. package/cjs/math/object/math.js.map +1 -1
  59. package/cjs/math/object/ops.composite.js +7 -7
  60. package/cjs/math/object/ops.composite.js.map +1 -1
  61. package/cjs/math/object/ops.js +9 -9
  62. package/cjs/math/object/ops.js.map +1 -1
  63. package/cjs/models/Loading.js +2 -2
  64. package/cjs/models/Loading.js.map +1 -1
  65. package/cjs/models/LogicModel.js +13 -13
  66. package/cjs/models/LogicModel.js.map +1 -1
  67. package/cjs/models/Model.js +2 -2
  68. package/cjs/models/Model.js.map +1 -1
  69. package/cjs/models/wrappers.js +2 -2
  70. package/cjs/models/wrappers.js.map +1 -1
  71. package/cjs/observing/event.js +6 -6
  72. package/cjs/observing/event.js.map +1 -1
  73. package/cjs/observing/event.late.js +4 -4
  74. package/cjs/observing/event.late.js.map +1 -1
  75. package/cjs/observing/progressTracker.js +6 -6
  76. package/cjs/observing/progressTracker.js.map +1 -1
  77. package/cjs/observing/throttledEvent.js +4 -4
  78. package/cjs/observing/throttledEvent.js.map +1 -1
  79. package/cjs/observing/timer.js +3 -3
  80. package/cjs/observing/timer.js.map +1 -1
  81. package/cjs/storage/index.js +2 -2
  82. package/cjs/storage/index.js.map +1 -1
  83. package/cjs/structures/path/builder.js +8 -8
  84. package/cjs/structures/path/builder.js.map +1 -1
  85. package/cjs/structures/path/index.js +2 -2
  86. package/cjs/structures/path/index.js.map +1 -1
  87. package/cjs/structures/promiseCache.js +4 -4
  88. package/cjs/structures/promiseCache.js.map +1 -1
  89. package/cjs/structures/promiseProxy.js +2 -2
  90. package/cjs/structures/promiseProxy.js.map +1 -1
  91. package/cjs/structures/queue/parallel.js +7 -7
  92. package/cjs/structures/queue/parallel.js.map +1 -1
  93. package/cjs/structures/subscribersMap.js +6 -6
  94. package/cjs/structures/subscribersMap.js.map +1 -1
  95. package/cjs/structures/tempoCache.js +2 -2
  96. package/cjs/structures/tempoCache.js.map +1 -1
  97. package/cjs/types/index.js +4 -4
  98. package/cjs/types/index.js.map +1 -1
  99. package/cjs/validation/ValidationErrors.js +2 -2
  100. package/cjs/validation/ValidationErrors.js.map +1 -1
  101. package/cjs/validation/helpers.js +8 -8
  102. package/cjs/validation/helpers.js.map +1 -1
  103. package/cjs/validation/index.js +5 -5
  104. package/cjs/validation/index.js.map +1 -1
  105. package/cjs/validation/validators.js +17 -17
  106. package/cjs/validation/validators.js.map +1 -1
  107. package/cjs/validation/wrappers.js +7 -7
  108. package/cjs/validation/wrappers.js.map +1 -1
  109. package/esm/api/call.js +2 -2
  110. package/esm/api/call.js.map +1 -1
  111. package/esm/api/endpoint.js +2 -2
  112. package/esm/api/endpoint.js.map +1 -1
  113. package/esm/api/index.js +6 -6
  114. package/esm/api/index.js.map +1 -1
  115. package/esm/api/processor.js +1 -1
  116. package/esm/api/processor.js.map +1 -1
  117. package/esm/api/register.js +2 -2
  118. package/esm/api/register.js.map +1 -1
  119. package/esm/async/misc.js +1 -1
  120. package/esm/async/misc.js.map +1 -1
  121. package/esm/dates/calc.js +2 -2
  122. package/esm/dates/calc.js.map +1 -1
  123. package/esm/dates/convert.js +4 -4
  124. package/esm/dates/convert.js.map +1 -1
  125. package/esm/dates/datex.js +3 -3
  126. package/esm/dates/datex.js.map +1 -1
  127. package/esm/dates/decompose.js +2 -2
  128. package/esm/dates/decompose.js.map +1 -1
  129. package/esm/dates/format.js +4 -4
  130. package/esm/dates/format.js.map +1 -1
  131. package/esm/dates/index.js +10 -10
  132. package/esm/dates/index.js.map +1 -1
  133. package/esm/dates/period.js +1 -1
  134. package/esm/dates/period.js.map +1 -1
  135. package/esm/dates/shift.js +3 -3
  136. package/esm/dates/shift.js.map +1 -1
  137. package/esm/dates/types.js +1 -1
  138. package/esm/dates/types.js.map +1 -1
  139. package/esm/dates/yearDate.js +1 -1
  140. package/esm/dates/yearDate.js.map +1 -1
  141. package/esm/fields/index.js +3 -3
  142. package/esm/fields/index.js.map +1 -1
  143. package/esm/functions/assert.js +2 -2
  144. package/esm/functions/assert.js.map +1 -1
  145. package/esm/functions/disposer.js +1 -1
  146. package/esm/functions/disposer.js.map +1 -1
  147. package/esm/functions/throttle.js +4 -4
  148. package/esm/functions/throttle.js.map +1 -1
  149. package/esm/logger/console.js +1 -1
  150. package/esm/logger/console.js.map +1 -1
  151. package/esm/logger/index.js +4 -4
  152. package/esm/logger/index.js.map +1 -1
  153. package/esm/logger/manager.js +3 -3
  154. package/esm/logger/manager.js.map +1 -1
  155. package/esm/logger/proxy.js +1 -1
  156. package/esm/logger/proxy.js.map +1 -1
  157. package/esm/math/arrays.js +2 -2
  158. package/esm/math/arrays.js.map +1 -1
  159. package/esm/math/index.js +3 -3
  160. package/esm/math/index.js.map +1 -1
  161. package/esm/math/object/index.js +5 -5
  162. package/esm/math/object/index.js.map +1 -1
  163. package/esm/math/object/math.composite.js +2 -2
  164. package/esm/math/object/math.composite.js.map +1 -1
  165. package/esm/math/object/math.js +2 -2
  166. package/esm/math/object/math.js.map +1 -1
  167. package/esm/math/object/ops.composite.js +1 -1
  168. package/esm/math/object/ops.composite.js.map +1 -1
  169. package/esm/math/object/ops.js +2 -2
  170. package/esm/math/object/ops.js.map +1 -1
  171. package/esm/models/Loading.js +1 -1
  172. package/esm/models/Loading.js.map +1 -1
  173. package/esm/models/LogicModel.js +4 -4
  174. package/esm/models/LogicModel.js.map +1 -1
  175. package/esm/models/Model.js +1 -1
  176. package/esm/models/Model.js.map +1 -1
  177. package/esm/models/wrappers.js +1 -1
  178. package/esm/models/wrappers.js.map +1 -1
  179. package/esm/observing/event.js +3 -3
  180. package/esm/observing/event.js.map +1 -1
  181. package/esm/observing/event.late.js +2 -2
  182. package/esm/observing/event.late.js.map +1 -1
  183. package/esm/observing/progressTracker.js +4 -4
  184. package/esm/observing/progressTracker.js.map +1 -1
  185. package/esm/observing/throttledEvent.js +2 -2
  186. package/esm/observing/throttledEvent.js.map +1 -1
  187. package/esm/observing/timer.js +1 -1
  188. package/esm/observing/timer.js.map +1 -1
  189. package/esm/storage/index.js +2 -2
  190. package/esm/storage/index.js.map +1 -1
  191. package/esm/structures/path/builder.js +2 -2
  192. package/esm/structures/path/builder.js.map +1 -1
  193. package/esm/structures/path/index.js +2 -2
  194. package/esm/structures/path/index.js.map +1 -1
  195. package/esm/structures/promiseCache.js +2 -2
  196. package/esm/structures/promiseCache.js.map +1 -1
  197. package/esm/structures/promiseProxy.js +1 -1
  198. package/esm/structures/promiseProxy.js.map +1 -1
  199. package/esm/structures/queue/parallel.js +3 -3
  200. package/esm/structures/queue/parallel.js.map +1 -1
  201. package/esm/structures/subscribersMap.js +3 -3
  202. package/esm/structures/subscribersMap.js.map +1 -1
  203. package/esm/structures/tempoCache.js +1 -1
  204. package/esm/structures/tempoCache.js.map +1 -1
  205. package/esm/types/index.js +4 -4
  206. package/esm/types/index.js.map +1 -1
  207. package/esm/validation/ValidationErrors.js +1 -1
  208. package/esm/validation/ValidationErrors.js.map +1 -1
  209. package/esm/validation/helpers.js +3 -3
  210. package/esm/validation/helpers.js.map +1 -1
  211. package/esm/validation/index.js +5 -5
  212. package/esm/validation/index.js.map +1 -1
  213. package/esm/validation/validators.js +2 -2
  214. package/esm/validation/validators.js.map +1 -1
  215. package/esm/validation/wrappers.js +3 -3
  216. package/esm/validation/wrappers.js.map +1 -1
  217. package/package.json +1 -1
  218. package/types/api/call.d.ts +4 -4
  219. package/types/api/endpoint.d.ts +4 -4
  220. package/types/api/endpoint.types.d.ts +3 -3
  221. package/types/api/error.d.ts +1 -1
  222. package/types/api/helpers.d.ts +1 -1
  223. package/types/api/index.d.ts +8 -8
  224. package/types/api/logging.d.ts +1 -1
  225. package/types/api/register.d.ts +2 -2
  226. package/types/async/misc.d.ts +1 -1
  227. package/types/dates/calc.d.ts +1 -1
  228. package/types/dates/convert.d.ts +1 -1
  229. package/types/dates/datex.d.ts +1 -1
  230. package/types/dates/decompose.d.ts +1 -1
  231. package/types/dates/format.d.ts +1 -1
  232. package/types/dates/index.d.ts +10 -10
  233. package/types/dates/period.d.ts +1 -1
  234. package/types/dates/shift.d.ts +1 -1
  235. package/types/fields/index.d.ts +3 -3
  236. package/types/fields/update.d.ts +1 -1
  237. package/types/functions/assert.d.ts +1 -1
  238. package/types/functions/disposer.symbols.d.ts +1 -1
  239. package/types/functions/safe.d.ts +1 -1
  240. package/types/functions/throttle.d.ts +1 -1
  241. package/types/lazy/light.d.ts +1 -1
  242. package/types/lazy/promise.d.ts +2 -2
  243. package/types/lazy/singleton.d.ts +2 -2
  244. package/types/lazy/types.d.ts +2 -2
  245. package/types/logger/batch.d.ts +1 -1
  246. package/types/logger/console.d.ts +2 -2
  247. package/types/logger/file.d.ts +1 -1
  248. package/types/logger/index.d.ts +5 -5
  249. package/types/logger/manager.d.ts +3 -3
  250. package/types/logger/named.d.ts +1 -1
  251. package/types/logger/proxy.d.ts +2 -2
  252. package/types/math/arrays.d.ts +1 -1
  253. package/types/math/index.d.ts +3 -3
  254. package/types/math/object/helpers.d.ts +2 -2
  255. package/types/math/object/index.d.ts +5 -5
  256. package/types/math/object/math.composite.d.ts +4 -4
  257. package/types/math/object/math.d.ts +3 -3
  258. package/types/math/object/ops.composite.d.ts +3 -3
  259. package/types/math/object/ops.d.ts +3 -3
  260. package/types/math/object/types.d.ts +1 -1
  261. package/types/models/Loading.d.ts +1 -1
  262. package/types/models/LogicModel.d.ts +4 -4
  263. package/types/models/Model.d.ts +3 -3
  264. package/types/models/ValuesCollector.d.ts +1 -1
  265. package/types/models/wrappers.d.ts +2 -2
  266. package/types/observing/event.d.ts +2 -2
  267. package/types/observing/event.late.d.ts +1 -1
  268. package/types/observing/progressTracker.d.ts +2 -2
  269. package/types/observing/throttledEvent.d.ts +1 -1
  270. package/types/observing/timer.d.ts +2 -2
  271. package/types/storage/index.d.ts +2 -2
  272. package/types/storage/types.d.ts +1 -1
  273. package/types/storage/wrappers.d.ts +1 -1
  274. package/types/structures/path/builder.d.ts +2 -2
  275. package/types/structures/path/index.d.ts +2 -2
  276. package/types/structures/path/types.d.ts +2 -2
  277. package/types/structures/path/utils.d.ts +1 -1
  278. package/types/structures/pool.d.ts +1 -1
  279. package/types/structures/promiseCache.d.ts +1 -1
  280. package/types/structures/promiseExtended.d.ts +1 -1
  281. package/types/structures/promiseProxy.d.ts +2 -2
  282. package/types/structures/queue/parallel.d.ts +3 -3
  283. package/types/structures/queue/tasks.d.ts +1 -1
  284. package/types/structures/subscribersMap.d.ts +1 -1
  285. package/types/structures/tempoCache.d.ts +2 -2
  286. package/types/types/deep.d.ts +1 -1
  287. package/types/types/functions.d.ts +1 -1
  288. package/types/types/index.d.ts +4 -4
  289. package/types/validation/ValidationErrors.d.ts +1 -1
  290. package/types/validation/helpers.d.ts +3 -3
  291. package/types/validation/index.d.ts +5 -5
  292. package/types/validation/types.d.ts +1 -1
  293. package/types/validation/validators.d.ts +1 -1
  294. package/types/validation/wrappers.d.ts +1 -1
@@ -1,5 +1,5 @@
1
- import { ILogger } from './abstractions';
2
- import { NamedLogger } from './named';
1
+ import { ILogger } from './abstractions.js';
2
+ import { NamedLogger } from './named.js';
3
3
  export declare const EMPTY_LOGGER: ILogger;
4
4
  export declare class ProxyLogger extends NamedLogger {
5
5
  protected get implementation(): ILogger;
@@ -1,4 +1,4 @@
1
- import { Comparator, Getter, Nullable, Predicate } from '../types';
1
+ import { Comparator, Getter, Nullable, Predicate } from '../types/index.js';
2
2
  /** type-safe `Array.isArray` wrapper */
3
3
  export declare function isArray<T>(value: any): value is T[];
4
4
  export declare function arrayCompareG<T>(arr: ReadonlyArray<T> | null | undefined, cond: (current: T, previous: T | null) => boolean): T | null;
@@ -1,5 +1,5 @@
1
- export * from './calc';
2
- export * from './arrays';
3
- export * from './distribution';
1
+ export * from './calc.js';
2
+ export * from './arrays.js';
3
+ export * from './distribution.js';
4
4
  export declare function getNumberSuffix(num: number): "st" | "nd" | "rd" | "th";
5
5
  export declare function format(n: number, digits?: number): string;
@@ -1,5 +1,5 @@
1
- import { DeepReadonly, DeepReadonlyPartial } from '../../types/deep';
2
- import { BasePair, IObjectOps, NumKey } from './types';
1
+ import { DeepReadonly, DeepReadonlyPartial } from '../../types/deep.js';
2
+ import { BasePair, IObjectOps, NumKey } from './types.js';
3
3
  export declare function _getValue<T extends object, TKey extends NumKey<T> = NumKey<T>>(o: DeepReadonlyPartial<T>, key: TKey): T[TKey] | null;
4
4
  export declare function _getInnerValue<T extends object, TKey extends string & keyof T>(o: DeepReadonly<T>, key: TKey): DeepReadonly<T[TKey]>;
5
5
  export declare function _getInnerValue<T extends object, TKey extends string & keyof T>(o: DeepReadonly<T> | number, key: TKey): DeepReadonly<T[TKey]> | number;
@@ -1,5 +1,5 @@
1
- export * from './types';
2
- export { ObjectOps } from './ops';
3
- export { ObjectMath } from './math';
4
- export { CompositeObjectOps } from './ops.composite';
5
- export { CompositeObjectMath } from './math.composite';
1
+ export * from './types.js';
2
+ export { ObjectOps } from './ops.js';
3
+ export { ObjectMath } from './math.js';
4
+ export { CompositeObjectOps } from './ops.composite.js';
5
+ export { CompositeObjectMath } from './math.composite.js';
@@ -1,7 +1,7 @@
1
- import { AnyObject } from '../../types';
2
- import { DeepReadonly } from '../../types/deep';
3
- import { CompositeObjectOps } from './ops.composite';
4
- import { AbsOptions, IObjectMath, MathPairsMap, RoundOptions } from './types';
1
+ import { AnyObject } from '../../types/index.js';
2
+ import { DeepReadonly } from '../../types/deep.js';
3
+ import { CompositeObjectOps } from './ops.composite.js';
4
+ import { AbsOptions, IObjectMath, MathPairsMap, RoundOptions } from './types.js';
5
5
  export declare class CompositeObjectMath<T extends AnyObject> extends CompositeObjectOps<T> implements IObjectMath<T> {
6
6
  private readonly _math;
7
7
  constructor(innerMath: MathPairsMap<T>);
@@ -1,6 +1,6 @@
1
- import { DeepReadonly, DeepReadonlyPartial } from '../../types/deep';
2
- import { ObjectOps } from './ops';
3
- import { AbsOptions, DELETE_TYPE, IObjectMath, NumKey, RoundOptions } from './types';
1
+ import { DeepReadonly, DeepReadonlyPartial } from '../../types/deep.js';
2
+ import { ObjectOps } from './ops.js';
3
+ import { AbsOptions, DELETE_TYPE, IObjectMath, NumKey, RoundOptions } from './types.js';
4
4
  export declare class ObjectMath<T extends object> extends ObjectOps<T> implements IObjectMath<T> {
5
5
  getTotal(o: DeepReadonlyPartial<T>): number;
6
6
  contains(base: DeepReadonly<T>, target: DeepReadonly<T>): boolean;
@@ -1,6 +1,6 @@
1
- import { AnyObject } from '../../types';
2
- import { DeepReadonly } from '../../types/deep';
3
- import { IObjectOps, OpsPairsMap } from './types';
1
+ import { AnyObject } from '../../types/index.js';
2
+ import { DeepReadonly } from '../../types/deep.js';
3
+ import { IObjectOps, OpsPairsMap } from './types.js';
4
4
  export declare class CompositeObjectOps<T extends AnyObject> implements IObjectOps<T> {
5
5
  readonly Empty: Readonly<T>;
6
6
  private readonly _ops;
@@ -1,6 +1,6 @@
1
- import { SkipCondition, SkipOptions } from '../../fields/skip';
2
- import { AnyObject, DeepPartial, DeepReadonly, Predicate } from '../../types';
3
- import { IObjectOps, NumKey } from './types';
1
+ import { SkipCondition, SkipOptions } from '../../fields/skip.js';
2
+ import { AnyObject, DeepPartial, DeepReadonly, Predicate } from '../../types/index.js';
3
+ import { IObjectOps, NumKey } from './types.js';
4
4
  type Keys<T extends AnyObject> = NumKey<T>[];
5
5
  export declare class ObjectOps<T extends AnyObject> implements IObjectOps<T> {
6
6
  readonly keys: Keys<T>;
@@ -1,4 +1,4 @@
1
- import { AnyObject, DeepReadonly, TypedKeys } from '../../types';
1
+ import { AnyObject, DeepReadonly, TypedKeys } from '../../types/index.js';
2
2
  export type NumKey<T extends AnyObject> = TypedKeys<T, number>;
3
3
  export type AbsOptions = false | 'remove' | 'zero';
4
4
  export type RoundOptions = 'floor' | 'ceil' | 'round';
@@ -1,4 +1,4 @@
1
- import type { IResetableModel, IValueModel } from './types';
1
+ import type { IResetableModel, IValueModel } from './types.js';
2
2
  export type LoadingWorker<T> = () => (T | Promise<T>);
3
3
  export type LoadingResult<T = unknown> = {
4
4
  aborted: true;
@@ -1,7 +1,7 @@
1
- import { ExclusiveLoadingError, LoadingModel } from './Loading';
2
- import { Getter } from '../types';
3
- import { PromiseExtended } from '../structures/promiseExtended';
4
- import { ILogger } from '../logger';
1
+ import { ExclusiveLoadingError, LoadingModel } from './Loading.js';
2
+ import { Getter } from '../types/index.js';
3
+ import { PromiseExtended } from '../structures/promiseExtended.js';
4
+ import { ILogger } from '../logger/index.js';
5
5
  export type ActionRunOptions = {
6
6
  /** Action name, required for logging and joining. */
7
7
  name?: string;
@@ -1,6 +1,6 @@
1
- import type { IResetableModel, IValueModel } from './types';
2
- import { Getter } from '../types/getter';
3
- import { Nullable } from '../types/misc';
1
+ import type { IResetableModel, IValueModel } from './types.js';
2
+ import { Getter } from '../types/getter.js';
3
+ import { Nullable } from '../types/misc.js';
4
4
  export declare class Model<T> implements IValueModel<Nullable<T>>, IResetableModel {
5
5
  private _value;
6
6
  private readonly _defaultValue;
@@ -1,4 +1,4 @@
1
- import type { IValueModel } from './types';
1
+ import type { IValueModel } from './types.js';
2
2
  export interface IValueCollector<TSource, TValue> {
3
3
  getValue(source: TSource): TValue;
4
4
  setValue(source: TSource, value: TValue): void;
@@ -1,5 +1,5 @@
1
- import { Getter } from '../types/getter';
2
- import type { ILabel, IValueModel } from './types';
1
+ import { Getter } from '../types/getter.js';
2
+ import type { ILabel, IValueModel } from './types.js';
3
3
  export declare function withLabel<T, TModel extends IValueModel<T>, TLabel = string>(model: TModel, label: Getter<TLabel>): TModel & ILabel<TLabel>;
4
4
  export declare function inject<T, TModel extends IValueModel<T>>(model: TModel, source: IValueModel<T>): TModel;
5
5
  /**
@@ -1,5 +1,5 @@
1
- import type { Predicate } from '../types';
2
- import { ILogger } from '../logger';
1
+ import type { Predicate } from '../types/index.js';
2
+ import { ILogger } from '../logger/index.js';
3
3
  export type EventHandler<T = any> = (data?: T) => void | Promise<void>;
4
4
  type Unsubscribe = () => void;
5
5
  export interface IEvent<T = any> {
@@ -1,4 +1,4 @@
1
- import { Event, EventHandler } from './event';
1
+ import { Event, EventHandler } from './event.js';
2
2
  export declare class OneTimeLateEvent<T = any> extends Event<T> {
3
3
  private _triggeredWith;
4
4
  private _triggered;
@@ -1,4 +1,4 @@
1
- import { ILogger } from '../logger';
1
+ import { ILogger } from '../logger/index.js';
2
2
  export declare class ProgressTracker {
3
3
  readonly log: boolean | ILogger;
4
4
  private readonly _firstTimestamp;
@@ -10,7 +10,7 @@ export declare class ProgressTracker {
10
10
  private readonly _deltas;
11
11
  private readonly _changed;
12
12
  constructor(log?: boolean | ILogger);
13
- get changed(): import("./event").IEvent<{
13
+ get changed(): import("./event.js").IEvent<{
14
14
  completed: number;
15
15
  total: number;
16
16
  currentProgress: number;
@@ -1,4 +1,4 @@
1
- import { Event } from './event';
1
+ import { Event } from './event.js';
2
2
  export declare class ThrottledEvent extends Event {
3
3
  private readonly _throttle;
4
4
  setTimeout(timeout: number): this;
@@ -1,5 +1,5 @@
1
- import { IDisposable } from '../functions/disposer';
2
- import { EventHandler, IEvent } from './event';
1
+ import { IDisposable } from '../functions/disposer.js';
2
+ import { EventHandler, IEvent } from './event.js';
3
3
  export type TimerState = {
4
4
  timer: Timer;
5
5
  elapsed: number;
@@ -1,2 +1,2 @@
1
- export * from './types';
2
- export * from './wrappers';
1
+ export * from './types.js';
2
+ export * from './wrappers.js';
@@ -1,4 +1,4 @@
1
- import type { RemoveFirstParameter, Awaitify } from '../types/functions';
1
+ import type { RemoveFirstParameter, Awaitify } from '../types/functions.js';
2
2
  export interface IStorage<T = string> {
3
3
  getValue(key: string): Promise<T | null>;
4
4
  setValue(key: string, value: T): Promise<void>;
@@ -1,4 +1,4 @@
1
- import type { IKeyedStorage, IKeyedStorageSync, IStorage, IStorageSync } from './types';
1
+ import type { IKeyedStorage, IKeyedStorageSync, IStorage, IStorageSync } from './types.js';
2
2
  export declare namespace Storages {
3
3
  function toAsync<T = string>(storage: IStorageSync<T>): IStorage<T>;
4
4
  function toKeyed<T = string>(storage: IStorage<T>, storageKey: string): IKeyedStorage<T>;
@@ -1,5 +1,5 @@
1
- import { BaseInput, CombineBuilders, StaticBuilder, SwitchBuilder } from './types';
2
- export * from './types';
1
+ import { BaseInput, CombineBuilders, StaticBuilder, SwitchBuilder } from './types.js';
2
+ export * from './types.js';
3
3
  /** Tagged template literal to create a path builder */
4
4
  export declare function build<TArgs extends string[]>(strings: TemplateStringsArray, ...params: TArgs): SwitchBuilder<TArgs>;
5
5
  export declare const Empty: StaticBuilder;
@@ -1,2 +1,2 @@
1
- export * from './utils';
2
- export * as Path from './builder';
1
+ export * from './utils.js';
2
+ export * as Path from './builder.js';
@@ -1,5 +1,5 @@
1
- import type { LengthArray, Nullable } from '../../types/misc';
2
- import type { CombineOptions } from './utils';
1
+ import type { LengthArray, Nullable } from '../../types/misc.js';
2
+ import type { CombineOptions } from './utils.js';
3
3
  export type ArgValue = string | number;
4
4
  export type ObjectBuilderArgs<TArgs extends string> = Record<TArgs, ArgValue>;
5
5
  export type BuilderArgs<TArgs extends string, L extends number = number> = LengthArray<ArgValue, L> | Record<TArgs, ArgValue>;
@@ -1,4 +1,4 @@
1
- import { Nullable } from '../../types/misc';
1
+ import { Nullable } from '../../types/misc.js';
2
2
  export declare function indexTrim(str: string | null | undefined, ch: string): string;
3
3
  export type CombineOptions = {
4
4
  noTrim?: boolean;
@@ -1,4 +1,4 @@
1
- import type { IDisposable } from '../functions/disposer';
1
+ import type { IDisposable } from '../functions/disposer.js';
2
2
  export declare class Pool<T> {
3
3
  readonly factory: () => T;
4
4
  private readonly _container;
@@ -1,4 +1,4 @@
1
- import { ILogger } from '../logger';
1
+ import { ILogger } from '../logger/index.js';
2
2
  export type DeferredGetter<T> = {
3
3
  readonly current: T | null | undefined;
4
4
  readonly promise: Promise<T | null>;
@@ -1,4 +1,4 @@
1
- import type { Nullable } from '../types/misc';
1
+ import type { Nullable } from '../types/misc.js';
2
2
  /**
3
3
  * The idea here is to wrap a promise (or promise getter) so it will never throw natively, but still be able to provide success/fail results:
4
4
  * - `onSuccess` for handling successful result: like `then` but to be called only if there was no error
@@ -1,5 +1,5 @@
1
- import { LazyPromise } from '../lazy/promise';
2
- import { AnyObject, FunctionKeys, StringKeys } from '../types';
1
+ import { LazyPromise } from '../lazy/promise.js';
2
+ import { AnyObject, FunctionKeys, StringKeys } from '../types/index.js';
3
3
  declare const PromiseGetter = "__promise";
4
4
  type AllowedFnKeys<T extends AnyObject> = FunctionKeys<T, any[], void>;
5
5
  type PromiseProxy<T extends AnyObject, TKeys extends StringKeys<T> = StringKeys<T>, TFnKeys = never, TWrap extends object = object> = {
@@ -10,9 +10,9 @@ export declare class ParallelQueue {
10
10
  private readonly _finished;
11
11
  get currentPriority(): number;
12
12
  get inProgress(): boolean;
13
- get beforePriorityRun(): import("../../observing/event").IEvent<number>;
14
- get afterPriorityRun(): import("../../observing/event").IEvent<number>;
15
- get finished(): import("../../observing/event").IEvent<any>;
13
+ get beforePriorityRun(): import("../../observing/event.js").IEvent<number>;
14
+ get afterPriorityRun(): import("../../observing/event.js").IEvent<number>;
15
+ get finished(): import("../../observing/event.js").IEvent<any>;
16
16
  withLogger(name?: string): this;
17
17
  /** @returns A callback that will try to cancel queued item */
18
18
  enqueue(cb: QueueItem, priority?: number): () => void;
@@ -1,4 +1,4 @@
1
- import type { ILogger } from '../../logger';
1
+ import type { ILogger } from '../../logger/index.js';
2
2
  type Factory<T> = () => Promise<T>;
3
3
  export declare class TasksQueue<T> {
4
4
  readonly limit: number;
@@ -1,4 +1,4 @@
1
- import { IDisposable } from '../functions/disposer';
1
+ import { IDisposable } from '../functions/disposer.js';
2
2
  type Unsub = () => void;
3
3
  export declare class SubscribersMap implements IDisposable {
4
4
  readonly subscribe: null | ((key: string) => Promise<Unsub[]>);
@@ -1,5 +1,5 @@
1
- import type { ILazy, ILazyPromise } from '../lazy/types';
2
- import { ExpireTracker } from './expire';
1
+ import type { ILazy, ILazyPromise } from '../lazy/types.js';
2
+ import { ExpireTracker } from './expire.js';
3
3
  /**
4
4
  * Calls factory fn to fetch and store some value for a limited time.
5
5
  *
@@ -1,4 +1,4 @@
1
- import { AnyFunction } from './misc';
1
+ import { AnyFunction } from './misc.js';
2
2
  export type DeepReadonly<T> = T extends Array<infer U> ? ReadonlyArray<DeepReadonly<U>> : (T extends AnyFunction ? T : (T extends object ? {
3
3
  readonly [P in keyof T]: DeepReadonly<T[P]>;
4
4
  } : T));
@@ -1,4 +1,4 @@
1
- import { AnyFunction } from './misc';
1
+ import { AnyFunction } from './misc.js';
2
2
  export type TypedFn<A extends unknown[], R> = (...args: A) => R;
3
3
  export type Asyncify<T> = {
4
4
  [P in keyof T]: T[P] extends TypedFn<unknown[], Promise<unknown>> ? T[P] : (T[P] extends TypedFn<infer A, infer R> ? (...args: A) => Promise<R> : T[P]);
@@ -1,4 +1,4 @@
1
- export * from './deep';
2
- export * from './getter';
3
- export * from './comparator';
4
- export * from './misc';
1
+ export * from './deep.js';
2
+ export * from './getter.js';
3
+ export * from './comparator.js';
4
+ export * from './misc.js';
@@ -1,4 +1,4 @@
1
- import EnumHelper from '../structures/helpers/enum';
1
+ import EnumHelper from '../structures/helpers/enum.js';
2
2
  export declare enum ValidationErrors {
3
3
  None = 0,
4
4
  ShouldBeNonEmpty = 1,
@@ -1,6 +1,6 @@
1
- import { AnyObject } from '../types';
2
- import { ValidationErrors } from './ValidationErrors';
3
- import { ValidationConfig, ValidationResults, ValidationVoid, ValidatorFunction, ValidatorFunctionAsync } from './types';
1
+ import { AnyObject } from '../types/index.js';
2
+ import { ValidationErrors } from './ValidationErrors.js';
3
+ import { ValidationConfig, ValidationResults, ValidationVoid, ValidatorFunction, ValidatorFunctionAsync } from './types.js';
4
4
  export declare function createShouldBeEqualTo<T = string>(getter: () => T): ValidatorFunction<T>;
5
5
  export declare function throwNotOk(result: ValidationErrors, message?: string): void;
6
6
  export declare function validateObject<T extends AnyObject, TErrors = ValidationErrors>(obj: T, validators: ValidationConfig<T, TErrors>, onlyTruthy?: boolean, context?: T): ValidationResults<T, TErrors>;
@@ -1,5 +1,5 @@
1
- export * from './ValidationErrors';
2
- export * from './types';
3
- export * from './validators';
4
- export * from './wrappers';
5
- export * from './helpers';
1
+ export * from './ValidationErrors.js';
2
+ export * from './types.js';
3
+ export * from './validators.js';
4
+ export * from './wrappers.js';
5
+ export * from './helpers.js';
@@ -1,4 +1,4 @@
1
- import { ValidationErrors } from './ValidationErrors';
1
+ import { ValidationErrors } from './ValidationErrors.js';
2
2
  export type ValidatorFunction<T = string, TErrors = ValidationErrors, TContext = any> = (val: T, ctx?: TContext) => TErrors;
3
3
  export type ValidatorFunctionAsync<T = string, TErrors = ValidationErrors, TContext = any> = (val: T, ctx?: TContext) => Promise<TErrors>;
4
4
  export type ValidationConfig<T, TErrors> = {
@@ -1,4 +1,4 @@
1
- import { ValidationErrors } from './ValidationErrors';
1
+ import { ValidationErrors } from './ValidationErrors.js';
2
2
  export declare const ValidatorsRegExps: {
3
3
  name: RegExp;
4
4
  englishLetters: RegExp;
@@ -1,4 +1,4 @@
1
- import { ValidatorFunction } from './types';
1
+ import { ValidatorFunction } from './types.js';
2
2
  export declare const Wrappers: {
3
3
  required<T = string>(validator: ValidatorFunction<T>): ValidatorFunction<T>;
4
4
  notRequired<T = string>(validator: ValidatorFunction<T>): ValidatorFunction<T>;