@cyberskill/shared 1.105.0 → 1.107.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 (101) hide show
  1. package/dist/_tsup-dts-rollup.d.cts +158 -24
  2. package/dist/_tsup-dts-rollup.d.ts +158 -24
  3. package/dist/configs/config.util.cjs +1 -1
  4. package/dist/configs/config.util.js +1 -1
  5. package/dist/configs/index.cjs +1 -1
  6. package/dist/configs/index.js +1 -1
  7. package/dist/index.cjs +1 -1
  8. package/dist/index.d.cts +11 -5
  9. package/dist/index.d.ts +11 -5
  10. package/dist/index.js +1 -1
  11. package/dist/nodejs/cli/cli.util.cjs +1 -1
  12. package/dist/nodejs/cli/cli.util.js +1 -1
  13. package/dist/nodejs/cli/index.cjs +1 -1
  14. package/dist/nodejs/cli/index.js +1 -1
  15. package/dist/nodejs/command/command.util.cjs +1 -1
  16. package/dist/nodejs/command/command.util.js +1 -1
  17. package/dist/nodejs/command/index.cjs +1 -1
  18. package/dist/nodejs/command/index.js +1 -1
  19. package/dist/nodejs/fs/fs.util.cjs +1 -1
  20. package/dist/nodejs/fs/fs.util.d.cts +5 -5
  21. package/dist/nodejs/fs/fs.util.d.ts +5 -5
  22. package/dist/nodejs/fs/fs.util.js +1 -1
  23. package/dist/nodejs/fs/index.cjs +1 -1
  24. package/dist/nodejs/fs/index.d.cts +5 -5
  25. package/dist/nodejs/fs/index.d.ts +5 -5
  26. package/dist/nodejs/fs/index.js +1 -1
  27. package/dist/nodejs/index.cjs +1 -1
  28. package/dist/nodejs/index.d.cts +5 -5
  29. package/dist/nodejs/index.d.ts +5 -5
  30. package/dist/nodejs/index.js +1 -1
  31. package/dist/nodejs/mongo/index.cjs +1 -1
  32. package/dist/nodejs/mongo/index.js +1 -1
  33. package/dist/nodejs/mongo/mongo.util.cjs +1 -1
  34. package/dist/nodejs/mongo/mongo.util.js +1 -1
  35. package/dist/nodejs/package/index.cjs +1 -1
  36. package/dist/nodejs/package/index.js +1 -1
  37. package/dist/nodejs/package/package.util.cjs +1 -1
  38. package/dist/nodejs/package/package.util.js +1 -1
  39. package/dist/nodejs/path/index.cjs +1 -1
  40. package/dist/nodejs/path/index.js +1 -1
  41. package/dist/nodejs/path/path.constant.cjs +1 -1
  42. package/dist/nodejs/path/path.constant.js +1 -1
  43. package/dist/react/apollo-client/apollo-client.component.d.cts +1 -1
  44. package/dist/react/apollo-client/apollo-client.component.d.ts +1 -1
  45. package/dist/react/apollo-client/index.d.cts +1 -1
  46. package/dist/react/apollo-client/index.d.ts +1 -1
  47. package/dist/react/apollo-error/apollo-error.component.d.cts +1 -1
  48. package/dist/react/apollo-error/apollo-error.component.d.ts +1 -1
  49. package/dist/react/apollo-error/apollo-error.context.d.cts +1 -1
  50. package/dist/react/apollo-error/apollo-error.context.d.ts +1 -1
  51. package/dist/react/apollo-error/apollo-error.hook.d.cts +1 -1
  52. package/dist/react/apollo-error/apollo-error.hook.d.ts +1 -1
  53. package/dist/react/apollo-error/apollo-error.provider.d.cts +1 -1
  54. package/dist/react/apollo-error/apollo-error.provider.d.ts +1 -1
  55. package/dist/react/apollo-error/apollo-error.util.d.cts +2 -2
  56. package/dist/react/apollo-error/apollo-error.util.d.ts +2 -2
  57. package/dist/react/apollo-error/index.d.cts +6 -6
  58. package/dist/react/apollo-error/index.d.ts +6 -6
  59. package/dist/react/index.cjs +1 -1
  60. package/dist/react/index.js +1 -1
  61. package/dist/react/next-intl/index.cjs +1 -1
  62. package/dist/react/next-intl/index.js +1 -1
  63. package/dist/react/next-intl/next-intl.provider.cjs +1 -1
  64. package/dist/react/next-intl/next-intl.provider.js +1 -1
  65. package/dist/react/storage/index.cjs +1 -1
  66. package/dist/react/storage/index.js +1 -1
  67. package/dist/react/storage/storage.hook.cjs +1 -1
  68. package/dist/react/storage/storage.hook.js +1 -1
  69. package/dist/react/vitest/index.cjs +1 -1
  70. package/dist/react/vitest/index.js +1 -1
  71. package/dist/react/vitest/vitest.unit.cjs +1 -1
  72. package/dist/react/vitest/vitest.unit.js +1 -1
  73. package/dist/utils/index.cjs +1 -1
  74. package/dist/utils/index.d.cts +6 -0
  75. package/dist/utils/index.d.ts +6 -0
  76. package/dist/utils/index.js +1 -1
  77. package/dist/utils/object/index.cjs +1 -1
  78. package/dist/utils/object/index.js +1 -1
  79. package/dist/utils/object/object.util.cjs +1 -1
  80. package/dist/utils/object/object.util.js +1 -1
  81. package/dist/utils/serializer/index.cjs +1 -1
  82. package/dist/utils/serializer/index.d.cts +3 -0
  83. package/dist/utils/serializer/index.d.ts +3 -0
  84. package/dist/utils/serializer/index.js +1 -1
  85. package/dist/utils/serializer/serializer.type.d.cts +3 -0
  86. package/dist/utils/serializer/serializer.type.d.ts +3 -0
  87. package/dist/utils/serializer/serializer.util.cjs +1 -1
  88. package/dist/utils/serializer/serializer.util.js +1 -1
  89. package/dist/utils/string/index.cjs +1 -1
  90. package/dist/utils/string/index.d.cts +3 -0
  91. package/dist/utils/string/index.d.ts +3 -0
  92. package/dist/utils/string/index.js +1 -1
  93. package/dist/utils/string/string.util.cjs +1 -1
  94. package/dist/utils/string/string.util.d.cts +3 -0
  95. package/dist/utils/string/string.util.d.ts +3 -0
  96. package/dist/utils/string/string.util.js +1 -1
  97. package/dist/utils/validate/index.cjs +1 -1
  98. package/dist/utils/validate/index.js +1 -1
  99. package/dist/utils/validate/validate.util.cjs +1 -1
  100. package/dist/utils/validate/validate.util.js +1 -1
  101. package/package.json +2 -2
@@ -9,6 +9,7 @@ import type { ApolloError as ApolloError_2 } from '@apollo/client';
9
9
  import type { ApolloLink } from '@apollo/client';
10
10
  import { ApolloServer } from '@apollo/server';
11
11
  import type { Application } from 'express';
12
+ import type { Buffer as Buffer_2 } from 'node:buffer';
12
13
  import type { ClientSession } from 'mongoose';
13
14
  import type { CodegenConfig } from '@graphql-codegen/cli';
14
15
  import { Collection } from 'mongodb';
@@ -234,12 +235,6 @@ export { copySync as copySync_alias_1 }
234
235
  export { copySync as copySync_alias_2 }
235
236
  export { copySync as copySync_alias_3 }
236
237
 
237
- declare const copySyncE: typeof fsExtra.copySync;
238
- export { copySyncE }
239
- export { copySyncE as copySyncE_alias_1 }
240
- export { copySyncE as copySyncE_alias_2 }
241
- export { copySyncE as copySyncE_alias_3 }
242
-
243
238
  declare function createApolloServer(options: I_ApolloServerOptions): ApolloServer;
244
239
  export { createApolloServer }
245
240
  export { createApolloServer as createApolloServer_alias_1 }
@@ -317,7 +312,15 @@ export { CYBERSKILL_STORAGE_DIRECTORY as CYBERSKILL_STORAGE_DIRECTORY_alias_1 }
317
312
  export { CYBERSKILL_STORAGE_DIRECTORY as CYBERSKILL_STORAGE_DIRECTORY_alias_2 }
318
313
  export { CYBERSKILL_STORAGE_DIRECTORY as CYBERSKILL_STORAGE_DIRECTORY_alias_3 }
319
314
 
320
- declare function deepMerge(...object: T_Object_2[]): T_Object_2;
315
+ /**
316
+ * Merges multiple objects deeply.
317
+ * If a property is an array, it will be merged without duplicates.
318
+ * If a property is an object, it will be merged recursively.
319
+ * If a property is a primitive, it will be overwritten.
320
+ * @param objects - The objects to merge.
321
+ * @returns The merged object.
322
+ */
323
+ declare function deepMerge(...objects: T_Object_2[]): T_Object_2;
321
324
  export { deepMerge }
322
325
  export { deepMerge as deepMerge_alias_1 }
323
326
  export { deepMerge as deepMerge_alias_2 }
@@ -1545,12 +1548,6 @@ export { ESLINT_PACKAGE_NAME as ESLINT_PACKAGE_NAME_alias_1 }
1545
1548
  export { ESLINT_PACKAGE_NAME as ESLINT_PACKAGE_NAME_alias_2 }
1546
1549
  export { ESLINT_PACKAGE_NAME as ESLINT_PACKAGE_NAME_alias_3 }
1547
1550
 
1548
- declare function existsSync(...paths: string[]): boolean;
1549
- export { existsSync }
1550
- export { existsSync as existsSync_alias_1 }
1551
- export { existsSync as existsSync_alias_2 }
1552
- export { existsSync as existsSync_alias_3 }
1553
-
1554
1551
  export { express }
1555
1552
  export { express as express_alias_1 }
1556
1553
  export { express as express_alias_2 }
@@ -1567,12 +1564,39 @@ export { formatCommand as formatCommand_alias_1 }
1567
1564
  export { formatCommand as formatCommand_alias_2 }
1568
1565
  export { formatCommand as formatCommand_alias_3 }
1569
1566
 
1567
+ /**
1568
+ * Generates a random password of a given length.
1569
+ * The password contains a mix of letters, numbers, and special characters.
1570
+ * @param length - The length of the password.
1571
+ * @returns The generated password.
1572
+ */
1573
+ declare function generateRandomPassword(length?: number): string;
1574
+ export { generateRandomPassword }
1575
+ export { generateRandomPassword as generateRandomPassword_alias_1 }
1576
+ export { generateRandomPassword as generateRandomPassword_alias_2 }
1577
+ export { generateRandomPassword as generateRandomPassword_alias_3 }
1578
+
1579
+ /**
1580
+ * Generates a short ID from a UUID.
1581
+ * The ID is a substring of the SHA256 hash of the UUID.
1582
+ * @param uuid - The UUID to be converted.
1583
+ * @param length - The length of the short ID.
1584
+ * @returns The short ID.
1585
+ */
1570
1586
  declare function generateShortId(uuid: string, length?: number): string;
1571
1587
  export { generateShortId }
1572
1588
  export { generateShortId as generateShortId_alias_1 }
1573
1589
  export { generateShortId as generateShortId_alias_2 }
1574
1590
  export { generateShortId as generateShortId_alias_3 }
1575
1591
 
1592
+ /**
1593
+ * Generates a slug from a given string.
1594
+ * The slug is a URL-friendly version of the string.
1595
+ * It replaces spaces with hyphens and removes special characters.
1596
+ * @param str - The string to be slugified.
1597
+ * @param options - Options for slugify.
1598
+ * @returns The slugified string.
1599
+ */
1576
1600
  declare function generateSlug(str?: string, options?: I_SlugifyOptions): string;
1577
1601
  export { generateSlug }
1578
1602
  export { generateSlug as generateSlug_alias_1 }
@@ -1585,6 +1609,18 @@ export { getEnv as getEnv_alias_1 }
1585
1609
  export { getEnv as getEnv_alias_2 }
1586
1610
  export { getEnv as getEnv_alias_3 }
1587
1611
 
1612
+ /**
1613
+ * Get the file name from a URL.
1614
+ * @param url - The URL to extract the file name from.
1615
+ * @param getExtension - Whether to include the file extension.
1616
+ * @returns The file name.
1617
+ */
1618
+ declare function getFileName(url?: string, getExtension?: boolean): string;
1619
+ export { getFileName }
1620
+ export { getFileName as getFileName_alias_1 }
1621
+ export { getFileName as getFileName_alias_2 }
1622
+ export { getFileName as getFileName_alias_3 }
1623
+
1588
1624
  declare function getLatestPackageVersion(packageName: string): Promise<string>;
1589
1625
  export { getLatestPackageVersion }
1590
1626
  export { getLatestPackageVersion as getLatestPackageVersion_alias_1 }
@@ -2107,7 +2143,7 @@ export { I_ReturnSuccess as I_ReturnSuccess_alias_1 }
2107
2143
  export { I_ReturnSuccess as I_ReturnSuccess_alias_2 }
2108
2144
  export { I_ReturnSuccess as I_ReturnSuccess_alias_3 }
2109
2145
 
2110
- declare interface I_Serializer<T> {
2146
+ declare interface I_Serializer<T = unknown> {
2111
2147
  serialize: (value: T) => string;
2112
2148
  deserialize: (value: string) => T;
2113
2149
  }
@@ -2116,11 +2152,20 @@ export { I_Serializer as I_Serializer_alias_1 }
2116
2152
  export { I_Serializer as I_Serializer_alias_2 }
2117
2153
  export { I_Serializer as I_Serializer_alias_3 }
2118
2154
 
2119
- declare interface I_Serializer_2<T> {
2155
+ declare interface I_Serializer_2<T = unknown> {
2120
2156
  serialize: (value: T) => string;
2121
2157
  deserialize: (value: string) => T;
2122
2158
  }
2123
2159
 
2160
+ declare interface I_SerializerTypeWrapper<T extends T_SerializerKnownTypes = T_SerializerKnownTypes> {
2161
+ __type: T;
2162
+ value: unknown;
2163
+ }
2164
+ export { I_SerializerTypeWrapper }
2165
+ export { I_SerializerTypeWrapper as I_SerializerTypeWrapper_alias_1 }
2166
+ export { I_SerializerTypeWrapper as I_SerializerTypeWrapper_alias_2 }
2167
+ export { I_SerializerTypeWrapper as I_SerializerTypeWrapper_alias_3 }
2168
+
2124
2169
  declare interface I_SlugifyOptions {
2125
2170
  replacement?: string;
2126
2171
  remove?: RegExp;
@@ -2187,12 +2232,23 @@ export { IS_BROWSER }
2187
2232
  export { IS_BROWSER as IS_BROWSER_alias_1 }
2188
2233
  export { IS_BROWSER as IS_BROWSER_alias_2 }
2189
2234
 
2235
+ /**
2236
+ * Check if a string is a valid JSON string.
2237
+ * @param str - The string to check.
2238
+ * @returns True if the string is a valid JSON string, false otherwise.
2239
+ */
2190
2240
  declare function isJson(str: string): boolean;
2191
2241
  export { isJson }
2192
2242
  export { isJson as isJson_alias_1 }
2193
2243
  export { isJson as isJson_alias_2 }
2194
2244
  export { isJson as isJson_alias_3 }
2195
2245
 
2246
+ /**
2247
+ * Checks if a value is a plain object.
2248
+ * A plain object is an object that is not an array, null, or a function.
2249
+ * @param val - The value to check.
2250
+ * @returns True if the value is a plain object, false otherwise.
2251
+ */
2196
2252
  declare function isPlainObject(val: unknown): val is T_Object_2;
2197
2253
  export { isPlainObject }
2198
2254
  export { isPlainObject as isPlainObject_alias_1 }
@@ -2247,6 +2303,12 @@ export { logNodeJS as logNodeJS_alias_1 }
2247
2303
  export { logNodeJS as logNodeJS_alias_2 }
2248
2304
  export { logNodeJS as logNodeJS_alias_3 }
2249
2305
 
2306
+ declare const lstatSync: fsExtra.StatSyncFn;
2307
+ export { lstatSync }
2308
+ export { lstatSync as lstatSync_alias_1 }
2309
+ export { lstatSync as lstatSync_alias_2 }
2310
+ export { lstatSync as lstatSync_alias_3 }
2311
+
2250
2312
  declare function mergeConfigs(type: T_ConfigType, ...configs: T_Object_2[]): T_Object_2;
2251
2313
  export { mergeConfigs }
2252
2314
  export { mergeConfigs as mergeConfigs_alias_1 }
@@ -2270,6 +2332,12 @@ export { MIGRATE_MONGO_PACKAGE_NAME as MIGRATE_MONGO_PACKAGE_NAME_alias_1 }
2270
2332
  export { MIGRATE_MONGO_PACKAGE_NAME as MIGRATE_MONGO_PACKAGE_NAME_alias_2 }
2271
2333
  export { MIGRATE_MONGO_PACKAGE_NAME as MIGRATE_MONGO_PACKAGE_NAME_alias_3 }
2272
2334
 
2335
+ declare const mkdirSync: typeof fsExtra.mkdirSync;
2336
+ export { mkdirSync }
2337
+ export { mkdirSync as mkdirSync_alias_1 }
2338
+ export { mkdirSync as mkdirSync_alias_2 }
2339
+ export { mkdirSync as mkdirSync_alias_3 }
2340
+
2273
2341
  declare const mongo: {
2274
2342
  getDateTime(now?: Date): string;
2275
2343
  createGenericFields({ returnDateAs, }?: {
@@ -2493,7 +2561,7 @@ export { PATH as PATH_alias_1 }
2493
2561
  export { PATH as PATH_alias_2 }
2494
2562
  export { PATH as PATH_alias_3 }
2495
2563
 
2496
- declare const pathExistsSync: typeof fsExtra.pathExistsSync;
2564
+ declare function pathExistsSync(...paths: string[]): boolean;
2497
2565
  export { pathExistsSync }
2498
2566
  export { pathExistsSync as pathExistsSync_alias_1 }
2499
2567
  export { pathExistsSync as pathExistsSync_alias_2 }
@@ -2538,18 +2606,28 @@ export { readFileSync as readFileSync_alias_1 }
2538
2606
  export { readFileSync as readFileSync_alias_2 }
2539
2607
  export { readFileSync as readFileSync_alias_3 }
2540
2608
 
2541
- declare const readJsonSync: <T = unknown>(file: string, options?: fsExtra.JsonReadOptions) => T;
2609
+ declare const readJsonSync: typeof fsExtra.readJsonSync;
2542
2610
  export { readJsonSync }
2543
2611
  export { readJsonSync as readJsonSync_alias_1 }
2544
2612
  export { readJsonSync as readJsonSync_alias_2 }
2545
2613
  export { readJsonSync as readJsonSync_alias_3 }
2546
2614
 
2615
+ /**
2616
+ * Convert a string to a regex pattern that matches the string and its accented variations.
2617
+ * @param str - The string to convert.
2618
+ * @returns The regex pattern as a string.
2619
+ */
2547
2620
  declare function regexSearchMapper(str: string): string;
2548
2621
  export { regexSearchMapper }
2549
2622
  export { regexSearchMapper as regexSearchMapper_alias_1 }
2550
2623
  export { regexSearchMapper as regexSearchMapper_alias_2 }
2551
2624
  export { regexSearchMapper as regexSearchMapper_alias_3 }
2552
2625
 
2626
+ /**
2627
+ * Remove accents from a string.
2628
+ * @param str - The string to remove accents from.
2629
+ * @returns The string without accents.
2630
+ */
2553
2631
  declare function removeAccent(str: string): string;
2554
2632
  export { removeAccent }
2555
2633
  export { removeAccent as removeAccent_alias_1 }
@@ -2562,12 +2640,6 @@ export { removeSync as removeSync_alias_1 }
2562
2640
  export { removeSync as removeSync_alias_2 }
2563
2641
  export { removeSync as removeSync_alias_3 }
2564
2642
 
2565
- declare const removeSyncE: typeof fsExtra.removeSync;
2566
- export { removeSyncE }
2567
- export { removeSyncE as removeSyncE_alias_1 }
2568
- export { removeSyncE as removeSyncE_alias_2 }
2569
- export { removeSyncE as removeSyncE_alias_3 }
2570
-
2571
2643
  export { Request_2 as Request }
2572
2644
  export { Request_2 as Request_alias_1 }
2573
2645
  export { Request_2 as Request_alias_2 }
@@ -2942,6 +3014,19 @@ export { storageNodeJS as storageNodeJS_alias_1 }
2942
3014
  export { storageNodeJS as storageNodeJS_alias_2 }
2943
3015
  export { storageNodeJS as storageNodeJS_alias_3 }
2944
3016
 
3017
+ /**
3018
+ * Extracts a substring between two strings.
3019
+ * @param s - The original string.
3020
+ * @param a - The starting string.
3021
+ * @param b - The ending string.
3022
+ * @returns The substring between the two strings.
3023
+ */
3024
+ declare function substringBetween(s: string, a: string, b: string): string;
3025
+ export { substringBetween }
3026
+ export { substringBetween as substringBetween_alias_1 }
3027
+ export { substringBetween as substringBetween_alias_2 }
3028
+ export { substringBetween as substringBetween_alias_3 }
3029
+
2945
3030
  declare type T_AggregatePaginateResult<T> = AggregatePaginateResult<T>;
2946
3031
  export { T_AggregatePaginateResult }
2947
3032
  export { T_AggregatePaginateResult as T_AggregatePaginateResult_alias_1 }
@@ -3206,6 +3291,25 @@ export { T_QueryWithHelpers as T_QueryWithHelpers_alias_1 }
3206
3291
  export { T_QueryWithHelpers as T_QueryWithHelpers_alias_2 }
3207
3292
  export { T_QueryWithHelpers as T_QueryWithHelpers_alias_3 }
3208
3293
 
3294
+ declare type T_SerializerKnownTypes = 'Date' | 'Map' | 'Set' | 'RegExp' | 'BigInt' | 'Buffer';
3295
+ export { T_SerializerKnownTypes }
3296
+ export { T_SerializerKnownTypes as T_SerializerKnownTypes_alias_1 }
3297
+ export { T_SerializerKnownTypes as T_SerializerKnownTypes_alias_2 }
3298
+ export { T_SerializerKnownTypes as T_SerializerKnownTypes_alias_3 }
3299
+
3300
+ declare interface T_SerializerValueMap {
3301
+ Date: Date;
3302
+ Map: Map<unknown, unknown>;
3303
+ Set: Set<unknown>;
3304
+ RegExp: RegExp;
3305
+ BigInt: bigint;
3306
+ Buffer: Buffer_2;
3307
+ }
3308
+ export { T_SerializerValueMap }
3309
+ export { T_SerializerValueMap as T_SerializerValueMap_alias_1 }
3310
+ export { T_SerializerValueMap as T_SerializerValueMap_alias_2 }
3311
+ export { T_SerializerValueMap as T_SerializerValueMap_alias_3 }
3312
+
3209
3313
  declare interface T_ThrowError {
3210
3314
  message?: string;
3211
3315
  status?: {
@@ -3275,6 +3379,12 @@ export { TSX_CLI as TSX_CLI_alias_1 }
3275
3379
  export { TSX_CLI as TSX_CLI_alias_2 }
3276
3380
  export { TSX_CLI as TSX_CLI_alias_3 }
3277
3381
 
3382
+ declare const unlinkSync: typeof fsExtra.unlinkSync;
3383
+ export { unlinkSync }
3384
+ export { unlinkSync as unlinkSync_alias_1 }
3385
+ export { unlinkSync as unlinkSync_alias_2 }
3386
+ export { unlinkSync as unlinkSync_alias_3 }
3387
+
3278
3388
  declare function useApolloError(): I_ApolloErrorContext_2;
3279
3389
  export { useApolloError }
3280
3390
  export { useApolloError as useApolloError_alias_1 }
@@ -3316,7 +3426,31 @@ export { useTranslateNextIntl as useTranslateNextIntl_alias_2 }
3316
3426
  export { useTranslateNextIntl as useTranslateNextIntl_alias_3 }
3317
3427
 
3318
3428
  declare const validate: {
3429
+ /**
3430
+ * Checks if a value is empty.
3431
+ * - For strings, it checks if the string is empty or contains only whitespace.
3432
+ * - For arrays, it checks if the array has no elements.
3433
+ * - For objects, it checks if the object has no own properties.
3434
+ * - For Maps and Sets, it checks if they are empty.
3435
+ * - For WeakMaps and WeakSets, it returns true (as they are not enumerable).
3436
+ * - For ArrayBuffer views, it checks if the byte length is 0.
3437
+ * - For Dates, it returns false.
3438
+ * - For null and undefined, it returns true.
3439
+ * - For all other types, it returns false.
3440
+ * @param value - The value to check.
3441
+ * @returns True if the value is empty, false otherwise.
3442
+ */
3319
3443
  isEmpty(value: unknown): boolean;
3444
+ /**
3445
+ * Checks if a string is a valid IP address (IPv4 or IPv6).
3446
+ *
3447
+ * - IPv4: Four octets separated by dots, each between 0–255.
3448
+ * - IPv6: Eight groups of four hex digits, possibly compressed with `::`.
3449
+ *
3450
+ * @param ip - The IP address string to validate.
3451
+ * @returns True if the IP is valid IPv4 or IPv6.
3452
+ */
3453
+ isValidIP(ip: string): boolean;
3320
3454
  };
3321
3455
  export { validate }
3322
3456
  export { validate as validate_alias_1 }
@@ -3371,7 +3505,7 @@ export { writeFileSync as writeFileSync_alias_1 }
3371
3505
  export { writeFileSync as writeFileSync_alias_2 }
3372
3506
  export { writeFileSync as writeFileSync_alias_3 }
3373
3507
 
3374
- declare const writeJsonSync: <T = unknown>(file: string, obj: T, options?: fsExtra.JsonWriteOptions | null) => void;
3508
+ declare const writeJsonSync: typeof fsExtra.writeJsonSync;
3375
3509
  export { writeJsonSync }
3376
3510
  export { writeJsonSync as writeJsonSync_alias_1 }
3377
3511
  export { writeJsonSync as writeJsonSync_alias_2 }
@@ -9,6 +9,7 @@ import type { ApolloError as ApolloError_2 } from '@apollo/client';
9
9
  import type { ApolloLink } from '@apollo/client';
10
10
  import { ApolloServer } from '@apollo/server';
11
11
  import type { Application } from 'express';
12
+ import type { Buffer as Buffer_2 } from 'node:buffer';
12
13
  import type { ClientSession } from 'mongoose';
13
14
  import type { CodegenConfig } from '@graphql-codegen/cli';
14
15
  import { Collection } from 'mongodb';
@@ -234,12 +235,6 @@ export { copySync as copySync_alias_1 }
234
235
  export { copySync as copySync_alias_2 }
235
236
  export { copySync as copySync_alias_3 }
236
237
 
237
- declare const copySyncE: typeof fsExtra.copySync;
238
- export { copySyncE }
239
- export { copySyncE as copySyncE_alias_1 }
240
- export { copySyncE as copySyncE_alias_2 }
241
- export { copySyncE as copySyncE_alias_3 }
242
-
243
238
  declare function createApolloServer(options: I_ApolloServerOptions): ApolloServer;
244
239
  export { createApolloServer }
245
240
  export { createApolloServer as createApolloServer_alias_1 }
@@ -317,7 +312,15 @@ export { CYBERSKILL_STORAGE_DIRECTORY as CYBERSKILL_STORAGE_DIRECTORY_alias_1 }
317
312
  export { CYBERSKILL_STORAGE_DIRECTORY as CYBERSKILL_STORAGE_DIRECTORY_alias_2 }
318
313
  export { CYBERSKILL_STORAGE_DIRECTORY as CYBERSKILL_STORAGE_DIRECTORY_alias_3 }
319
314
 
320
- declare function deepMerge(...object: T_Object_2[]): T_Object_2;
315
+ /**
316
+ * Merges multiple objects deeply.
317
+ * If a property is an array, it will be merged without duplicates.
318
+ * If a property is an object, it will be merged recursively.
319
+ * If a property is a primitive, it will be overwritten.
320
+ * @param objects - The objects to merge.
321
+ * @returns The merged object.
322
+ */
323
+ declare function deepMerge(...objects: T_Object_2[]): T_Object_2;
321
324
  export { deepMerge }
322
325
  export { deepMerge as deepMerge_alias_1 }
323
326
  export { deepMerge as deepMerge_alias_2 }
@@ -1545,12 +1548,6 @@ export { ESLINT_PACKAGE_NAME as ESLINT_PACKAGE_NAME_alias_1 }
1545
1548
  export { ESLINT_PACKAGE_NAME as ESLINT_PACKAGE_NAME_alias_2 }
1546
1549
  export { ESLINT_PACKAGE_NAME as ESLINT_PACKAGE_NAME_alias_3 }
1547
1550
 
1548
- declare function existsSync(...paths: string[]): boolean;
1549
- export { existsSync }
1550
- export { existsSync as existsSync_alias_1 }
1551
- export { existsSync as existsSync_alias_2 }
1552
- export { existsSync as existsSync_alias_3 }
1553
-
1554
1551
  export { express }
1555
1552
  export { express as express_alias_1 }
1556
1553
  export { express as express_alias_2 }
@@ -1567,12 +1564,39 @@ export { formatCommand as formatCommand_alias_1 }
1567
1564
  export { formatCommand as formatCommand_alias_2 }
1568
1565
  export { formatCommand as formatCommand_alias_3 }
1569
1566
 
1567
+ /**
1568
+ * Generates a random password of a given length.
1569
+ * The password contains a mix of letters, numbers, and special characters.
1570
+ * @param length - The length of the password.
1571
+ * @returns The generated password.
1572
+ */
1573
+ declare function generateRandomPassword(length?: number): string;
1574
+ export { generateRandomPassword }
1575
+ export { generateRandomPassword as generateRandomPassword_alias_1 }
1576
+ export { generateRandomPassword as generateRandomPassword_alias_2 }
1577
+ export { generateRandomPassword as generateRandomPassword_alias_3 }
1578
+
1579
+ /**
1580
+ * Generates a short ID from a UUID.
1581
+ * The ID is a substring of the SHA256 hash of the UUID.
1582
+ * @param uuid - The UUID to be converted.
1583
+ * @param length - The length of the short ID.
1584
+ * @returns The short ID.
1585
+ */
1570
1586
  declare function generateShortId(uuid: string, length?: number): string;
1571
1587
  export { generateShortId }
1572
1588
  export { generateShortId as generateShortId_alias_1 }
1573
1589
  export { generateShortId as generateShortId_alias_2 }
1574
1590
  export { generateShortId as generateShortId_alias_3 }
1575
1591
 
1592
+ /**
1593
+ * Generates a slug from a given string.
1594
+ * The slug is a URL-friendly version of the string.
1595
+ * It replaces spaces with hyphens and removes special characters.
1596
+ * @param str - The string to be slugified.
1597
+ * @param options - Options for slugify.
1598
+ * @returns The slugified string.
1599
+ */
1576
1600
  declare function generateSlug(str?: string, options?: I_SlugifyOptions): string;
1577
1601
  export { generateSlug }
1578
1602
  export { generateSlug as generateSlug_alias_1 }
@@ -1585,6 +1609,18 @@ export { getEnv as getEnv_alias_1 }
1585
1609
  export { getEnv as getEnv_alias_2 }
1586
1610
  export { getEnv as getEnv_alias_3 }
1587
1611
 
1612
+ /**
1613
+ * Get the file name from a URL.
1614
+ * @param url - The URL to extract the file name from.
1615
+ * @param getExtension - Whether to include the file extension.
1616
+ * @returns The file name.
1617
+ */
1618
+ declare function getFileName(url?: string, getExtension?: boolean): string;
1619
+ export { getFileName }
1620
+ export { getFileName as getFileName_alias_1 }
1621
+ export { getFileName as getFileName_alias_2 }
1622
+ export { getFileName as getFileName_alias_3 }
1623
+
1588
1624
  declare function getLatestPackageVersion(packageName: string): Promise<string>;
1589
1625
  export { getLatestPackageVersion }
1590
1626
  export { getLatestPackageVersion as getLatestPackageVersion_alias_1 }
@@ -2107,7 +2143,7 @@ export { I_ReturnSuccess as I_ReturnSuccess_alias_1 }
2107
2143
  export { I_ReturnSuccess as I_ReturnSuccess_alias_2 }
2108
2144
  export { I_ReturnSuccess as I_ReturnSuccess_alias_3 }
2109
2145
 
2110
- declare interface I_Serializer<T> {
2146
+ declare interface I_Serializer<T = unknown> {
2111
2147
  serialize: (value: T) => string;
2112
2148
  deserialize: (value: string) => T;
2113
2149
  }
@@ -2116,11 +2152,20 @@ export { I_Serializer as I_Serializer_alias_1 }
2116
2152
  export { I_Serializer as I_Serializer_alias_2 }
2117
2153
  export { I_Serializer as I_Serializer_alias_3 }
2118
2154
 
2119
- declare interface I_Serializer_2<T> {
2155
+ declare interface I_Serializer_2<T = unknown> {
2120
2156
  serialize: (value: T) => string;
2121
2157
  deserialize: (value: string) => T;
2122
2158
  }
2123
2159
 
2160
+ declare interface I_SerializerTypeWrapper<T extends T_SerializerKnownTypes = T_SerializerKnownTypes> {
2161
+ __type: T;
2162
+ value: unknown;
2163
+ }
2164
+ export { I_SerializerTypeWrapper }
2165
+ export { I_SerializerTypeWrapper as I_SerializerTypeWrapper_alias_1 }
2166
+ export { I_SerializerTypeWrapper as I_SerializerTypeWrapper_alias_2 }
2167
+ export { I_SerializerTypeWrapper as I_SerializerTypeWrapper_alias_3 }
2168
+
2124
2169
  declare interface I_SlugifyOptions {
2125
2170
  replacement?: string;
2126
2171
  remove?: RegExp;
@@ -2187,12 +2232,23 @@ export { IS_BROWSER }
2187
2232
  export { IS_BROWSER as IS_BROWSER_alias_1 }
2188
2233
  export { IS_BROWSER as IS_BROWSER_alias_2 }
2189
2234
 
2235
+ /**
2236
+ * Check if a string is a valid JSON string.
2237
+ * @param str - The string to check.
2238
+ * @returns True if the string is a valid JSON string, false otherwise.
2239
+ */
2190
2240
  declare function isJson(str: string): boolean;
2191
2241
  export { isJson }
2192
2242
  export { isJson as isJson_alias_1 }
2193
2243
  export { isJson as isJson_alias_2 }
2194
2244
  export { isJson as isJson_alias_3 }
2195
2245
 
2246
+ /**
2247
+ * Checks if a value is a plain object.
2248
+ * A plain object is an object that is not an array, null, or a function.
2249
+ * @param val - The value to check.
2250
+ * @returns True if the value is a plain object, false otherwise.
2251
+ */
2196
2252
  declare function isPlainObject(val: unknown): val is T_Object_2;
2197
2253
  export { isPlainObject }
2198
2254
  export { isPlainObject as isPlainObject_alias_1 }
@@ -2247,6 +2303,12 @@ export { logNodeJS as logNodeJS_alias_1 }
2247
2303
  export { logNodeJS as logNodeJS_alias_2 }
2248
2304
  export { logNodeJS as logNodeJS_alias_3 }
2249
2305
 
2306
+ declare const lstatSync: fsExtra.StatSyncFn;
2307
+ export { lstatSync }
2308
+ export { lstatSync as lstatSync_alias_1 }
2309
+ export { lstatSync as lstatSync_alias_2 }
2310
+ export { lstatSync as lstatSync_alias_3 }
2311
+
2250
2312
  declare function mergeConfigs(type: T_ConfigType, ...configs: T_Object_2[]): T_Object_2;
2251
2313
  export { mergeConfigs }
2252
2314
  export { mergeConfigs as mergeConfigs_alias_1 }
@@ -2270,6 +2332,12 @@ export { MIGRATE_MONGO_PACKAGE_NAME as MIGRATE_MONGO_PACKAGE_NAME_alias_1 }
2270
2332
  export { MIGRATE_MONGO_PACKAGE_NAME as MIGRATE_MONGO_PACKAGE_NAME_alias_2 }
2271
2333
  export { MIGRATE_MONGO_PACKAGE_NAME as MIGRATE_MONGO_PACKAGE_NAME_alias_3 }
2272
2334
 
2335
+ declare const mkdirSync: typeof fsExtra.mkdirSync;
2336
+ export { mkdirSync }
2337
+ export { mkdirSync as mkdirSync_alias_1 }
2338
+ export { mkdirSync as mkdirSync_alias_2 }
2339
+ export { mkdirSync as mkdirSync_alias_3 }
2340
+
2273
2341
  declare const mongo: {
2274
2342
  getDateTime(now?: Date): string;
2275
2343
  createGenericFields({ returnDateAs, }?: {
@@ -2493,7 +2561,7 @@ export { PATH as PATH_alias_1 }
2493
2561
  export { PATH as PATH_alias_2 }
2494
2562
  export { PATH as PATH_alias_3 }
2495
2563
 
2496
- declare const pathExistsSync: typeof fsExtra.pathExistsSync;
2564
+ declare function pathExistsSync(...paths: string[]): boolean;
2497
2565
  export { pathExistsSync }
2498
2566
  export { pathExistsSync as pathExistsSync_alias_1 }
2499
2567
  export { pathExistsSync as pathExistsSync_alias_2 }
@@ -2538,18 +2606,28 @@ export { readFileSync as readFileSync_alias_1 }
2538
2606
  export { readFileSync as readFileSync_alias_2 }
2539
2607
  export { readFileSync as readFileSync_alias_3 }
2540
2608
 
2541
- declare const readJsonSync: <T = unknown>(file: string, options?: fsExtra.JsonReadOptions) => T;
2609
+ declare const readJsonSync: typeof fsExtra.readJsonSync;
2542
2610
  export { readJsonSync }
2543
2611
  export { readJsonSync as readJsonSync_alias_1 }
2544
2612
  export { readJsonSync as readJsonSync_alias_2 }
2545
2613
  export { readJsonSync as readJsonSync_alias_3 }
2546
2614
 
2615
+ /**
2616
+ * Convert a string to a regex pattern that matches the string and its accented variations.
2617
+ * @param str - The string to convert.
2618
+ * @returns The regex pattern as a string.
2619
+ */
2547
2620
  declare function regexSearchMapper(str: string): string;
2548
2621
  export { regexSearchMapper }
2549
2622
  export { regexSearchMapper as regexSearchMapper_alias_1 }
2550
2623
  export { regexSearchMapper as regexSearchMapper_alias_2 }
2551
2624
  export { regexSearchMapper as regexSearchMapper_alias_3 }
2552
2625
 
2626
+ /**
2627
+ * Remove accents from a string.
2628
+ * @param str - The string to remove accents from.
2629
+ * @returns The string without accents.
2630
+ */
2553
2631
  declare function removeAccent(str: string): string;
2554
2632
  export { removeAccent }
2555
2633
  export { removeAccent as removeAccent_alias_1 }
@@ -2562,12 +2640,6 @@ export { removeSync as removeSync_alias_1 }
2562
2640
  export { removeSync as removeSync_alias_2 }
2563
2641
  export { removeSync as removeSync_alias_3 }
2564
2642
 
2565
- declare const removeSyncE: typeof fsExtra.removeSync;
2566
- export { removeSyncE }
2567
- export { removeSyncE as removeSyncE_alias_1 }
2568
- export { removeSyncE as removeSyncE_alias_2 }
2569
- export { removeSyncE as removeSyncE_alias_3 }
2570
-
2571
2643
  export { Request_2 as Request }
2572
2644
  export { Request_2 as Request_alias_1 }
2573
2645
  export { Request_2 as Request_alias_2 }
@@ -2942,6 +3014,19 @@ export { storageNodeJS as storageNodeJS_alias_1 }
2942
3014
  export { storageNodeJS as storageNodeJS_alias_2 }
2943
3015
  export { storageNodeJS as storageNodeJS_alias_3 }
2944
3016
 
3017
+ /**
3018
+ * Extracts a substring between two strings.
3019
+ * @param s - The original string.
3020
+ * @param a - The starting string.
3021
+ * @param b - The ending string.
3022
+ * @returns The substring between the two strings.
3023
+ */
3024
+ declare function substringBetween(s: string, a: string, b: string): string;
3025
+ export { substringBetween }
3026
+ export { substringBetween as substringBetween_alias_1 }
3027
+ export { substringBetween as substringBetween_alias_2 }
3028
+ export { substringBetween as substringBetween_alias_3 }
3029
+
2945
3030
  declare type T_AggregatePaginateResult<T> = AggregatePaginateResult<T>;
2946
3031
  export { T_AggregatePaginateResult }
2947
3032
  export { T_AggregatePaginateResult as T_AggregatePaginateResult_alias_1 }
@@ -3206,6 +3291,25 @@ export { T_QueryWithHelpers as T_QueryWithHelpers_alias_1 }
3206
3291
  export { T_QueryWithHelpers as T_QueryWithHelpers_alias_2 }
3207
3292
  export { T_QueryWithHelpers as T_QueryWithHelpers_alias_3 }
3208
3293
 
3294
+ declare type T_SerializerKnownTypes = 'Date' | 'Map' | 'Set' | 'RegExp' | 'BigInt' | 'Buffer';
3295
+ export { T_SerializerKnownTypes }
3296
+ export { T_SerializerKnownTypes as T_SerializerKnownTypes_alias_1 }
3297
+ export { T_SerializerKnownTypes as T_SerializerKnownTypes_alias_2 }
3298
+ export { T_SerializerKnownTypes as T_SerializerKnownTypes_alias_3 }
3299
+
3300
+ declare interface T_SerializerValueMap {
3301
+ Date: Date;
3302
+ Map: Map<unknown, unknown>;
3303
+ Set: Set<unknown>;
3304
+ RegExp: RegExp;
3305
+ BigInt: bigint;
3306
+ Buffer: Buffer_2;
3307
+ }
3308
+ export { T_SerializerValueMap }
3309
+ export { T_SerializerValueMap as T_SerializerValueMap_alias_1 }
3310
+ export { T_SerializerValueMap as T_SerializerValueMap_alias_2 }
3311
+ export { T_SerializerValueMap as T_SerializerValueMap_alias_3 }
3312
+
3209
3313
  declare interface T_ThrowError {
3210
3314
  message?: string;
3211
3315
  status?: {
@@ -3275,6 +3379,12 @@ export { TSX_CLI as TSX_CLI_alias_1 }
3275
3379
  export { TSX_CLI as TSX_CLI_alias_2 }
3276
3380
  export { TSX_CLI as TSX_CLI_alias_3 }
3277
3381
 
3382
+ declare const unlinkSync: typeof fsExtra.unlinkSync;
3383
+ export { unlinkSync }
3384
+ export { unlinkSync as unlinkSync_alias_1 }
3385
+ export { unlinkSync as unlinkSync_alias_2 }
3386
+ export { unlinkSync as unlinkSync_alias_3 }
3387
+
3278
3388
  declare function useApolloError(): I_ApolloErrorContext_2;
3279
3389
  export { useApolloError }
3280
3390
  export { useApolloError as useApolloError_alias_1 }
@@ -3316,7 +3426,31 @@ export { useTranslateNextIntl as useTranslateNextIntl_alias_2 }
3316
3426
  export { useTranslateNextIntl as useTranslateNextIntl_alias_3 }
3317
3427
 
3318
3428
  declare const validate: {
3429
+ /**
3430
+ * Checks if a value is empty.
3431
+ * - For strings, it checks if the string is empty or contains only whitespace.
3432
+ * - For arrays, it checks if the array has no elements.
3433
+ * - For objects, it checks if the object has no own properties.
3434
+ * - For Maps and Sets, it checks if they are empty.
3435
+ * - For WeakMaps and WeakSets, it returns true (as they are not enumerable).
3436
+ * - For ArrayBuffer views, it checks if the byte length is 0.
3437
+ * - For Dates, it returns false.
3438
+ * - For null and undefined, it returns true.
3439
+ * - For all other types, it returns false.
3440
+ * @param value - The value to check.
3441
+ * @returns True if the value is empty, false otherwise.
3442
+ */
3319
3443
  isEmpty(value: unknown): boolean;
3444
+ /**
3445
+ * Checks if a string is a valid IP address (IPv4 or IPv6).
3446
+ *
3447
+ * - IPv4: Four octets separated by dots, each between 0–255.
3448
+ * - IPv6: Eight groups of four hex digits, possibly compressed with `::`.
3449
+ *
3450
+ * @param ip - The IP address string to validate.
3451
+ * @returns True if the IP is valid IPv4 or IPv6.
3452
+ */
3453
+ isValidIP(ip: string): boolean;
3320
3454
  };
3321
3455
  export { validate }
3322
3456
  export { validate as validate_alias_1 }
@@ -3371,7 +3505,7 @@ export { writeFileSync as writeFileSync_alias_1 }
3371
3505
  export { writeFileSync as writeFileSync_alias_2 }
3372
3506
  export { writeFileSync as writeFileSync_alias_3 }
3373
3507
 
3374
- declare const writeJsonSync: <T = unknown>(file: string, obj: T, options?: fsExtra.JsonWriteOptions | null) => void;
3508
+ declare const writeJsonSync: typeof fsExtra.writeJsonSync;
3375
3509
  export { writeJsonSync }
3376
3510
  export { writeJsonSync as writeJsonSync_alias_1 }
3377
3511
  export { writeJsonSync as writeJsonSync_alias_2 }