elseware-nodejs 1.3.0 → 1.4.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.
- package/README.md +1 -1
- package/dist/index.cjs +5458 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13 -1
- package/dist/index.d.ts +13 -1
- package/dist/index.js +5367 -4
- package/dist/index.js.map +1 -1
- package/package.json +69 -69
package/dist/index.d.cts
CHANGED
|
@@ -57,6 +57,18 @@ declare class APIResponse {
|
|
|
57
57
|
|
|
58
58
|
declare const asyncHandler: (fn: (req: Request, res: Response, next: NextFunction) => Promise<void>) => (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
59
59
|
|
|
60
|
+
type FieldTransform<T> = (value: T) => any;
|
|
61
|
+
type PickOptions<T extends Record<string, any>, K extends keyof T> = {
|
|
62
|
+
removeUndefined?: boolean;
|
|
63
|
+
removeNull?: boolean;
|
|
64
|
+
removeEmptyString?: boolean;
|
|
65
|
+
strict?: boolean;
|
|
66
|
+
defaults?: Partial<Record<K, any>>;
|
|
67
|
+
rename?: Partial<Record<K, string>>;
|
|
68
|
+
transform?: Partial<Record<K, FieldTransform<T[K]>>>;
|
|
69
|
+
};
|
|
70
|
+
declare function pickFields<T extends Record<string, any>, K extends keyof T>(obj: T, fields: readonly K[], options?: PickOptions<T, K>): Partial<Record<K | string, any>>;
|
|
71
|
+
|
|
60
72
|
interface AzureBlobConfig {
|
|
61
73
|
connectionString: string;
|
|
62
74
|
accountName: string;
|
|
@@ -1882,4 +1894,4 @@ declare function toMinutes(ms: number): number;
|
|
|
1882
1894
|
declare function toHours(ms: number): number;
|
|
1883
1895
|
declare function sleep(ms: number): Promise<void>;
|
|
1884
1896
|
|
|
1885
|
-
export { APIFactory, APIFeatures, APIResponse, AVLTree, AdjacencyList, AdjacencyMatrix, type AdjacentEdge, type AllowedOriginsOptions, AppError, type AzureBlobConfig, AzureBlobService, BPlusTree, BTree, BaseService, BinaryHeap, BinarySearchTree, BinaryTree, BloomFilter, CircularArray, CircularLinkedList, CircularQueue, type CloudinaryConfig, CloudinaryService, ConsistentHash, CountMinSketch, type CrudService, type DatabaseConfig, Deque, type DirectedEdge, DirectedGraph, DisjointSetUnion, DoublyLinkedList, DynamicArray, type Edge, FenwickTree, FibNode, FibonacciHeap, GlobalErrorHandler, Graph, HashMap, HashSet, HyperLogLog, type Interval, IntervalTree, KDTree, LFUCache, LRUCache, type LoggerOptions, MaxHeap, MaxStack, MinHeap, MinStack, MultiSet, Node, OrderedSet, PairingHeap, PairingNode, type Point, type Point2D, PriorityQueue, type ProgressCallback, QuadTree, Queue, RadixTree, type Rect, RedBlackTree, SegmentTree, Set, SinglyLinkedList, SparseTable, SplayTree, Stack, StaticArray, SuffixArray, SuffixTree, TernarySearchTree, TreeNode, Trie, type UploadOptions, asyncHandler, authMiddleware, connectMongoDB, createAllowedOrigins, createCorsOptions, days, errorToString, hours, loadEnv, logger, milliseconds, minutes, seconds, sleep, toHours, toMinutes, toSeconds, validate };
|
|
1897
|
+
export { APIFactory, APIFeatures, APIResponse, AVLTree, AdjacencyList, AdjacencyMatrix, type AdjacentEdge, type AllowedOriginsOptions, AppError, type AzureBlobConfig, AzureBlobService, BPlusTree, BTree, BaseService, BinaryHeap, BinarySearchTree, BinaryTree, BloomFilter, CircularArray, CircularLinkedList, CircularQueue, type CloudinaryConfig, CloudinaryService, ConsistentHash, CountMinSketch, type CrudService, type DatabaseConfig, Deque, type DirectedEdge, DirectedGraph, DisjointSetUnion, DoublyLinkedList, DynamicArray, type Edge, FenwickTree, FibNode, FibonacciHeap, GlobalErrorHandler, Graph, HashMap, HashSet, HyperLogLog, type Interval, IntervalTree, KDTree, LFUCache, LRUCache, type LoggerOptions, MaxHeap, MaxStack, MinHeap, MinStack, MultiSet, Node, OrderedSet, PairingHeap, PairingNode, type Point, type Point2D, PriorityQueue, type ProgressCallback, QuadTree, Queue, RadixTree, type Rect, RedBlackTree, SegmentTree, Set, SinglyLinkedList, SparseTable, SplayTree, Stack, StaticArray, SuffixArray, SuffixTree, TernarySearchTree, TreeNode, Trie, type UploadOptions, asyncHandler, authMiddleware, connectMongoDB, createAllowedOrigins, createCorsOptions, days, errorToString, hours, loadEnv, logger, milliseconds, minutes, pickFields, seconds, sleep, toHours, toMinutes, toSeconds, validate };
|
package/dist/index.d.ts
CHANGED
|
@@ -57,6 +57,18 @@ declare class APIResponse {
|
|
|
57
57
|
|
|
58
58
|
declare const asyncHandler: (fn: (req: Request, res: Response, next: NextFunction) => Promise<void>) => (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
59
59
|
|
|
60
|
+
type FieldTransform<T> = (value: T) => any;
|
|
61
|
+
type PickOptions<T extends Record<string, any>, K extends keyof T> = {
|
|
62
|
+
removeUndefined?: boolean;
|
|
63
|
+
removeNull?: boolean;
|
|
64
|
+
removeEmptyString?: boolean;
|
|
65
|
+
strict?: boolean;
|
|
66
|
+
defaults?: Partial<Record<K, any>>;
|
|
67
|
+
rename?: Partial<Record<K, string>>;
|
|
68
|
+
transform?: Partial<Record<K, FieldTransform<T[K]>>>;
|
|
69
|
+
};
|
|
70
|
+
declare function pickFields<T extends Record<string, any>, K extends keyof T>(obj: T, fields: readonly K[], options?: PickOptions<T, K>): Partial<Record<K | string, any>>;
|
|
71
|
+
|
|
60
72
|
interface AzureBlobConfig {
|
|
61
73
|
connectionString: string;
|
|
62
74
|
accountName: string;
|
|
@@ -1882,4 +1894,4 @@ declare function toMinutes(ms: number): number;
|
|
|
1882
1894
|
declare function toHours(ms: number): number;
|
|
1883
1895
|
declare function sleep(ms: number): Promise<void>;
|
|
1884
1896
|
|
|
1885
|
-
export { APIFactory, APIFeatures, APIResponse, AVLTree, AdjacencyList, AdjacencyMatrix, type AdjacentEdge, type AllowedOriginsOptions, AppError, type AzureBlobConfig, AzureBlobService, BPlusTree, BTree, BaseService, BinaryHeap, BinarySearchTree, BinaryTree, BloomFilter, CircularArray, CircularLinkedList, CircularQueue, type CloudinaryConfig, CloudinaryService, ConsistentHash, CountMinSketch, type CrudService, type DatabaseConfig, Deque, type DirectedEdge, DirectedGraph, DisjointSetUnion, DoublyLinkedList, DynamicArray, type Edge, FenwickTree, FibNode, FibonacciHeap, GlobalErrorHandler, Graph, HashMap, HashSet, HyperLogLog, type Interval, IntervalTree, KDTree, LFUCache, LRUCache, type LoggerOptions, MaxHeap, MaxStack, MinHeap, MinStack, MultiSet, Node, OrderedSet, PairingHeap, PairingNode, type Point, type Point2D, PriorityQueue, type ProgressCallback, QuadTree, Queue, RadixTree, type Rect, RedBlackTree, SegmentTree, Set, SinglyLinkedList, SparseTable, SplayTree, Stack, StaticArray, SuffixArray, SuffixTree, TernarySearchTree, TreeNode, Trie, type UploadOptions, asyncHandler, authMiddleware, connectMongoDB, createAllowedOrigins, createCorsOptions, days, errorToString, hours, loadEnv, logger, milliseconds, minutes, seconds, sleep, toHours, toMinutes, toSeconds, validate };
|
|
1897
|
+
export { APIFactory, APIFeatures, APIResponse, AVLTree, AdjacencyList, AdjacencyMatrix, type AdjacentEdge, type AllowedOriginsOptions, AppError, type AzureBlobConfig, AzureBlobService, BPlusTree, BTree, BaseService, BinaryHeap, BinarySearchTree, BinaryTree, BloomFilter, CircularArray, CircularLinkedList, CircularQueue, type CloudinaryConfig, CloudinaryService, ConsistentHash, CountMinSketch, type CrudService, type DatabaseConfig, Deque, type DirectedEdge, DirectedGraph, DisjointSetUnion, DoublyLinkedList, DynamicArray, type Edge, FenwickTree, FibNode, FibonacciHeap, GlobalErrorHandler, Graph, HashMap, HashSet, HyperLogLog, type Interval, IntervalTree, KDTree, LFUCache, LRUCache, type LoggerOptions, MaxHeap, MaxStack, MinHeap, MinStack, MultiSet, Node, OrderedSet, PairingHeap, PairingNode, type Point, type Point2D, PriorityQueue, type ProgressCallback, QuadTree, Queue, RadixTree, type Rect, RedBlackTree, SegmentTree, Set, SinglyLinkedList, SparseTable, SplayTree, Stack, StaticArray, SuffixArray, SuffixTree, TernarySearchTree, TreeNode, Trie, type UploadOptions, asyncHandler, authMiddleware, connectMongoDB, createAllowedOrigins, createCorsOptions, days, errorToString, hours, loadEnv, logger, milliseconds, minutes, pickFields, seconds, sleep, toHours, toMinutes, toSeconds, validate };
|