@cyberskill/shared 3.11.0 → 3.12.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 (191) hide show
  1. package/dist/config/commitlint/index.d.ts +1 -5
  2. package/dist/config/env/index.d.ts +1 -3
  3. package/dist/config/eslint/index.d.ts +1 -1198
  4. package/dist/config/graphql-codegen/index.d.ts +1 -2
  5. package/dist/config/index.d.ts +1 -2
  6. package/dist/config/lint-staged/index.d.ts +1 -5
  7. package/dist/config/storybook/index.d.ts +1 -2
  8. package/dist/config/vitest/index.d.ts +1 -3
  9. package/dist/config/vitest/vitest.e2e.d.ts +1 -20
  10. package/dist/config/vitest/vitest.e2e.js +1 -1
  11. package/dist/config/vitest/vitest.unit.d.ts +1 -22
  12. package/dist/config/vitest/vitest.unit.js +1 -1
  13. package/dist/constant/index.d.ts +1 -5
  14. package/dist/node/apollo-server/index.d.ts +1 -2
  15. package/dist/node/cli/index.d.ts +1 -2
  16. package/dist/node/command/index.d.ts +1 -2
  17. package/dist/node/express/index.d.ts +1 -2
  18. package/dist/node/fs/index.d.ts +1 -2
  19. package/dist/node/log/index.d.ts +1 -2
  20. package/dist/node/mongo/index.d.ts +1 -6
  21. package/dist/node/package/index.d.ts +1 -2
  22. package/dist/node/path/index.d.ts +1 -2
  23. package/dist/node/storage/index.d.ts +1 -3
  24. package/dist/node/upload/index.d.ts +1 -3
  25. package/dist/node/upload/upload.util.js.map +1 -1
  26. package/dist/node/ws/index.d.ts +1 -2
  27. package/dist/node_modules/.pnpm/vitest@4.1.2_@types_node@25.5.0_jsdom@29.0.1_@noble_hashes@1.8.0__vite@8.0.3_@types_nod_0827261ede788764a5d99ac6bdf44bde/node_modules/vitest/dist/config.js +8 -0
  28. package/dist/node_modules/.pnpm/{vitest@4.1.0_@types_node@25.5.0_jsdom@29.0.1_@noble_hashes@1.8.0__vite@8.0.1_@types_nod_5f6c16f4d4385f16c87b17afc93c851f → vitest@4.1.2_@types_node@25.5.0_jsdom@29.0.1_@noble_hashes@1.8.0__vite@8.0.3_@types_nod_0827261ede788764a5d99ac6bdf44bde}/node_modules/vitest/dist/config.js.map +1 -1
  29. package/dist/react/apollo-client/index.d.ts +1 -9
  30. package/dist/react/apollo-client/links/index.d.ts +1 -1
  31. package/dist/react/apollo-client-nextjs/apollo-client-nextjs.rsc.d.ts +1 -16
  32. package/dist/react/apollo-client-nextjs/index.d.ts +1 -2
  33. package/dist/react/apollo-error/apollo-error.component.js +6 -2
  34. package/dist/react/apollo-error/apollo-error.component.js.map +1 -1
  35. package/dist/react/apollo-error/index.d.ts +1 -6
  36. package/dist/react/i18next/index.d.ts +1 -2
  37. package/dist/react/loading/index.d.ts +1 -5
  38. package/dist/react/log/index.d.ts +1 -2
  39. package/dist/react/next-intl/index.d.ts +1 -6
  40. package/dist/react/storage/index.d.ts +1 -2
  41. package/dist/react/toast/index.d.ts +1 -1
  42. package/dist/react/userback/index.d.ts +1 -2
  43. package/dist/src/config/commitlint/index.d.ts +5 -0
  44. package/dist/{config → src/config}/config.type.d.ts +1 -1
  45. package/dist/{config → src/config}/config.util.d.ts +1 -1
  46. package/dist/src/config/env/index.d.ts +3 -0
  47. package/dist/src/config/eslint/index.d.ts +1198 -0
  48. package/dist/src/config/graphql-codegen/index.d.ts +2 -0
  49. package/dist/src/config/index.d.ts +2 -0
  50. package/dist/src/config/lint-staged/index.d.ts +5 -0
  51. package/dist/src/config/storybook/index.d.ts +2 -0
  52. package/dist/src/config/vitest/index.d.ts +3 -0
  53. package/dist/src/config/vitest/vitest.e2e.d.ts +20 -0
  54. package/dist/src/config/vitest/vitest.unit.d.ts +22 -0
  55. package/dist/src/constant/index.d.ts +5 -0
  56. package/dist/src/node/apollo-server/index.d.ts +2 -0
  57. package/dist/src/node/cli/index.d.ts +2 -0
  58. package/dist/src/node/command/index.d.ts +2 -0
  59. package/dist/src/node/express/index.d.ts +2 -0
  60. package/dist/src/node/fs/index.d.ts +2 -0
  61. package/dist/src/node/log/index.d.ts +2 -0
  62. package/dist/{node → src/node}/log/log.type.d.ts +2 -2
  63. package/dist/{node → src/node}/log/log.util.d.ts +1 -1
  64. package/dist/src/node/mongo/index.d.ts +6 -0
  65. package/dist/{node → src/node}/mongo/mongo.controller.helpers.d.ts +1 -1
  66. package/dist/{node → src/node}/mongo/mongo.controller.mongoose.d.ts +1 -1
  67. package/dist/{node → src/node}/mongo/mongo.controller.native.d.ts +1 -1
  68. package/dist/{node → src/node}/mongo/mongo.controller.type.d.ts +1 -1
  69. package/dist/src/node/package/index.d.ts +2 -0
  70. package/dist/{node → src/node}/package/package.util.d.ts +1 -1
  71. package/dist/src/node/path/index.d.ts +2 -0
  72. package/dist/src/node/storage/index.d.ts +3 -0
  73. package/dist/src/node/upload/index.d.ts +3 -0
  74. package/dist/{node → src/node}/upload/upload.util.d.ts +1 -1
  75. package/dist/src/node/ws/index.d.ts +2 -0
  76. package/dist/{react → src/react}/apollo-client/apollo-client.type.d.ts +1 -1
  77. package/dist/src/react/apollo-client/index.d.ts +9 -0
  78. package/dist/src/react/apollo-client/links/index.d.ts +1 -0
  79. package/dist/src/react/apollo-client-nextjs/apollo-client-nextjs.rsc.d.ts +16 -0
  80. package/dist/src/react/apollo-client-nextjs/index.d.ts +2 -0
  81. package/dist/src/react/apollo-error/index.d.ts +6 -0
  82. package/dist/src/react/i18next/index.d.ts +2 -0
  83. package/dist/src/react/loading/index.d.ts +5 -0
  84. package/dist/{react → src/react}/loading/loading.provider.d.ts +1 -1
  85. package/dist/src/react/log/index.d.ts +2 -0
  86. package/dist/src/react/log/log.type.d.ts +1 -0
  87. package/dist/{react → src/react}/log/log.util.d.ts +1 -1
  88. package/dist/src/react/next-intl/index.d.ts +6 -0
  89. package/dist/{react → src/react}/next-intl/next-intl.hoc.d.ts +1 -1
  90. package/dist/{react → src/react}/next-intl/next-intl.type.d.ts +1 -1
  91. package/dist/src/react/storage/index.d.ts +2 -0
  92. package/dist/{react → src/react}/storage/storage.hook.d.ts +1 -1
  93. package/dist/src/react/toast/index.d.ts +1 -0
  94. package/dist/src/react/userback/index.d.ts +2 -0
  95. package/dist/src/typescript/index.d.ts +5 -0
  96. package/dist/src/util/common/index.d.ts +5 -0
  97. package/dist/src/util/index.d.ts +9 -0
  98. package/dist/src/util/log/index.d.ts +2 -0
  99. package/dist/{util → src/util}/log/log.util.d.ts +1 -1
  100. package/dist/src/util/object/index.d.ts +4 -0
  101. package/dist/src/util/serializer/index.d.ts +2 -0
  102. package/dist/src/util/string/index.d.ts +5 -0
  103. package/dist/src/util/validate/index.d.ts +4 -0
  104. package/dist/typescript/index.d.ts +1 -5
  105. package/dist/util/common/index.d.ts +1 -5
  106. package/dist/util/index.d.ts +1 -9
  107. package/dist/util/log/index.d.ts +1 -2
  108. package/dist/util/object/index.d.ts +1 -4
  109. package/dist/util/object/object.util.js +5 -3
  110. package/dist/util/object/object.util.js.map +1 -1
  111. package/dist/util/serializer/index.d.ts +1 -2
  112. package/dist/util/serializer/serializer.util.js +10 -10
  113. package/dist/util/serializer/serializer.util.js.map +1 -1
  114. package/dist/util/string/index.d.ts +1 -5
  115. package/dist/util/validate/index.d.ts +1 -4
  116. package/package.json +21 -21
  117. package/dist/node_modules/.pnpm/vitest@4.1.0_@types_node@25.5.0_jsdom@29.0.1_@noble_hashes@1.8.0__vite@8.0.1_@types_nod_5f6c16f4d4385f16c87b17afc93c851f/node_modules/vitest/dist/config.js +0 -8
  118. package/dist/react/log/log.type.d.ts +0 -1
  119. /package/dist/{config → src/config}/env/env.constant.d.ts +0 -0
  120. /package/dist/{config → src/config}/env/env.type.d.ts +0 -0
  121. /package/dist/{config → src/config}/env/env.util.d.ts +0 -0
  122. /package/dist/{config → src/config}/graphql-codegen/graphql-codegen.type.d.ts +0 -0
  123. /package/dist/{config → src/config}/graphql-codegen/graphql-codegen.util.d.ts +0 -0
  124. /package/dist/{config → src/config}/storybook/storybook.main.d.ts +0 -0
  125. /package/dist/{config → src/config}/storybook/storybook.preview.d.ts +0 -0
  126. /package/dist/{config → src/config}/vitest/vitest.unit.setup.d.ts +0 -0
  127. /package/dist/{constant → src/constant}/common.d.ts +0 -0
  128. /package/dist/{constant → src/constant}/response-status.d.ts +0 -0
  129. /package/dist/{node → src/node}/apollo-server/apollo-server.type.d.ts +0 -0
  130. /package/dist/{node → src/node}/apollo-server/apollo-server.util.d.ts +0 -0
  131. /package/dist/{node → src/node}/command/command.type.d.ts +0 -0
  132. /package/dist/{node → src/node}/command/command.util.d.ts +0 -0
  133. /package/dist/{node → src/node}/express/express.type.d.ts +0 -0
  134. /package/dist/{node → src/node}/express/express.util.d.ts +0 -0
  135. /package/dist/{node → src/node}/fs/fs.type.d.ts +0 -0
  136. /package/dist/{node → src/node}/fs/fs.util.d.ts +0 -0
  137. /package/dist/{node → src/node}/mongo/mongo.constant.d.ts +0 -0
  138. /package/dist/{node → src/node}/mongo/mongo.controller.d.ts +0 -0
  139. /package/dist/{node → src/node}/mongo/mongo.dynamic-populate.d.ts +0 -0
  140. /package/dist/{node → src/node}/mongo/mongo.internal-types.d.ts +0 -0
  141. /package/dist/{node → src/node}/mongo/mongo.populate.d.ts +0 -0
  142. /package/dist/{node → src/node}/mongo/mongo.type.d.ts +0 -0
  143. /package/dist/{node → src/node}/mongo/mongo.util.d.ts +0 -0
  144. /package/dist/{node → src/node}/package/package.type.d.ts +0 -0
  145. /package/dist/{node → src/node}/path/path.constant.d.ts +0 -0
  146. /package/dist/{node → src/node}/path/path.util.d.ts +0 -0
  147. /package/dist/{node → src/node}/storage/storage.constant.d.ts +0 -0
  148. /package/dist/{node → src/node}/storage/storage.type.d.ts +0 -0
  149. /package/dist/{node → src/node}/storage/storage.util.d.ts +0 -0
  150. /package/dist/{node → src/node}/upload/upload.constant.d.ts +0 -0
  151. /package/dist/{node → src/node}/upload/upload.type.d.ts +0 -0
  152. /package/dist/{node → src/node}/ws/ws.type.d.ts +0 -0
  153. /package/dist/{node → src/node}/ws/ws.util.d.ts +0 -0
  154. /package/dist/{react → src/react}/apollo-client/apollo-client.component.d.ts +0 -0
  155. /package/dist/{react → src/react}/apollo-client/apollo-client.constant.d.ts +0 -0
  156. /package/dist/{react → src/react}/apollo-client/apollo-client.context.d.ts +0 -0
  157. /package/dist/{react → src/react}/apollo-client/apollo-client.hook.d.ts +0 -0
  158. /package/dist/{react → src/react}/apollo-client/apollo-client.util.d.ts +0 -0
  159. /package/dist/{react → src/react}/apollo-client/links/upload.d.ts +0 -0
  160. /package/dist/{react → src/react}/apollo-client-nextjs/apollo-client-nextjs.component.d.ts +0 -0
  161. /package/dist/{react → src/react}/apollo-client-nextjs/apollo-client-nextjs.util.d.ts +0 -0
  162. /package/dist/{react → src/react}/apollo-error/apollo-error.component.d.ts +0 -0
  163. /package/dist/{react → src/react}/apollo-error/apollo-error.context.d.ts +0 -0
  164. /package/dist/{react → src/react}/apollo-error/apollo-error.hook.d.ts +0 -0
  165. /package/dist/{react → src/react}/apollo-error/apollo-error.provider.d.ts +0 -0
  166. /package/dist/{react → src/react}/apollo-error/apollo-error.type.d.ts +0 -0
  167. /package/dist/{react → src/react}/apollo-error/apollo-error.util.d.ts +0 -0
  168. /package/dist/{react → src/react}/i18next/i18next.hook.d.ts +0 -0
  169. /package/dist/{react → src/react}/i18next/i18next.util.d.ts +0 -0
  170. /package/dist/{react → src/react}/loading/loading.component.d.ts +0 -0
  171. /package/dist/{react → src/react}/loading/loading.context.d.ts +0 -0
  172. /package/dist/{react → src/react}/loading/loading.hook.d.ts +0 -0
  173. /package/dist/{react → src/react}/loading/loading.type.d.ts +0 -0
  174. /package/dist/{react → src/react}/next-intl/next-intl.constant.d.ts +0 -0
  175. /package/dist/{react → src/react}/next-intl/next-intl.context.d.ts +0 -0
  176. /package/dist/{react → src/react}/next-intl/next-intl.hook.d.ts +0 -0
  177. /package/dist/{react → src/react}/next-intl/next-intl.provider.d.ts +0 -0
  178. /package/dist/{react → src/react}/storage/storage.util.d.ts +0 -0
  179. /package/dist/{react → src/react}/userback/userback.component.d.ts +0 -0
  180. /package/dist/{react → src/react}/userback/userback.type.d.ts +0 -0
  181. /package/dist/{typescript → src/typescript}/common.type.d.ts +0 -0
  182. /package/dist/{typescript → src/typescript}/react.type.d.ts +0 -0
  183. /package/dist/{util → src/util}/common/common.type.d.ts +0 -0
  184. /package/dist/{util → src/util}/common/common.util.d.ts +0 -0
  185. /package/dist/{util → src/util}/log/log.type.d.ts +0 -0
  186. /package/dist/{util → src/util}/object/object.util.d.ts +0 -0
  187. /package/dist/{util → src/util}/serializer/serializer.type.d.ts +0 -0
  188. /package/dist/{util → src/util}/serializer/serializer.util.d.ts +0 -0
  189. /package/dist/{util → src/util}/string/string.type.d.ts +0 -0
  190. /package/dist/{util → src/util}/string/string.util.d.ts +0 -0
  191. /package/dist/{util → src/util}/validate/validate.util.d.ts +0 -0
@@ -0,0 +1,2 @@
1
+ export * from './graphql-codegen.type.js';
2
+ export * from './graphql-codegen.util.js';
@@ -0,0 +1,2 @@
1
+ export * from './config.type.js';
2
+ export * from './config.util.js';
@@ -0,0 +1,5 @@
1
+ declare const _default: {
2
+ '*.ts': () => string;
3
+ '*': string[];
4
+ };
5
+ export default _default;
@@ -0,0 +1,2 @@
1
+ export * from './storybook.main.js';
2
+ export * from './storybook.preview.js';
@@ -0,0 +1,3 @@
1
+ export * from './vitest.e2e.js';
2
+ export * from './vitest.unit.js';
3
+ export * from './vitest.unit.setup.js';
@@ -0,0 +1,20 @@
1
+ import { UserConfig } from 'vite';
2
+ /**
3
+ * Creates a Vitest configuration for end-to-end testing with browser automation.
4
+ * This function generates a Vitest configuration specifically designed for E2E testing
5
+ * using Playwright with multiple browser instances. It includes React support and
6
+ * browser automation capabilities for comprehensive end-to-end testing.
7
+ *
8
+ * The configuration includes:
9
+ * - React SWC plugin for fast React compilation
10
+ * - Browser automation with Playwright provider
11
+ * - Multiple browser instances (Chromium, Firefox, WebKit)
12
+ * - E2E test file pattern matching
13
+ * - Configurable options merging
14
+ *
15
+ * @param options - Additional Vite configuration options to merge with the E2E config.
16
+ * @returns A Vitest configuration object optimized for end-to-end testing with browser automation.
17
+ */
18
+ export declare function vitestE2E(options: UserConfig): UserConfig;
19
+ declare const _default: UserConfig;
20
+ export default _default;
@@ -0,0 +1,22 @@
1
+ import { UserConfig } from 'vite';
2
+ /**
3
+ * Creates a Vitest configuration for unit testing with React support.
4
+ * This function generates a Vitest configuration specifically designed for unit testing
5
+ * React components and JavaScript/TypeScript modules. It includes JSDOM environment
6
+ * for DOM simulation and comprehensive testing setup.
7
+ *
8
+ * The configuration includes:
9
+ * - React SWC plugin for fast React compilation
10
+ * - JSDOM environment for DOM simulation
11
+ * - Global test functions availability
12
+ * - VM threads pool for parallel test execution
13
+ * - Unit test file pattern matching
14
+ * - Setup files for testing library configuration
15
+ * - Configurable options merging
16
+ *
17
+ * @param options - Additional Vite configuration options to merge with the unit test config.
18
+ * @returns A Vitest configuration object optimized for unit testing with React and DOM support.
19
+ */
20
+ export declare function vitestUnit(options: UserConfig): UserConfig;
21
+ declare const _default: UserConfig;
22
+ export default _default;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Re-exports all common constants for shared usage across the codebase.
3
+ */
4
+ export * from './common.js';
5
+ export * from './response-status.js';
@@ -0,0 +1,2 @@
1
+ export * from './apollo-server.type.js';
2
+ export * from './apollo-server.util.js';
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
@@ -0,0 +1,2 @@
1
+ export * from './command.type.js';
2
+ export * from './command.util.js';
@@ -0,0 +1,2 @@
1
+ export * from './express.type.js';
2
+ export * from './express.util.js';
@@ -0,0 +1,2 @@
1
+ export * from './fs.type.js';
2
+ export * from './fs.util.js';
@@ -0,0 +1,2 @@
1
+ export * from './log.type.js';
2
+ export * from './log.util.js';
@@ -1,5 +1,5 @@
1
- import { I_Log as I_LogCommon } from '../../typescript/index.js';
2
- export type { I_CatchErrorOptions } from '../../util/log/index.js';
1
+ import { I_Log as I_LogCommon } from '../../../typescript/index.js';
2
+ export type { I_CatchErrorOptions } from '../../../util/log/index.js';
3
3
  /**
4
4
  * Enum representing the type of issues for logging and error handling.
5
5
  * - Error: Represents an error issue.
@@ -1,4 +1,4 @@
1
- import { I_Return } from '../../typescript/index.js';
1
+ import { I_Return } from '../../../typescript/index.js';
2
2
  import { I_CatchErrorOptions, I_Log, I_ThrowError } from './log.type.js';
3
3
  /**
4
4
  * Throws a standardized error with optional status information and type specification.
@@ -0,0 +1,6 @@
1
+ export * from './mongo.constant.js';
2
+ export * from './mongo.controller.js';
3
+ export * from './mongo.dynamic-populate.js';
4
+ export * from './mongo.populate.js';
5
+ export * from './mongo.type.js';
6
+ export * from './mongo.util.js';
@@ -1,4 +1,4 @@
1
- import { I_Return } from '../../typescript/index.js';
1
+ import { I_Return } from '../../../typescript/index.js';
2
2
  /**
3
3
  * Shared helper functions for MongoDB controllers.
4
4
  *
@@ -1,4 +1,4 @@
1
- import { I_Return } from '../../typescript/index.js';
1
+ import { I_Return } from '../../../typescript/index.js';
2
2
  import { C_Document, I_DeleteOptionsExtended, I_ExtendedModel, I_Input_CheckSlug, I_Input_CreateSlug, I_Input_GenerateSlug, I_PaginateOptionsWithPopulate, I_UpdateOptionsExtended, T_AggregatePaginateResult, T_DeleteResult, T_Input_Populate, T_InsertManyOptions, T_PaginateResult, T_PipelineStage, T_ProjectionType, T_QueryFilter, T_QueryOptions, T_UpdateQuery, T_UpdateResult } from './mongo.type.js';
3
3
  /**
4
4
  * Mongoose controller for database operations with advanced features.
@@ -1,4 +1,4 @@
1
- import { I_Return } from '../../typescript/index.js';
1
+ import { I_Return } from '../../../typescript/index.js';
2
2
  import { C_Db, C_Document, T_DeleteResult, T_Filter, T_UpdateResult, T_WithId } from './mongo.type.js';
3
3
  /**
4
4
  * MongoDB native driver controller for direct database operations.
@@ -1,4 +1,4 @@
1
- import { I_Return } from '../../typescript/index.js';
1
+ import { I_Return } from '../../../typescript/index.js';
2
2
  import { T_DeleteResult, T_UpdateResult, T_WithId } from './mongo.type.js';
3
3
  /**
4
4
  * Shared controller interface for MongoDB operations.
@@ -0,0 +1,2 @@
1
+ export * from './package.type.js';
2
+ export * from './package.util.js';
@@ -1,4 +1,4 @@
1
- import { I_Return } from '../../typescript/index.js';
1
+ import { I_Return } from '../../../typescript/index.js';
2
2
  import { I_PackageInfo, I_PackageInput } from './package.type.js';
3
3
  /**
4
4
  * Fetches the latest version of a package from the npm registry.
@@ -0,0 +1,2 @@
1
+ export * from './path.constant.js';
2
+ export * from './path.util.js';
@@ -0,0 +1,3 @@
1
+ export * from './storage.constant.js';
2
+ export * from './storage.type.js';
3
+ export * from './storage.util.js';
@@ -0,0 +1,3 @@
1
+ export * from './upload.constant.js';
2
+ export * from './upload.type.js';
3
+ export * from './upload.util.js';
@@ -1,5 +1,5 @@
1
1
  import { ReadableStream } from 'node:stream/web';
2
- import { I_Return } from '../../typescript/index.js';
2
+ import { I_Return } from '../../../typescript/index.js';
3
3
  import { I_UploadConfig, I_UploadFile, I_UploadFileData, I_UploadOptions, I_UploadValidationConfig, E_UploadType } from './upload.type.js';
4
4
  /**
5
5
  * Calculates the size of a file from a readable stream.
@@ -0,0 +1,2 @@
1
+ export * from './ws.type.js';
2
+ export * from './ws.util.js';
@@ -1,7 +1,7 @@
1
1
  import { ApolloClient } from '@apollo/client';
2
2
  import { ApolloLink } from '@apollo/client/link';
3
3
  import { GraphQLError } from 'graphql';
4
- import { I_Children } from '../../typescript/index.js';
4
+ import { I_Children } from '../../../typescript/index.js';
5
5
  export interface I_ApolloOptions extends Omit<ApolloClient.Options, 'link' | 'cache'> {
6
6
  uri?: string;
7
7
  wsUrl?: string;
@@ -0,0 +1,9 @@
1
+ export * from './apollo-client.component.js';
2
+ export * from './apollo-client.constant.js';
3
+ export * from './apollo-client.context.js';
4
+ export * from './apollo-client.hook.js';
5
+ export * from './apollo-client.type.js';
6
+ export * from './apollo-client.util.js';
7
+ export * from './links/index.js';
8
+ export { makeVar } from '@apollo/client/cache';
9
+ export { useApolloClient, useBackgroundQuery, useFragment, useLazyQuery, useLoadableQuery, useMutation, useQuery, useQueryRefHandlers, useReactiveVar, useReadQuery, useSubscription, useSuspenseFragment, useSuspenseQuery } from '@apollo/client/react';
@@ -0,0 +1 @@
1
+ export * from './upload.js';
@@ -0,0 +1,16 @@
1
+ import { I_ApolloOptions } from '../apollo-client/index.js';
2
+ /**
3
+ * Creates a registered Apollo Client factory for Next.js server components.
4
+ * This function creates a client factory that is registered with Next.js for
5
+ * proper server-side rendering support. The factory function ensures that
6
+ * each request gets its own Apollo Client instance, which is essential for
7
+ * SSR compatibility and preventing client state leakage between requests.
8
+ *
9
+ * @param options - Configuration options for the Apollo Client including URI, WebSocket URL, and custom links.
10
+ * @returns A registered Apollo Client factory function that can be used with Next.js server components.
11
+ */
12
+ export declare const makeClient: (options?: I_ApolloOptions) => {
13
+ getClient: () => import('@apollo/client-integration-nextjs').ApolloClient;
14
+ query: <TData = unknown, TVariables extends import('@apollo/client').OperationVariables = import('@apollo/client').OperationVariables>(options: import("@apollo/client").ApolloClient.QueryOptions<TData, TVariables>) => Promise<import("@apollo/client").ApolloClient.QueryResult<import('@apollo/client').MaybeMasked<TData>>>;
15
+ PreloadQuery: import('@apollo/client-integration-nextjs').PreloadQueryComponent;
16
+ };
@@ -0,0 +1,2 @@
1
+ export * from './apollo-client-nextjs.component.js';
2
+ export * from './apollo-client-nextjs.util.js';
@@ -0,0 +1,6 @@
1
+ export * from './apollo-error.component.js';
2
+ export * from './apollo-error.context.js';
3
+ export * from './apollo-error.hook.js';
4
+ export * from './apollo-error.provider.js';
5
+ export * from './apollo-error.type.js';
6
+ export * from './apollo-error.util.js';
@@ -0,0 +1,2 @@
1
+ export * from './i18next.hook.js';
2
+ export * from './i18next.util.js';
@@ -0,0 +1,5 @@
1
+ export * from './loading.component.js';
2
+ export * from './loading.context.js';
3
+ export * from './loading.hook.js';
4
+ export * from './loading.provider.js';
5
+ export * from './loading.type.js';
@@ -1,4 +1,4 @@
1
- import { I_Children } from '../../typescript/index.js';
1
+ import { I_Children } from '../../../typescript/index.js';
2
2
  import * as React from 'react';
3
3
  /**
4
4
  * Provider component that manages loading state and provides loading context.
@@ -0,0 +1,2 @@
1
+ export * from './log.type.js';
2
+ export * from './log.util.js';
@@ -0,0 +1 @@
1
+ export type { I_CatchErrorOptions } from '../../../util/log/index.js';
@@ -1,4 +1,4 @@
1
- import { I_Log, I_Return } from '../../typescript/index.js';
1
+ import { I_Log, I_Return } from '../../../typescript/index.js';
2
2
  import { I_CatchErrorOptions } from './log.type.js';
3
3
  /**
4
4
  * Browser-compatible logging interface using consola.
@@ -0,0 +1,6 @@
1
+ export * from './next-intl.constant.js';
2
+ export * from './next-intl.context.js';
3
+ export * from './next-intl.hoc.js';
4
+ export * from './next-intl.hook.js';
5
+ export * from './next-intl.provider.js';
6
+ export * from './next-intl.type.js';
@@ -1,5 +1,5 @@
1
1
  import { ComponentType } from 'react';
2
- import { I_Children } from '../../typescript/index.js';
2
+ import { I_Children } from '../../../typescript/index.js';
3
3
  import { I_NextIntlLanguage, T_NextIntlMessageList } from './next-intl.type.js';
4
4
  import * as React from 'react';
5
5
  /**
@@ -1,6 +1,6 @@
1
1
  import { Locale } from 'date-fns';
2
2
  import { AbstractIntlMessages, Timezone } from 'next-intl';
3
- import { I_Children } from '../../typescript/index.js';
3
+ import { I_Children } from '../../../typescript/index.js';
4
4
  export interface I_NextIntlLanguage {
5
5
  label: string;
6
6
  value: string;
@@ -0,0 +1,2 @@
1
+ export * from './storage.hook.js';
2
+ export * from './storage.util.js';
@@ -1,4 +1,4 @@
1
- import { I_Serializer } from '../../util/serializer/index.js';
1
+ import { I_Serializer } from '../../../util/serializer/index.js';
2
2
  /**
3
3
  * React hook that provides persistent storage functionality with automatic serialization.
4
4
  * This hook manages state that persists across browser sessions using localStorage,
@@ -0,0 +1 @@
1
+ export { toast, Toaster } from 'react-hot-toast';
@@ -0,0 +1,2 @@
1
+ export * from './userback.component.js';
2
+ export * from './userback.type.js';
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Re-exports all common TypeScript types for shared usage across the codebase.
3
+ */
4
+ export * from './common.type.js';
5
+ export * from './react.type.js';
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Re-exports all common utility types for shared usage across the codebase.
3
+ */
4
+ export * from './common.type.js';
5
+ export * from './common.util.js';
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Re-exports all utility modules for shared usage across the codebase.
3
+ */
4
+ export * from './common/index.js';
5
+ export * from './log/index.js';
6
+ export * from './object/index.js';
7
+ export * from './serializer/index.js';
8
+ export * from './string/index.js';
9
+ export * from './validate/index.js';
@@ -0,0 +1,2 @@
1
+ export type { I_CatchErrorOptions } from './log.type.js';
2
+ export { baseCatchError } from './log.util.js';
@@ -1,4 +1,4 @@
1
- import { I_Return } from '../../typescript/index.js';
1
+ import { I_Return } from '../../../typescript/index.js';
2
2
  import { I_CatchErrorOptions } from './log.type.js';
3
3
  /**
4
4
  * Core error-catching implementation shared between Node and React environments.
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Re-exports all object manipulation utilities.
3
+ */
4
+ export * from './object.util.js';
@@ -0,0 +1,2 @@
1
+ export * from './serializer.type.js';
2
+ export * from './serializer.util.js';
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Re-exports all string manipulation utilities and types.
3
+ */
4
+ export * from './string.type.js';
5
+ export * from './string.util.js';
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Re-exports all validation utilities.
3
+ */
4
+ export * from './validate.util.js';
@@ -1,5 +1 @@
1
- /**
2
- * Re-exports all common TypeScript types for shared usage across the codebase.
3
- */
4
- export * from './common.type.js';
5
- export * from './react.type.js';
1
+ export {}
@@ -1,5 +1 @@
1
- /**
2
- * Re-exports all common utility types for shared usage across the codebase.
3
- */
4
- export * from './common.type.js';
5
- export * from './common.util.js';
1
+ export {}
@@ -1,9 +1 @@
1
- /**
2
- * Re-exports all utility modules for shared usage across the codebase.
3
- */
4
- export * from './common/index.js';
5
- export * from './log/index.js';
6
- export * from './object/index.js';
7
- export * from './serializer/index.js';
8
- export * from './string/index.js';
9
- export * from './validate/index.js';
1
+ export {}
@@ -1,2 +1 @@
1
- export type { I_CatchErrorOptions } from './log.type.js';
2
- export { baseCatchError } from './log.util.js';
1
+ export {}
@@ -1,4 +1 @@
1
- /**
2
- * Re-exports all object manipulation utilities.
3
- */
4
- export * from './object.util.js';
1
+ export {}
@@ -33,21 +33,23 @@ function r(e, t, r) {
33
33
  return t.length === 0 ? e : n(e, t, r, 0);
34
34
  }
35
35
  function i(e) {
36
- return a(e, /* @__PURE__ */ new WeakSet());
36
+ return a(e, /* @__PURE__ */ new WeakMap());
37
37
  }
38
38
  function a(e, t) {
39
39
  if (typeof e != "object" || !e) return e;
40
- if (t.has(e)) throw Error("deepClone: Circular reference detected.");
41
- if (t.add(e), e instanceof Date) return new Date(e.getTime());
40
+ if (t.has(e)) return t.get(e);
41
+ if (e instanceof Date) return new Date(e.getTime());
42
42
  if (e instanceof RegExp) return new RegExp(e.source, e.flags);
43
43
  if (Array.isArray(e)) {
44
44
  let n = e.length, r = Array(n);
45
+ t.set(e, r);
45
46
  for (let i = 0; i < n; i++) r[i] = a(e[i], t);
46
47
  return r;
47
48
  }
48
49
  let n = Object.getPrototypeOf(e);
49
50
  if (n !== Object.prototype && n !== null) return e;
50
51
  let r = {};
52
+ t.set(e, r);
51
53
  for (let n in e) Object.hasOwn(e, n) && (r[n] = a(e[n], t));
52
54
  return r;
53
55
  }
@@ -1 +1 @@
1
- {"version":3,"file":"object.util.js","names":[],"sources":["../../../src/util/object/object.util.ts"],"sourcesContent":["/**\n * Check if a string is a valid JSON string.\n * This function attempts to parse the string as JSON and returns true if successful,\n * false if the string is not valid JSON.\n *\n * @param str - The string to check for valid JSON format.\n * @returns True if the string is a valid JSON string, false otherwise.\n */\nexport function isJSON(str: string): boolean {\n try {\n JSON.parse(str);\n return true;\n }\n catch {\n return false;\n }\n}\n\n/**\n * Gets a nested value from an object using a path array.\n * This function traverses the object following the provided path and returns\n * the value at the specified location, or undefined if the path doesn't exist.\n *\n * @param obj - The object to get the value from.\n * @param path - An array of keys representing the path to the desired value.\n * @returns The value at the specified path, or undefined if the path doesn't exist.\n */\nexport function getNestedValue<T>(obj: T, path: (string | number)[]): unknown {\n // Optimization: Loop is faster than reduce and allows early exit\n let current: unknown = obj;\n const len = path.length;\n\n for (let i = 0; i < len; i++) {\n // Optimization: Early return if current value is null/undefined or not an object\n // This avoids unnecessary key lookups and type checks\n if (current == null || typeof current !== 'object') {\n return undefined;\n }\n\n const key = path[i];\n\n if (key !== undefined && key in (current as Record<string | number, unknown>)) {\n current = (current as Record<string | number, unknown>)[key];\n }\n else {\n return undefined;\n }\n }\n\n return current;\n}\n\n/**\n * Recursively sets a value at a nested path within an object, creating intermediate objects as needed.\n *\n * @param obj - The source object.\n * @param path - Array of keys forming the path.\n * @param value - The value to set.\n * @param index - Current recursion depth.\n * @returns A new object with the value set at the specified path.\n */\nfunction setNestedValueHelper<T>(obj: T, path: (string | number)[], value: unknown, index: number): T {\n if (index >= path.length)\n return obj;\n\n const head = path[index];\n\n if (index === path.length - 1) {\n return {\n ...(obj as Record<string | number, unknown>),\n [head as string | number]: value,\n } as T;\n }\n\n const current = (obj as Record<string | number, unknown>)[head as string | number];\n\n return {\n ...(obj as Record<string | number, unknown>),\n [head as string | number | symbol]: setNestedValueHelper(\n typeof current === 'object' && current !== null\n ? (current as object)\n : {},\n path,\n value,\n index + 1,\n ),\n } as T;\n}\n\n/**\n * Sets a nested value in an object using a path array.\n * This function creates the path if it doesn't exist and sets the value at the specified location.\n * The function returns a new object with the updated value, maintaining immutability.\n *\n * @param obj - The object to set the value in.\n * @param path - An array of keys representing the path to the desired location.\n * @param value - The value to set at the specified path.\n * @returns A new object with the updated value at the specified path.\n */\nexport function setNestedValue<T>(obj: T, path: (string | number)[], value: unknown): T {\n if (path.length === 0)\n return obj;\n\n return setNestedValueHelper(obj, path, value, 0);\n}\n\n/**\n * Deep clones an object or array.\n * This function creates a deep copy of the input, recursively cloning objects and arrays.\n * Primitive values, dates, and other non-plain objects are returned as is (or cloned if supported).\n *\n * @remarks\n * **Non-POJO objects are NOT cloned.** Objects with custom prototypes (e.g., Mongoose ObjectId,\n * class instances, Map, Set, Buffer) are returned **by reference** to preserve driver\n * compatibility. Mutations to these nested references will affect the original.\n * If you need full deep cloning of complex types, use `structuredClone()` or a dedicated library.\n *\n * @param obj - The object to clone.\n * @returns A deep copy of the object (with non-POJO objects returned by reference).\n */\nexport function deepClone<T>(obj: T): T {\n return deepCloneInternal(obj, new WeakSet<object>());\n}\n\n/**\n * Internal recursive implementation of deepClone with circular reference detection.\n *\n * @param obj - The value to clone.\n * @param seen - A WeakSet tracking already-visited objects to prevent infinite recursion.\n * @returns A deep copy of the value.\n */\nfunction deepCloneInternal<T>(obj: T, seen: WeakSet<object>): T {\n if (obj === null || typeof obj !== 'object') {\n return obj;\n }\n\n if (seen.has(obj as object)) {\n throw new Error('deepClone: Circular reference detected.');\n }\n seen.add(obj as object);\n\n if (obj instanceof Date) {\n return new Date(obj.getTime()) as unknown as T;\n }\n\n if (obj instanceof RegExp) {\n return new RegExp(obj.source, obj.flags) as unknown as T;\n }\n\n if (Array.isArray(obj)) {\n // Optimization: `new Array(len)` + `for` loop is ~10-15% faster than `Array.map` or `Array.from`\n // for large arrays since it avoids callback overhead and pre-allocates memory.\n const len = obj.length;\n // eslint-disable-next-line unicorn/no-new-array -- Pre-allocating array size for performance\n const arr = new Array(len);\n for (let i = 0; i < len; i++) {\n arr[i] = deepCloneInternal(obj[i], seen);\n }\n return arr as unknown as T;\n }\n\n // Handle Mongoose ObjectId and other custom classes by returning reference.\n // structuredClone is not used here because it silently corrupts nested non-POJO\n // types (e.g., ObjectId → plain object) and Date instances in jsdom environments.\n const proto = Object.getPrototypeOf(obj);\n if (proto !== Object.prototype && proto !== null) {\n return obj;\n }\n\n const result = {} as Record<string, unknown>;\n for (const key in obj) {\n if (Object.hasOwn(obj, key)) {\n result[key] = deepCloneInternal((obj as Record<string, unknown>)[key], seen);\n }\n }\n\n return result as T;\n}\n\n/**\n * Deep merges multiple objects into a single object.\n * @param args - The objects to merge. Can be empty, in which case returns an empty object.\n * @returns The merged object.\n */\nexport function deepMerge<T = Record<string, unknown>>(\n ...args: (object | null | undefined)[]\n): T;\n\n/**\n * Deep merges multiple arrays into a single array.\n * @param args - The arrays to merge. Can be empty, in which case returns an empty array.\n * @returns The merged array.\n */\nexport function deepMerge<T = unknown[]>(\n ...args: (unknown[] | null | undefined)[]\n): T;\n\n/**\n * Implementation of deepMerge function.\n * @param args - The objects or arrays to merge.\n * @returns The merged result.\n */\nexport function deepMerge<T = Record<string, unknown> | unknown[]>(\n ...args: (object | unknown[] | null | undefined)[]\n): T {\n const MAX_DEPTH = 20;\n\n /** Recursively merges an array of objects with depth and circular-reference tracking. */\n function mergeRecursive(\n validArgs: object[],\n depth: number,\n seen: WeakSet<object>,\n ): unknown {\n // Depth guard\n if (depth > MAX_DEPTH) {\n throw new Error(`deepMerge: Maximum depth of ${MAX_DEPTH} exceeded. Possible circular reference or excessively nested objects.`);\n }\n\n // Handle empty arguments\n if (validArgs.length === 0) {\n return {};\n }\n\n // If only one argument, return it directly\n if (validArgs.length === 1) {\n return validArgs[0];\n }\n\n // Check if all arguments are arrays\n if (validArgs.every(Array.isArray)) {\n return (validArgs as unknown[][]).flat();\n }\n\n // Check if all arguments are objects (but not arrays)\n if (validArgs.every(arg => typeof arg === 'object' && arg !== null && !Array.isArray(arg))) {\n const result = {} as Record<string, unknown>;\n\n for (const arg of validArgs) {\n // Circular reference protection (per-arg scope prevents false\n // positives when the same object appears in multiple branches)\n if (seen.has(arg)) {\n throw new Error('deepMerge: Circular reference detected.');\n }\n\n const obj = arg as Record<string, unknown>;\n for (const key in obj) {\n if (Object.hasOwn(obj, key)) {\n const value = obj[key];\n if (Object.hasOwn(result, key)) {\n const existingValue = result[key];\n if (\n typeof value === 'object' && value !== null\n && typeof existingValue === 'object' && existingValue !== null\n ) {\n if (Array.isArray(value) && Array.isArray(existingValue)) {\n result[key] = [...existingValue, ...value];\n }\n else if (!Array.isArray(value) && !Array.isArray(existingValue)) {\n result[key] = mergeRecursive(\n [existingValue as Record<string, unknown>, value as Record<string, unknown>],\n depth + 1,\n new WeakSet<object>(),\n );\n }\n else {\n // One is array, other is object — overwrite\n result[key] = value;\n }\n }\n else {\n result[key] = value;\n }\n }\n else {\n result[key] = value;\n }\n }\n }\n }\n return result;\n }\n\n // Check if all arguments are primitive values\n if (validArgs.every(arg => typeof arg !== 'object' || arg === null)) {\n throw new Error(\n 'deepMerge: Cannot merge primitive values. All arguments must be objects or arrays.',\n );\n }\n\n // Mixed types error\n const hasArrays = validArgs.some(Array.isArray);\n const hasObjects = validArgs.some(arg =>\n typeof arg === 'object' && arg !== null && !Array.isArray(arg),\n );\n\n if (hasArrays && hasObjects) {\n throw new Error(\n 'deepMerge: Cannot mix arrays and objects. All arguments must be either arrays or objects.',\n );\n }\n\n // Fallback for unexpected cases\n throw new Error(\n 'deepMerge: Invalid arguments provided. All arguments must be objects or arrays of the same type.',\n );\n }\n\n // Filter out null/undefined\n const validArgs = args.filter((arg): arg is object => arg !== null && arg !== undefined);\n\n return mergeRecursive(validArgs, 0, new WeakSet<object>()) as T;\n}\n\n/**\n * Normalizes MongoDB filters to support both dot notation strings and nested objects.\n * This function converts nested object filters to dot notation format while preserving\n * MongoDB operators to ensure consistent behavior across different filter input formats.\n *\n * @param filter - The filter object to normalize.\n * @returns A normalized filter object with nested objects converted to dot notation,\n * while preserving MongoDB operators as nested objects.\n *\n * @example\n * ```typescript\n * // Both of these will work the same way:\n * normalizeMongoFilter({ \"location.countryId\": \"240\" })\n * normalizeMongoFilter({ location: { countryId: \"240\" } })\n * // Both return: { \"location.countryId\": \"240\" }\n *\n * // MongoDB operators are preserved:\n * normalizeMongoFilter({ id: { $in: [\"240\", \"59\"] } })\n * // Returns: { id: { $in: [\"240\", \"59\"] } }\n * ```\n */\nexport function normalizeMongoFilter<T extends Record<string, unknown>>(filter: T): T {\n if (!filter || typeof filter !== 'object') {\n return filter;\n }\n\n const normalized: Record<string, unknown> = {};\n\n /**\n * Recursively flattens nested objects into dot-notation keys, preserving MongoDB operators.\n */\n function flatten(current: Record<string, unknown>, prefix: string) {\n for (const key in current) {\n if (!Object.hasOwn(current, key))\n continue;\n\n const value = current[key];\n const newKey = prefix ? `${prefix}.${key}` : key;\n\n if (value && typeof value === 'object' && !Array.isArray(value)) {\n // Fast-path POJO check: `.constructor` is safe even on null-prototype objects\n // (returns undefined, so the === Object check simply fails and falls through\n // to the getPrototypeOf check which correctly identifies it as a POJO).\n const isPojo = (value as object).constructor === Object\n || Object.getPrototypeOf(value) === null;\n\n if (!isPojo) {\n normalized[newKey] = value;\n continue;\n }\n\n // Check for Mongo operator\n let hasMongoOperator = false;\n for (const subKey in value as Record<string, unknown>) {\n if (Object.hasOwn(value, subKey) && subKey.startsWith('$')) {\n hasMongoOperator = true;\n break;\n }\n }\n\n if (hasMongoOperator) {\n normalized[newKey] = value;\n }\n else {\n flatten(value as Record<string, unknown>, newKey);\n }\n }\n else {\n normalized[newKey] = value;\n }\n }\n }\n\n flatten(filter, '');\n\n return normalized as T;\n}\n"],"mappings":";AAQA,SAAgB,EAAO,GAAsB;AACzC,KAAI;AAEA,SADA,KAAK,MAAM,EAAI,EACR;SAEL;AACF,SAAO;;;AAaf,SAAgB,EAAkB,GAAQ,GAAoC;CAE1E,IAAI,IAAmB,GACjB,IAAM,EAAK;AAEjB,MAAK,IAAI,IAAI,GAAG,IAAI,GAAK,KAAK;AAG1B,MAAuB,OAAO,KAAY,aAAtC,EACA;EAGJ,IAAM,IAAM,EAAK;AAEjB,MAAI,MAAQ,KAAA,KAAa,KAAQ,EAC7B,KAAW,EAA6C;MAGxD;;AAIR,QAAO;;AAYX,SAAS,EAAwB,GAAQ,GAA2B,GAAgB,GAAkB;AAClG,KAAI,KAAS,EAAK,OACd,QAAO;CAEX,IAAM,IAAO,EAAK;AAElB,KAAI,MAAU,EAAK,SAAS,EACxB,QAAO;EACH,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U,OAAO,KAAW,SAC7B,QAAO;CAGX,IAAM,IAAsC,EAAE;CAK9C,SAAS,EAAQ,GAAkC,GAAgB;AAC/D,OAAK,IAAM,KAAO,GAAS;AACvB,OAAI,CAAC,OAAO,OAAO,GAAS,EAAI,CAC5B;GAEJ,IAAM,IAAQ,EAAQ,IAChB,IAAS,IAAS,GAAG,EAAO,GAAG,MAAQ;AAE7C,OAAI,KAAS,OAAO,KAAU,YAAY,CAAC,MAAM,QAAQ,EAAM,EAAE;AAO7D,QAAI,EAHY,EAAiB,gBAAgB,UAC1C,OAAO,eAAe,EAAM,KAAK,OAE3B;AACT,OAAW,KAAU;AACrB;;IAIJ,IAAI,IAAmB;AACvB,SAAK,IAAM,KAAU,EACjB,KAAI,OAAO,OAAO,GAAO,EAAO,IAAI,EAAO,WAAW,IAAI,EAAE;AACxD,SAAmB;AACnB;;AAIR,IAAI,IACA,EAAW,KAAU,IAGrB,EAAQ,GAAkC,EAAO;SAIrD,GAAW,KAAU;;;AAOjC,QAFA,EAAQ,GAAQ,GAAG,EAEZ"}
1
+ {"version":3,"file":"object.util.js","names":[],"sources":["../../../src/util/object/object.util.ts"],"sourcesContent":["/**\n * Check if a string is a valid JSON string.\n * This function attempts to parse the string as JSON and returns true if successful,\n * false if the string is not valid JSON.\n *\n * @param str - The string to check for valid JSON format.\n * @returns True if the string is a valid JSON string, false otherwise.\n */\nexport function isJSON(str: string): boolean {\n try {\n JSON.parse(str);\n return true;\n }\n catch {\n return false;\n }\n}\n\n/**\n * Gets a nested value from an object using a path array.\n * This function traverses the object following the provided path and returns\n * the value at the specified location, or undefined if the path doesn't exist.\n *\n * @param obj - The object to get the value from.\n * @param path - An array of keys representing the path to the desired value.\n * @returns The value at the specified path, or undefined if the path doesn't exist.\n */\nexport function getNestedValue<T>(obj: T, path: (string | number)[]): unknown {\n // Optimization: Loop is faster than reduce and allows early exit\n let current: unknown = obj;\n const len = path.length;\n\n for (let i = 0; i < len; i++) {\n // Optimization: Early return if current value is null/undefined or not an object\n // This avoids unnecessary key lookups and type checks\n if (current == null || typeof current !== 'object') {\n return undefined;\n }\n\n const key = path[i];\n\n if (key !== undefined && key in (current as Record<string | number, unknown>)) {\n current = (current as Record<string | number, unknown>)[key];\n }\n else {\n return undefined;\n }\n }\n\n return current;\n}\n\n/**\n * Recursively sets a value at a nested path within an object, creating intermediate objects as needed.\n *\n * @param obj - The source object.\n * @param path - Array of keys forming the path.\n * @param value - The value to set.\n * @param index - Current recursion depth.\n * @returns A new object with the value set at the specified path.\n */\nfunction setNestedValueHelper<T>(obj: T, path: (string | number)[], value: unknown, index: number): T {\n if (index >= path.length)\n return obj;\n\n const head = path[index];\n\n if (index === path.length - 1) {\n return {\n ...(obj as Record<string | number, unknown>),\n [head as string | number]: value,\n } as T;\n }\n\n const current = (obj as Record<string | number, unknown>)[head as string | number];\n\n return {\n ...(obj as Record<string | number, unknown>),\n [head as string | number | symbol]: setNestedValueHelper(\n typeof current === 'object' && current !== null\n ? (current as object)\n : {},\n path,\n value,\n index + 1,\n ),\n } as T;\n}\n\n/**\n * Sets a nested value in an object using a path array.\n * This function creates the path if it doesn't exist and sets the value at the specified location.\n * The function returns a new object with the updated value, maintaining immutability.\n *\n * @param obj - The object to set the value in.\n * @param path - An array of keys representing the path to the desired location.\n * @param value - The value to set at the specified path.\n * @returns A new object with the updated value at the specified path.\n */\nexport function setNestedValue<T>(obj: T, path: (string | number)[], value: unknown): T {\n if (path.length === 0)\n return obj;\n\n return setNestedValueHelper(obj, path, value, 0);\n}\n\n/**\n * Deep clones an object or array.\n * This function creates a deep copy of the input, recursively cloning objects and arrays.\n * Primitive values, dates, and other non-plain objects are returned as is (or cloned if supported).\n *\n * @remarks\n * **Non-POJO objects are NOT cloned.** Objects with custom prototypes (e.g., Mongoose ObjectId,\n * class instances, Map, Set, Buffer) are returned **by reference** to preserve driver\n * compatibility. Mutations to these nested references will affect the original.\n * If you need full deep cloning of complex types, use `structuredClone()` or a dedicated library.\n *\n * @param obj - The object to clone.\n * @returns A deep copy of the object (with non-POJO objects returned by reference).\n */\nexport function deepClone<T>(obj: T): T {\n return deepCloneInternal(obj, new WeakMap<object, unknown>());\n}\n\n/**\n * Internal recursive implementation of deepClone with shared-reference and circular-reference handling.\n *\n * Uses a WeakMap to track already-cloned objects. This correctly handles:\n * - **Shared references**: The same object appearing in multiple places returns\n * the same clone (preserving the shared-reference topology).\n * - **Circular references**: Detected because the object is added to the map\n * before* its children are recursed into; a back-edge will find itself in\n * the map and return the (partially constructed) clone rather than recursing\n * infinitely.\n *\n * @param obj - The value to clone.\n * @param seen - A WeakMap mapping original objects to their clones.\n * @returns A deep copy of the value.\n */\nfunction deepCloneInternal<T>(obj: T, seen: WeakMap<object, unknown>): T {\n if (obj === null || typeof obj !== 'object') {\n return obj;\n }\n\n // Return the already-cloned copy for shared (or circular) references\n if (seen.has(obj as object)) {\n return seen.get(obj as object) as T;\n }\n\n if (obj instanceof Date) {\n return new Date(obj.getTime()) as unknown as T;\n }\n\n if (obj instanceof RegExp) {\n return new RegExp(obj.source, obj.flags) as unknown as T;\n }\n\n if (Array.isArray(obj)) {\n // Optimization: `new Array(len)` + `for` loop is ~10-15% faster than `Array.map` or `Array.from`\n // for large arrays since it avoids callback overhead and pre-allocates memory.\n const len = obj.length;\n // eslint-disable-next-line unicorn/no-new-array -- Pre-allocating array size for performance\n const arr = new Array(len);\n // Register before recursing to handle circular references within arrays\n seen.set(obj as object, arr);\n\n for (let i = 0; i < len; i++) {\n arr[i] = deepCloneInternal(obj[i], seen);\n }\n\n return arr as unknown as T;\n }\n\n // Handle Mongoose ObjectId and other custom classes by returning reference.\n // structuredClone is not used here because it silently corrupts nested non-POJO\n // types (e.g., ObjectId → plain object) and Date instances in jsdom environments.\n const proto = Object.getPrototypeOf(obj);\n\n if (proto !== Object.prototype && proto !== null) {\n return obj;\n }\n\n const result = {} as Record<string, unknown>;\n // Register before recursing to handle circular references within objects\n seen.set(obj as object, result);\n\n for (const key in obj) {\n if (Object.hasOwn(obj, key)) {\n result[key] = deepCloneInternal((obj as Record<string, unknown>)[key], seen);\n }\n }\n\n return result as T;\n}\n\n/**\n * Deep merges multiple objects into a single object.\n * @param args - The objects to merge. Can be empty, in which case returns an empty object.\n * @returns The merged object.\n */\nexport function deepMerge<T = Record<string, unknown>>(\n ...args: (object | null | undefined)[]\n): T;\n\n/**\n * Deep merges multiple arrays into a single array.\n * @param args - The arrays to merge. Can be empty, in which case returns an empty array.\n * @returns The merged array.\n */\nexport function deepMerge<T = unknown[]>(\n ...args: (unknown[] | null | undefined)[]\n): T;\n\n/**\n * Implementation of deepMerge function.\n * @param args - The objects or arrays to merge.\n * @returns The merged result.\n */\nexport function deepMerge<T = Record<string, unknown> | unknown[]>(\n ...args: (object | unknown[] | null | undefined)[]\n): T {\n const MAX_DEPTH = 20;\n\n /** Recursively merges an array of objects with depth and circular-reference tracking. */\n function mergeRecursive(\n validArgs: object[],\n depth: number,\n seen: WeakSet<object>,\n ): unknown {\n // Depth guard\n if (depth > MAX_DEPTH) {\n throw new Error(`deepMerge: Maximum depth of ${MAX_DEPTH} exceeded. Possible circular reference or excessively nested objects.`);\n }\n\n // Handle empty arguments\n if (validArgs.length === 0) {\n return {};\n }\n\n // If only one argument, return it directly\n if (validArgs.length === 1) {\n return validArgs[0];\n }\n\n // Check if all arguments are arrays\n if (validArgs.every(Array.isArray)) {\n return (validArgs as unknown[][]).flat();\n }\n\n // Check if all arguments are objects (but not arrays)\n if (validArgs.every(arg => typeof arg === 'object' && arg !== null && !Array.isArray(arg))) {\n const result = {} as Record<string, unknown>;\n\n for (const arg of validArgs) {\n // Circular reference protection (per-arg scope prevents false\n // positives when the same object appears in multiple branches)\n if (seen.has(arg)) {\n throw new Error('deepMerge: Circular reference detected.');\n }\n\n const obj = arg as Record<string, unknown>;\n for (const key in obj) {\n if (Object.hasOwn(obj, key)) {\n const value = obj[key];\n if (Object.hasOwn(result, key)) {\n const existingValue = result[key];\n if (\n typeof value === 'object' && value !== null\n && typeof existingValue === 'object' && existingValue !== null\n ) {\n if (Array.isArray(value) && Array.isArray(existingValue)) {\n result[key] = [...existingValue, ...value];\n }\n else if (!Array.isArray(value) && !Array.isArray(existingValue)) {\n result[key] = mergeRecursive(\n [existingValue as Record<string, unknown>, value as Record<string, unknown>],\n depth + 1,\n new WeakSet<object>(),\n );\n }\n else {\n // One is array, other is object — overwrite\n result[key] = value;\n }\n }\n else {\n result[key] = value;\n }\n }\n else {\n result[key] = value;\n }\n }\n }\n }\n return result;\n }\n\n // Check if all arguments are primitive values\n if (validArgs.every(arg => typeof arg !== 'object' || arg === null)) {\n throw new Error(\n 'deepMerge: Cannot merge primitive values. All arguments must be objects or arrays.',\n );\n }\n\n // Mixed types error\n const hasArrays = validArgs.some(Array.isArray);\n const hasObjects = validArgs.some(arg =>\n typeof arg === 'object' && arg !== null && !Array.isArray(arg),\n );\n\n if (hasArrays && hasObjects) {\n throw new Error(\n 'deepMerge: Cannot mix arrays and objects. All arguments must be either arrays or objects.',\n );\n }\n\n // Fallback for unexpected cases\n throw new Error(\n 'deepMerge: Invalid arguments provided. All arguments must be objects or arrays of the same type.',\n );\n }\n\n // Filter out null/undefined\n const validArgs = args.filter((arg): arg is object => arg !== null && arg !== undefined);\n\n return mergeRecursive(validArgs, 0, new WeakSet<object>()) as T;\n}\n\n/**\n * Normalizes MongoDB filters to support both dot notation strings and nested objects.\n * This function converts nested object filters to dot notation format while preserving\n * MongoDB operators to ensure consistent behavior across different filter input formats.\n *\n * @param filter - The filter object to normalize.\n * @returns A normalized filter object with nested objects converted to dot notation,\n * while preserving MongoDB operators as nested objects.\n *\n * @example\n * ```typescript\n * // Both of these will work the same way:\n * normalizeMongoFilter({ \"location.countryId\": \"240\" })\n * normalizeMongoFilter({ location: { countryId: \"240\" } })\n * // Both return: { \"location.countryId\": \"240\" }\n *\n * // MongoDB operators are preserved:\n * normalizeMongoFilter({ id: { $in: [\"240\", \"59\"] } })\n * // Returns: { id: { $in: [\"240\", \"59\"] } }\n * ```\n */\nexport function normalizeMongoFilter<T extends Record<string, unknown>>(filter: T): T {\n if (!filter || typeof filter !== 'object') {\n return filter;\n }\n\n const normalized: Record<string, unknown> = {};\n\n /**\n * Recursively flattens nested objects into dot-notation keys, preserving MongoDB operators.\n */\n function flatten(current: Record<string, unknown>, prefix: string) {\n for (const key in current) {\n if (!Object.hasOwn(current, key))\n continue;\n\n const value = current[key];\n const newKey = prefix ? `${prefix}.${key}` : key;\n\n if (value && typeof value === 'object' && !Array.isArray(value)) {\n // Fast-path POJO check: `.constructor` is safe even on null-prototype objects\n // (returns undefined, so the === Object check simply fails and falls through\n // to the getPrototypeOf check which correctly identifies it as a POJO).\n const isPojo = (value as object).constructor === Object\n || Object.getPrototypeOf(value) === null;\n\n if (!isPojo) {\n normalized[newKey] = value;\n continue;\n }\n\n // Check for Mongo operator\n let hasMongoOperator = false;\n for (const subKey in value as Record<string, unknown>) {\n if (Object.hasOwn(value, subKey) && subKey.startsWith('$')) {\n hasMongoOperator = true;\n break;\n }\n }\n\n if (hasMongoOperator) {\n normalized[newKey] = value;\n }\n else {\n flatten(value as Record<string, unknown>, newKey);\n }\n }\n else {\n normalized[newKey] = value;\n }\n }\n }\n\n flatten(filter, '');\n\n return normalized as T;\n}\n"],"mappings":";AAQA,SAAgB,EAAO,GAAsB;AACzC,KAAI;AAEA,SADA,KAAK,MAAM,EAAI,EACR;SAEL;AACF,SAAO;;;AAaf,SAAgB,EAAkB,GAAQ,GAAoC;CAE1E,IAAI,IAAmB,GACjB,IAAM,EAAK;AAEjB,MAAK,IAAI,IAAI,GAAG,IAAI,GAAK,KAAK;AAG1B,MAAuB,OAAO,KAAY,aAAtC,EACA;EAGJ,IAAM,IAAM,EAAK;AAEjB,MAAI,MAAQ,KAAA,KAAa,KAAQ,EAC7B,KAAW,EAA6C;MAGxD;;AAIR,QAAO;;AAYX,SAAS,EAAwB,GAAQ,GAA2B,GAAgB,GAAkB;AAClG,KAAI,KAAS,EAAK,OACd,QAAO;CAEX,IAAM,IAAO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Q,KAA0B,EAEvD,mBAAG,IAAI,SAAiB,CAAC;;AAwB9D,SAAgB,EAAwD,GAAc;AAClF,KAAI,CAAC,KAAU,OAAO,KAAW,SAC7B,QAAO;CAGX,IAAM,IAAsC,EAAE;CAK9C,SAAS,EAAQ,GAAkC,GAAgB;AAC/D,OAAK,IAAM,KAAO,GAAS;AACvB,OAAI,CAAC,OAAO,OAAO,GAAS,EAAI,CAC5B;GAEJ,IAAM,IAAQ,EAAQ,IAChB,IAAS,IAAS,GAAG,EAAO,GAAG,MAAQ;AAE7C,OAAI,KAAS,OAAO,KAAU,YAAY,CAAC,MAAM,QAAQ,EAAM,EAAE;AAO7D,QAAI,EAHY,EAAiB,gBAAgB,UAC1C,OAAO,eAAe,EAAM,KAAK,OAE3B;AACT,OAAW,KAAU;AACrB;;IAIJ,IAAI,IAAmB;AACvB,SAAK,IAAM,KAAU,EACjB,KAAI,OAAO,OAAO,GAAO,EAAO,IAAI,EAAO,WAAW,IAAI,EAAE;AACxD,SAAmB;AACnB;;AAIR,IAAI,IACA,EAAW,KAAU,IAGrB,EAAQ,GAAkC,EAAO;SAIrD,GAAW,KAAU;;;AAOjC,QAFA,EAAQ,GAAQ,GAAG,EAEZ"}
@@ -1,2 +1 @@
1
- export * from './serializer.type.js';
2
- export * from './serializer.util.js';
1
+ export {}
@@ -46,16 +46,16 @@ var e = {
46
46
  }),
47
47
  deserialize: (e) => BigInt(e)
48
48
  }
49
- }, t = {
50
- serialize(t) {
51
- return JSON.stringify(t, function(t, n) {
52
- let r = this[t];
53
- if (r instanceof Date) return e.Date.serialize(r);
54
- for (let t of Object.keys(e)) {
55
- let r = e[t];
56
- if (r.is(n)) return r.serialize(n);
49
+ }, t = Object.entries(e).filter(([e]) => e !== "Date").map(([, e]) => e), n = {
50
+ serialize(n) {
51
+ return JSON.stringify(n, function(n, r) {
52
+ let i = this[n];
53
+ if (i instanceof Date) return e.Date.serialize(i);
54
+ for (let e = 0; e < t.length; e++) {
55
+ let n = t[e];
56
+ if (n.is(r)) return n.serialize(r);
57
57
  }
58
- return n;
58
+ return r;
59
59
  });
60
60
  },
61
61
  deserialize(t) {
@@ -69,6 +69,6 @@ var e = {
69
69
  }
70
70
  };
71
71
  //#endregion
72
- export { t as serializer };
72
+ export { n as serializer };
73
73
 
74
74
  //# sourceMappingURL=serializer.util.js.map