feathers-utils 10.0.0-rc.8 → 10.0.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 (238) hide show
  1. package/dist/guards.mjs +1 -1
  2. package/dist/guards.mjs.map +1 -1
  3. package/dist/hook-context-aHkq1h0N.d.mts +51 -0
  4. package/dist/{traverse.hook-BLSSwn5l.mjs → hooks-DPFxxjBu.mjs} +190 -84
  5. package/dist/hooks-DPFxxjBu.mjs.map +1 -0
  6. package/dist/hooks.d.mts +116 -23
  7. package/dist/hooks.mjs +5 -8
  8. package/dist/{zip-data-result.util-DiwjF6qd.d.mts → index-CNrzxmWo.d.mts} +95 -10
  9. package/dist/index.d.mts +19 -9
  10. package/dist/index.mjs +8 -11
  11. package/dist/index.mjs.map +1 -1
  12. package/dist/{hook-context-Dfdh0e8q.d.mts → infer-service-methods-D7zRVQeJ.d.mts} +4 -33
  13. package/dist/{internal.utils-EIZPRZzm.mjs → internal.utils-BWQ25nOd.mjs} +2 -5
  14. package/dist/internal.utils-BWQ25nOd.mjs.map +1 -0
  15. package/dist/{mutate-result.util-Dpxp56Bo.d.mts → mutate-result.util-BIeYlqqT.d.mts} +6 -14
  16. package/dist/{mutate-result.util-BxXb39DP.mjs → mutate-result.util-CCBWix-G.mjs} +16 -15
  17. package/dist/mutate-result.util-CCBWix-G.mjs.map +1 -0
  18. package/dist/{throw-if.hook-DRNssJBV.mjs → predicates-CT08opkD.mjs} +69 -78
  19. package/dist/predicates-CT08opkD.mjs.map +1 -0
  20. package/dist/predicates.d.mts +18 -42
  21. package/dist/predicates.mjs +2 -4
  22. package/dist/resolve-CA7-EaTw.d.mts +118 -0
  23. package/dist/resolve-Cx9osy8O.mjs +215 -0
  24. package/dist/resolve-Cx9osy8O.mjs.map +1 -0
  25. package/dist/resolvers.d.mts +71 -50
  26. package/dist/resolvers.mjs +95 -112
  27. package/dist/resolvers.mjs.map +1 -1
  28. package/dist/{transform-result.hook-BFqIEHJJ.d.mts → transform-result.hook-BUwLePT2.d.mts} +8 -6
  29. package/dist/{transform-result.hook-DM0S5rkk.mjs → transform-result.hook-CevWK5TA.mjs} +5 -8
  30. package/dist/transform-result.hook-CevWK5TA.mjs.map +1 -0
  31. package/dist/transformers.d.mts +41 -53
  32. package/dist/transformers.mjs +80 -105
  33. package/dist/transformers.mjs.map +1 -1
  34. package/dist/{unless.hook-CWm7A-7q.d.mts → unless.hook-BYWO9hzO.d.mts} +6 -6
  35. package/dist/{zip-data-result.util-BSKwCFF9.mjs → utils-1I_iPZkV.mjs} +74 -42
  36. package/dist/utils-1I_iPZkV.mjs.map +1 -0
  37. package/dist/utils.d.mts +3 -5
  38. package/dist/utils.mjs +4 -6
  39. package/package.json +45 -31
  40. package/src/hooks/cache/cache-utils.ts +7 -0
  41. package/src/hooks/cache/cache.hook.ts +50 -2
  42. package/src/hooks/check-multi/check-multi.hook.ts +10 -12
  43. package/src/hooks/check-required/check-required.hook.ts +5 -6
  44. package/src/hooks/create-related/create-related.hook.ts +5 -1
  45. package/src/hooks/disable-pagination/disable-pagination.hook.ts +5 -1
  46. package/src/hooks/disallow/disallow.hook.ts +1 -1
  47. package/src/hooks/iff/iff.hook.ts +5 -5
  48. package/src/hooks/iff-else/iff-else.hook.ts +20 -9
  49. package/src/hooks/index.ts +7 -1
  50. package/src/hooks/on-delete/on-delete.hook.ts +5 -1
  51. package/src/hooks/params-from-client/params-from-client.hook.ts +1 -0
  52. package/src/hooks/prevent-changes/prevent-changes.hook.ts +3 -3
  53. package/src/hooks/rate-limit/rate-limit.hook.ts +58 -0
  54. package/src/hooks/set-data/set-data.hook.ts +2 -0
  55. package/src/hooks/set-field/set-field.hook.ts +2 -1
  56. package/src/hooks/set-result/set-result.hook.ts +1 -1
  57. package/src/hooks/skippable/skippable.hook.ts +1 -0
  58. package/src/hooks/soft-delete/soft-delete.hook.ts +1 -1
  59. package/src/hooks/stashable/stashable.hook.ts +73 -0
  60. package/src/hooks/transform-data/transform-data.hook.ts +10 -7
  61. package/src/hooks/transform-result/transform-result.hook.ts +16 -9
  62. package/src/internal.utils.ts +5 -0
  63. package/src/predicates/and/and.predicate.ts +57 -0
  64. package/src/predicates/index.ts +2 -2
  65. package/src/predicates/is-context/is-context.predicate.ts +20 -27
  66. package/src/predicates/or/or.predicate.ts +60 -0
  67. package/src/resolvers/from-predicate/from-predicate.ts +30 -0
  68. package/src/resolvers/helpers/defaults/defaults.ts +35 -0
  69. package/src/resolvers/helpers/lowercase/lowercase.ts +29 -0
  70. package/src/resolvers/helpers/omit/omit.ts +29 -0
  71. package/src/resolvers/helpers/set-now/set-now.ts +27 -0
  72. package/src/resolvers/helpers/trim/trim.ts +29 -0
  73. package/src/resolvers/index.ts +14 -1
  74. package/src/resolvers/{hooks → resolve}/resolve.ts +33 -13
  75. package/src/resolvers/resolve-data/resolve-data.ts +56 -0
  76. package/src/resolvers/resolve-query/resolve-query.ts +57 -0
  77. package/src/resolvers/resolve-result/resolve-result.ts +57 -0
  78. package/src/resolvers/resolver-condition.ts +6 -0
  79. package/src/resolvers/resolvers.internal.ts +130 -0
  80. package/src/transformers/defaults/defaults.transformer.ts +32 -0
  81. package/src/transformers/index.ts +1 -0
  82. package/src/transformers/lowercase/lowercase.transformer.ts +17 -20
  83. package/src/transformers/omit/omit.transformer.ts +8 -13
  84. package/src/transformers/parse-date/parse-date.transformer.ts +12 -17
  85. package/src/transformers/pick/pick.transformer.ts +8 -13
  86. package/src/transformers/set-now/set-now.transformer.ts +11 -17
  87. package/src/transformers/trim/trim.transformer.ts +17 -20
  88. package/src/types.ts +23 -0
  89. package/src/utils/check-context/check-context.util.ts +89 -8
  90. package/src/utils/chunk-find/chunk-find.util.ts +3 -1
  91. package/src/utils/index.ts +1 -0
  92. package/src/utils/iterate-find/iterate-find.util.ts +3 -1
  93. package/src/utils/mutate-data/mutate-data.util.ts +5 -6
  94. package/src/utils/mutate-result/mutate-result.util.ts +25 -18
  95. package/src/utils/sort-query-properties/sort-query-properties.util.ts +59 -0
  96. package/dist/internal.utils-BNM-vPgB.d.mts +0 -12
  97. package/dist/internal.utils-EIZPRZzm.mjs.map +0 -1
  98. package/dist/mutate-result.util-BxXb39DP.mjs.map +0 -1
  99. package/dist/throw-if.hook-DRNssJBV.mjs.map +0 -1
  100. package/dist/transform-result.hook-DM0S5rkk.mjs.map +0 -1
  101. package/dist/traverse.hook-BLSSwn5l.mjs.map +0 -1
  102. package/dist/zip-data-result.util-BSKwCFF9.mjs.map +0 -1
  103. package/src/.DS_Store +0 -0
  104. package/src/guards/has-query/has-query.guard.md +0 -5
  105. package/src/hooks/.DS_Store +0 -0
  106. package/src/hooks/cache/cache.hook.md +0 -8
  107. package/src/hooks/cache/cache.hook.test.ts +0 -304
  108. package/src/hooks/check-multi/check-multi.hook.md +0 -9
  109. package/src/hooks/check-multi/check-multi.hook.test.ts +0 -173
  110. package/src/hooks/check-required/check-required.hook.md +0 -8
  111. package/src/hooks/check-required/check-required.hook.test.ts +0 -41
  112. package/src/hooks/create-related/create-related.hook.md +0 -8
  113. package/src/hooks/create-related/create-related.hook.test.ts +0 -405
  114. package/src/hooks/debug/debug.hook.md +0 -8
  115. package/src/hooks/debug/debug.hook.test.ts +0 -25
  116. package/src/hooks/disable-pagination/disable-pagination.hook.md +0 -8
  117. package/src/hooks/disable-pagination/disable-pagination.hook.test.ts +0 -61
  118. package/src/hooks/disallow/disallow.hook.md +0 -9
  119. package/src/hooks/disallow/disallow.hook.test.ts +0 -159
  120. package/src/hooks/iff/iff.hook.md +0 -16
  121. package/src/hooks/iff/iff.hook.test.ts +0 -469
  122. package/src/hooks/iff-else/iff-else.hook.md +0 -16
  123. package/src/hooks/iff-else/iff-else.hook.test.ts +0 -219
  124. package/src/hooks/on-delete/on-delete.hook.md +0 -32
  125. package/src/hooks/on-delete/on-delete.hook.test.ts +0 -917
  126. package/src/hooks/params-for-server/params-for-server.hook.md +0 -9
  127. package/src/hooks/params-for-server/params-for-server.hook.test.ts +0 -68
  128. package/src/hooks/params-from-client/params-from-client.hook.md +0 -9
  129. package/src/hooks/params-from-client/params-from-client.hook.test.ts +0 -54
  130. package/src/hooks/prevent-changes/prevent-changes.hook.md +0 -8
  131. package/src/hooks/prevent-changes/prevent-changes.hook.test.ts +0 -206
  132. package/src/hooks/set-data/set-data.hook.md +0 -8
  133. package/src/hooks/set-data/set-data.hook.test.ts +0 -390
  134. package/src/hooks/set-field/set-field.hook.md +0 -8
  135. package/src/hooks/set-field/set-field.hook.test.ts +0 -94
  136. package/src/hooks/set-result/set-result.hook.md +0 -8
  137. package/src/hooks/set-result/set-result.hook.test.ts +0 -417
  138. package/src/hooks/set-slug/set-slug.hook.md +0 -8
  139. package/src/hooks/set-slug/set-slug.hook.test.ts +0 -57
  140. package/src/hooks/skippable/skippable.hook.md +0 -18
  141. package/src/hooks/skippable/skippable.hook.test.ts +0 -124
  142. package/src/hooks/soft-delete/soft-delete.hook.md +0 -8
  143. package/src/hooks/soft-delete/soft-delete.hook.test.ts +0 -213
  144. package/src/hooks/stash-before/stash-before.hook.md +0 -8
  145. package/src/hooks/stash-before/stash-before.hook.test.ts +0 -124
  146. package/src/hooks/stash-before/stash-before.hook.ts +0 -65
  147. package/src/hooks/throw-if/throw-if.hook.md +0 -9
  148. package/src/hooks/throw-if/throw-if.hook.test.ts +0 -27
  149. package/src/hooks/throw-if-is-multi/throw-if-is-multi.hook.md +0 -9
  150. package/src/hooks/throw-if-is-multi/throw-if-is-multi.hook.test.ts +0 -148
  151. package/src/hooks/throw-if-is-provider/throw-if-is-provider.hook.md +0 -9
  152. package/src/hooks/throw-if-is-provider/throw-if-is-provider.hook.test.ts +0 -39
  153. package/src/hooks/transform-data/transform-data.hook.md +0 -47
  154. package/src/hooks/transform-data/transform-data.hook.test.ts +0 -117
  155. package/src/hooks/transform-query/transform-query.hook.md +0 -18
  156. package/src/hooks/transform-query/transform-query.hook.test.ts +0 -30
  157. package/src/hooks/transform-result/transform-result.hook.md +0 -39
  158. package/src/hooks/transform-result/transform-result.hook.test.ts +0 -254
  159. package/src/hooks/traverse/traverse.hook.md +0 -8
  160. package/src/hooks/traverse/traverse.hook.test.ts +0 -128
  161. package/src/hooks/unless/unless.hook.md +0 -10
  162. package/src/hooks/unless/unless.hook.test.ts +0 -450
  163. package/src/predicates/.DS_Store +0 -0
  164. package/src/predicates/every/every.predicate.md +0 -5
  165. package/src/predicates/every/every.predicate.test.ts +0 -186
  166. package/src/predicates/every/every.predicate.ts +0 -66
  167. package/src/predicates/is-context/is-context.predicate.md +0 -4
  168. package/src/predicates/is-context/is-context.predicate.test.ts +0 -64
  169. package/src/predicates/is-multi/is-multi.predicate.md +0 -4
  170. package/src/predicates/is-multi/is-multi.predicate.test.ts +0 -57
  171. package/src/predicates/is-paginated/is-paginated.predicate.md +0 -5
  172. package/src/predicates/is-paginated/is-paginated.predicate.test.ts +0 -72
  173. package/src/predicates/is-provider/is-provider.predicate.md +0 -4
  174. package/src/predicates/is-provider/is-provider.predicate.test.ts +0 -138
  175. package/src/predicates/not/not.predicate.md +0 -5
  176. package/src/predicates/not/not.predicate.test.ts +0 -124
  177. package/src/predicates/should-skip/should-skip.predicate.md +0 -5
  178. package/src/predicates/should-skip/should-skip.predicate.test.ts +0 -121
  179. package/src/predicates/some/some.predicate.md +0 -5
  180. package/src/predicates/some/some.predicate.test.ts +0 -66
  181. package/src/predicates/some/some.predicate.ts +0 -69
  182. package/src/resolvers/hooks/index.ts +0 -4
  183. package/src/resolvers/hooks/resolve-data.test.ts +0 -129
  184. package/src/resolvers/hooks/resolve-data.ts +0 -34
  185. package/src/resolvers/hooks/resolve-query.ts +0 -34
  186. package/src/resolvers/hooks/resolve-result.test.ts +0 -206
  187. package/src/resolvers/hooks/resolve-result.ts +0 -36
  188. package/src/resolvers/hooks/resolvers.internal.ts +0 -118
  189. package/src/transformers/lowercase/lowercase.transformer.md +0 -4
  190. package/src/transformers/lowercase/lowercase.transformer.test.ts +0 -42
  191. package/src/transformers/omit/omit.transformer.md +0 -4
  192. package/src/transformers/omit/omit.transformer.test.ts +0 -41
  193. package/src/transformers/parse-date/parse-date.transformer.md +0 -4
  194. package/src/transformers/parse-date/parse-date.transformer.test.ts +0 -43
  195. package/src/transformers/pick/pick.transformer.md +0 -4
  196. package/src/transformers/pick/pick.transformer.test.ts +0 -29
  197. package/src/transformers/set-now/set-now.transformer.md +0 -4
  198. package/src/transformers/set-now/set-now.transformer.test.ts +0 -30
  199. package/src/transformers/trim/trim.transformer.md +0 -4
  200. package/src/transformers/trim/trim.transformer.test.ts +0 -42
  201. package/src/utils/.DS_Store +0 -0
  202. package/src/utils/add-skip/add-skip.util.md +0 -5
  203. package/src/utils/add-skip/add-skip.util.test.ts +0 -29
  204. package/src/utils/add-to-query/add-to-query.util.md +0 -4
  205. package/src/utils/add-to-query/add-to-query.util.test.ts +0 -72
  206. package/src/utils/check-context/check-context.util.md +0 -4
  207. package/src/utils/check-context/check-context.util.test.ts +0 -107
  208. package/src/utils/chunk-find/chunk-find.util.md +0 -5
  209. package/src/utils/chunk-find/chunk-find.util.test.ts +0 -118
  210. package/src/utils/combine/combine.util.md +0 -8
  211. package/src/utils/combine/combine.util.test.ts +0 -158
  212. package/src/utils/context-to-json/context-to-json.util.md +0 -4
  213. package/src/utils/define-hooks/define-hooks.util.md +0 -27
  214. package/src/utils/define-hooks/define-hooks.util.test.ts +0 -27
  215. package/src/utils/get-data-is-array/get-data-is-array.util.md +0 -4
  216. package/src/utils/get-data-is-array/get-data-is-array.util.test.ts +0 -63
  217. package/src/utils/get-exposed-methods/get-exposed-methods.util.md +0 -4
  218. package/src/utils/get-exposed-methods/get-exposed-methods.util.test.ts +0 -47
  219. package/src/utils/get-paginate/get-paginate.util.md +0 -4
  220. package/src/utils/get-paginate/get-paginate.util.test.ts +0 -73
  221. package/src/utils/get-result-is-array/get-result-is-array.util.md +0 -4
  222. package/src/utils/get-result-is-array/get-result-is-array.util.test.ts +0 -187
  223. package/src/utils/iterate-find/iterate-find.util.md +0 -5
  224. package/src/utils/iterate-find/iterate-find.util.test.ts +0 -122
  225. package/src/utils/mutate-data/mutate-data.util.md +0 -6
  226. package/src/utils/mutate-result/mutate-result.util.md +0 -6
  227. package/src/utils/mutate-result/mutate-result.util.test.ts +0 -175
  228. package/src/utils/patch-batch/patch-batch.util.md +0 -4
  229. package/src/utils/patch-batch/patch-batch.util.test.ts +0 -41
  230. package/src/utils/skip-result/skip-result.util.md +0 -4
  231. package/src/utils/skip-result/skip-result.util.test.ts +0 -262
  232. package/src/utils/to-paginated/to-paginated.util.md +0 -4
  233. package/src/utils/to-paginated/to-paginated.util.test.ts +0 -27
  234. package/src/utils/transform-params/transform-params.util.md +0 -4
  235. package/src/utils/walk-query/walk-query.util.md +0 -4
  236. package/src/utils/walk-query/walk-query.util.test.ts +0 -141
  237. package/src/utils/zip-data-result/zip-data-result.util.md +0 -4
  238. package/src/utils/zip-data-result/zip-data-result.util.test.ts +0 -180
package/dist/guards.mjs CHANGED
@@ -25,7 +25,7 @@
25
25
  function hasQuery(params) {
26
26
  return !!params.query;
27
27
  }
28
-
29
28
  //#endregion
30
29
  export { hasQuery };
30
+
31
31
  //# sourceMappingURL=guards.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"guards.mjs","names":[],"sources":["../src/guards/has-query/has-query.guard.ts"],"sourcesContent":["import type { Params } from '@feathersjs/feathers'\nimport type { RequiredQuery } from '../../utility-types/required-query.js'\n\n/**\n * Type guard to check if the `query` property of `Params` is present and non-nullable.\n *\n * @param params - The `Params` object to check.\n * @returns `true` if `params.query` is present and non-nullable, otherwise `false`.\n *\n * @see https://utils.feathersjs.com/guards/has-query.html\n *\n * @example\n * ```ts\n * import { hasQuery } from 'feathers-utils/guards'\n *\n * function example(params: Params) {\n * // `params.query` is optional and can be undefined at this point\n * if (!hasQuery(params)) {\n * return;\n * }\n *\n * // TypeScript now knows that params.query is present and non-nullable\n * // You can safely access params.query here without additional checks\n * }\n * ```\n */\nexport function hasQuery<P extends Params>(\n params: P,\n): params is RequiredQuery<P> {\n return !!params.query\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA0BA,SAAgB,SACd,QAC4B;AAC5B,QAAO,CAAC,CAAC,OAAO"}
1
+ {"version":3,"file":"guards.mjs","names":[],"sources":["../src/guards/has-query/has-query.guard.ts"],"sourcesContent":["import type { Params } from '@feathersjs/feathers'\nimport type { RequiredQuery } from '../../utility-types/required-query.js'\n\n/**\n * Type guard to check if the `query` property of `Params` is present and non-nullable.\n *\n * @param params - The `Params` object to check.\n * @returns `true` if `params.query` is present and non-nullable, otherwise `false`.\n *\n * @see https://utils.feathersjs.com/guards/has-query.html\n *\n * @example\n * ```ts\n * import { hasQuery } from 'feathers-utils/guards'\n *\n * function example(params: Params) {\n * // `params.query` is optional and can be undefined at this point\n * if (!hasQuery(params)) {\n * return;\n * }\n *\n * // TypeScript now knows that params.query is present and non-nullable\n * // You can safely access params.query here without additional checks\n * }\n * ```\n */\nexport function hasQuery<P extends Params>(\n params: P,\n): params is RequiredQuery<P> {\n return !!params.query\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA0BA,SAAgB,SACd,QAC4B;CAC5B,OAAO,CAAC,CAAC,OAAO"}
@@ -0,0 +1,51 @@
1
+ import { HookContext, NextFunction, Paginated, Params } from "@feathersjs/feathers";
2
+
3
+ //#region src/internal.utils.d.ts
4
+ type MaybeArray<T> = T | readonly T[];
5
+ type UnpackMaybeArray<T> = T extends readonly (infer E)[] ? E : T;
6
+ type Promisable<T> = T | Promise<T>;
7
+ type KeyOf<T> = Extract<keyof T, string>;
8
+ type UnwrapArray<T> = T extends Array<infer U> ? U : T;
9
+ type IsAny<T> = 0 extends 1 & T ? true : false;
10
+ type AnyFallback<T, Fallback> = IsAny<T> extends true ? Fallback : T;
11
+ type NeverFallback<Never, Fallback> = [Never] extends [never] ? Fallback : Never;
12
+ type KeyOfOrDotNotation<D> = KeyOf<D> | `${KeyOf<D>}.${string}`;
13
+ //#endregion
14
+ //#region src/types.d.ts
15
+ declare const hookTypes: readonly ["around", "before", "after", "error"];
16
+ type HookType$1 = (typeof hookTypes)[number];
17
+ declare const methodNames: readonly ["find", "get", "create", "update", "patch", "remove"];
18
+ type MethodName = (typeof methodNames)[number] | ({} & string);
19
+ type TransportName = 'socketio' | 'rest' | 'external' | 'server';
20
+ type ContextFunctionSync<T, H extends HookContext = HookContext> = (context: H) => T;
21
+ type ContextFunctionAsync<T, H extends HookContext = HookContext> = (context: H) => Promise<T>;
22
+ type ContextFunction<T, H extends HookContext = HookContext> = (context: H) => T | Promise<T>;
23
+ type PredicateContextSync<H extends HookContext = HookContext> = (context: H) => boolean;
24
+ type PredicateContextAsync<H extends HookContext = HookContext> = (context: H) => Promise<boolean>;
25
+ type PredicateFn<H extends HookContext = HookContext> = (context: H) => boolean | Promise<boolean>;
26
+ type PredicateItemWithContext<T = any> = (item: T, context: HookContext) => boolean;
27
+ type TransformerFn<T = Record<string, any>, H extends HookContext = HookContext> = (item: T, options: {
28
+ context: H;
29
+ i: number;
30
+ }) => Promisable<T | undefined | void>;
31
+ type TransformerInputFn<T = Record<string, any>, H extends HookContext = HookContext> = (item: T, options: {
32
+ context: H;
33
+ i: number;
34
+ }) => Promisable<any>;
35
+ type FieldKey<T> = (keyof T & string) | `${Extract<keyof T, string>}.${string}`;
36
+ type StringFieldKey<T> = { [K in keyof T & string]: T[K] extends string | null | undefined ? K : never }[keyof T & string] | `${Extract<keyof T, string>}.${string}`;
37
+ type DefaultsInput<T extends Record<string, any>> = { [K in keyof T & string]?: T[K] | (() => T[K]) } & { [K in `${Extract<keyof T, string>}.${string}`]?: unknown };
38
+ declare type HookFunction<H extends HookContext = HookContext> = (context: H, next?: NextFunction) => Promise<H | void> | H | void;
39
+ type TransformParamsFn<P extends Params = Params> = (params: P) => P | void;
40
+ type DispatchOption = boolean | 'both';
41
+ //#endregion
42
+ //#region src/utility-types/unwrap-paginated.d.ts
43
+ type UnwrapPaginated<R> = R extends Paginated<infer D> ? D : R;
44
+ type UnwrapPaginatedOrArray<T> = T extends Paginated<infer D> ? D : T extends any[] ? T[number] : T;
45
+ //#endregion
46
+ //#region src/utility-types/hook-context.d.ts
47
+ type ResultSingleHookContext<H extends HookContext> = UnwrapPaginatedOrArray<NonNullable<H['result']>>;
48
+ type DataSingleHookContext<H extends HookContext> = UnwrapArray<NonNullable<H['data']>>;
49
+ //#endregion
50
+ export { Promisable as A, hookTypes as C, KeyOfOrDotNotation as D, KeyOf as E, UnwrapArray as M, MaybeArray as O, TransportName as S, AnyFallback as T, PredicateItemWithContext as _, ContextFunction as a, TransformerFn as b, DefaultsInput as c, HookFunction as d, HookType$1 as f, PredicateFn as g, PredicateContextSync as h, UnwrapPaginatedOrArray as i, UnpackMaybeArray as j, NeverFallback as k, DispatchOption as l, PredicateContextAsync as m, ResultSingleHookContext as n, ContextFunctionAsync as o, MethodName as p, UnwrapPaginated as r, ContextFunctionSync as s, DataSingleHookContext as t, FieldKey as u, StringFieldKey as v, methodNames as w, TransformerInputFn as x, TransformParamsFn as y };
51
+ //# sourceMappingURL=hook-context-aHkq1h0N.d.mts.map
@@ -1,20 +1,24 @@
1
- import { f as isMulti, l as isProvider, m as every, t as throwIf } from "./throw-if.hook-DRNssJBV.mjs";
2
- import { a as traverse$1, i as isPromise, r as toArray, t as early } from "./internal.utils-EIZPRZzm.mjs";
3
- import { d as checkContext, f as addToQuery, r as transformParams, u as contextToJson } from "./zip-data-result.util-BSKwCFF9.mjs";
4
- import { i as getDataIsArray, r as getResultIsArray } from "./mutate-result.util-BxXb39DP.mjs";
5
- import { r as transformData } from "./transform-result.hook-DM0S5rkk.mjs";
1
+ import { g as every, p as isMulti, t as throwIf, u as isProvider } from "./predicates-CT08opkD.mjs";
2
+ import { d as checkContext, f as addToQuery, h as sortQueryProperties, r as transformParams, u as contextToJson } from "./utils-1I_iPZkV.mjs";
3
+ import { a as traverse$1, i as isPromise, r as toArray, t as early } from "./internal.utils-BWQ25nOd.mjs";
4
+ import { i as getDataIsArray, r as getResultIsArray } from "./mutate-result.util-CCBWix-G.mjs";
5
+ import { r as transformData } from "./transform-result.hook-CevWK5TA.mjs";
6
+ import "./resolve-Cx9osy8O.mjs";
6
7
  import isObject from "lodash/isObject.js";
7
8
  import { copy } from "fast-copy";
8
- import { BadRequest, Forbidden, MethodNotAllowed } from "@feathersjs/errors";
9
+ import { BadRequest, Forbidden, MethodNotAllowed, TooManyRequests } from "@feathersjs/errors";
9
10
  import _get from "lodash/get.js";
10
11
  import _has from "lodash/has.js";
11
12
  import _omit from "lodash/omit.js";
12
13
  import _set from "lodash/set.js";
13
14
  import _setWith from "lodash/setWith.js";
14
15
  import _clone from "lodash/clone.js";
15
-
16
16
  //#region src/hooks/cache/cache-utils.ts
17
17
  const stableStringify = (obj) => {
18
+ if (obj.query) obj = {
19
+ ...obj,
20
+ query: sortQueryProperties(obj.query)
21
+ };
18
22
  return JSON.stringify(obj, (key, value) => {
19
23
  if (typeof value === "function") throw new Error("Cannot stringify non JSON value");
20
24
  if (isObject(value)) return Object.keys(value).sort().reduce((result, key) => {
@@ -24,7 +28,6 @@ const stableStringify = (obj) => {
24
28
  return value;
25
29
  });
26
30
  };
27
-
28
31
  //#endregion
29
32
  //#region src/hooks/cache/cache.hook.ts
30
33
  /**
@@ -76,13 +79,17 @@ var ContextCacheMap = class {
76
79
  map;
77
80
  delimiter = ":";
78
81
  options;
82
+ log;
83
+ serialize;
79
84
  constructor(options) {
80
85
  this.map = options.map;
81
86
  this.options = options;
87
+ this.log = options.logger;
88
+ this.serialize = options.serialize ?? stableStringify;
82
89
  }
83
90
  stringifyCacheKey(context) {
84
91
  if (context.method !== "get" && context.method !== "find") throw new Error(`Cache can only be used with 'get' or 'find' methods, not '${context.method}'`);
85
- const stringifiedParams = stableStringify(this.options.transformParams(context.params ?? {}));
92
+ const stringifiedParams = this.serialize(this.options.transformParams(context.params ?? {}));
86
93
  return `${context.id ?? "null"}${this.delimiter}${stringifiedParams}`;
87
94
  }
88
95
  getCachedId(key) {
@@ -102,7 +109,19 @@ var ContextCacheMap = class {
102
109
  async get(context) {
103
110
  const key = this.stringifyCacheKey(context);
104
111
  const result = this.map.get(key);
105
- if (result) return copy(result);
112
+ if (result) {
113
+ this.log?.({
114
+ type: "hit",
115
+ method: context.method,
116
+ key
117
+ });
118
+ return copy(result);
119
+ }
120
+ this.log?.({
121
+ type: "miss",
122
+ method: context.method,
123
+ key
124
+ });
106
125
  }
107
126
  /**
108
127
  * Called after get() and find()
@@ -111,6 +130,11 @@ var ContextCacheMap = class {
111
130
  */
112
131
  async set(context) {
113
132
  const key = this.stringifyCacheKey(context);
133
+ this.log?.({
134
+ type: "set",
135
+ method: context.method,
136
+ key
137
+ });
114
138
  return this.map.set(key, copy(context.result));
115
139
  }
116
140
  async clear(context) {
@@ -118,23 +142,38 @@ var ContextCacheMap = class {
118
142
  const promises = [];
119
143
  const itemIds = results.map((item) => this.getId(item, context)).filter(Boolean);
120
144
  if (!itemIds.length) {
145
+ this.log?.({
146
+ type: "clear",
147
+ method: context.method
148
+ });
121
149
  await this.map.clear();
122
150
  return context;
123
151
  }
124
152
  for (const key of this.map.keys()) {
125
153
  const cachedId = this.getCachedId(key);
126
154
  if (cachedId === "null") {
155
+ this.log?.({
156
+ type: "invalidate",
157
+ method: context.method,
158
+ key
159
+ });
127
160
  promises.push(this.map.delete(key));
128
161
  continue;
129
162
  }
130
163
  if (context.method === "create") continue;
131
- for (const itemId of itemIds) if (cachedId === itemId) promises.push(this.map.delete(key));
164
+ for (const itemId of itemIds) if (cachedId === itemId) {
165
+ this.log?.({
166
+ type: "invalidate",
167
+ method: context.method,
168
+ key
169
+ });
170
+ promises.push(this.map.delete(key));
171
+ }
132
172
  }
133
173
  await Promise.all(promises);
134
174
  return context;
135
175
  }
136
176
  };
137
-
138
177
  //#endregion
139
178
  //#region src/hooks/check-multi/check-multi.hook.ts
140
179
  /**
@@ -156,13 +195,13 @@ var ContextCacheMap = class {
156
195
  function checkMulti(options) {
157
196
  return (context, next) => {
158
197
  const { service, method } = context;
159
- if (!service.allowsMulti || !isMulti(context) || method === "find") return context;
160
- if (!service.allowsMulti(method)) throw options?.error ? options.error(context) : new MethodNotAllowed(`Can not ${method} multiple entries`);
161
- if (next) return next();
162
- return context;
198
+ if (!service.allowsMulti || !isMulti(context) || method === "find" || service.allowsMulti(method)) {
199
+ if (next) return next();
200
+ return context;
201
+ }
202
+ throw options?.error ? options.error(context) : new MethodNotAllowed(`Can not ${method} multiple entries`);
163
203
  };
164
204
  }
165
-
166
205
  //#endregion
167
206
  //#region src/hooks/check-required/check-required.hook.ts
168
207
  /**
@@ -184,11 +223,15 @@ function checkMulti(options) {
184
223
  function checkRequired(fieldNames) {
185
224
  const fieldNamesArray = toArray(fieldNames);
186
225
  return (context, next) => {
187
- checkContext(context, ["before", "around"], [
188
- "create",
189
- "update",
190
- "patch"
191
- ], "checkRequired");
226
+ checkContext(context, {
227
+ type: ["before", "around"],
228
+ method: [
229
+ "create",
230
+ "update",
231
+ "patch"
232
+ ],
233
+ label: "checkRequired"
234
+ });
192
235
  const { data } = getDataIsArray(context);
193
236
  for (let i = 0; i < data.length; i++) {
194
237
  const item = data[i];
@@ -202,7 +245,6 @@ function checkRequired(fieldNames) {
202
245
  if (next) return next();
203
246
  };
204
247
  }
205
-
206
248
  //#endregion
207
249
  //#region src/hooks/create-related/create-related.hook.ts
208
250
  /**
@@ -225,7 +267,11 @@ function checkRequired(fieldNames) {
225
267
  */
226
268
  function createRelated(options) {
227
269
  return async (context, next) => {
228
- checkContext(context, ["after", "around"], ["create"], "createRelated");
270
+ checkContext(context, {
271
+ type: ["after", "around"],
272
+ method: ["create"],
273
+ label: "createRelated"
274
+ });
229
275
  if (next) await next();
230
276
  const { result } = getResultIsArray(context);
231
277
  const entries = Array.isArray(options) ? options : [options];
@@ -238,7 +284,6 @@ function createRelated(options) {
238
284
  }));
239
285
  };
240
286
  }
241
-
242
287
  //#endregion
243
288
  //#region src/hooks/debug/debug.hook.ts
244
289
  /**
@@ -274,7 +319,6 @@ const debug = (msg, ...fieldNames) => async (context, next) => {
274
319
  });
275
320
  if (context.error) console.log("error", context.error);
276
321
  };
277
-
278
322
  //#endregion
279
323
  //#region src/hooks/disable-pagination/disable-pagination.hook.ts
280
324
  /**
@@ -295,7 +339,11 @@ const debug = (msg, ...fieldNames) => async (context, next) => {
295
339
  * @see https://utils.feathersjs.com/hooks/disable-pagination.html
296
340
  */
297
341
  const disablePagination = () => (context, next) => {
298
- checkContext(context, ["before", "around"], ["find"], "disablePagination");
342
+ checkContext(context, {
343
+ type: ["before", "around"],
344
+ method: ["find"],
345
+ label: "disablePagination"
346
+ });
299
347
  const $limit = context.params?.query?.$limit;
300
348
  if ($limit === "-1" || $limit === -1) {
301
349
  context.params.paginate = false;
@@ -304,7 +352,6 @@ const disablePagination = () => (context, next) => {
304
352
  if (next) return next();
305
353
  return context;
306
354
  };
307
-
308
355
  //#endregion
309
356
  //#region src/hooks/disallow/disallow.hook.ts
310
357
  /**
@@ -330,17 +377,20 @@ const disallow = (transports) => {
330
377
  const transportsArr = toArray(transports);
331
378
  return (context, next) => {
332
379
  if (!transports) throw new MethodNotAllowed("Method not allowed");
333
- if (isProvider(...transportsArr)(context)) throw new MethodNotAllowed(`Provider '${context.params.provider}' can not call '${context.method}'. (disallow)`);
380
+ if (isProvider(...transportsArr)(context)) throw new MethodNotAllowed(`Provider '${context.params.provider}' can not call '${context.method}' on '${context.path}'. (disallow)`);
334
381
  if (next) return next().then(() => context);
335
382
  };
336
383
  };
337
-
338
384
  //#endregion
339
385
  //#region src/hooks/on-delete/on-delete.hook.ts
340
386
  const onDelete = (options) => {
341
387
  const optionsMulti = Array.isArray(options) ? options : [options];
342
388
  return async (context, next) => {
343
- checkContext(context, ["after", "around"], "remove", "onDelete");
389
+ checkContext(context, {
390
+ type: ["after", "around"],
391
+ method: "remove",
392
+ label: "onDelete"
393
+ });
344
394
  if (next) await next();
345
395
  const { result } = getResultIsArray(context);
346
396
  if (!result.length) return;
@@ -367,11 +417,9 @@ const onDelete = (options) => {
367
417
  if (promises.length) await Promise.all(promises);
368
418
  };
369
419
  };
370
-
371
420
  //#endregion
372
421
  //#region src/hooks/params-for-server/params-for-from-shared.ts
373
422
  const FROM_CLIENT_FOR_SERVER_DEFAULT_KEY = "_$client";
374
-
375
423
  //#endregion
376
424
  //#region src/hooks/params-for-server/params-for-server.hook.ts
377
425
  /**
@@ -413,7 +461,6 @@ const paramsForServer = (whitelist, options) => {
413
461
  return context;
414
462
  };
415
463
  };
416
-
417
464
  //#endregion
418
465
  //#region src/hooks/params-from-client/params-from-client.hook.ts
419
466
  /**
@@ -437,7 +484,10 @@ const paramsFromClient = (whitelist, options) => {
437
484
  const whitelistArr = toArray(whitelist);
438
485
  const { keyToHide = FROM_CLIENT_FOR_SERVER_DEFAULT_KEY } = options || {};
439
486
  return (context, next) => {
440
- if (!context.params?.query?.[keyToHide] || typeof context.params.query[keyToHide] !== "object") return context;
487
+ if (!context.params?.query?.[keyToHide] || typeof context.params.query[keyToHide] !== "object") {
488
+ if (next) return next();
489
+ return context;
490
+ }
441
491
  const params = {
442
492
  ...context.params,
443
493
  query: {
@@ -458,7 +508,6 @@ const paramsFromClient = (whitelist, options) => {
458
508
  return context;
459
509
  };
460
510
  };
461
-
462
511
  //#endregion
463
512
  //#region src/hooks/prevent-changes/prevent-changes.hook.ts
464
513
  /**
@@ -486,11 +535,51 @@ const preventChanges = (fieldNames, options) => {
486
535
  const name = fieldNamesArr[i];
487
536
  if (_has(item, name)) throw typeof options.error === "function" ? options.error(item, name) : new BadRequest(`Field ${String(name)} may not be patched. (preventChanges)`);
488
537
  }
489
- else item = _omit(item, fieldNamesArr);
538
+ else return _omit(item, fieldNamesArr);
490
539
  return item;
491
540
  });
492
541
  };
493
-
542
+ //#endregion
543
+ //#region src/hooks/rate-limit/rate-limit.hook.ts
544
+ /**
545
+ * Rate limits service method calls using `rate-limiter-flexible`.
546
+ * You provide a pre-configured `RateLimiterAbstract` instance
547
+ * (Memory, Redis, Mongo, etc.) and the hook consumes points per request.
548
+ *
549
+ * @example
550
+ * ```ts
551
+ * import { rateLimit } from 'feathers-utils/hooks'
552
+ * import { RateLimiterMemory } from 'rate-limiter-flexible'
553
+ *
554
+ * const rateLimiter = new RateLimiterMemory({ points: 10, duration: 1 })
555
+ *
556
+ * app.service('users').hooks({
557
+ * before: { find: [rateLimit(rateLimiter)] }
558
+ * })
559
+ * ```
560
+ *
561
+ * @see https://utils.feathersjs.com/hooks/rate-limit.html
562
+ */
563
+ const rateLimit = (rateLimiter, options) => {
564
+ const key = options?.key ?? ((context) => context.path);
565
+ const points = options?.points ?? (() => 1);
566
+ return async (context, next) => {
567
+ checkContext(context, {
568
+ type: ["before", "around"],
569
+ label: "rateLimit"
570
+ });
571
+ const resolvedKey = await key(context);
572
+ const resolvedPoints = await points(context);
573
+ try {
574
+ const res = await rateLimiter.consume(resolvedKey, resolvedPoints);
575
+ context.params.rateLimit = res;
576
+ } catch (res) {
577
+ context.params.rateLimit = res;
578
+ throw new TooManyRequests("Too many requests", { rateLimitRes: res });
579
+ }
580
+ if (next) return await next();
581
+ };
582
+ };
494
583
  //#endregion
495
584
  //#region src/hooks/set-data/set-data.hook.ts
496
585
  /**
@@ -515,8 +604,14 @@ function setData(from, to, options) {
515
604
  const { data } = getDataIsArray(context);
516
605
  const contextJson = contextToJson(context);
517
606
  if (!_has(contextJson, from)) {
518
- if (!context.params?.provider || allowUndefined === true) return context;
519
- if (!overwrite && data.every((item) => _has(item, to))) return context;
607
+ if (!context.params?.provider || allowUndefined === true) {
608
+ if (next) return next();
609
+ return context;
610
+ }
611
+ if (!overwrite && data.every((item) => _has(item, to))) {
612
+ if (next) return next();
613
+ return context;
614
+ }
520
615
  throw options?.error ? options.error(context, from) : new Forbidden(`Expected field ${from.toString()} not available`);
521
616
  }
522
617
  const val = _get(contextJson, from);
@@ -529,7 +624,6 @@ function setData(from, to, options) {
529
624
  return context;
530
625
  };
531
626
  }
532
-
533
627
  //#endregion
534
628
  //#region src/hooks/set-field/set-field.hook.ts
535
629
  /**
@@ -550,17 +644,22 @@ function setData(from, to, options) {
550
644
  */
551
645
  const setField = ({ as, from, allowUndefined = false, error }) => (context, next) => {
552
646
  const { params } = context;
553
- checkContext(context, ["before", "around"], null, "setField");
647
+ checkContext(context, {
648
+ type: ["before", "around"],
649
+ label: "setField"
650
+ });
554
651
  const value = _get(context, from);
555
652
  if (value === void 0) {
556
- if (!params.provider || allowUndefined) return context;
653
+ if (!params.provider || allowUndefined) {
654
+ if (next) return next();
655
+ return context;
656
+ }
557
657
  throw error ? error(context, from) : new Forbidden(`Expected field ${as} not available`);
558
658
  }
559
659
  context = _setWith(context, as, value, _clone);
560
660
  if (next) return next();
561
661
  return context;
562
662
  };
563
-
564
663
  //#endregion
565
664
  //#region src/hooks/set-result/set-result.hook.ts
566
665
  /**
@@ -605,11 +704,10 @@ function setResult(from, to, options) {
605
704
  return forResultOrDispatch(context, !!options?.dispatch);
606
705
  };
607
706
  return (context, next) => {
608
- if (next) next().then(() => fn(context));
707
+ if (next) return next().then(() => fn(context));
609
708
  return fn(context);
610
709
  };
611
710
  }
612
-
613
711
  //#endregion
614
712
  //#region src/hooks/set-slug/set-slug.hook.ts
615
713
  /**
@@ -639,7 +737,6 @@ const setSlug = (slug, fieldName) => {
639
737
  return context;
640
738
  };
641
739
  };
642
-
643
740
  //#endregion
644
741
  //#region src/hooks/soft-delete/soft-delete.hook.ts
645
742
  /**
@@ -663,7 +760,10 @@ const setSlug = (slug, fieldName) => {
663
760
  const softDelete = (options) => {
664
761
  if (!options?.deletedQuery || !options?.removeData) throw new Error("You must provide `deletedQuery` and `removeData` options to the softDelete hook.");
665
762
  return async (context, next) => {
666
- checkContext(context, ["before", "around"], null, "softDelete");
763
+ checkContext(context, {
764
+ type: ["before", "around"],
765
+ label: "softDelete"
766
+ });
667
767
  const { disableSoftDeleteKey = "disableSoftDelete" } = options;
668
768
  if (context.params[disableSoftDeleteKey]) return early(context, next);
669
769
  const { deletedQuery, removeData } = options;
@@ -689,52 +789,60 @@ const getValue = (value, ...args) => {
689
789
  if (typeof value === "function") return value(...args);
690
790
  return value;
691
791
  };
692
-
693
792
  //#endregion
694
- //#region src/hooks/stash-before/stash-before.hook.ts
793
+ //#region src/hooks/stashable/stashable.hook.ts
794
+ const defaultStashFunc = (context) => {
795
+ const isMulti = context.id == null;
796
+ const params = {
797
+ ...context.params,
798
+ _stashable: true,
799
+ ...isMulti ? { paginate: false } : {}
800
+ };
801
+ return isMulti ? context.service.find(params) : context.service.get(context.id, params);
802
+ };
695
803
  /**
696
- * Stashes the current value of a record into `params.before` prior to mutation.
697
- * Performs a `get` (single item) or `find` (multi) call to retrieve the existing state.
698
- * Useful in `update`, `patch`, or `remove` hooks when you need the original data for comparison.
804
+ * Stashes the pre-mutation state of a record into `context.params`.
805
+ * Eagerly starts the fetch but exposes a memoized function calling it
806
+ * multiple times only hits the database once.
807
+ * Use in `before` hooks on `update`, `patch`, or `remove` methods.
699
808
  *
700
809
  * @example
701
810
  * ```ts
702
- * import { stashBefore } from 'feathers-utils/hooks'
811
+ * import { stashable } from 'feathers-utils/hooks'
703
812
  *
704
813
  * app.service('users').hooks({
705
- * before: { patch: [stashBefore()] }
814
+ * before: { patch: [stashable()] }
706
815
  * })
707
- * // Access via: context.params.before
816
+ *
817
+ * // In a later hook (before or after):
818
+ * const before = await context.params.stashed()
708
819
  * ```
709
820
  *
710
- * @see https://utils.feathersjs.com/hooks/stash-before.html
821
+ * @see https://utils.feathersjs.com/hooks/stashable.html
711
822
  */
712
- function stashBefore(fieldName) {
713
- const beforeField = fieldName || "before";
714
- return async (context, next) => {
715
- if (context.params.disableStashBefore) return context;
716
- checkContext(context, ["before", "around"], [
717
- "update",
718
- "patch",
719
- "remove"
720
- ], "stashBefore");
721
- const isMulti = context.id == null;
722
- const params = {
723
- ...context.params,
724
- disableStashBefore: true,
725
- ...isMulti ? { paginate: false } : {}
726
- };
727
- await (!isMulti ? context.service.get(context.id, params) : context.service.find(params)).then((result) => {
728
- context.params[beforeField] = result;
729
- return context;
730
- }).catch(() => {
823
+ function stashable(options) {
824
+ const propName = options?.propName ?? "stashed";
825
+ const stashFunc = options?.stashFunc ?? defaultStashFunc;
826
+ return ((context, next) => {
827
+ if (context.params._stashable) {
828
+ if (next) return next();
731
829
  return context;
830
+ }
831
+ checkContext(context, {
832
+ type: ["before", "around"],
833
+ method: [
834
+ "update",
835
+ "patch",
836
+ "remove"
837
+ ],
838
+ label: "stashable"
732
839
  });
733
- if (next) return await next();
840
+ const promise = stashFunc(context).catch(() => void 0);
841
+ context.params[propName] = () => promise;
842
+ if (next) return next();
734
843
  return context;
735
- };
844
+ });
736
845
  }
737
-
738
846
  //#endregion
739
847
  //#region src/hooks/throw-if-is-multi/throw-if-is-multi.hook.ts
740
848
  const defaultError$1 = (context) => new BadRequest(`Cannot perform multi operation on method '${context.method}'`);
@@ -755,7 +863,6 @@ const defaultError$1 = (context) => new BadRequest(`Cannot perform multi operati
755
863
  * @see https://utils.feathersjs.com/hooks/throw-if-is-multi.html
756
864
  */
757
865
  const throwIfIsMulti = (options) => throwIf(every(every(isMulti, (context) => context.method !== "find"), options?.filter), { error: options?.error ?? defaultError$1 });
758
-
759
866
  //#endregion
760
867
  //#region src/hooks/throw-if-is-provider/throw-if-is-provider.hook.ts
761
868
  const defaultError = (context) => new MethodNotAllowed(`Provider '${context.params.provider}' can not call '${context.method}'.`);
@@ -778,7 +885,6 @@ const defaultError = (context) => new MethodNotAllowed(`Provider '${context.para
778
885
  const throwIfIsProvider = (transports, options) => {
779
886
  return throwIf(every(isProvider(...toArray(transports)), options?.filter), { error: options?.error ?? defaultError });
780
887
  };
781
-
782
888
  //#endregion
783
889
  //#region src/hooks/traverse/traverse.hook.ts
784
890
  /**
@@ -804,7 +910,7 @@ const traverse = ({ transformer, getObject }) => (context, next) => {
804
910
  if (next) return next();
805
911
  return context;
806
912
  };
807
-
808
913
  //#endregion
809
- export { createRelated as _, softDelete as a, cache as b, setField as c, paramsFromClient as d, paramsForServer as f, debug as g, disablePagination as h, stashBefore as i, setData as l, disallow as m, throwIfIsProvider as n, setSlug as o, onDelete as p, throwIfIsMulti as r, setResult as s, traverse as t, preventChanges as u, checkRequired as v, checkMulti as y };
810
- //# sourceMappingURL=traverse.hook-BLSSwn5l.mjs.map
914
+ export { debug as _, softDelete as a, checkMulti as b, setField as c, preventChanges as d, paramsFromClient as f, disablePagination as g, disallow as h, stashable as i, setData as l, onDelete as m, throwIfIsProvider as n, setSlug as o, paramsForServer as p, throwIfIsMulti as r, setResult as s, traverse as t, rateLimit as u, createRelated as v, cache as x, checkRequired as y };
915
+
916
+ //# sourceMappingURL=hooks-DPFxxjBu.mjs.map