@autofleet/sadot 1.6.16 → 1.6.18-beta.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 (470) hide show
  1. package/dist/_virtual/_@oxc-project_runtime@0.103.0/helpers/decorate.mjs +10 -0
  2. package/dist/_virtual/_@oxc-project_runtime@0.103.0/helpers/decorateMetadata.mjs +7 -0
  3. package/dist/_virtual/rolldown_runtime.mjs +22 -0
  4. package/dist/index.d.mts +26 -0
  5. package/dist/index.mjs +66 -0
  6. package/dist/node_modules/accepts/index.mjs +175 -0
  7. package/dist/node_modules/array-flatten/array-flatten.mjs +56 -0
  8. package/dist/node_modules/body-parser/index.mjs +135 -0
  9. package/dist/node_modules/body-parser/lib/read.mjs +164 -0
  10. package/dist/node_modules/body-parser/lib/types/json.mjs +200 -0
  11. package/dist/node_modules/body-parser/lib/types/raw.mjs +85 -0
  12. package/dist/node_modules/body-parser/lib/types/text.mjs +101 -0
  13. package/dist/node_modules/body-parser/lib/types/urlencoded.mjs +217 -0
  14. package/dist/node_modules/body-parser/node_modules/qs/lib/formats.mjs +29 -0
  15. package/dist/node_modules/body-parser/node_modules/qs/lib/index.mjs +21 -0
  16. package/dist/node_modules/body-parser/node_modules/qs/lib/parse.mjs +182 -0
  17. package/dist/node_modules/body-parser/node_modules/qs/lib/stringify.mjs +187 -0
  18. package/dist/node_modules/body-parser/node_modules/qs/lib/utils.mjs +173 -0
  19. package/dist/node_modules/bytes/index.mjs +121 -0
  20. package/dist/node_modules/call-bind-apply-helpers/actualApply.mjs +20 -0
  21. package/dist/node_modules/call-bind-apply-helpers/functionApply.mjs +12 -0
  22. package/dist/node_modules/call-bind-apply-helpers/functionCall.mjs +12 -0
  23. package/dist/node_modules/call-bind-apply-helpers/index.mjs +23 -0
  24. package/dist/node_modules/call-bind-apply-helpers/reflectApply.mjs +12 -0
  25. package/dist/node_modules/call-bound/index.mjs +22 -0
  26. package/dist/node_modules/content-disposition/index.mjs +309 -0
  27. package/dist/node_modules/content-type/index.mjs +151 -0
  28. package/dist/node_modules/cookie/index.mjs +245 -0
  29. package/dist/node_modules/cookie-signature/index.mjs +48 -0
  30. package/dist/node_modules/debug/node_modules/has-flag/index.mjs +17 -0
  31. package/dist/node_modules/debug/node_modules/supports-color/index.mjs +70 -0
  32. package/dist/node_modules/debug/src/browser.mjs +203 -0
  33. package/dist/node_modules/debug/src/common.mjs +209 -0
  34. package/dist/node_modules/debug/src/index.mjs +18 -0
  35. package/dist/node_modules/debug/src/node.mjs +215 -0
  36. package/dist/node_modules/depd/index.mjs +316 -0
  37. package/dist/node_modules/destroy/index.mjs +155 -0
  38. package/dist/node_modules/dunder-proto/get.mjs +27 -0
  39. package/dist/node_modules/ee-first/index.mjs +75 -0
  40. package/dist/node_modules/encodeurl/index.mjs +56 -0
  41. package/dist/node_modules/es-define-property/index.mjs +18 -0
  42. package/dist/node_modules/es-errors/eval.mjs +12 -0
  43. package/dist/node_modules/es-errors/index.mjs +12 -0
  44. package/dist/node_modules/es-errors/range.mjs +12 -0
  45. package/dist/node_modules/es-errors/ref.mjs +12 -0
  46. package/dist/node_modules/es-errors/syntax.mjs +12 -0
  47. package/dist/node_modules/es-errors/type.mjs +12 -0
  48. package/dist/node_modules/es-errors/uri.mjs +12 -0
  49. package/dist/node_modules/es-object-atoms/index.mjs +12 -0
  50. package/dist/node_modules/escape-html/index.mjs +67 -0
  51. package/dist/node_modules/etag/index.mjs +82 -0
  52. package/dist/node_modules/express/index.mjs +19 -0
  53. package/dist/node_modules/express/lib/application.mjs +503 -0
  54. package/dist/node_modules/express/lib/express.mjs +114 -0
  55. package/dist/node_modules/express/lib/middleware/init.mjs +44 -0
  56. package/dist/node_modules/express/lib/middleware/query.mjs +47 -0
  57. package/dist/node_modules/express/lib/request.mjs +422 -0
  58. package/dist/node_modules/express/lib/response.mjs +867 -0
  59. package/dist/node_modules/express/lib/router/index.mjs +424 -0
  60. package/dist/node_modules/express/lib/router/layer.mjs +140 -0
  61. package/dist/node_modules/express/lib/router/route.mjs +158 -0
  62. package/dist/node_modules/express/lib/utils.mjs +247 -0
  63. package/dist/node_modules/express/lib/view.mjs +135 -0
  64. package/dist/node_modules/express/node_modules/qs/lib/formats.mjs +29 -0
  65. package/dist/node_modules/express/node_modules/qs/lib/index.mjs +21 -0
  66. package/dist/node_modules/express/node_modules/qs/lib/parse.mjs +182 -0
  67. package/dist/node_modules/express/node_modules/qs/lib/stringify.mjs +187 -0
  68. package/dist/node_modules/express/node_modules/qs/lib/utils.mjs +173 -0
  69. package/dist/node_modules/finalhandler/index.mjs +234 -0
  70. package/dist/node_modules/forwarded/index.mjs +67 -0
  71. package/dist/node_modules/fresh/index.mjs +96 -0
  72. package/dist/node_modules/function-bind/implementation.mjs +58 -0
  73. package/dist/node_modules/function-bind/index.mjs +13 -0
  74. package/dist/node_modules/get-intrinsic/index.mjs +357 -0
  75. package/dist/node_modules/get-proto/Object.getPrototypeOf.mjs +14 -0
  76. package/dist/node_modules/get-proto/Reflect.getPrototypeOf.mjs +12 -0
  77. package/dist/node_modules/get-proto/index.mjs +25 -0
  78. package/dist/node_modules/gopd/gOPD.mjs +12 -0
  79. package/dist/node_modules/gopd/index.mjs +19 -0
  80. package/dist/node_modules/has-symbols/index.mjs +21 -0
  81. package/dist/node_modules/has-symbols/shams.mjs +35 -0
  82. package/dist/node_modules/hasown/index.mjs +16 -0
  83. package/dist/node_modules/http-errors/index.mjs +207 -0
  84. package/dist/node_modules/iconv-lite/encodings/dbcs-codec.mjs +321 -0
  85. package/dist/node_modules/iconv-lite/encodings/dbcs-data.mjs +126 -0
  86. package/dist/node_modules/iconv-lite/encodings/index.mjs +32 -0
  87. package/dist/node_modules/iconv-lite/encodings/internal.mjs +135 -0
  88. package/dist/node_modules/iconv-lite/encodings/sbcs-codec.mjs +53 -0
  89. package/dist/node_modules/iconv-lite/encodings/sbcs-data-generated.mjs +458 -0
  90. package/dist/node_modules/iconv-lite/encodings/sbcs-data.mjs +150 -0
  91. package/dist/node_modules/iconv-lite/encodings/tables/big5-added.mjs +172 -0
  92. package/dist/node_modules/iconv-lite/encodings/tables/cp936.mjs +2587 -0
  93. package/dist/node_modules/iconv-lite/encodings/tables/cp949.mjs +2223 -0
  94. package/dist/node_modules/iconv-lite/encodings/tables/cp950.mjs +230 -0
  95. package/dist/node_modules/iconv-lite/encodings/tables/eucjp.mjs +428 -0
  96. package/dist/node_modules/iconv-lite/encodings/tables/gb18030-ranges.mjs +430 -0
  97. package/dist/node_modules/iconv-lite/encodings/tables/gbk-added.mjs +232 -0
  98. package/dist/node_modules/iconv-lite/encodings/tables/shiftjis.mjs +295 -0
  99. package/dist/node_modules/iconv-lite/encodings/utf16.mjs +107 -0
  100. package/dist/node_modules/iconv-lite/encodings/utf7.mjs +183 -0
  101. package/dist/node_modules/iconv-lite/lib/bom-handling.mjs +45 -0
  102. package/dist/node_modules/iconv-lite/lib/extend-node.mjs +150 -0
  103. package/dist/node_modules/iconv-lite/lib/index.mjs +96 -0
  104. package/dist/node_modules/iconv-lite/lib/streams.mjs +97 -0
  105. package/dist/node_modules/inherits/inherits.mjs +20 -0
  106. package/dist/node_modules/inherits/inherits_browser.mjs +30 -0
  107. package/dist/node_modules/ipaddr.js/lib/ipaddr.mjs +677 -0
  108. package/dist/node_modules/math-intrinsics/abs.mjs +12 -0
  109. package/dist/node_modules/math-intrinsics/floor.mjs +12 -0
  110. package/dist/node_modules/math-intrinsics/isNaN.mjs +14 -0
  111. package/dist/node_modules/math-intrinsics/max.mjs +12 -0
  112. package/dist/node_modules/math-intrinsics/min.mjs +12 -0
  113. package/dist/node_modules/math-intrinsics/pow.mjs +12 -0
  114. package/dist/node_modules/math-intrinsics/round.mjs +12 -0
  115. package/dist/node_modules/math-intrinsics/sign.mjs +17 -0
  116. package/dist/node_modules/merge-descriptors/index.mjs +46 -0
  117. package/dist/node_modules/methods/index.mjs +69 -0
  118. package/dist/node_modules/mime/mime.mjs +79 -0
  119. package/dist/node_modules/mime/types.mjs +1104 -0
  120. package/dist/node_modules/mime-types/index.mjs +123 -0
  121. package/dist/node_modules/mime-types/node_modules/mime-db/db.mjs +7051 -0
  122. package/dist/node_modules/mime-types/node_modules/mime-db/index.mjs +21 -0
  123. package/dist/node_modules/ms/index.mjs +124 -0
  124. package/dist/node_modules/negotiator/index.mjs +76 -0
  125. package/dist/node_modules/negotiator/lib/charset.mjs +132 -0
  126. package/dist/node_modules/negotiator/lib/encoding.mjs +143 -0
  127. package/dist/node_modules/negotiator/lib/language.mjs +138 -0
  128. package/dist/node_modules/negotiator/lib/mediaType.mjs +200 -0
  129. package/dist/node_modules/object-inspect/index.mjs +389 -0
  130. package/dist/node_modules/object-inspect/util.inspect.mjs +11 -0
  131. package/dist/node_modules/on-finished/index.mjs +178 -0
  132. package/dist/node_modules/parseurl/index.mjs +111 -0
  133. package/dist/node_modules/path-to-regexp/index.mjs +118 -0
  134. package/dist/node_modules/proxy-addr/index.mjs +212 -0
  135. package/dist/node_modules/range-parser/index.mjs +110 -0
  136. package/dist/node_modules/raw-body/index.mjs +209 -0
  137. package/dist/node_modules/safe-buffer/index.mjs +46 -0
  138. package/dist/node_modules/safer-buffer/safer.mjs +48 -0
  139. package/dist/node_modules/send/index.mjs +801 -0
  140. package/dist/node_modules/send/node_modules/encodeurl/index.mjs +56 -0
  141. package/dist/node_modules/serve-static/index.mjs +134 -0
  142. package/dist/node_modules/setprototypeof/index.mjs +19 -0
  143. package/dist/node_modules/side-channel/index.mjs +45 -0
  144. package/dist/node_modules/side-channel-list/index.mjs +84 -0
  145. package/dist/node_modules/side-channel-map/index.mjs +62 -0
  146. package/dist/node_modules/side-channel-weakmap/index.mjs +73 -0
  147. package/dist/node_modules/statuses/codes.mjs +75 -0
  148. package/dist/node_modules/statuses/index.mjs +108 -0
  149. package/dist/node_modules/toidentifier/index.mjs +32 -0
  150. package/dist/node_modules/type-is/index.mjs +179 -0
  151. package/dist/node_modules/type-is/node_modules/media-typer/index.mjs +186 -0
  152. package/dist/node_modules/unpipe/index.mjs +50 -0
  153. package/dist/node_modules/utils-merge/index.mjs +28 -0
  154. package/dist/node_modules/vary/index.mjs +95 -0
  155. package/dist/packages/sadot/src/api/index.mjs +11 -0
  156. package/dist/packages/sadot/src/api/v1/definition/index.mjs +112 -0
  157. package/dist/packages/sadot/src/api/v1/definition/validations.mjs +125 -0
  158. package/dist/packages/sadot/src/api/v1/errors.mjs +13 -0
  159. package/dist/packages/sadot/src/api/v1/index.mjs +15 -0
  160. package/dist/packages/sadot/src/api/v1/templates/index.mjs +76 -0
  161. package/dist/packages/sadot/src/api/v1/validator/index.mjs +114 -0
  162. package/dist/{api/v1/validator/validations.d.ts → packages/sadot/src/api/v1/validator/validations.d.mts} +1 -2
  163. package/dist/packages/sadot/src/api/v1/validator/validations.mjs +38 -0
  164. package/dist/packages/sadot/src/errors/index.mjs +55 -0
  165. package/dist/packages/sadot/src/events/index.mjs +50 -0
  166. package/dist/packages/sadot/src/hooks/enrich.mjs +175 -0
  167. package/dist/packages/sadot/src/hooks/find.mjs +22 -0
  168. package/dist/packages/sadot/src/hooks/hooks.mjs +302 -0
  169. package/dist/packages/sadot/src/hooks/index.mjs +5 -0
  170. package/dist/packages/sadot/src/hooks/utils/updateInstanceValues.mjs +27 -0
  171. package/dist/{init-state.d.ts → packages/sadot/src/init-state.d.mts} +1 -2
  172. package/dist/packages/sadot/src/init-state.mjs +55 -0
  173. package/dist/packages/sadot/src/mat-path-state.mjs +9 -0
  174. package/dist/{migrations/001-create-core-tables.js → packages/sadot/src/migrations/001-create-core-tables.mjs} +23 -7
  175. package/dist/{migrations/002-create-custom-field-entries.cjs → packages/sadot/src/migrations/002-create-custom-field-entries.mjs} +14 -4
  176. package/dist/{migrations/003-create-custom-field-model-type-map.js → packages/sadot/src/migrations/003-create-custom-field-model-type-map.mjs} +18 -6
  177. package/dist/packages/sadot/src/migrations/004-create-field-policy-tables.mjs +27 -0
  178. package/dist/packages/sadot/src/migrations/index.mjs +89 -0
  179. package/dist/{models/CustomFieldDefinition.d.ts → packages/sadot/src/models/CustomFieldDefinition.d.mts} +4 -5
  180. package/dist/packages/sadot/src/models/CustomFieldDefinition.mjs +146 -0
  181. package/dist/{models/CustomFieldEntries.d.ts → packages/sadot/src/models/CustomFieldEntries.d.mts} +1 -2
  182. package/dist/packages/sadot/src/models/CustomFieldEntries.mjs +70 -0
  183. package/dist/{models/CustomFieldModelTypeMap.d.cts → packages/sadot/src/models/CustomFieldModelTypeMap.d.mts} +2 -3
  184. package/dist/packages/sadot/src/models/CustomFieldModelTypeMap.mjs +61 -0
  185. package/dist/{models/CustomFieldValue.d.cts → packages/sadot/src/models/CustomFieldValue.d.mts} +3 -4
  186. package/dist/packages/sadot/src/models/CustomFieldValue.mjs +108 -0
  187. package/dist/{models/CustomValidator.d.cts → packages/sadot/src/models/CustomValidator.d.mts} +3 -4
  188. package/dist/packages/sadot/src/models/CustomValidator.mjs +67 -0
  189. package/dist/packages/sadot/src/models/FieldPolicy.d.mts +23 -0
  190. package/dist/packages/sadot/src/models/FieldPolicy.mjs +49 -0
  191. package/dist/packages/sadot/src/models/index.d.mts +7 -0
  192. package/dist/packages/sadot/src/models/index.mjs +161 -0
  193. package/dist/packages/sadot/src/models/tests/AssociatedTestModel.mjs +50 -0
  194. package/dist/packages/sadot/src/models/tests/TestModel.mjs +42 -0
  195. package/dist/packages/sadot/src/models/tests/contextAwareModels/ContextAwareTestModel.mjs +34 -0
  196. package/dist/packages/sadot/src/models/tests/contextAwareModels/ContextTestModel.mjs +32 -0
  197. package/dist/packages/sadot/src/repository/definition.mjs +212 -0
  198. package/dist/packages/sadot/src/repository/entries.mjs +67 -0
  199. package/dist/packages/sadot/src/repository/field-policy.d.mts +29 -0
  200. package/dist/packages/sadot/src/repository/field-policy.mjs +33 -0
  201. package/dist/packages/sadot/src/repository/utils/formatValues.mjs +14 -0
  202. package/dist/packages/sadot/src/repository/validator.mjs +54 -0
  203. package/dist/packages/sadot/src/repository/value.mjs +76 -0
  204. package/dist/{scopes/filter.d.ts → packages/sadot/src/scopes/filter.d.mts} +3 -4
  205. package/dist/packages/sadot/src/scopes/filter.mjs +54 -0
  206. package/dist/{scopes/helpers/filter.helpers.d.ts → packages/sadot/src/scopes/helpers/filter.helpers.d.mts} +1 -2
  207. package/dist/packages/sadot/src/scopes/helpers/filter.helpers.mjs +147 -0
  208. package/dist/packages/sadot/src/scopes/index.mjs +3 -0
  209. package/dist/{types/index.d.cts → packages/sadot/src/types/index.d.mts} +6 -5
  210. package/dist/{utils/constants/index.d.ts → packages/sadot/src/utils/constants/index.d.mts} +1 -2
  211. package/dist/packages/sadot/src/utils/constants/index.mjs +29 -0
  212. package/dist/packages/sadot/src/utils/db/index.mjs +14 -0
  213. package/dist/{utils/helpers/index.d.cts → packages/sadot/src/utils/helpers/index.d.mts} +3 -4
  214. package/dist/packages/sadot/src/utils/helpers/index.mjs +21 -0
  215. package/dist/packages/sadot/src/utils/init.mjs +111 -0
  216. package/dist/packages/sadot/src/utils/logger/index.mjs +12 -0
  217. package/dist/packages/sadot/src/utils/scopeAttributes.mjs +11 -0
  218. package/dist/packages/sadot/src/utils/validations/index.mjs +32 -0
  219. package/dist/{utils/validations/schema/custom-fields.d.ts → packages/sadot/src/utils/validations/schema/custom-fields.d.mts} +1 -2
  220. package/dist/packages/sadot/src/utils/validations/schema/custom-fields.mjs +7 -0
  221. package/dist/packages/sadot/src/utils/validations/schema/validator-schema.mjs +99 -0
  222. package/dist/packages/sadot/src/utils/validations/validators/index.mjs +42 -0
  223. package/dist/packages/sadot/src/utils/validations/validators/multi-select-dropdown.validator.mjs +7 -0
  224. package/dist/packages/sadot/src/utils/validations/validators/multi-select-status.validator.mjs +10 -0
  225. package/dist/packages/sadot/src/utils/validations/validators/multi-select.helpers.mjs +10 -0
  226. package/dist/packages/sadot/src/utils/validations/validators/select.validator.mjs +10 -0
  227. package/dist/packages/sadot/src/utils/validations/validators/status.validator.mjs +10 -0
  228. package/dist/packages/zehut/src/check-permission.d.mts +6 -0
  229. package/dist/packages/zehut/src/errors.d.mts +1 -0
  230. package/dist/packages/zehut/src/index.d.mts +6 -0
  231. package/dist/packages/zehut/src/permissions/SDK/evaluatePermissions.d.mts +1 -0
  232. package/dist/packages/zehut/src/permissions/SDK/types.d.mts +1 -0
  233. package/dist/packages/zehut/src/permissions/index.d.mts +2 -0
  234. package/dist/packages/zehut/src/permissions/middleware/requirePermissions.d.mts +1 -0
  235. package/dist/packages/zehut/src/user/ApiUser.d.mts +59 -0
  236. package/dist/packages/zehut/src/user/fastify.d.mts +8 -0
  237. package/dist/packages/zehut/src/user/index.d.mts +9 -0
  238. package/package.json +3 -3
  239. package/dist/_virtual/_@oxc-project_runtime@0.103.0/helpers/decorate.cjs +0 -1
  240. package/dist/_virtual/_@oxc-project_runtime@0.103.0/helpers/decorate.js +0 -1
  241. package/dist/_virtual/_@oxc-project_runtime@0.103.0/helpers/decorateMetadata.cjs +0 -1
  242. package/dist/_virtual/_@oxc-project_runtime@0.103.0/helpers/decorateMetadata.js +0 -1
  243. package/dist/_virtual/rolldown_runtime.cjs +0 -1
  244. package/dist/_virtual/rolldown_runtime.js +0 -1
  245. package/dist/api/index.cjs +0 -2
  246. package/dist/api/index.cjs.map +0 -1
  247. package/dist/api/index.js +0 -2
  248. package/dist/api/index.js.map +0 -1
  249. package/dist/api/v1/definition/index.cjs +0 -2
  250. package/dist/api/v1/definition/index.cjs.map +0 -1
  251. package/dist/api/v1/definition/index.js +0 -2
  252. package/dist/api/v1/definition/index.js.map +0 -1
  253. package/dist/api/v1/definition/validations.cjs +0 -2
  254. package/dist/api/v1/definition/validations.cjs.map +0 -1
  255. package/dist/api/v1/definition/validations.js +0 -2
  256. package/dist/api/v1/definition/validations.js.map +0 -1
  257. package/dist/api/v1/errors.cjs +0 -2
  258. package/dist/api/v1/errors.cjs.map +0 -1
  259. package/dist/api/v1/errors.js +0 -2
  260. package/dist/api/v1/errors.js.map +0 -1
  261. package/dist/api/v1/index.cjs +0 -2
  262. package/dist/api/v1/index.cjs.map +0 -1
  263. package/dist/api/v1/index.js +0 -2
  264. package/dist/api/v1/index.js.map +0 -1
  265. package/dist/api/v1/validator/index.cjs +0 -2
  266. package/dist/api/v1/validator/index.cjs.map +0 -1
  267. package/dist/api/v1/validator/index.js +0 -2
  268. package/dist/api/v1/validator/index.js.map +0 -1
  269. package/dist/api/v1/validator/validations.cjs +0 -2
  270. package/dist/api/v1/validator/validations.cjs.map +0 -1
  271. package/dist/api/v1/validator/validations.d.cts +0 -23
  272. package/dist/api/v1/validator/validations.js +0 -2
  273. package/dist/api/v1/validator/validations.js.map +0 -1
  274. package/dist/errors/index.cjs +0 -3
  275. package/dist/errors/index.cjs.map +0 -1
  276. package/dist/errors/index.js +0 -3
  277. package/dist/errors/index.js.map +0 -1
  278. package/dist/events/index.cjs +0 -2
  279. package/dist/events/index.cjs.map +0 -1
  280. package/dist/events/index.js +0 -2
  281. package/dist/events/index.js.map +0 -1
  282. package/dist/hooks/enrich.cjs +0 -2
  283. package/dist/hooks/enrich.cjs.map +0 -1
  284. package/dist/hooks/enrich.js +0 -2
  285. package/dist/hooks/enrich.js.map +0 -1
  286. package/dist/hooks/find.cjs +0 -2
  287. package/dist/hooks/find.cjs.map +0 -1
  288. package/dist/hooks/find.js +0 -2
  289. package/dist/hooks/find.js.map +0 -1
  290. package/dist/hooks/hooks.cjs +0 -2
  291. package/dist/hooks/hooks.cjs.map +0 -1
  292. package/dist/hooks/hooks.js +0 -2
  293. package/dist/hooks/hooks.js.map +0 -1
  294. package/dist/hooks/index.cjs +0 -1
  295. package/dist/hooks/index.js +0 -1
  296. package/dist/hooks/utils/updateInstanceValues.cjs +0 -2
  297. package/dist/hooks/utils/updateInstanceValues.cjs.map +0 -1
  298. package/dist/hooks/utils/updateInstanceValues.js +0 -2
  299. package/dist/hooks/utils/updateInstanceValues.js.map +0 -1
  300. package/dist/index.cjs +0 -2
  301. package/dist/index.cjs.map +0 -1
  302. package/dist/index.d.cts +0 -25
  303. package/dist/index.d.ts +0 -25
  304. package/dist/index.js +0 -2
  305. package/dist/index.js.map +0 -1
  306. package/dist/init-state.cjs +0 -2
  307. package/dist/init-state.cjs.map +0 -1
  308. package/dist/init-state.d.cts +0 -36
  309. package/dist/init-state.js +0 -2
  310. package/dist/init-state.js.map +0 -1
  311. package/dist/mat-path-state.cjs +0 -2
  312. package/dist/mat-path-state.cjs.map +0 -1
  313. package/dist/mat-path-state.js +0 -2
  314. package/dist/mat-path-state.js.map +0 -1
  315. package/dist/migrations/001-create-core-tables.cjs +0 -52
  316. package/dist/migrations/001-create-core-tables.cjs.map +0 -1
  317. package/dist/migrations/001-create-core-tables.js.map +0 -1
  318. package/dist/migrations/002-create-custom-field-entries.cjs.map +0 -1
  319. package/dist/migrations/002-create-custom-field-entries.js +0 -15
  320. package/dist/migrations/002-create-custom-field-entries.js.map +0 -1
  321. package/dist/migrations/003-create-custom-field-model-type-map.cjs +0 -21
  322. package/dist/migrations/003-create-custom-field-model-type-map.cjs.map +0 -1
  323. package/dist/migrations/003-create-custom-field-model-type-map.js.map +0 -1
  324. package/dist/migrations/index.cjs +0 -2
  325. package/dist/migrations/index.cjs.map +0 -1
  326. package/dist/migrations/index.js +0 -2
  327. package/dist/migrations/index.js.map +0 -1
  328. package/dist/models/CustomFieldDefinition.cjs +0 -2
  329. package/dist/models/CustomFieldDefinition.cjs.map +0 -1
  330. package/dist/models/CustomFieldDefinition.d.cts +0 -41
  331. package/dist/models/CustomFieldDefinition.js +0 -2
  332. package/dist/models/CustomFieldDefinition.js.map +0 -1
  333. package/dist/models/CustomFieldEntries.cjs +0 -2
  334. package/dist/models/CustomFieldEntries.cjs.map +0 -1
  335. package/dist/models/CustomFieldEntries.d.cts +0 -16
  336. package/dist/models/CustomFieldEntries.js +0 -2
  337. package/dist/models/CustomFieldEntries.js.map +0 -1
  338. package/dist/models/CustomFieldModelTypeMap.cjs +0 -2
  339. package/dist/models/CustomFieldModelTypeMap.cjs.map +0 -1
  340. package/dist/models/CustomFieldModelTypeMap.d.ts +0 -15
  341. package/dist/models/CustomFieldModelTypeMap.js +0 -2
  342. package/dist/models/CustomFieldModelTypeMap.js.map +0 -1
  343. package/dist/models/CustomFieldValue.cjs +0 -2
  344. package/dist/models/CustomFieldValue.cjs.map +0 -1
  345. package/dist/models/CustomFieldValue.d.ts +0 -21
  346. package/dist/models/CustomFieldValue.js +0 -2
  347. package/dist/models/CustomFieldValue.js.map +0 -1
  348. package/dist/models/CustomValidator.cjs +0 -2
  349. package/dist/models/CustomValidator.cjs.map +0 -1
  350. package/dist/models/CustomValidator.d.ts +0 -19
  351. package/dist/models/CustomValidator.js +0 -2
  352. package/dist/models/CustomValidator.js.map +0 -1
  353. package/dist/models/index.cjs +0 -2
  354. package/dist/models/index.cjs.map +0 -1
  355. package/dist/models/index.d.cts +0 -7
  356. package/dist/models/index.d.ts +0 -7
  357. package/dist/models/index.js +0 -2
  358. package/dist/models/index.js.map +0 -1
  359. package/dist/models/tests/AssociatedTestModel.cjs +0 -2
  360. package/dist/models/tests/AssociatedTestModel.cjs.map +0 -1
  361. package/dist/models/tests/AssociatedTestModel.js +0 -2
  362. package/dist/models/tests/AssociatedTestModel.js.map +0 -1
  363. package/dist/models/tests/TestModel.cjs +0 -2
  364. package/dist/models/tests/TestModel.cjs.map +0 -1
  365. package/dist/models/tests/TestModel.js +0 -2
  366. package/dist/models/tests/TestModel.js.map +0 -1
  367. package/dist/models/tests/contextAwareModels/ContextAwareTestModel.cjs +0 -2
  368. package/dist/models/tests/contextAwareModels/ContextAwareTestModel.cjs.map +0 -1
  369. package/dist/models/tests/contextAwareModels/ContextAwareTestModel.js +0 -2
  370. package/dist/models/tests/contextAwareModels/ContextAwareTestModel.js.map +0 -1
  371. package/dist/models/tests/contextAwareModels/ContextTestModel.cjs +0 -2
  372. package/dist/models/tests/contextAwareModels/ContextTestModel.cjs.map +0 -1
  373. package/dist/models/tests/contextAwareModels/ContextTestModel.js +0 -2
  374. package/dist/models/tests/contextAwareModels/ContextTestModel.js.map +0 -1
  375. package/dist/repository/definition.cjs +0 -2
  376. package/dist/repository/definition.cjs.map +0 -1
  377. package/dist/repository/definition.js +0 -2
  378. package/dist/repository/definition.js.map +0 -1
  379. package/dist/repository/entries.cjs +0 -2
  380. package/dist/repository/entries.cjs.map +0 -1
  381. package/dist/repository/entries.js +0 -2
  382. package/dist/repository/entries.js.map +0 -1
  383. package/dist/repository/utils/formatValues.cjs +0 -2
  384. package/dist/repository/utils/formatValues.cjs.map +0 -1
  385. package/dist/repository/utils/formatValues.js +0 -2
  386. package/dist/repository/utils/formatValues.js.map +0 -1
  387. package/dist/repository/validator.cjs +0 -2
  388. package/dist/repository/validator.cjs.map +0 -1
  389. package/dist/repository/validator.js +0 -2
  390. package/dist/repository/validator.js.map +0 -1
  391. package/dist/repository/value.cjs +0 -2
  392. package/dist/repository/value.cjs.map +0 -1
  393. package/dist/repository/value.js +0 -2
  394. package/dist/repository/value.js.map +0 -1
  395. package/dist/scopes/filter.cjs +0 -2
  396. package/dist/scopes/filter.cjs.map +0 -1
  397. package/dist/scopes/filter.d.cts +0 -23
  398. package/dist/scopes/filter.js +0 -2
  399. package/dist/scopes/filter.js.map +0 -1
  400. package/dist/scopes/helpers/filter.helpers.cjs +0 -46
  401. package/dist/scopes/helpers/filter.helpers.cjs.map +0 -1
  402. package/dist/scopes/helpers/filter.helpers.d.cts +0 -17
  403. package/dist/scopes/helpers/filter.helpers.js +0 -46
  404. package/dist/scopes/helpers/filter.helpers.js.map +0 -1
  405. package/dist/scopes/index.cjs +0 -1
  406. package/dist/scopes/index.js +0 -1
  407. package/dist/types/index.d.ts +0 -72
  408. package/dist/utils/constants/index.cjs +0 -2
  409. package/dist/utils/constants/index.cjs.map +0 -1
  410. package/dist/utils/constants/index.d.cts +0 -24
  411. package/dist/utils/constants/index.js +0 -2
  412. package/dist/utils/constants/index.js.map +0 -1
  413. package/dist/utils/db/index.cjs +0 -2
  414. package/dist/utils/db/index.cjs.map +0 -1
  415. package/dist/utils/db/index.js +0 -2
  416. package/dist/utils/db/index.js.map +0 -1
  417. package/dist/utils/helpers/index.cjs +0 -2
  418. package/dist/utils/helpers/index.cjs.map +0 -1
  419. package/dist/utils/helpers/index.d.ts +0 -31
  420. package/dist/utils/helpers/index.js +0 -2
  421. package/dist/utils/helpers/index.js.map +0 -1
  422. package/dist/utils/init.cjs +0 -2
  423. package/dist/utils/init.cjs.map +0 -1
  424. package/dist/utils/init.js +0 -2
  425. package/dist/utils/init.js.map +0 -1
  426. package/dist/utils/logger/index.cjs +0 -2
  427. package/dist/utils/logger/index.cjs.map +0 -1
  428. package/dist/utils/logger/index.js +0 -2
  429. package/dist/utils/logger/index.js.map +0 -1
  430. package/dist/utils/scopeAttributes.cjs +0 -2
  431. package/dist/utils/scopeAttributes.cjs.map +0 -1
  432. package/dist/utils/scopeAttributes.js +0 -2
  433. package/dist/utils/scopeAttributes.js.map +0 -1
  434. package/dist/utils/validations/index.cjs +0 -2
  435. package/dist/utils/validations/index.cjs.map +0 -1
  436. package/dist/utils/validations/index.js +0 -2
  437. package/dist/utils/validations/index.js.map +0 -1
  438. package/dist/utils/validations/schema/custom-fields.cjs +0 -2
  439. package/dist/utils/validations/schema/custom-fields.cjs.map +0 -1
  440. package/dist/utils/validations/schema/custom-fields.d.cts +0 -7
  441. package/dist/utils/validations/schema/custom-fields.js +0 -2
  442. package/dist/utils/validations/schema/custom-fields.js.map +0 -1
  443. package/dist/utils/validations/schema/validator-schema.cjs +0 -2
  444. package/dist/utils/validations/schema/validator-schema.cjs.map +0 -1
  445. package/dist/utils/validations/schema/validator-schema.js +0 -2
  446. package/dist/utils/validations/schema/validator-schema.js.map +0 -1
  447. package/dist/utils/validations/validators/index.cjs +0 -2
  448. package/dist/utils/validations/validators/index.cjs.map +0 -1
  449. package/dist/utils/validations/validators/index.js +0 -2
  450. package/dist/utils/validations/validators/index.js.map +0 -1
  451. package/dist/utils/validations/validators/multi-select-dropdown.validator.cjs +0 -2
  452. package/dist/utils/validations/validators/multi-select-dropdown.validator.cjs.map +0 -1
  453. package/dist/utils/validations/validators/multi-select-dropdown.validator.js +0 -2
  454. package/dist/utils/validations/validators/multi-select-dropdown.validator.js.map +0 -1
  455. package/dist/utils/validations/validators/multi-select-status.validator.cjs +0 -2
  456. package/dist/utils/validations/validators/multi-select-status.validator.cjs.map +0 -1
  457. package/dist/utils/validations/validators/multi-select-status.validator.js +0 -2
  458. package/dist/utils/validations/validators/multi-select-status.validator.js.map +0 -1
  459. package/dist/utils/validations/validators/multi-select.helpers.cjs +0 -2
  460. package/dist/utils/validations/validators/multi-select.helpers.cjs.map +0 -1
  461. package/dist/utils/validations/validators/multi-select.helpers.js +0 -2
  462. package/dist/utils/validations/validators/multi-select.helpers.js.map +0 -1
  463. package/dist/utils/validations/validators/select.validator.cjs +0 -2
  464. package/dist/utils/validations/validators/select.validator.cjs.map +0 -1
  465. package/dist/utils/validations/validators/select.validator.js +0 -2
  466. package/dist/utils/validations/validators/select.validator.js.map +0 -1
  467. package/dist/utils/validations/validators/status.validator.cjs +0 -2
  468. package/dist/utils/validations/validators/status.validator.cjs.map +0 -1
  469. package/dist/utils/validations/validators/status.validator.js +0 -2
  470. package/dist/utils/validations/validators/status.validator.js.map +0 -1
@@ -0,0 +1,200 @@
1
+ import { __commonJSMin } from "../../../../_virtual/rolldown_runtime.mjs";
2
+ import { require_bytes } from "../../../bytes/index.mjs";
3
+ import { require_content_type } from "../../../content-type/index.mjs";
4
+ import { require_http_errors } from "../../../http-errors/index.mjs";
5
+ import { require_src } from "../../../debug/src/index.mjs";
6
+ import { require_read } from "../read.mjs";
7
+ import { require_type_is } from "../../../type-is/index.mjs";
8
+
9
+ //#region ../../node_modules/body-parser/lib/types/json.js
10
+ /*!
11
+ * body-parser
12
+ * Copyright(c) 2014 Jonathan Ong
13
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
14
+ * MIT Licensed
15
+ */
16
+ var require_json = /* @__PURE__ */ __commonJSMin(((exports, module) => {
17
+ /**
18
+ * Module dependencies.
19
+ * @private
20
+ */
21
+ var bytes = require_bytes();
22
+ var contentType = require_content_type();
23
+ var createError = require_http_errors();
24
+ var debug = require_src()("body-parser:json");
25
+ var read = require_read();
26
+ var typeis = require_type_is();
27
+ /**
28
+ * Module exports.
29
+ */
30
+ module.exports = json;
31
+ /**
32
+ * RegExp to match the first non-space in a string.
33
+ *
34
+ * Allowed whitespace is defined in RFC 7159:
35
+ *
36
+ * ws = *(
37
+ * %x20 / ; Space
38
+ * %x09 / ; Horizontal tab
39
+ * %x0A / ; Line feed or New line
40
+ * %x0D ) ; Carriage return
41
+ */
42
+ var FIRST_CHAR_REGEXP = /^[\x20\x09\x0a\x0d]*([^\x20\x09\x0a\x0d])/;
43
+ var JSON_SYNTAX_CHAR = "#";
44
+ var JSON_SYNTAX_REGEXP = /#+/g;
45
+ /**
46
+ * Create a middleware to parse JSON bodies.
47
+ *
48
+ * @param {object} [options]
49
+ * @return {function}
50
+ * @public
51
+ */
52
+ function json(options) {
53
+ var opts = options || {};
54
+ var limit = typeof opts.limit !== "number" ? bytes.parse(opts.limit || "100kb") : opts.limit;
55
+ var inflate = opts.inflate !== false;
56
+ var reviver = opts.reviver;
57
+ var strict = opts.strict !== false;
58
+ var type = opts.type || "application/json";
59
+ var verify = opts.verify || false;
60
+ if (verify !== false && typeof verify !== "function") throw new TypeError("option verify must be function");
61
+ var shouldParse = typeof type !== "function" ? typeChecker(type) : type;
62
+ function parse(body) {
63
+ if (body.length === 0) return {};
64
+ if (strict) {
65
+ var first = firstchar(body);
66
+ if (first !== "{" && first !== "[") {
67
+ debug("strict violation");
68
+ throw createStrictSyntaxError(body, first);
69
+ }
70
+ }
71
+ try {
72
+ debug("parse json");
73
+ return JSON.parse(body, reviver);
74
+ } catch (e) {
75
+ throw normalizeJsonSyntaxError(e, {
76
+ message: e.message,
77
+ stack: e.stack
78
+ });
79
+ }
80
+ }
81
+ return function jsonParser(req, res, next) {
82
+ if (req._body) {
83
+ debug("body already parsed");
84
+ next();
85
+ return;
86
+ }
87
+ req.body = req.body || {};
88
+ if (!typeis.hasBody(req)) {
89
+ debug("skip empty body");
90
+ next();
91
+ return;
92
+ }
93
+ debug("content-type %j", req.headers["content-type"]);
94
+ if (!shouldParse(req)) {
95
+ debug("skip parsing");
96
+ next();
97
+ return;
98
+ }
99
+ var charset = getCharset(req) || "utf-8";
100
+ if (charset.slice(0, 4) !== "utf-") {
101
+ debug("invalid charset");
102
+ next(createError(415, "unsupported charset \"" + charset.toUpperCase() + "\"", {
103
+ charset,
104
+ type: "charset.unsupported"
105
+ }));
106
+ return;
107
+ }
108
+ read(req, res, next, parse, debug, {
109
+ encoding: charset,
110
+ inflate,
111
+ limit,
112
+ verify
113
+ });
114
+ };
115
+ }
116
+ /**
117
+ * Create strict violation syntax error matching native error.
118
+ *
119
+ * @param {string} str
120
+ * @param {string} char
121
+ * @return {Error}
122
+ * @private
123
+ */
124
+ function createStrictSyntaxError(str, char) {
125
+ var index = str.indexOf(char);
126
+ var partial = "";
127
+ if (index !== -1) {
128
+ partial = str.substring(0, index) + JSON_SYNTAX_CHAR;
129
+ for (var i = index + 1; i < str.length; i++) partial += JSON_SYNTAX_CHAR;
130
+ }
131
+ try {
132
+ JSON.parse(partial);
133
+ /* istanbul ignore next */ throw new SyntaxError("strict violation");
134
+ } catch (e) {
135
+ return normalizeJsonSyntaxError(e, {
136
+ message: e.message.replace(JSON_SYNTAX_REGEXP, function(placeholder) {
137
+ return str.substring(index, index + placeholder.length);
138
+ }),
139
+ stack: e.stack
140
+ });
141
+ }
142
+ }
143
+ /**
144
+ * Get the first non-whitespace character in a string.
145
+ *
146
+ * @param {string} str
147
+ * @return {function}
148
+ * @private
149
+ */
150
+ function firstchar(str) {
151
+ var match = FIRST_CHAR_REGEXP.exec(str);
152
+ return match ? match[1] : void 0;
153
+ }
154
+ /**
155
+ * Get the charset of a request.
156
+ *
157
+ * @param {object} req
158
+ * @api private
159
+ */
160
+ function getCharset(req) {
161
+ try {
162
+ return (contentType.parse(req).parameters.charset || "").toLowerCase();
163
+ } catch (e) {
164
+ return;
165
+ }
166
+ }
167
+ /**
168
+ * Normalize a SyntaxError for JSON.parse.
169
+ *
170
+ * @param {SyntaxError} error
171
+ * @param {object} obj
172
+ * @return {SyntaxError}
173
+ */
174
+ function normalizeJsonSyntaxError(error, obj) {
175
+ var keys = Object.getOwnPropertyNames(error);
176
+ for (var i = 0; i < keys.length; i++) {
177
+ var key = keys[i];
178
+ if (key !== "stack" && key !== "message") delete error[key];
179
+ }
180
+ error.stack = obj.stack.replace(error.message, obj.message);
181
+ error.message = obj.message;
182
+ return error;
183
+ }
184
+ /**
185
+ * Get the simple type checker.
186
+ *
187
+ * @param {string} type
188
+ * @return {function}
189
+ */
190
+ function typeChecker(type) {
191
+ return function checkType(req) {
192
+ return Boolean(typeis(req, type));
193
+ };
194
+ }
195
+ }));
196
+
197
+ //#endregion
198
+ export default require_json();
199
+
200
+ export { require_json };
@@ -0,0 +1,85 @@
1
+ import { __commonJSMin } from "../../../../_virtual/rolldown_runtime.mjs";
2
+ import { require_bytes } from "../../../bytes/index.mjs";
3
+ import { require_src } from "../../../debug/src/index.mjs";
4
+ import { require_read } from "../read.mjs";
5
+ import { require_type_is } from "../../../type-is/index.mjs";
6
+
7
+ //#region ../../node_modules/body-parser/lib/types/raw.js
8
+ /*!
9
+ * body-parser
10
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
11
+ * MIT Licensed
12
+ */
13
+ var require_raw = /* @__PURE__ */ __commonJSMin(((exports, module) => {
14
+ /**
15
+ * Module dependencies.
16
+ */
17
+ var bytes = require_bytes();
18
+ var debug = require_src()("body-parser:raw");
19
+ var read = require_read();
20
+ var typeis = require_type_is();
21
+ /**
22
+ * Module exports.
23
+ */
24
+ module.exports = raw;
25
+ /**
26
+ * Create a middleware to parse raw bodies.
27
+ *
28
+ * @param {object} [options]
29
+ * @return {function}
30
+ * @api public
31
+ */
32
+ function raw(options) {
33
+ var opts = options || {};
34
+ var inflate = opts.inflate !== false;
35
+ var limit = typeof opts.limit !== "number" ? bytes.parse(opts.limit || "100kb") : opts.limit;
36
+ var type = opts.type || "application/octet-stream";
37
+ var verify = opts.verify || false;
38
+ if (verify !== false && typeof verify !== "function") throw new TypeError("option verify must be function");
39
+ var shouldParse = typeof type !== "function" ? typeChecker(type) : type;
40
+ function parse(buf) {
41
+ return buf;
42
+ }
43
+ return function rawParser(req, res, next) {
44
+ if (req._body) {
45
+ debug("body already parsed");
46
+ next();
47
+ return;
48
+ }
49
+ req.body = req.body || {};
50
+ if (!typeis.hasBody(req)) {
51
+ debug("skip empty body");
52
+ next();
53
+ return;
54
+ }
55
+ debug("content-type %j", req.headers["content-type"]);
56
+ if (!shouldParse(req)) {
57
+ debug("skip parsing");
58
+ next();
59
+ return;
60
+ }
61
+ read(req, res, next, parse, debug, {
62
+ encoding: null,
63
+ inflate,
64
+ limit,
65
+ verify
66
+ });
67
+ };
68
+ }
69
+ /**
70
+ * Get the simple type checker.
71
+ *
72
+ * @param {string} type
73
+ * @return {function}
74
+ */
75
+ function typeChecker(type) {
76
+ return function checkType(req) {
77
+ return Boolean(typeis(req, type));
78
+ };
79
+ }
80
+ }));
81
+
82
+ //#endregion
83
+ export default require_raw();
84
+
85
+ export { require_raw };
@@ -0,0 +1,101 @@
1
+ import { __commonJSMin } from "../../../../_virtual/rolldown_runtime.mjs";
2
+ import { require_bytes } from "../../../bytes/index.mjs";
3
+ import { require_content_type } from "../../../content-type/index.mjs";
4
+ import { require_src } from "../../../debug/src/index.mjs";
5
+ import { require_read } from "../read.mjs";
6
+ import { require_type_is } from "../../../type-is/index.mjs";
7
+
8
+ //#region ../../node_modules/body-parser/lib/types/text.js
9
+ /*!
10
+ * body-parser
11
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
12
+ * MIT Licensed
13
+ */
14
+ var require_text = /* @__PURE__ */ __commonJSMin(((exports, module) => {
15
+ /**
16
+ * Module dependencies.
17
+ */
18
+ var bytes = require_bytes();
19
+ var contentType = require_content_type();
20
+ var debug = require_src()("body-parser:text");
21
+ var read = require_read();
22
+ var typeis = require_type_is();
23
+ /**
24
+ * Module exports.
25
+ */
26
+ module.exports = text;
27
+ /**
28
+ * Create a middleware to parse text bodies.
29
+ *
30
+ * @param {object} [options]
31
+ * @return {function}
32
+ * @api public
33
+ */
34
+ function text(options) {
35
+ var opts = options || {};
36
+ var defaultCharset = opts.defaultCharset || "utf-8";
37
+ var inflate = opts.inflate !== false;
38
+ var limit = typeof opts.limit !== "number" ? bytes.parse(opts.limit || "100kb") : opts.limit;
39
+ var type = opts.type || "text/plain";
40
+ var verify = opts.verify || false;
41
+ if (verify !== false && typeof verify !== "function") throw new TypeError("option verify must be function");
42
+ var shouldParse = typeof type !== "function" ? typeChecker(type) : type;
43
+ function parse(buf) {
44
+ return buf;
45
+ }
46
+ return function textParser(req, res, next) {
47
+ if (req._body) {
48
+ debug("body already parsed");
49
+ next();
50
+ return;
51
+ }
52
+ req.body = req.body || {};
53
+ if (!typeis.hasBody(req)) {
54
+ debug("skip empty body");
55
+ next();
56
+ return;
57
+ }
58
+ debug("content-type %j", req.headers["content-type"]);
59
+ if (!shouldParse(req)) {
60
+ debug("skip parsing");
61
+ next();
62
+ return;
63
+ }
64
+ read(req, res, next, parse, debug, {
65
+ encoding: getCharset(req) || defaultCharset,
66
+ inflate,
67
+ limit,
68
+ verify
69
+ });
70
+ };
71
+ }
72
+ /**
73
+ * Get the charset of a request.
74
+ *
75
+ * @param {object} req
76
+ * @api private
77
+ */
78
+ function getCharset(req) {
79
+ try {
80
+ return (contentType.parse(req).parameters.charset || "").toLowerCase();
81
+ } catch (e) {
82
+ return;
83
+ }
84
+ }
85
+ /**
86
+ * Get the simple type checker.
87
+ *
88
+ * @param {string} type
89
+ * @return {function}
90
+ */
91
+ function typeChecker(type) {
92
+ return function checkType(req) {
93
+ return Boolean(typeis(req, type));
94
+ };
95
+ }
96
+ }));
97
+
98
+ //#endregion
99
+ export default require_text();
100
+
101
+ export { require_text };
@@ -0,0 +1,217 @@
1
+ import { __commonJSMin, __require } from "../../../../_virtual/rolldown_runtime.mjs";
2
+ import { require_depd } from "../../../depd/index.mjs";
3
+ import { require_bytes } from "../../../bytes/index.mjs";
4
+ import { require_content_type } from "../../../content-type/index.mjs";
5
+ import { require_http_errors } from "../../../http-errors/index.mjs";
6
+ import { require_src } from "../../../debug/src/index.mjs";
7
+ import { require_read } from "../read.mjs";
8
+ import { require_type_is } from "../../../type-is/index.mjs";
9
+ import { require_lib } from "../../node_modules/qs/lib/index.mjs";
10
+
11
+ //#region ../../node_modules/body-parser/lib/types/urlencoded.js
12
+ /*!
13
+ * body-parser
14
+ * Copyright(c) 2014 Jonathan Ong
15
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
16
+ * MIT Licensed
17
+ */
18
+ var require_urlencoded = /* @__PURE__ */ __commonJSMin(((exports, module) => {
19
+ /**
20
+ * Module dependencies.
21
+ * @private
22
+ */
23
+ var bytes = require_bytes();
24
+ var contentType = require_content_type();
25
+ var createError = require_http_errors();
26
+ var debug = require_src()("body-parser:urlencoded");
27
+ var deprecate = require_depd()("body-parser");
28
+ var read = require_read();
29
+ var typeis = require_type_is();
30
+ /**
31
+ * Module exports.
32
+ */
33
+ module.exports = urlencoded;
34
+ /**
35
+ * Cache of parser modules.
36
+ */
37
+ var parsers = Object.create(null);
38
+ /**
39
+ * Create a middleware to parse urlencoded bodies.
40
+ *
41
+ * @param {object} [options]
42
+ * @return {function}
43
+ * @public
44
+ */
45
+ function urlencoded(options) {
46
+ var opts = options || {};
47
+ if (opts.extended === void 0) deprecate("undefined extended: provide extended option");
48
+ var extended = opts.extended !== false;
49
+ var inflate = opts.inflate !== false;
50
+ var limit = typeof opts.limit !== "number" ? bytes.parse(opts.limit || "100kb") : opts.limit;
51
+ var type = opts.type || "application/x-www-form-urlencoded";
52
+ var verify = opts.verify || false;
53
+ var depth = typeof opts.depth !== "number" ? Number(opts.depth || 32) : opts.depth;
54
+ if (verify !== false && typeof verify !== "function") throw new TypeError("option verify must be function");
55
+ var queryparse = extended ? extendedparser(opts) : simpleparser(opts);
56
+ var shouldParse = typeof type !== "function" ? typeChecker(type) : type;
57
+ function parse(body) {
58
+ return body.length ? queryparse(body) : {};
59
+ }
60
+ return function urlencodedParser(req, res, next) {
61
+ if (req._body) {
62
+ debug("body already parsed");
63
+ next();
64
+ return;
65
+ }
66
+ req.body = req.body || {};
67
+ if (!typeis.hasBody(req)) {
68
+ debug("skip empty body");
69
+ next();
70
+ return;
71
+ }
72
+ debug("content-type %j", req.headers["content-type"]);
73
+ if (!shouldParse(req)) {
74
+ debug("skip parsing");
75
+ next();
76
+ return;
77
+ }
78
+ var charset = getCharset(req) || "utf-8";
79
+ if (charset !== "utf-8") {
80
+ debug("invalid charset");
81
+ next(createError(415, "unsupported charset \"" + charset.toUpperCase() + "\"", {
82
+ charset,
83
+ type: "charset.unsupported"
84
+ }));
85
+ return;
86
+ }
87
+ read(req, res, next, parse, debug, {
88
+ debug,
89
+ encoding: charset,
90
+ inflate,
91
+ limit,
92
+ verify,
93
+ depth
94
+ });
95
+ };
96
+ }
97
+ /**
98
+ * Get the extended query parser.
99
+ *
100
+ * @param {object} options
101
+ */
102
+ function extendedparser(options) {
103
+ var parameterLimit = options.parameterLimit !== void 0 ? options.parameterLimit : 1e3;
104
+ var depth = typeof options.depth !== "number" ? Number(options.depth || 32) : options.depth;
105
+ var parse = parser("qs");
106
+ if (isNaN(parameterLimit) || parameterLimit < 1) throw new TypeError("option parameterLimit must be a positive number");
107
+ if (isNaN(depth) || depth < 0) throw new TypeError("option depth must be a zero or a positive number");
108
+ if (isFinite(parameterLimit)) parameterLimit = parameterLimit | 0;
109
+ return function queryparse(body) {
110
+ var paramCount = parameterCount(body, parameterLimit);
111
+ if (paramCount === void 0) {
112
+ debug("too many parameters");
113
+ throw createError(413, "too many parameters", { type: "parameters.too.many" });
114
+ }
115
+ var arrayLimit = Math.max(100, paramCount);
116
+ debug("parse extended urlencoding");
117
+ try {
118
+ return parse(body, {
119
+ allowPrototypes: true,
120
+ arrayLimit,
121
+ depth,
122
+ strictDepth: true,
123
+ parameterLimit
124
+ });
125
+ } catch (err) {
126
+ if (err instanceof RangeError) throw createError(400, "The input exceeded the depth", { type: "querystring.parse.rangeError" });
127
+ else throw err;
128
+ }
129
+ };
130
+ }
131
+ /**
132
+ * Get the charset of a request.
133
+ *
134
+ * @param {object} req
135
+ * @api private
136
+ */
137
+ function getCharset(req) {
138
+ try {
139
+ return (contentType.parse(req).parameters.charset || "").toLowerCase();
140
+ } catch (e) {
141
+ return;
142
+ }
143
+ }
144
+ /**
145
+ * Count the number of parameters, stopping once limit reached
146
+ *
147
+ * @param {string} body
148
+ * @param {number} limit
149
+ * @api private
150
+ */
151
+ function parameterCount(body, limit) {
152
+ var count = 0;
153
+ var index = 0;
154
+ while ((index = body.indexOf("&", index)) !== -1) {
155
+ count++;
156
+ index++;
157
+ if (count === limit) return;
158
+ }
159
+ return count;
160
+ }
161
+ /**
162
+ * Get parser for module name dynamically.
163
+ *
164
+ * @param {string} name
165
+ * @return {function}
166
+ * @api private
167
+ */
168
+ function parser(name) {
169
+ var mod = parsers[name];
170
+ if (mod !== void 0) return mod.parse;
171
+ switch (name) {
172
+ case "qs":
173
+ mod = require_lib();
174
+ break;
175
+ case "querystring":
176
+ mod = __require("querystring");
177
+ break;
178
+ }
179
+ parsers[name] = mod;
180
+ return mod.parse;
181
+ }
182
+ /**
183
+ * Get the simple query parser.
184
+ *
185
+ * @param {object} options
186
+ */
187
+ function simpleparser(options) {
188
+ var parameterLimit = options.parameterLimit !== void 0 ? options.parameterLimit : 1e3;
189
+ var parse = parser("querystring");
190
+ if (isNaN(parameterLimit) || parameterLimit < 1) throw new TypeError("option parameterLimit must be a positive number");
191
+ if (isFinite(parameterLimit)) parameterLimit = parameterLimit | 0;
192
+ return function queryparse(body) {
193
+ if (parameterCount(body, parameterLimit) === void 0) {
194
+ debug("too many parameters");
195
+ throw createError(413, "too many parameters", { type: "parameters.too.many" });
196
+ }
197
+ debug("parse urlencoding");
198
+ return parse(body, void 0, void 0, { maxKeys: parameterLimit });
199
+ };
200
+ }
201
+ /**
202
+ * Get the simple type checker.
203
+ *
204
+ * @param {string} type
205
+ * @return {function}
206
+ */
207
+ function typeChecker(type) {
208
+ return function checkType(req) {
209
+ return Boolean(typeis(req, type));
210
+ };
211
+ }
212
+ }));
213
+
214
+ //#endregion
215
+ export default require_urlencoded();
216
+
217
+ export { require_urlencoded };
@@ -0,0 +1,29 @@
1
+ import { __commonJSMin } from "../../../../../_virtual/rolldown_runtime.mjs";
2
+
3
+ //#region ../../node_modules/body-parser/node_modules/qs/lib/formats.js
4
+ var require_formats = /* @__PURE__ */ __commonJSMin(((exports, module) => {
5
+ var replace = String.prototype.replace;
6
+ var percentTwenties = /%20/g;
7
+ var Format = {
8
+ RFC1738: "RFC1738",
9
+ RFC3986: "RFC3986"
10
+ };
11
+ module.exports = {
12
+ "default": Format.RFC3986,
13
+ formatters: {
14
+ RFC1738: function(value) {
15
+ return replace.call(value, percentTwenties, "+");
16
+ },
17
+ RFC3986: function(value) {
18
+ return String(value);
19
+ }
20
+ },
21
+ RFC1738: Format.RFC1738,
22
+ RFC3986: Format.RFC3986
23
+ };
24
+ }));
25
+
26
+ //#endregion
27
+ export default require_formats();
28
+
29
+ export { require_formats };
@@ -0,0 +1,21 @@
1
+ import { __commonJSMin } from "../../../../../_virtual/rolldown_runtime.mjs";
2
+ import { require_formats } from "./formats.mjs";
3
+ import { require_stringify } from "./stringify.mjs";
4
+ import { require_parse } from "./parse.mjs";
5
+
6
+ //#region ../../node_modules/body-parser/node_modules/qs/lib/index.js
7
+ var require_lib = /* @__PURE__ */ __commonJSMin(((exports, module) => {
8
+ var stringify = require_stringify();
9
+ var parse = require_parse();
10
+ var formats = require_formats();
11
+ module.exports = {
12
+ formats,
13
+ parse,
14
+ stringify
15
+ };
16
+ }));
17
+
18
+ //#endregion
19
+ export default require_lib();
20
+
21
+ export { require_lib };