@nullix/zod-mongoose-studio 0.0.1

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 (876) hide show
  1. package/.output/nitro.json +15 -0
  2. package/.output/public/_nuxt/8SOpv6rk.js +1 -0
  3. package/.output/public/_nuxt/9HpZscsL.js +2 -0
  4. package/.output/public/_nuxt/B2KnRiWG.js +4 -0
  5. package/.output/public/_nuxt/B8OfTtLu.js +1 -0
  6. package/.output/public/_nuxt/BBUBE1dy.js +1 -0
  7. package/.output/public/_nuxt/BBc9UKZt.js +1 -0
  8. package/.output/public/_nuxt/BDtDVThU.js +1 -0
  9. package/.output/public/_nuxt/BEgZUVRK.js +1 -0
  10. package/.output/public/_nuxt/BFxVWTOG.js +1 -0
  11. package/.output/public/_nuxt/BG73LgW2.js +1 -0
  12. package/.output/public/_nuxt/BKILRCQU.js +1 -0
  13. package/.output/public/_nuxt/BOtBlQCF.js +1 -0
  14. package/.output/public/_nuxt/BPhDTwHR.js +1 -0
  15. package/.output/public/_nuxt/BTesnYfV.js +298 -0
  16. package/.output/public/_nuxt/BbWJElDN.js +1 -0
  17. package/.output/public/_nuxt/BcvAzS8a.js +3 -0
  18. package/.output/public/_nuxt/Bd8akH9Z.js +1 -0
  19. package/.output/public/_nuxt/Be1F0pOV.js +1 -0
  20. package/.output/public/_nuxt/BeJ5waoc.js +1 -0
  21. package/.output/public/_nuxt/Bf6VGUru.js +1 -0
  22. package/.output/public/_nuxt/BkW5O-1t.js +1 -0
  23. package/.output/public/_nuxt/BlNEE0v7.js +1 -0
  24. package/.output/public/_nuxt/Brw8urJB.js +2 -0
  25. package/.output/public/_nuxt/Bs9aos_-.js +1 -0
  26. package/.output/public/_nuxt/Bs9z6M-B.js +1 -0
  27. package/.output/public/_nuxt/Btyra-wh.js +1 -0
  28. package/.output/public/_nuxt/Bu5POkcn.js +1 -0
  29. package/.output/public/_nuxt/Bw9ernYp.js +1 -0
  30. package/.output/public/_nuxt/BwHxbl9M.js +1 -0
  31. package/.output/public/_nuxt/BxJiqAUM.js +1 -0
  32. package/.output/public/_nuxt/BzKRNQWT.js +1 -0
  33. package/.output/public/_nuxt/CBJaRo0y.js +3 -0
  34. package/.output/public/_nuxt/CFznDFnq.js +2 -0
  35. package/.output/public/_nuxt/CHwy0fLd.js +1 -0
  36. package/.output/public/_nuxt/CJmd_6j2.js +1 -0
  37. package/.output/public/_nuxt/CMQZ64NL.js +1 -0
  38. package/.output/public/_nuxt/COWaemsV.js +1 -0
  39. package/.output/public/_nuxt/CXBNlu9o.js +1 -0
  40. package/.output/public/_nuxt/C_tMU-Nz.js +1 -0
  41. package/.output/public/_nuxt/CiqrrVzr.js +1 -0
  42. package/.output/public/_nuxt/ClhHkBeG.js +1 -0
  43. package/.output/public/_nuxt/CnS9iZB_.js +1 -0
  44. package/.output/public/_nuxt/CnmFD0ga.js +1 -0
  45. package/.output/public/_nuxt/Co3qMtFm.js +1 -0
  46. package/.output/public/_nuxt/CocnycG-.js +1 -0
  47. package/.output/public/_nuxt/CpO_ztTX.js +1 -0
  48. package/.output/public/_nuxt/CqXO7rUv.js +1 -0
  49. package/.output/public/_nuxt/Csy3S7wG.js +1 -0
  50. package/.output/public/_nuxt/CtU7CIYd.js +11 -0
  51. package/.output/public/_nuxt/Cw6BJv9p.js +908 -0
  52. package/.output/public/_nuxt/Cyyb5UIc.js +1 -0
  53. package/.output/public/_nuxt/D-4FJmMZ.js +1 -0
  54. package/.output/public/_nuxt/D9hQfWCl.js +1 -0
  55. package/.output/public/_nuxt/DARyPmWN.js +1 -0
  56. package/.output/public/_nuxt/DA_xQXIa.js +1 -0
  57. package/.output/public/_nuxt/DIpCSwC3.js +1 -0
  58. package/.output/public/_nuxt/DLDM7-KI.js +1 -0
  59. package/.output/public/_nuxt/DNDY2TF8.js +1 -0
  60. package/.output/public/_nuxt/DSgGBnBI.js +1 -0
  61. package/.output/public/_nuxt/DSh2-awV.js +1 -0
  62. package/.output/public/_nuxt/DWLU9E4j.js +7 -0
  63. package/.output/public/_nuxt/Db0IVjzk.js +1 -0
  64. package/.output/public/_nuxt/Db0cS2oM.js +1 -0
  65. package/.output/public/_nuxt/Dcm9cKUX.js +1 -0
  66. package/.output/public/_nuxt/DdJfP1eB.js +3 -0
  67. package/.output/public/_nuxt/DiJ1NA_G.js +1 -0
  68. package/.output/public/_nuxt/Dj0IH4Bd.js +1 -0
  69. package/.output/public/_nuxt/Dm6ycUr_.js +1 -0
  70. package/.output/public/_nuxt/Dm9fPMHo.js +1 -0
  71. package/.output/public/_nuxt/DmeGPVcC.js +1 -0
  72. package/.output/public/_nuxt/Dnu-v4kV.js +1 -0
  73. package/.output/public/_nuxt/DtV1sZF8.js +1 -0
  74. package/.output/public/_nuxt/DtZ0uQbO.js +1 -0
  75. package/.output/public/_nuxt/DuqnmPmx.js +33 -0
  76. package/.output/public/_nuxt/JqRWe2rp.js +1 -0
  77. package/.output/public/_nuxt/Kd9XrMLS.js +1 -0
  78. package/.output/public/_nuxt/OrD6JF1K.js +1 -0
  79. package/.output/public/_nuxt/PahG7c26.js +1 -0
  80. package/.output/public/_nuxt/Ub6l9XKa.js +1 -0
  81. package/.output/public/_nuxt/XOt5hzHz.js +1 -0
  82. package/.output/public/_nuxt/Y6nb8tq_.js +1 -0
  83. package/.output/public/_nuxt/acbASCJo.js +1 -0
  84. package/.output/public/_nuxt/builds/latest.json +1 -0
  85. package/.output/public/_nuxt/builds/meta/5f8bfdb9-d523-4660-afb9-2a5faf918ee2.json +1 -0
  86. package/.output/public/_nuxt/cCwfBBRk.js +59 -0
  87. package/.output/public/_nuxt/cTPe9QuQ.js +1 -0
  88. package/.output/public/_nuxt/c_t8T7LW.js +1 -0
  89. package/.output/public/_nuxt/cl7-CwDS.js +1 -0
  90. package/.output/public/_nuxt/codicon.ngg6Pgfi.ttf +0 -0
  91. package/.output/public/_nuxt/css.worker-DBVD8oXr.js +93 -0
  92. package/.output/public/_nuxt/editor.CdBKkuhR.css +1 -0
  93. package/.output/public/_nuxt/editor.worker-CdQrwHl8.js +26 -0
  94. package/.output/public/_nuxt/entry.V-_Q9qpd.css +1 -0
  95. package/.output/public/_nuxt/error-404.ZEdaMr7r.css +1 -0
  96. package/.output/public/_nuxt/error-500.CPEQ7gwd.css +1 -0
  97. package/.output/public/_nuxt/html.worker-CwpTb9lJ.js +470 -0
  98. package/.output/public/_nuxt/j7ic8hl3.js +1 -0
  99. package/.output/public/_nuxt/json.worker-BoL8UZqY.js +58 -0
  100. package/.output/public/_nuxt/s7OhZKlX.js +1 -0
  101. package/.output/public/_nuxt/tScXyioY.js +1 -0
  102. package/.output/public/_nuxt/ts.worker-CTGvpNXs.js +67718 -0
  103. package/.output/public/_nuxt/vHIfCaH5.js +1 -0
  104. package/.output/public/_nuxt/zBfavPgS.js +1 -0
  105. package/.output/public/android-chrome-192x192.png +0 -0
  106. package/.output/public/android-chrome-512x512.png +0 -0
  107. package/.output/public/apple-touch-icon.png +0 -0
  108. package/.output/public/favicon-16x16.png +0 -0
  109. package/.output/public/favicon-32x32.png +0 -0
  110. package/.output/public/favicon.ico +0 -0
  111. package/.output/public/robots.txt +2 -0
  112. package/.output/public/site.webmanifest +1 -0
  113. package/.output/public/zodmongoose-b.jpg +0 -0
  114. package/.output/public/zodmongoose-b.png +0 -0
  115. package/.output/public/zodmongoose-b.svg +10 -0
  116. package/.output/public/zodmongoose.jpg +0 -0
  117. package/.output/public/zodmongoose.png +0 -0
  118. package/.output/public/zodmongoose.svg +12 -0
  119. package/.output/server/chunks/_/error-500.mjs +19 -0
  120. package/.output/server/chunks/_/error-500.mjs.map +1 -0
  121. package/.output/server/chunks/build/client.precomputed.mjs +4 -0
  122. package/.output/server/chunks/build/client.precomputed.mjs.map +1 -0
  123. package/.output/server/chunks/build/error-404-C01T0Fs3.mjs +93 -0
  124. package/.output/server/chunks/build/error-404-C01T0Fs3.mjs.map +1 -0
  125. package/.output/server/chunks/build/error-404-styles.C9SFt1Pa.mjs +8 -0
  126. package/.output/server/chunks/build/error-404-styles.C9SFt1Pa.mjs.map +1 -0
  127. package/.output/server/chunks/build/error-500-BxPzc_RO.mjs +76 -0
  128. package/.output/server/chunks/build/error-500-BxPzc_RO.mjs.map +1 -0
  129. package/.output/server/chunks/build/error-500-styles.BgBkJrKx.mjs +8 -0
  130. package/.output/server/chunks/build/error-500-styles.BgBkJrKx.mjs.map +1 -0
  131. package/.output/server/chunks/build/index-Cm3PgUzj.mjs +504 -0
  132. package/.output/server/chunks/build/index-Cm3PgUzj.mjs.map +1 -0
  133. package/.output/server/chunks/build/server.mjs +14569 -0
  134. package/.output/server/chunks/build/server.mjs.map +1 -0
  135. package/.output/server/chunks/build/styles.mjs +10 -0
  136. package/.output/server/chunks/build/styles.mjs.map +1 -0
  137. package/.output/server/chunks/nitro/nitro.mjs +6533 -0
  138. package/.output/server/chunks/nitro/nitro.mjs.map +1 -0
  139. package/.output/server/chunks/routes/api/parse.post.mjs +1293 -0
  140. package/.output/server/chunks/routes/api/parse.post.mjs.map +1 -0
  141. package/.output/server/chunks/routes/api/resolve.get.mjs +42 -0
  142. package/.output/server/chunks/routes/api/resolve.get.mjs.map +1 -0
  143. package/.output/server/chunks/routes/renderer.mjs +483 -0
  144. package/.output/server/chunks/routes/renderer.mjs.map +1 -0
  145. package/.output/server/chunks/virtual/_virtual_spa-template.mjs +4 -0
  146. package/.output/server/chunks/virtual/_virtual_spa-template.mjs.map +1 -0
  147. package/.output/server/index.mjs +12 -0
  148. package/.output/server/index.mjs.map +1 -0
  149. package/.output/server/node_modules/@babel/parser/lib/index.js +14582 -0
  150. package/.output/server/node_modules/@babel/parser/package.json +50 -0
  151. package/.output/server/node_modules/@esbuild/darwin-arm64/bin/esbuild +0 -0
  152. package/.output/server/node_modules/@esbuild/darwin-arm64/package.json +20 -0
  153. package/.output/server/node_modules/@iconify/utils/lib/colors/index.js +292 -0
  154. package/.output/server/node_modules/@iconify/utils/lib/colors/keywords.js +702 -0
  155. package/.output/server/node_modules/@iconify/utils/lib/css/common.js +76 -0
  156. package/.output/server/node_modules/@iconify/utils/lib/css/format.js +40 -0
  157. package/.output/server/node_modules/@iconify/utils/lib/css/icon.js +52 -0
  158. package/.output/server/node_modules/@iconify/utils/lib/css/icons.js +133 -0
  159. package/.output/server/node_modules/@iconify/utils/lib/customisations/bool.js +20 -0
  160. package/.output/server/node_modules/@iconify/utils/lib/customisations/defaults.js +15 -0
  161. package/.output/server/node_modules/@iconify/utils/lib/customisations/flip.js +18 -0
  162. package/.output/server/node_modules/@iconify/utils/lib/customisations/merge.js +18 -0
  163. package/.output/server/node_modules/@iconify/utils/lib/customisations/rotate.js +31 -0
  164. package/.output/server/node_modules/@iconify/utils/lib/emoji/cleanup.js +80 -0
  165. package/.output/server/node_modules/@iconify/utils/lib/emoji/convert.js +102 -0
  166. package/.output/server/node_modules/@iconify/utils/lib/emoji/data.js +29 -0
  167. package/.output/server/node_modules/@iconify/utils/lib/emoji/format.js +60 -0
  168. package/.output/server/node_modules/@iconify/utils/lib/emoji/parse.js +50 -0
  169. package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/base.js +204 -0
  170. package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/create.js +35 -0
  171. package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/numbers.js +134 -0
  172. package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/similar.js +167 -0
  173. package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/tree.js +81 -0
  174. package/.output/server/node_modules/@iconify/utils/lib/emoji/replace/find.js +94 -0
  175. package/.output/server/node_modules/@iconify/utils/lib/emoji/replace/replace.js +28 -0
  176. package/.output/server/node_modules/@iconify/utils/lib/emoji/test/components.js +78 -0
  177. package/.output/server/node_modules/@iconify/utils/lib/emoji/test/missing.js +68 -0
  178. package/.output/server/node_modules/@iconify/utils/lib/emoji/test/name.js +47 -0
  179. package/.output/server/node_modules/@iconify/utils/lib/emoji/test/parse.js +105 -0
  180. package/.output/server/node_modules/@iconify/utils/lib/emoji/test/similar.js +38 -0
  181. package/.output/server/node_modules/@iconify/utils/lib/emoji/test/tree.js +94 -0
  182. package/.output/server/node_modules/@iconify/utils/lib/emoji/test/variations.js +64 -0
  183. package/.output/server/node_modules/@iconify/utils/lib/icon/defaults.js +26 -0
  184. package/.output/server/node_modules/@iconify/utils/lib/icon/merge.js +18 -0
  185. package/.output/server/node_modules/@iconify/utils/lib/icon/name.js +58 -0
  186. package/.output/server/node_modules/@iconify/utils/lib/icon/square.js +34 -0
  187. package/.output/server/node_modules/@iconify/utils/lib/icon/transformations.js +13 -0
  188. package/.output/server/node_modules/@iconify/utils/lib/icon-set/convert-info.js +126 -0
  189. package/.output/server/node_modules/@iconify/utils/lib/icon-set/expand.js +21 -0
  190. package/.output/server/node_modules/@iconify/utils/lib/icon-set/get-icon.js +27 -0
  191. package/.output/server/node_modules/@iconify/utils/lib/icon-set/get-icons.js +38 -0
  192. package/.output/server/node_modules/@iconify/utils/lib/icon-set/minify.js +93 -0
  193. package/.output/server/node_modules/@iconify/utils/lib/icon-set/parse.js +48 -0
  194. package/.output/server/node_modules/@iconify/utils/lib/icon-set/tree.js +24 -0
  195. package/.output/server/node_modules/@iconify/utils/lib/icon-set/validate-basic.js +44 -0
  196. package/.output/server/node_modules/@iconify/utils/lib/icon-set/validate.js +125 -0
  197. package/.output/server/node_modules/@iconify/utils/lib/index.js +53 -0
  198. package/.output/server/node_modules/@iconify/utils/lib/loader/custom.js +32 -0
  199. package/.output/server/node_modules/@iconify/utils/lib/loader/loader.js +28 -0
  200. package/.output/server/node_modules/@iconify/utils/lib/loader/modern.js +42 -0
  201. package/.output/server/node_modules/@iconify/utils/lib/loader/utils.js +63 -0
  202. package/.output/server/node_modules/@iconify/utils/lib/misc/objects.js +27 -0
  203. package/.output/server/node_modules/@iconify/utils/lib/misc/strings.js +27 -0
  204. package/.output/server/node_modules/@iconify/utils/lib/misc/title.js +10 -0
  205. package/.output/server/node_modules/@iconify/utils/lib/svg/build.js +115 -0
  206. package/.output/server/node_modules/@iconify/utils/lib/svg/defs.js +32 -0
  207. package/.output/server/node_modules/@iconify/utils/lib/svg/encode-svg-for-css.js +15 -0
  208. package/.output/server/node_modules/@iconify/utils/lib/svg/html.js +10 -0
  209. package/.output/server/node_modules/@iconify/utils/lib/svg/id.js +42 -0
  210. package/.output/server/node_modules/@iconify/utils/lib/svg/inner-html.js +23 -0
  211. package/.output/server/node_modules/@iconify/utils/lib/svg/parse.js +69 -0
  212. package/.output/server/node_modules/@iconify/utils/lib/svg/pretty.js +55 -0
  213. package/.output/server/node_modules/@iconify/utils/lib/svg/size.js +28 -0
  214. package/.output/server/node_modules/@iconify/utils/lib/svg/trim.js +8 -0
  215. package/.output/server/node_modules/@iconify/utils/lib/svg/url.js +23 -0
  216. package/.output/server/node_modules/@iconify/utils/lib/svg/viewbox.js +9 -0
  217. package/.output/server/node_modules/@iconify/utils/package.json +118 -0
  218. package/.output/server/node_modules/@mongodb-js/saslprep/dist/code-points-data.js +5 -0
  219. package/.output/server/node_modules/@mongodb-js/saslprep/dist/index.js +65 -0
  220. package/.output/server/node_modules/@mongodb-js/saslprep/dist/memory-code-points.js +32 -0
  221. package/.output/server/node_modules/@mongodb-js/saslprep/dist/node.js +15 -0
  222. package/.output/server/node_modules/@mongodb-js/saslprep/package.json +87 -0
  223. package/.output/server/node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.js +6763 -0
  224. package/.output/server/node_modules/@vue/compiler-core/package.json +58 -0
  225. package/.output/server/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.prod.js +689 -0
  226. package/.output/server/node_modules/@vue/compiler-dom/package.json +57 -0
  227. package/.output/server/node_modules/@vue/compiler-ssr/dist/compiler-ssr.cjs.js +1413 -0
  228. package/.output/server/node_modules/@vue/compiler-ssr/package.json +34 -0
  229. package/.output/server/node_modules/@vue/reactivity/dist/reactivity.cjs.prod.js +1877 -0
  230. package/.output/server/node_modules/@vue/reactivity/package.json +55 -0
  231. package/.output/server/node_modules/@vue/runtime-core/dist/runtime-core.cjs.prod.js +6856 -0
  232. package/.output/server/node_modules/@vue/runtime-core/package.json +52 -0
  233. package/.output/server/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.prod.js +1796 -0
  234. package/.output/server/node_modules/@vue/runtime-dom/package.json +60 -0
  235. package/.output/server/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js +883 -0
  236. package/.output/server/node_modules/@vue/server-renderer/package.json +55 -0
  237. package/.output/server/node_modules/@vue/shared/dist/shared.cjs.prod.js +604 -0
  238. package/.output/server/node_modules/@vue/shared/package.json +47 -0
  239. package/.output/server/node_modules/bson/lib/bson.cjs +4636 -0
  240. package/.output/server/node_modules/bson/package.json +120 -0
  241. package/.output/server/node_modules/consola/dist/chunks/prompt.mjs +280 -0
  242. package/.output/server/node_modules/consola/dist/core.mjs +512 -0
  243. package/.output/server/node_modules/consola/dist/index.mjs +651 -0
  244. package/.output/server/node_modules/consola/dist/shared/consola.DRwqZj3T.mjs +72 -0
  245. package/.output/server/node_modules/consola/dist/shared/consola.DXBYu-KD.mjs +288 -0
  246. package/.output/server/node_modules/consola/package.json +136 -0
  247. package/.output/server/node_modules/debug/package.json +64 -0
  248. package/.output/server/node_modules/debug/src/browser.js +272 -0
  249. package/.output/server/node_modules/debug/src/common.js +292 -0
  250. package/.output/server/node_modules/debug/src/index.js +10 -0
  251. package/.output/server/node_modules/debug/src/node.js +263 -0
  252. package/.output/server/node_modules/devalue/index.js +4 -0
  253. package/.output/server/node_modules/devalue/package.json +37 -0
  254. package/.output/server/node_modules/devalue/src/base64.js +110 -0
  255. package/.output/server/node_modules/devalue/src/constants.js +7 -0
  256. package/.output/server/node_modules/devalue/src/parse.js +265 -0
  257. package/.output/server/node_modules/devalue/src/stringify.js +350 -0
  258. package/.output/server/node_modules/devalue/src/uneval.js +490 -0
  259. package/.output/server/node_modules/devalue/src/utils.js +148 -0
  260. package/.output/server/node_modules/entities/dist/commonjs/decode-codepoint.js +77 -0
  261. package/.output/server/node_modules/entities/dist/commonjs/decode.js +568 -0
  262. package/.output/server/node_modules/entities/dist/commonjs/generated/decode-data-html.js +7 -0
  263. package/.output/server/node_modules/entities/dist/commonjs/generated/decode-data-xml.js +7 -0
  264. package/.output/server/node_modules/entities/dist/commonjs/internal/bin-trie-flags.js +21 -0
  265. package/.output/server/node_modules/entities/dist/commonjs/internal/decode-shared.js +31 -0
  266. package/.output/server/node_modules/entities/dist/commonjs/package.json +3 -0
  267. package/.output/server/node_modules/entities/package.json +120 -0
  268. package/.output/server/node_modules/esbuild/lib/main.js +2532 -0
  269. package/.output/server/node_modules/esbuild/package.json +74 -0
  270. package/.output/server/node_modules/estree-walker/dist/umd/estree-walker.js +344 -0
  271. package/.output/server/node_modules/estree-walker/package.json +37 -0
  272. package/.output/server/node_modules/hookable/dist/index.mjs +266 -0
  273. package/.output/server/node_modules/hookable/package.json +53 -0
  274. package/.output/server/node_modules/ip-address/dist/address-error.js +12 -0
  275. package/.output/server/node_modules/ip-address/dist/common.js +46 -0
  276. package/.output/server/node_modules/ip-address/dist/ip-address.js +35 -0
  277. package/.output/server/node_modules/ip-address/dist/ipv4.js +360 -0
  278. package/.output/server/node_modules/ip-address/dist/ipv6.js +1003 -0
  279. package/.output/server/node_modules/ip-address/dist/v4/constants.js +8 -0
  280. package/.output/server/node_modules/ip-address/dist/v6/constants.js +76 -0
  281. package/.output/server/node_modules/ip-address/dist/v6/helpers.js +45 -0
  282. package/.output/server/node_modules/ip-address/dist/v6/regular-expressions.js +95 -0
  283. package/.output/server/node_modules/ip-address/package.json +78 -0
  284. package/.output/server/node_modules/kareem/index.js +668 -0
  285. package/.output/server/node_modules/kareem/package.json +28 -0
  286. package/.output/server/node_modules/memory-pager/index.js +160 -0
  287. package/.output/server/node_modules/memory-pager/package.json +24 -0
  288. package/.output/server/node_modules/mongodb/lib/admin.js +136 -0
  289. package/.output/server/node_modules/mongodb/lib/bson.js +84 -0
  290. package/.output/server/node_modules/mongodb/lib/bulk/common.js +837 -0
  291. package/.output/server/node_modules/mongodb/lib/bulk/ordered.js +67 -0
  292. package/.output/server/node_modules/mongodb/lib/bulk/unordered.js +92 -0
  293. package/.output/server/node_modules/mongodb/lib/change_stream.js +465 -0
  294. package/.output/server/node_modules/mongodb/lib/client-side-encryption/auto_encrypter.js +274 -0
  295. package/.output/server/node_modules/mongodb/lib/client-side-encryption/client_encryption.js +610 -0
  296. package/.output/server/node_modules/mongodb/lib/client-side-encryption/crypto_callbacks.js +81 -0
  297. package/.output/server/node_modules/mongodb/lib/client-side-encryption/errors.js +136 -0
  298. package/.output/server/node_modules/mongodb/lib/client-side-encryption/mongocryptd_manager.js +85 -0
  299. package/.output/server/node_modules/mongodb/lib/client-side-encryption/providers/aws.js +23 -0
  300. package/.output/server/node_modules/mongodb/lib/client-side-encryption/providers/azure.js +132 -0
  301. package/.output/server/node_modules/mongodb/lib/client-side-encryption/providers/gcp.js +16 -0
  302. package/.output/server/node_modules/mongodb/lib/client-side-encryption/providers/index.js +43 -0
  303. package/.output/server/node_modules/mongodb/lib/client-side-encryption/state_machine.js +426 -0
  304. package/.output/server/node_modules/mongodb/lib/cmap/auth/auth_provider.js +51 -0
  305. package/.output/server/node_modules/mongodb/lib/cmap/auth/aws_temporary_credentials.js +150 -0
  306. package/.output/server/node_modules/mongodb/lib/cmap/auth/gssapi.js +154 -0
  307. package/.output/server/node_modules/mongodb/lib/cmap/auth/mongo_credentials.js +183 -0
  308. package/.output/server/node_modules/mongodb/lib/cmap/auth/mongodb_aws.js +138 -0
  309. package/.output/server/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/automated_callback_workflow.js +84 -0
  310. package/.output/server/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/azure_machine_workflow.js +62 -0
  311. package/.output/server/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/callback_workflow.js +141 -0
  312. package/.output/server/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/command_builders.js +44 -0
  313. package/.output/server/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/gcp_machine_workflow.js +39 -0
  314. package/.output/server/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/human_callback_workflow.js +122 -0
  315. package/.output/server/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/k8s_machine_workflow.js +31 -0
  316. package/.output/server/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/token_cache.js +52 -0
  317. package/.output/server/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/token_machine_workflow.js +22 -0
  318. package/.output/server/node_modules/mongodb/lib/cmap/auth/mongodb_oidc.js +73 -0
  319. package/.output/server/node_modules/mongodb/lib/cmap/auth/plain.js +26 -0
  320. package/.output/server/node_modules/mongodb/lib/cmap/auth/providers.js +23 -0
  321. package/.output/server/node_modules/mongodb/lib/cmap/auth/scram.js +254 -0
  322. package/.output/server/node_modules/mongodb/lib/cmap/auth/x509.js +36 -0
  323. package/.output/server/node_modules/mongodb/lib/cmap/command_monitoring_events.js +223 -0
  324. package/.output/server/node_modules/mongodb/lib/cmap/commands.js +535 -0
  325. package/.output/server/node_modules/mongodb/lib/cmap/connect.js +366 -0
  326. package/.output/server/node_modules/mongodb/lib/cmap/connection.js +570 -0
  327. package/.output/server/node_modules/mongodb/lib/cmap/connection_pool.js +558 -0
  328. package/.output/server/node_modules/mongodb/lib/cmap/connection_pool_events.js +190 -0
  329. package/.output/server/node_modules/mongodb/lib/cmap/errors.js +108 -0
  330. package/.output/server/node_modules/mongodb/lib/cmap/handshake/client_metadata.js +239 -0
  331. package/.output/server/node_modules/mongodb/lib/cmap/metrics.js +62 -0
  332. package/.output/server/node_modules/mongodb/lib/cmap/stream_description.js +70 -0
  333. package/.output/server/node_modules/mongodb/lib/cmap/wire_protocol/compression.js +163 -0
  334. package/.output/server/node_modules/mongodb/lib/cmap/wire_protocol/constants.js +19 -0
  335. package/.output/server/node_modules/mongodb/lib/cmap/wire_protocol/on_data.js +112 -0
  336. package/.output/server/node_modules/mongodb/lib/cmap/wire_protocol/on_demand/document.js +222 -0
  337. package/.output/server/node_modules/mongodb/lib/cmap/wire_protocol/responses.js +315 -0
  338. package/.output/server/node_modules/mongodb/lib/cmap/wire_protocol/shared.js +35 -0
  339. package/.output/server/node_modules/mongodb/lib/collection.js +751 -0
  340. package/.output/server/node_modules/mongodb/lib/connection_string.js +1091 -0
  341. package/.output/server/node_modules/mongodb/lib/constants.js +170 -0
  342. package/.output/server/node_modules/mongodb/lib/cursor/abstract_cursor.js +941 -0
  343. package/.output/server/node_modules/mongodb/lib/cursor/aggregation_cursor.js +164 -0
  344. package/.output/server/node_modules/mongodb/lib/cursor/change_stream_cursor.js +104 -0
  345. package/.output/server/node_modules/mongodb/lib/cursor/client_bulk_write_cursor.js +52 -0
  346. package/.output/server/node_modules/mongodb/lib/cursor/explainable_cursor.js +36 -0
  347. package/.output/server/node_modules/mongodb/lib/cursor/find_cursor.js +388 -0
  348. package/.output/server/node_modules/mongodb/lib/cursor/list_collections_cursor.js +34 -0
  349. package/.output/server/node_modules/mongodb/lib/cursor/list_indexes_cursor.js +32 -0
  350. package/.output/server/node_modules/mongodb/lib/cursor/list_search_indexes_cursor.js +14 -0
  351. package/.output/server/node_modules/mongodb/lib/cursor/run_command_cursor.js +94 -0
  352. package/.output/server/node_modules/mongodb/lib/db.js +420 -0
  353. package/.output/server/node_modules/mongodb/lib/deps.js +125 -0
  354. package/.output/server/node_modules/mongodb/lib/encrypter.js +106 -0
  355. package/.output/server/node_modules/mongodb/lib/error.js +1383 -0
  356. package/.output/server/node_modules/mongodb/lib/explain.js +59 -0
  357. package/.output/server/node_modules/mongodb/lib/gridfs/download.js +305 -0
  358. package/.output/server/node_modules/mongodb/lib/gridfs/index.js +164 -0
  359. package/.output/server/node_modules/mongodb/lib/gridfs/upload.js +364 -0
  360. package/.output/server/node_modules/mongodb/lib/index.js +195 -0
  361. package/.output/server/node_modules/mongodb/lib/mongo_client.js +566 -0
  362. package/.output/server/node_modules/mongodb/lib/mongo_client_auth_providers.js +86 -0
  363. package/.output/server/node_modules/mongodb/lib/mongo_logger.js +649 -0
  364. package/.output/server/node_modules/mongodb/lib/mongo_types.js +57 -0
  365. package/.output/server/node_modules/mongodb/lib/operations/aggregate.js +93 -0
  366. package/.output/server/node_modules/mongodb/lib/operations/client_bulk_write/client_bulk_write.js +51 -0
  367. package/.output/server/node_modules/mongodb/lib/operations/client_bulk_write/command_builder.js +340 -0
  368. package/.output/server/node_modules/mongodb/lib/operations/client_bulk_write/executor.js +120 -0
  369. package/.output/server/node_modules/mongodb/lib/operations/client_bulk_write/results_merger.js +204 -0
  370. package/.output/server/node_modules/mongodb/lib/operations/command.js +83 -0
  371. package/.output/server/node_modules/mongodb/lib/operations/count.js +45 -0
  372. package/.output/server/node_modules/mongodb/lib/operations/create_collection.js +110 -0
  373. package/.output/server/node_modules/mongodb/lib/operations/delete.js +125 -0
  374. package/.output/server/node_modules/mongodb/lib/operations/distinct.js +61 -0
  375. package/.output/server/node_modules/mongodb/lib/operations/drop.js +94 -0
  376. package/.output/server/node_modules/mongodb/lib/operations/estimated_document_count.js +41 -0
  377. package/.output/server/node_modules/mongodb/lib/operations/execute_operation.js +236 -0
  378. package/.output/server/node_modules/mongodb/lib/operations/find.js +148 -0
  379. package/.output/server/node_modules/mongodb/lib/operations/find_and_modify.js +158 -0
  380. package/.output/server/node_modules/mongodb/lib/operations/get_more.js +62 -0
  381. package/.output/server/node_modules/mongodb/lib/operations/indexes.js +186 -0
  382. package/.output/server/node_modules/mongodb/lib/operations/insert.js +70 -0
  383. package/.output/server/node_modules/mongodb/lib/operations/kill_cursors.js +43 -0
  384. package/.output/server/node_modules/mongodb/lib/operations/list_collections.js +53 -0
  385. package/.output/server/node_modules/mongodb/lib/operations/list_databases.js +40 -0
  386. package/.output/server/node_modules/mongodb/lib/operations/operation.js +102 -0
  387. package/.output/server/node_modules/mongodb/lib/operations/profiling_level.js +43 -0
  388. package/.output/server/node_modules/mongodb/lib/operations/remove_user.js +27 -0
  389. package/.output/server/node_modules/mongodb/lib/operations/rename.js +38 -0
  390. package/.output/server/node_modules/mongodb/lib/operations/run_command.js +47 -0
  391. package/.output/server/node_modules/mongodb/lib/operations/search_indexes/create.js +33 -0
  392. package/.output/server/node_modules/mongodb/lib/operations/search_indexes/drop.js +43 -0
  393. package/.output/server/node_modules/mongodb/lib/operations/search_indexes/update.js +35 -0
  394. package/.output/server/node_modules/mongodb/lib/operations/set_profiling_level.js +53 -0
  395. package/.output/server/node_modules/mongodb/lib/operations/stats.js +27 -0
  396. package/.output/server/node_modules/mongodb/lib/operations/update.js +188 -0
  397. package/.output/server/node_modules/mongodb/lib/operations/validate_collection.js +37 -0
  398. package/.output/server/node_modules/mongodb/lib/read_concern.js +73 -0
  399. package/.output/server/node_modules/mongodb/lib/read_preference.js +195 -0
  400. package/.output/server/node_modules/mongodb/lib/resource_management.js +58 -0
  401. package/.output/server/node_modules/mongodb/lib/sdam/common.js +49 -0
  402. package/.output/server/node_modules/mongodb/lib/sdam/events.js +146 -0
  403. package/.output/server/node_modules/mongodb/lib/sdam/monitor.js +544 -0
  404. package/.output/server/node_modules/mongodb/lib/sdam/server.js +392 -0
  405. package/.output/server/node_modules/mongodb/lib/sdam/server_description.js +204 -0
  406. package/.output/server/node_modules/mongodb/lib/sdam/server_selection.js +231 -0
  407. package/.output/server/node_modules/mongodb/lib/sdam/server_selection_events.js +85 -0
  408. package/.output/server/node_modules/mongodb/lib/sdam/srv_polling.js +108 -0
  409. package/.output/server/node_modules/mongodb/lib/sdam/topology.js +694 -0
  410. package/.output/server/node_modules/mongodb/lib/sdam/topology_description.js +383 -0
  411. package/.output/server/node_modules/mongodb/lib/sessions.js +827 -0
  412. package/.output/server/node_modules/mongodb/lib/sort.js +103 -0
  413. package/.output/server/node_modules/mongodb/lib/timeout.js +296 -0
  414. package/.output/server/node_modules/mongodb/lib/transactions.js +146 -0
  415. package/.output/server/node_modules/mongodb/lib/utils.js +1203 -0
  416. package/.output/server/node_modules/mongodb/lib/write_concern.js +100 -0
  417. package/.output/server/node_modules/mongodb/package.json +178 -0
  418. package/.output/server/node_modules/mongodb-connection-string-url/lib/index.js +213 -0
  419. package/.output/server/node_modules/mongodb-connection-string-url/lib/redact.js +86 -0
  420. package/.output/server/node_modules/mongodb-connection-string-url/package.json +62 -0
  421. package/.output/server/node_modules/mongoose/index.js +64 -0
  422. package/.output/server/node_modules/mongoose/lib/aggregate.js +1245 -0
  423. package/.output/server/node_modules/mongoose/lib/browserDocument.js +101 -0
  424. package/.output/server/node_modules/mongoose/lib/cast/bigint.js +46 -0
  425. package/.output/server/node_modules/mongoose/lib/cast/boolean.js +32 -0
  426. package/.output/server/node_modules/mongoose/lib/cast/date.js +41 -0
  427. package/.output/server/node_modules/mongoose/lib/cast/decimal128.js +39 -0
  428. package/.output/server/node_modules/mongoose/lib/cast/double.js +50 -0
  429. package/.output/server/node_modules/mongoose/lib/cast/int32.js +36 -0
  430. package/.output/server/node_modules/mongoose/lib/cast/number.js +42 -0
  431. package/.output/server/node_modules/mongoose/lib/cast/objectid.js +29 -0
  432. package/.output/server/node_modules/mongoose/lib/cast/string.js +37 -0
  433. package/.output/server/node_modules/mongoose/lib/cast/uuid.js +78 -0
  434. package/.output/server/node_modules/mongoose/lib/cast.js +444 -0
  435. package/.output/server/node_modules/mongoose/lib/collection.js +321 -0
  436. package/.output/server/node_modules/mongoose/lib/connection.js +1850 -0
  437. package/.output/server/node_modules/mongoose/lib/connectionState.js +26 -0
  438. package/.output/server/node_modules/mongoose/lib/constants.js +73 -0
  439. package/.output/server/node_modules/mongoose/lib/cursor/aggregationCursor.js +476 -0
  440. package/.output/server/node_modules/mongoose/lib/cursor/changeStream.js +198 -0
  441. package/.output/server/node_modules/mongoose/lib/cursor/queryCursor.js +629 -0
  442. package/.output/server/node_modules/mongoose/lib/document.js +5512 -0
  443. package/.output/server/node_modules/mongoose/lib/documentProvider.js +30 -0
  444. package/.output/server/node_modules/mongoose/lib/driver.js +15 -0
  445. package/.output/server/node_modules/mongoose/lib/drivers/node-mongodb-native/bulkWriteResult.js +5 -0
  446. package/.output/server/node_modules/mongoose/lib/drivers/node-mongodb-native/collection.js +471 -0
  447. package/.output/server/node_modules/mongoose/lib/drivers/node-mongodb-native/connection.js +528 -0
  448. package/.output/server/node_modules/mongoose/lib/drivers/node-mongodb-native/index.js +10 -0
  449. package/.output/server/node_modules/mongoose/lib/error/bulkSaveIncompleteError.js +44 -0
  450. package/.output/server/node_modules/mongoose/lib/error/bulkWriteError.js +41 -0
  451. package/.output/server/node_modules/mongoose/lib/error/cast.js +158 -0
  452. package/.output/server/node_modules/mongoose/lib/error/createCollectionsError.js +26 -0
  453. package/.output/server/node_modules/mongoose/lib/error/divergentArray.js +40 -0
  454. package/.output/server/node_modules/mongoose/lib/error/eachAsyncMultiError.js +41 -0
  455. package/.output/server/node_modules/mongoose/lib/error/index.js +237 -0
  456. package/.output/server/node_modules/mongoose/lib/error/invalidSchemaOption.js +32 -0
  457. package/.output/server/node_modules/mongoose/lib/error/messages.js +47 -0
  458. package/.output/server/node_modules/mongoose/lib/error/missingSchema.js +33 -0
  459. package/.output/server/node_modules/mongoose/lib/error/mongooseError.js +13 -0
  460. package/.output/server/node_modules/mongoose/lib/error/notFound.js +47 -0
  461. package/.output/server/node_modules/mongoose/lib/error/objectExpected.js +31 -0
  462. package/.output/server/node_modules/mongoose/lib/error/objectParameter.js +32 -0
  463. package/.output/server/node_modules/mongoose/lib/error/overwriteModel.js +31 -0
  464. package/.output/server/node_modules/mongoose/lib/error/parallelSave.js +33 -0
  465. package/.output/server/node_modules/mongoose/lib/error/parallelValidate.js +33 -0
  466. package/.output/server/node_modules/mongoose/lib/error/serverSelection.js +62 -0
  467. package/.output/server/node_modules/mongoose/lib/error/setOptionError.js +103 -0
  468. package/.output/server/node_modules/mongoose/lib/error/strict.js +35 -0
  469. package/.output/server/node_modules/mongoose/lib/error/strictPopulate.js +31 -0
  470. package/.output/server/node_modules/mongoose/lib/error/syncIndexes.js +30 -0
  471. package/.output/server/node_modules/mongoose/lib/error/validation.js +105 -0
  472. package/.output/server/node_modules/mongoose/lib/error/validator.js +100 -0
  473. package/.output/server/node_modules/mongoose/lib/error/version.js +38 -0
  474. package/.output/server/node_modules/mongoose/lib/helpers/aggregate/prepareDiscriminatorPipeline.js +39 -0
  475. package/.output/server/node_modules/mongoose/lib/helpers/aggregate/stringifyFunctionOperators.js +50 -0
  476. package/.output/server/node_modules/mongoose/lib/helpers/arrayDepth.js +33 -0
  477. package/.output/server/node_modules/mongoose/lib/helpers/clone.js +236 -0
  478. package/.output/server/node_modules/mongoose/lib/helpers/common.js +127 -0
  479. package/.output/server/node_modules/mongoose/lib/helpers/createJSONSchemaTypeDefinition.js +24 -0
  480. package/.output/server/node_modules/mongoose/lib/helpers/cursor/eachAsync.js +225 -0
  481. package/.output/server/node_modules/mongoose/lib/helpers/discriminator/applyEmbeddedDiscriminators.js +36 -0
  482. package/.output/server/node_modules/mongoose/lib/helpers/discriminator/areDiscriminatorValuesEqual.js +16 -0
  483. package/.output/server/node_modules/mongoose/lib/helpers/discriminator/checkEmbeddedDiscriminatorKeyProjection.js +12 -0
  484. package/.output/server/node_modules/mongoose/lib/helpers/discriminator/getConstructor.js +29 -0
  485. package/.output/server/node_modules/mongoose/lib/helpers/discriminator/getDiscriminatorByValue.js +28 -0
  486. package/.output/server/node_modules/mongoose/lib/helpers/discriminator/getSchemaDiscriminatorByValue.js +27 -0
  487. package/.output/server/node_modules/mongoose/lib/helpers/discriminator/mergeDiscriminatorSchema.js +91 -0
  488. package/.output/server/node_modules/mongoose/lib/helpers/document/applyDefaults.js +132 -0
  489. package/.output/server/node_modules/mongoose/lib/helpers/document/applyTimestamps.js +105 -0
  490. package/.output/server/node_modules/mongoose/lib/helpers/document/applyVirtuals.js +146 -0
  491. package/.output/server/node_modules/mongoose/lib/helpers/document/cleanModifiedSubpaths.js +45 -0
  492. package/.output/server/node_modules/mongoose/lib/helpers/document/compile.js +238 -0
  493. package/.output/server/node_modules/mongoose/lib/helpers/document/getDeepestSubdocumentForPath.js +38 -0
  494. package/.output/server/node_modules/mongoose/lib/helpers/document/getEmbeddedDiscriminatorPath.js +53 -0
  495. package/.output/server/node_modules/mongoose/lib/helpers/document/handleSpreadDoc.js +35 -0
  496. package/.output/server/node_modules/mongoose/lib/helpers/each.js +25 -0
  497. package/.output/server/node_modules/mongoose/lib/helpers/error/combinePathErrors.js +22 -0
  498. package/.output/server/node_modules/mongoose/lib/helpers/firstKey.js +8 -0
  499. package/.output/server/node_modules/mongoose/lib/helpers/get.js +65 -0
  500. package/.output/server/node_modules/mongoose/lib/helpers/getConstructorName.js +16 -0
  501. package/.output/server/node_modules/mongoose/lib/helpers/getDefaultBulkwriteResult.js +18 -0
  502. package/.output/server/node_modules/mongoose/lib/helpers/getFunctionName.js +10 -0
  503. package/.output/server/node_modules/mongoose/lib/helpers/immediate.js +16 -0
  504. package/.output/server/node_modules/mongoose/lib/helpers/indexes/applySchemaCollation.js +13 -0
  505. package/.output/server/node_modules/mongoose/lib/helpers/indexes/decorateDiscriminatorIndexOptions.js +14 -0
  506. package/.output/server/node_modules/mongoose/lib/helpers/indexes/getRelatedIndexes.js +63 -0
  507. package/.output/server/node_modules/mongoose/lib/helpers/indexes/isDefaultIdIndex.js +18 -0
  508. package/.output/server/node_modules/mongoose/lib/helpers/indexes/isIndexEqual.js +96 -0
  509. package/.output/server/node_modules/mongoose/lib/helpers/indexes/isIndexSpecEqual.js +32 -0
  510. package/.output/server/node_modules/mongoose/lib/helpers/indexes/isTextIndex.js +16 -0
  511. package/.output/server/node_modules/mongoose/lib/helpers/indexes/isTimeseriesIndex.js +16 -0
  512. package/.output/server/node_modules/mongoose/lib/helpers/isAsyncFunction.js +9 -0
  513. package/.output/server/node_modules/mongoose/lib/helpers/isBsonType.js +15 -0
  514. package/.output/server/node_modules/mongoose/lib/helpers/isMongooseObject.js +22 -0
  515. package/.output/server/node_modules/mongoose/lib/helpers/isObject.js +16 -0
  516. package/.output/server/node_modules/mongoose/lib/helpers/isPOJO.js +12 -0
  517. package/.output/server/node_modules/mongoose/lib/helpers/isPromise.js +6 -0
  518. package/.output/server/node_modules/mongoose/lib/helpers/isSimpleValidator.js +22 -0
  519. package/.output/server/node_modules/mongoose/lib/helpers/minimize.js +41 -0
  520. package/.output/server/node_modules/mongoose/lib/helpers/model/applyDefaultsToPOJO.js +52 -0
  521. package/.output/server/node_modules/mongoose/lib/helpers/model/applyHooks.js +150 -0
  522. package/.output/server/node_modules/mongoose/lib/helpers/model/applyMethods.js +70 -0
  523. package/.output/server/node_modules/mongoose/lib/helpers/model/applyStaticHooks.js +80 -0
  524. package/.output/server/node_modules/mongoose/lib/helpers/model/applyStatics.js +13 -0
  525. package/.output/server/node_modules/mongoose/lib/helpers/model/castBulkWrite.js +326 -0
  526. package/.output/server/node_modules/mongoose/lib/helpers/model/decorateBulkWriteResult.js +8 -0
  527. package/.output/server/node_modules/mongoose/lib/helpers/model/discriminator.js +265 -0
  528. package/.output/server/node_modules/mongoose/lib/helpers/model/pushNestedArrayPaths.js +15 -0
  529. package/.output/server/node_modules/mongoose/lib/helpers/omitUndefined.js +20 -0
  530. package/.output/server/node_modules/mongoose/lib/helpers/parallelLimit.js +55 -0
  531. package/.output/server/node_modules/mongoose/lib/helpers/path/parentPaths.js +18 -0
  532. package/.output/server/node_modules/mongoose/lib/helpers/path/setDottedPath.js +33 -0
  533. package/.output/server/node_modules/mongoose/lib/helpers/pluralize.js +95 -0
  534. package/.output/server/node_modules/mongoose/lib/helpers/populate/assignRawDocsToIdStructure.js +136 -0
  535. package/.output/server/node_modules/mongoose/lib/helpers/populate/assignVals.js +360 -0
  536. package/.output/server/node_modules/mongoose/lib/helpers/populate/createPopulateQueryFilter.js +97 -0
  537. package/.output/server/node_modules/mongoose/lib/helpers/populate/getModelsMapForPopulate.js +766 -0
  538. package/.output/server/node_modules/mongoose/lib/helpers/populate/getSchemaTypes.js +229 -0
  539. package/.output/server/node_modules/mongoose/lib/helpers/populate/getVirtual.js +103 -0
  540. package/.output/server/node_modules/mongoose/lib/helpers/populate/leanPopulateMap.js +7 -0
  541. package/.output/server/node_modules/mongoose/lib/helpers/populate/lookupLocalFields.js +40 -0
  542. package/.output/server/node_modules/mongoose/lib/helpers/populate/markArraySubdocsPopulated.js +49 -0
  543. package/.output/server/node_modules/mongoose/lib/helpers/populate/modelNamesFromRefPath.js +66 -0
  544. package/.output/server/node_modules/mongoose/lib/helpers/populate/removeDeselectedForeignField.js +31 -0
  545. package/.output/server/node_modules/mongoose/lib/helpers/populate/setPopulatedVirtualValue.js +33 -0
  546. package/.output/server/node_modules/mongoose/lib/helpers/populate/skipPopulateValue.js +10 -0
  547. package/.output/server/node_modules/mongoose/lib/helpers/populate/validateRef.js +19 -0
  548. package/.output/server/node_modules/mongoose/lib/helpers/printJestWarning.js +21 -0
  549. package/.output/server/node_modules/mongoose/lib/helpers/processConnectionOptions.js +65 -0
  550. package/.output/server/node_modules/mongoose/lib/helpers/projection/applyProjection.js +83 -0
  551. package/.output/server/node_modules/mongoose/lib/helpers/projection/hasIncludedChildren.js +41 -0
  552. package/.output/server/node_modules/mongoose/lib/helpers/projection/isDefiningProjection.js +18 -0
  553. package/.output/server/node_modules/mongoose/lib/helpers/projection/isExclusive.js +37 -0
  554. package/.output/server/node_modules/mongoose/lib/helpers/projection/isInclusive.js +39 -0
  555. package/.output/server/node_modules/mongoose/lib/helpers/projection/isNestedProjection.js +8 -0
  556. package/.output/server/node_modules/mongoose/lib/helpers/projection/isPathExcluded.js +40 -0
  557. package/.output/server/node_modules/mongoose/lib/helpers/projection/isPathSelectedInclusive.js +28 -0
  558. package/.output/server/node_modules/mongoose/lib/helpers/projection/isSubpath.js +14 -0
  559. package/.output/server/node_modules/mongoose/lib/helpers/projection/parseProjection.js +33 -0
  560. package/.output/server/node_modules/mongoose/lib/helpers/promiseOrCallback.js +54 -0
  561. package/.output/server/node_modules/mongoose/lib/helpers/query/applyGlobalOption.js +29 -0
  562. package/.output/server/node_modules/mongoose/lib/helpers/query/cast$expr.js +289 -0
  563. package/.output/server/node_modules/mongoose/lib/helpers/query/castFilterPath.js +54 -0
  564. package/.output/server/node_modules/mongoose/lib/helpers/query/castUpdate.js +641 -0
  565. package/.output/server/node_modules/mongoose/lib/helpers/query/getEmbeddedDiscriminatorPath.js +103 -0
  566. package/.output/server/node_modules/mongoose/lib/helpers/query/handleImmutable.js +44 -0
  567. package/.output/server/node_modules/mongoose/lib/helpers/query/handleReadPreferenceAliases.js +23 -0
  568. package/.output/server/node_modules/mongoose/lib/helpers/query/hasDollarKeys.js +23 -0
  569. package/.output/server/node_modules/mongoose/lib/helpers/query/isOperator.js +14 -0
  570. package/.output/server/node_modules/mongoose/lib/helpers/query/sanitizeFilter.js +41 -0
  571. package/.output/server/node_modules/mongoose/lib/helpers/query/sanitizeProjection.js +14 -0
  572. package/.output/server/node_modules/mongoose/lib/helpers/query/selectPopulatedFields.js +62 -0
  573. package/.output/server/node_modules/mongoose/lib/helpers/query/trusted.js +13 -0
  574. package/.output/server/node_modules/mongoose/lib/helpers/schema/addAutoId.js +7 -0
  575. package/.output/server/node_modules/mongoose/lib/helpers/schema/applyBuiltinPlugins.js +12 -0
  576. package/.output/server/node_modules/mongoose/lib/helpers/schema/applyPlugins.js +55 -0
  577. package/.output/server/node_modules/mongoose/lib/helpers/schema/applyReadConcern.js +20 -0
  578. package/.output/server/node_modules/mongoose/lib/helpers/schema/applyWriteConcern.js +37 -0
  579. package/.output/server/node_modules/mongoose/lib/helpers/schema/cleanPositionalOperators.js +12 -0
  580. package/.output/server/node_modules/mongoose/lib/helpers/schema/getIndexes.js +177 -0
  581. package/.output/server/node_modules/mongoose/lib/helpers/schema/getKeysInSchemaOrder.js +28 -0
  582. package/.output/server/node_modules/mongoose/lib/helpers/schema/getPath.js +43 -0
  583. package/.output/server/node_modules/mongoose/lib/helpers/schema/getSubdocumentStrictValue.js +32 -0
  584. package/.output/server/node_modules/mongoose/lib/helpers/schema/handleIdOption.js +20 -0
  585. package/.output/server/node_modules/mongoose/lib/helpers/schema/handleTimestampOption.js +24 -0
  586. package/.output/server/node_modules/mongoose/lib/helpers/schema/idGetter.js +34 -0
  587. package/.output/server/node_modules/mongoose/lib/helpers/schema/merge.js +36 -0
  588. package/.output/server/node_modules/mongoose/lib/helpers/schematype/handleImmutable.js +50 -0
  589. package/.output/server/node_modules/mongoose/lib/helpers/setDefaultsOnInsert.js +161 -0
  590. package/.output/server/node_modules/mongoose/lib/helpers/specialProperties.js +3 -0
  591. package/.output/server/node_modules/mongoose/lib/helpers/symbols.js +20 -0
  592. package/.output/server/node_modules/mongoose/lib/helpers/timers.js +3 -0
  593. package/.output/server/node_modules/mongoose/lib/helpers/timestamps/setDocumentTimestamps.js +26 -0
  594. package/.output/server/node_modules/mongoose/lib/helpers/timestamps/setupTimestamps.js +110 -0
  595. package/.output/server/node_modules/mongoose/lib/helpers/topology/allServersUnknown.js +12 -0
  596. package/.output/server/node_modules/mongoose/lib/helpers/topology/isAtlas.js +31 -0
  597. package/.output/server/node_modules/mongoose/lib/helpers/topology/isSSLError.js +16 -0
  598. package/.output/server/node_modules/mongoose/lib/helpers/update/applyTimestampsToChildren.js +193 -0
  599. package/.output/server/node_modules/mongoose/lib/helpers/update/applyTimestampsToUpdate.js +130 -0
  600. package/.output/server/node_modules/mongoose/lib/helpers/update/castArrayFilters.js +113 -0
  601. package/.output/server/node_modules/mongoose/lib/helpers/update/decorateUpdateWithVersionKey.js +35 -0
  602. package/.output/server/node_modules/mongoose/lib/helpers/update/modifiedPaths.js +33 -0
  603. package/.output/server/node_modules/mongoose/lib/helpers/update/moveImmutableProperties.js +53 -0
  604. package/.output/server/node_modules/mongoose/lib/helpers/update/removeUnusedArrayFilters.js +32 -0
  605. package/.output/server/node_modules/mongoose/lib/helpers/update/updatedPathsByArrayFilter.js +27 -0
  606. package/.output/server/node_modules/mongoose/lib/helpers/updateValidators.js +247 -0
  607. package/.output/server/node_modules/mongoose/lib/index.js +17 -0
  608. package/.output/server/node_modules/mongoose/lib/internal.js +46 -0
  609. package/.output/server/node_modules/mongoose/lib/model.js +5208 -0
  610. package/.output/server/node_modules/mongoose/lib/modifiedPathsSnapshot.js +9 -0
  611. package/.output/server/node_modules/mongoose/lib/mongoose.js +1383 -0
  612. package/.output/server/node_modules/mongoose/lib/options/populateOptions.js +36 -0
  613. package/.output/server/node_modules/mongoose/lib/options/propertyOptions.js +8 -0
  614. package/.output/server/node_modules/mongoose/lib/options/saveOptions.js +16 -0
  615. package/.output/server/node_modules/mongoose/lib/options/schemaArrayOptions.js +78 -0
  616. package/.output/server/node_modules/mongoose/lib/options/schemaBufferOptions.js +38 -0
  617. package/.output/server/node_modules/mongoose/lib/options/schemaDateOptions.js +71 -0
  618. package/.output/server/node_modules/mongoose/lib/options/schemaDocumentArrayOptions.js +68 -0
  619. package/.output/server/node_modules/mongoose/lib/options/schemaMapOptions.js +43 -0
  620. package/.output/server/node_modules/mongoose/lib/options/schemaNumberOptions.js +101 -0
  621. package/.output/server/node_modules/mongoose/lib/options/schemaObjectIdOptions.js +64 -0
  622. package/.output/server/node_modules/mongoose/lib/options/schemaStringOptions.js +138 -0
  623. package/.output/server/node_modules/mongoose/lib/options/schemaSubdocumentOptions.js +66 -0
  624. package/.output/server/node_modules/mongoose/lib/options/schemaTypeOptions.js +244 -0
  625. package/.output/server/node_modules/mongoose/lib/options/schemaUnionOptions.js +32 -0
  626. package/.output/server/node_modules/mongoose/lib/options/virtualOptions.js +164 -0
  627. package/.output/server/node_modules/mongoose/lib/options.js +18 -0
  628. package/.output/server/node_modules/mongoose/lib/plugins/index.js +6 -0
  629. package/.output/server/node_modules/mongoose/lib/plugins/saveSubdocs.js +102 -0
  630. package/.output/server/node_modules/mongoose/lib/plugins/sharding.js +83 -0
  631. package/.output/server/node_modules/mongoose/lib/plugins/trackTransaction.js +85 -0
  632. package/.output/server/node_modules/mongoose/lib/plugins/validateBeforeSave.js +51 -0
  633. package/.output/server/node_modules/mongoose/lib/query.js +5693 -0
  634. package/.output/server/node_modules/mongoose/lib/queryHelpers.js +394 -0
  635. package/.output/server/node_modules/mongoose/lib/schema/array.js +744 -0
  636. package/.output/server/node_modules/mongoose/lib/schema/bigint.js +282 -0
  637. package/.output/server/node_modules/mongoose/lib/schema/boolean.js +332 -0
  638. package/.output/server/node_modules/mongoose/lib/schema/buffer.js +343 -0
  639. package/.output/server/node_modules/mongoose/lib/schema/date.js +467 -0
  640. package/.output/server/node_modules/mongoose/lib/schema/decimal128.js +263 -0
  641. package/.output/server/node_modules/mongoose/lib/schema/documentArray.js +701 -0
  642. package/.output/server/node_modules/mongoose/lib/schema/documentArrayElement.js +102 -0
  643. package/.output/server/node_modules/mongoose/lib/schema/double.js +246 -0
  644. package/.output/server/node_modules/mongoose/lib/schema/index.js +31 -0
  645. package/.output/server/node_modules/mongoose/lib/schema/int32.js +289 -0
  646. package/.output/server/node_modules/mongoose/lib/schema/map.js +201 -0
  647. package/.output/server/node_modules/mongoose/lib/schema/mixed.js +146 -0
  648. package/.output/server/node_modules/mongoose/lib/schema/number.js +498 -0
  649. package/.output/server/node_modules/mongoose/lib/schema/objectId.js +333 -0
  650. package/.output/server/node_modules/mongoose/lib/schema/operators/bitwise.js +38 -0
  651. package/.output/server/node_modules/mongoose/lib/schema/operators/exists.js +12 -0
  652. package/.output/server/node_modules/mongoose/lib/schema/operators/geospatial.js +107 -0
  653. package/.output/server/node_modules/mongoose/lib/schema/operators/helpers.js +32 -0
  654. package/.output/server/node_modules/mongoose/lib/schema/operators/text.js +39 -0
  655. package/.output/server/node_modules/mongoose/lib/schema/operators/type.js +20 -0
  656. package/.output/server/node_modules/mongoose/lib/schema/string.js +733 -0
  657. package/.output/server/node_modules/mongoose/lib/schema/subdocument.js +445 -0
  658. package/.output/server/node_modules/mongoose/lib/schema/symbols.js +5 -0
  659. package/.output/server/node_modules/mongoose/lib/schema/union.js +113 -0
  660. package/.output/server/node_modules/mongoose/lib/schema/uuid.js +326 -0
  661. package/.output/server/node_modules/mongoose/lib/schema.js +3185 -0
  662. package/.output/server/node_modules/mongoose/lib/schemaType.js +1853 -0
  663. package/.output/server/node_modules/mongoose/lib/stateMachine.js +232 -0
  664. package/.output/server/node_modules/mongoose/lib/types/array/index.js +119 -0
  665. package/.output/server/node_modules/mongoose/lib/types/array/isMongooseArray.js +5 -0
  666. package/.output/server/node_modules/mongoose/lib/types/array/methods/index.js +1096 -0
  667. package/.output/server/node_modules/mongoose/lib/types/arraySubdocument.js +208 -0
  668. package/.output/server/node_modules/mongoose/lib/types/buffer.js +294 -0
  669. package/.output/server/node_modules/mongoose/lib/types/decimal128.js +13 -0
  670. package/.output/server/node_modules/mongoose/lib/types/documentArray/index.js +113 -0
  671. package/.output/server/node_modules/mongoose/lib/types/documentArray/isMongooseDocumentArray.js +5 -0
  672. package/.output/server/node_modules/mongoose/lib/types/documentArray/methods/index.js +413 -0
  673. package/.output/server/node_modules/mongoose/lib/types/double.js +13 -0
  674. package/.output/server/node_modules/mongoose/lib/types/index.js +23 -0
  675. package/.output/server/node_modules/mongoose/lib/types/map.js +419 -0
  676. package/.output/server/node_modules/mongoose/lib/types/objectid.js +41 -0
  677. package/.output/server/node_modules/mongoose/lib/types/subdocument.js +492 -0
  678. package/.output/server/node_modules/mongoose/lib/types/uuid.js +13 -0
  679. package/.output/server/node_modules/mongoose/lib/utils.js +1043 -0
  680. package/.output/server/node_modules/mongoose/lib/validOptions.js +42 -0
  681. package/.output/server/node_modules/mongoose/lib/virtualType.js +204 -0
  682. package/.output/server/node_modules/mongoose/package.json +156 -0
  683. package/.output/server/node_modules/mpath/index.js +3 -0
  684. package/.output/server/node_modules/mpath/lib/index.js +336 -0
  685. package/.output/server/node_modules/mpath/lib/stringToParts.js +48 -0
  686. package/.output/server/node_modules/mpath/package.json +144 -0
  687. package/.output/server/node_modules/mquery/lib/collection/collection.js +45 -0
  688. package/.output/server/node_modules/mquery/lib/collection/index.js +13 -0
  689. package/.output/server/node_modules/mquery/lib/collection/node.js +114 -0
  690. package/.output/server/node_modules/mquery/lib/env.js +22 -0
  691. package/.output/server/node_modules/mquery/lib/mquery.js +2705 -0
  692. package/.output/server/node_modules/mquery/lib/permissions.js +78 -0
  693. package/.output/server/node_modules/mquery/lib/utils.js +297 -0
  694. package/.output/server/node_modules/mquery/package.json +38 -0
  695. package/.output/server/node_modules/ms/index.js +162 -0
  696. package/.output/server/node_modules/ms/package.json +38 -0
  697. package/.output/server/node_modules/punycode/package.json +58 -0
  698. package/.output/server/node_modules/punycode/punycode.js +443 -0
  699. package/.output/server/node_modules/sift/index.js +4 -0
  700. package/.output/server/node_modules/sift/lib/index.js +781 -0
  701. package/.output/server/node_modules/sift/package.json +61 -0
  702. package/.output/server/node_modules/smart-buffer/build/smartbuffer.js +1233 -0
  703. package/.output/server/node_modules/smart-buffer/build/utils.js +108 -0
  704. package/.output/server/node_modules/smart-buffer/package.json +81 -0
  705. package/.output/server/node_modules/socks/build/client/socksclient.js +793 -0
  706. package/.output/server/node_modules/socks/build/common/constants.js +108 -0
  707. package/.output/server/node_modules/socks/build/common/helpers.js +167 -0
  708. package/.output/server/node_modules/socks/build/common/receivebuffer.js +43 -0
  709. package/.output/server/node_modules/socks/build/common/util.js +25 -0
  710. package/.output/server/node_modules/socks/build/index.js +18 -0
  711. package/.output/server/node_modules/socks/package.json +58 -0
  712. package/.output/server/node_modules/source-map-js/lib/array-set.js +121 -0
  713. package/.output/server/node_modules/source-map-js/lib/base64-vlq.js +140 -0
  714. package/.output/server/node_modules/source-map-js/lib/base64.js +67 -0
  715. package/.output/server/node_modules/source-map-js/lib/binary-search.js +111 -0
  716. package/.output/server/node_modules/source-map-js/lib/mapping-list.js +79 -0
  717. package/.output/server/node_modules/source-map-js/lib/quick-sort.js +132 -0
  718. package/.output/server/node_modules/source-map-js/lib/source-map-consumer.js +1188 -0
  719. package/.output/server/node_modules/source-map-js/lib/source-map-generator.js +444 -0
  720. package/.output/server/node_modules/source-map-js/lib/source-node.js +413 -0
  721. package/.output/server/node_modules/source-map-js/lib/util.js +594 -0
  722. package/.output/server/node_modules/source-map-js/package.json +71 -0
  723. package/.output/server/node_modules/source-map-js/source-map.js +8 -0
  724. package/.output/server/node_modules/sparse-bitfield/index.js +95 -0
  725. package/.output/server/node_modules/sparse-bitfield/package.json +27 -0
  726. package/.output/server/node_modules/supports-color/index.js +202 -0
  727. package/.output/server/node_modules/supports-color/package.json +64 -0
  728. package/.output/server/node_modules/tailwindcss/dist/chunk-X4GG3EDV.mjs +1 -0
  729. package/.output/server/node_modules/tailwindcss/dist/colors.mjs +1 -0
  730. package/.output/server/node_modules/tailwindcss/package.json +89 -0
  731. package/.output/server/node_modules/tr46/index.js +344 -0
  732. package/.output/server/node_modules/tr46/lib/mappingTable.json +1 -0
  733. package/.output/server/node_modules/tr46/lib/regexes.js +29 -0
  734. package/.output/server/node_modules/tr46/lib/statusMapping.js +9 -0
  735. package/.output/server/node_modules/tr46/package.json +44 -0
  736. package/.output/server/node_modules/ufo/dist/index.mjs +645 -0
  737. package/.output/server/node_modules/ufo/package.json +48 -0
  738. package/.output/server/node_modules/unhead/dist/index.mjs +9 -0
  739. package/.output/server/node_modules/unhead/dist/parser.mjs +508 -0
  740. package/.output/server/node_modules/unhead/dist/plugins.mjs +101 -0
  741. package/.output/server/node_modules/unhead/dist/scripts.mjs +30 -0
  742. package/.output/server/node_modules/unhead/dist/server.mjs +180 -0
  743. package/.output/server/node_modules/unhead/dist/shared/unhead.0eF0fa-Y.mjs +236 -0
  744. package/.output/server/node_modules/unhead/dist/shared/unhead.B5FWS6X0.mjs +207 -0
  745. package/.output/server/node_modules/unhead/dist/shared/unhead.BYvz9V1x.mjs +43 -0
  746. package/.output/server/node_modules/unhead/dist/shared/unhead.BnoAbrHA.mjs +269 -0
  747. package/.output/server/node_modules/unhead/dist/shared/unhead.CbpEuj3y.mjs +71 -0
  748. package/.output/server/node_modules/unhead/dist/shared/unhead.Chhckluj.mjs +166 -0
  749. package/.output/server/node_modules/unhead/dist/shared/unhead.Ct24BOby.mjs +182 -0
  750. package/.output/server/node_modules/unhead/dist/shared/unhead.DQc16pHI.mjs +196 -0
  751. package/.output/server/node_modules/unhead/dist/shared/unhead._ybhDo-G.mjs +44 -0
  752. package/.output/server/node_modules/unhead/dist/shared/unhead.yem5I2v_.mjs +38 -0
  753. package/.output/server/node_modules/unhead/dist/utils.mjs +5 -0
  754. package/.output/server/node_modules/unhead/package.json +105 -0
  755. package/.output/server/node_modules/vue/dist/vue.cjs.js +80 -0
  756. package/.output/server/node_modules/vue/dist/vue.cjs.prod.js +66 -0
  757. package/.output/server/node_modules/vue/index.js +7 -0
  758. package/.output/server/node_modules/vue/index.mjs +1 -0
  759. package/.output/server/node_modules/vue/package.json +112 -0
  760. package/.output/server/node_modules/vue/server-renderer/index.mjs +1 -0
  761. package/.output/server/node_modules/vue-bundle-renderer/dist/runtime.mjs +301 -0
  762. package/.output/server/node_modules/vue-bundle-renderer/package.json +55 -0
  763. package/.output/server/node_modules/webidl-conversions/lib/index.js +450 -0
  764. package/.output/server/node_modules/webidl-conversions/package.json +35 -0
  765. package/.output/server/node_modules/whatwg-url/index.js +27 -0
  766. package/.output/server/node_modules/whatwg-url/lib/Function.js +42 -0
  767. package/.output/server/node_modules/whatwg-url/lib/URL-impl.js +233 -0
  768. package/.output/server/node_modules/whatwg-url/lib/URL.js +499 -0
  769. package/.output/server/node_modules/whatwg-url/lib/URLSearchParams-impl.js +135 -0
  770. package/.output/server/node_modules/whatwg-url/lib/URLSearchParams.js +505 -0
  771. package/.output/server/node_modules/whatwg-url/lib/encoding.js +16 -0
  772. package/.output/server/node_modules/whatwg-url/lib/infra.js +26 -0
  773. package/.output/server/node_modules/whatwg-url/lib/percent-encoding.js +142 -0
  774. package/.output/server/node_modules/whatwg-url/lib/url-state-machine.js +1274 -0
  775. package/.output/server/node_modules/whatwg-url/lib/urlencoded.js +89 -0
  776. package/.output/server/node_modules/whatwg-url/lib/utils.js +190 -0
  777. package/.output/server/node_modules/whatwg-url/package.json +53 -0
  778. package/.output/server/node_modules/whatwg-url/webidl2js-wrapper.js +7 -0
  779. package/.output/server/node_modules/zod/index.js +4 -0
  780. package/.output/server/node_modules/zod/package.json +135 -0
  781. package/.output/server/node_modules/zod/v4/classic/checks.js +1 -0
  782. package/.output/server/node_modules/zod/v4/classic/coerce.js +17 -0
  783. package/.output/server/node_modules/zod/v4/classic/compat.js +31 -0
  784. package/.output/server/node_modules/zod/v4/classic/errors.js +48 -0
  785. package/.output/server/node_modules/zod/v4/classic/external.js +20 -0
  786. package/.output/server/node_modules/zod/v4/classic/from-json-schema.js +584 -0
  787. package/.output/server/node_modules/zod/v4/classic/index.js +4 -0
  788. package/.output/server/node_modules/zod/v4/classic/iso.js +30 -0
  789. package/.output/server/node_modules/zod/v4/classic/package.json +6 -0
  790. package/.output/server/node_modules/zod/v4/classic/parse.js +15 -0
  791. package/.output/server/node_modules/zod/v4/classic/schemas.js +1157 -0
  792. package/.output/server/node_modules/zod/v4/core/api.js +1082 -0
  793. package/.output/server/node_modules/zod/v4/core/checks.js +575 -0
  794. package/.output/server/node_modules/zod/v4/core/core.js +76 -0
  795. package/.output/server/node_modules/zod/v4/core/doc.js +35 -0
  796. package/.output/server/node_modules/zod/v4/core/errors.js +182 -0
  797. package/.output/server/node_modules/zod/v4/core/index.js +16 -0
  798. package/.output/server/node_modules/zod/v4/core/json-schema-generator.js +95 -0
  799. package/.output/server/node_modules/zod/v4/core/json-schema-processors.js +605 -0
  800. package/.output/server/node_modules/zod/v4/core/json-schema.js +1 -0
  801. package/.output/server/node_modules/zod/v4/core/package.json +6 -0
  802. package/.output/server/node_modules/zod/v4/core/parse.js +93 -0
  803. package/.output/server/node_modules/zod/v4/core/regexes.js +133 -0
  804. package/.output/server/node_modules/zod/v4/core/registries.js +51 -0
  805. package/.output/server/node_modules/zod/v4/core/schemas.js +2093 -0
  806. package/.output/server/node_modules/zod/v4/core/to-json-schema.js +437 -0
  807. package/.output/server/node_modules/zod/v4/core/util.js +651 -0
  808. package/.output/server/node_modules/zod/v4/core/versions.js +5 -0
  809. package/.output/server/node_modules/zod/v4/index.js +3 -0
  810. package/.output/server/node_modules/zod/v4/locales/ar.js +106 -0
  811. package/.output/server/node_modules/zod/v4/locales/az.js +105 -0
  812. package/.output/server/node_modules/zod/v4/locales/be.js +156 -0
  813. package/.output/server/node_modules/zod/v4/locales/bg.js +120 -0
  814. package/.output/server/node_modules/zod/v4/locales/ca.js +107 -0
  815. package/.output/server/node_modules/zod/v4/locales/cs.js +111 -0
  816. package/.output/server/node_modules/zod/v4/locales/da.js +115 -0
  817. package/.output/server/node_modules/zod/v4/locales/de.js +108 -0
  818. package/.output/server/node_modules/zod/v4/locales/en.js +109 -0
  819. package/.output/server/node_modules/zod/v4/locales/eo.js +109 -0
  820. package/.output/server/node_modules/zod/v4/locales/es.js +132 -0
  821. package/.output/server/node_modules/zod/v4/locales/fa.js +114 -0
  822. package/.output/server/node_modules/zod/v4/locales/fi.js +112 -0
  823. package/.output/server/node_modules/zod/v4/locales/fr-CA.js +107 -0
  824. package/.output/server/node_modules/zod/v4/locales/fr.js +108 -0
  825. package/.output/server/node_modules/zod/v4/locales/he.js +214 -0
  826. package/.output/server/node_modules/zod/v4/locales/hu.js +108 -0
  827. package/.output/server/node_modules/zod/v4/locales/hy.js +147 -0
  828. package/.output/server/node_modules/zod/v4/locales/id.js +106 -0
  829. package/.output/server/node_modules/zod/v4/locales/index.js +49 -0
  830. package/.output/server/node_modules/zod/v4/locales/is.js +109 -0
  831. package/.output/server/node_modules/zod/v4/locales/it.js +108 -0
  832. package/.output/server/node_modules/zod/v4/locales/ja.js +107 -0
  833. package/.output/server/node_modules/zod/v4/locales/ka.js +112 -0
  834. package/.output/server/node_modules/zod/v4/locales/kh.js +5 -0
  835. package/.output/server/node_modules/zod/v4/locales/km.js +110 -0
  836. package/.output/server/node_modules/zod/v4/locales/ko.js +111 -0
  837. package/.output/server/node_modules/zod/v4/locales/lt.js +203 -0
  838. package/.output/server/node_modules/zod/v4/locales/mk.js +109 -0
  839. package/.output/server/node_modules/zod/v4/locales/ms.js +107 -0
  840. package/.output/server/node_modules/zod/v4/locales/nl.js +110 -0
  841. package/.output/server/node_modules/zod/v4/locales/no.js +108 -0
  842. package/.output/server/node_modules/zod/v4/locales/ota.js +109 -0
  843. package/.output/server/node_modules/zod/v4/locales/package.json +6 -0
  844. package/.output/server/node_modules/zod/v4/locales/pl.js +109 -0
  845. package/.output/server/node_modules/zod/v4/locales/ps.js +114 -0
  846. package/.output/server/node_modules/zod/v4/locales/pt.js +108 -0
  847. package/.output/server/node_modules/zod/v4/locales/ru.js +156 -0
  848. package/.output/server/node_modules/zod/v4/locales/sl.js +109 -0
  849. package/.output/server/node_modules/zod/v4/locales/sv.js +110 -0
  850. package/.output/server/node_modules/zod/v4/locales/ta.js +110 -0
  851. package/.output/server/node_modules/zod/v4/locales/th.js +110 -0
  852. package/.output/server/node_modules/zod/v4/locales/tr.js +105 -0
  853. package/.output/server/node_modules/zod/v4/locales/ua.js +5 -0
  854. package/.output/server/node_modules/zod/v4/locales/uk.js +108 -0
  855. package/.output/server/node_modules/zod/v4/locales/ur.js +110 -0
  856. package/.output/server/node_modules/zod/v4/locales/uz.js +109 -0
  857. package/.output/server/node_modules/zod/v4/locales/vi.js +108 -0
  858. package/.output/server/node_modules/zod/v4/locales/yo.js +107 -0
  859. package/.output/server/node_modules/zod/v4/locales/zh-CN.js +109 -0
  860. package/.output/server/node_modules/zod/v4/locales/zh-TW.js +107 -0
  861. package/.output/server/node_modules/zod/v4/package.json +6 -0
  862. package/.output/server/package.json +53 -0
  863. package/README.md +131 -0
  864. package/app/app.vue +7 -0
  865. package/app/assets/css/main.css +2 -0
  866. package/app/components/StudioEditor.vue +114 -0
  867. package/app/components/StudioOutput.vue +43 -0
  868. package/app/components/ZodMongooseStudio.vue +121 -0
  869. package/app/pages/index.vue +3 -0
  870. package/app/plugins/monaco.client.ts +14 -0
  871. package/bin/index.mjs +69 -0
  872. package/nuxt.config.ts +18 -0
  873. package/package.json +49 -0
  874. package/server/api/parse.post.ts +90 -0
  875. package/server/api/resolve.get.ts +38 -0
  876. package/server/middleware/security.ts +40 -0
@@ -0,0 +1,1383 @@
1
+ 'use strict';
2
+
3
+ /*!
4
+ * Module dependencies.
5
+ */
6
+
7
+ const Document = require('./document');
8
+ const EventEmitter = require('events').EventEmitter;
9
+ const Kareem = require('kareem');
10
+ const Schema = require('./schema');
11
+ const SchemaType = require('./schemaType');
12
+ const SchemaTypes = require('./schema/index');
13
+ const VirtualType = require('./virtualType');
14
+ const STATES = require('./connectionState');
15
+ const VALID_OPTIONS = require('./validOptions');
16
+ const Types = require('./types');
17
+ const Query = require('./query');
18
+ const Model = require('./model');
19
+ const applyPlugins = require('./helpers/schema/applyPlugins');
20
+ const builtinPlugins = require('./plugins');
21
+ const driver = require('./driver');
22
+ const legacyPluralize = require('./helpers/pluralize');
23
+ const utils = require('./utils');
24
+ const pkg = require('../package.json');
25
+ const cast = require('./cast');
26
+
27
+ const Aggregate = require('./aggregate');
28
+ const trusted = require('./helpers/query/trusted').trusted;
29
+ const sanitizeFilter = require('./helpers/query/sanitizeFilter');
30
+ const isBsonType = require('./helpers/isBsonType');
31
+ const MongooseError = require('./error/mongooseError');
32
+ const SetOptionError = require('./error/setOptionError');
33
+ const applyEmbeddedDiscriminators = require('./helpers/discriminator/applyEmbeddedDiscriminators');
34
+
35
+ const defaultMongooseSymbol = Symbol.for('mongoose:default');
36
+ const defaultConnectionSymbol = Symbol('mongoose:defaultConnection');
37
+
38
+ require('./helpers/printJestWarning');
39
+
40
+ const objectIdHexRegexp = /^[0-9A-Fa-f]{24}$/;
41
+
42
+ const { AsyncLocalStorage } = require('node:async_hooks');
43
+
44
+ /**
45
+ * Mongoose constructor.
46
+ *
47
+ * The exports object of the `mongoose` module is an instance of this class.
48
+ * Most apps will only use this one instance.
49
+ *
50
+ * #### Example:
51
+ *
52
+ * const mongoose = require('mongoose');
53
+ * mongoose instanceof mongoose.Mongoose; // true
54
+ *
55
+ * // Create a new Mongoose instance with its own `connect()`, `set()`, `model()`, etc.
56
+ * const m = new mongoose.Mongoose();
57
+ *
58
+ * @api public
59
+ * @param {Object} options see [`Mongoose#set()` docs](https://mongoosejs.com/docs/api/mongoose.html#Mongoose.prototype.set())
60
+ */
61
+ function Mongoose(options) {
62
+ this.connections = [];
63
+ this.nextConnectionId = 0;
64
+ this.models = {};
65
+ this.events = new EventEmitter();
66
+ this.__driver = driver.get();
67
+ // default global options
68
+ this.options = Object.assign({
69
+ pluralization: true,
70
+ autoIndex: true,
71
+ autoCreate: true,
72
+ autoSearchIndex: false
73
+ }, options);
74
+ const createInitialConnection = utils.getOption('createInitialConnection', this.options) ?? true;
75
+ if (createInitialConnection && this.__driver != null) {
76
+ _createDefaultConnection(this);
77
+ }
78
+
79
+ if (this.options.pluralization) {
80
+ this._pluralize = legacyPluralize;
81
+ }
82
+
83
+ // If a user creates their own Mongoose instance, give them a separate copy
84
+ // of the `Schema` constructor so they get separate custom types. (gh-6933)
85
+ if (!options || !options[defaultMongooseSymbol]) {
86
+ const _this = this;
87
+ this.Schema = function() {
88
+ this.base = _this;
89
+ return Schema.apply(this, arguments);
90
+ };
91
+ this.Schema.prototype = Object.create(Schema.prototype);
92
+
93
+ Object.assign(this.Schema, Schema);
94
+ this.Schema.base = this;
95
+ this.Schema.Types = Object.assign({}, Schema.Types);
96
+ } else {
97
+ // Hack to work around babel's strange behavior with
98
+ // `import mongoose, { Schema } from 'mongoose'`. Because `Schema` is not
99
+ // an own property of a Mongoose global, Schema will be undefined. See gh-5648
100
+ for (const key of ['Schema', 'model']) {
101
+ this[key] = Mongoose.prototype[key];
102
+ }
103
+ }
104
+ this.Schema.prototype.base = this;
105
+
106
+ if (options?.transactionAsyncLocalStorage) {
107
+ this.transactionAsyncLocalStorage = new AsyncLocalStorage();
108
+ }
109
+
110
+ Object.defineProperty(this, 'plugins', {
111
+ configurable: false,
112
+ enumerable: true,
113
+ writable: false,
114
+ value: Object.values(builtinPlugins).map(plugin => ([plugin, { deduplicate: true }]))
115
+ });
116
+ }
117
+
118
+ Mongoose.prototype.cast = cast;
119
+ /**
120
+ * Expose connection states for user-land
121
+ *
122
+ * @memberOf Mongoose
123
+ * @property STATES
124
+ * @api public
125
+ */
126
+ Mongoose.prototype.STATES = STATES;
127
+
128
+ /**
129
+ * Expose connection states for user-land
130
+ *
131
+ * @memberOf Mongoose
132
+ * @property ConnectionStates
133
+ * @api public
134
+ */
135
+ Mongoose.prototype.ConnectionStates = STATES;
136
+
137
+ /**
138
+ * Object with `get()` and `set()` containing the underlying driver this Mongoose instance
139
+ * uses to communicate with the database. A driver is a Mongoose-specific interface that defines functions
140
+ * like `find()`.
141
+ *
142
+ * @deprecated
143
+ * @memberOf Mongoose
144
+ * @property driver
145
+ * @api public
146
+ */
147
+
148
+ Mongoose.prototype.driver = driver;
149
+
150
+ /**
151
+ * Overwrites the current driver used by this Mongoose instance. A driver is a
152
+ * Mongoose-specific interface that defines functions like `find()`.
153
+ *
154
+ * @memberOf Mongoose
155
+ * @method setDriver
156
+ * @api public
157
+ */
158
+
159
+ Mongoose.prototype.setDriver = function setDriver(driver) {
160
+ const _mongoose = this instanceof Mongoose ? this : mongoose;
161
+
162
+ if (_mongoose.__driver === driver) {
163
+ return _mongoose;
164
+ }
165
+
166
+ const openConnection = _mongoose.connections && _mongoose.connections.find(conn => conn.readyState !== STATES.disconnected);
167
+ if (openConnection) {
168
+ const msg = 'Cannot modify Mongoose driver if a connection is already open. ' +
169
+ 'Call `mongoose.disconnect()` before modifying the driver';
170
+ throw new MongooseError(msg);
171
+ }
172
+ _mongoose.__driver = driver;
173
+
174
+ if (Array.isArray(driver.plugins)) {
175
+ for (const plugin of driver.plugins) {
176
+ if (typeof plugin === 'function') {
177
+ _mongoose.plugin(plugin);
178
+ }
179
+ }
180
+ }
181
+
182
+ if (driver.SchemaTypes != null) {
183
+ Object.assign(mongoose.Schema.Types, driver.SchemaTypes);
184
+ }
185
+
186
+ const Connection = driver.Connection;
187
+ const oldDefaultConnection = _mongoose.connections[0];
188
+ _mongoose.connections = [new Connection(_mongoose)];
189
+ _mongoose.connections[0].models = _mongoose.models;
190
+ if (oldDefaultConnection == null) {
191
+ return _mongoose;
192
+ }
193
+
194
+ // Update all models that pointed to the old default connection to
195
+ // the new default connection, including collections
196
+ for (const model of Object.values(_mongoose.models)) {
197
+ if (model.db !== oldDefaultConnection) {
198
+ continue;
199
+ }
200
+ model.$__updateConnection(_mongoose.connections[0]);
201
+ }
202
+
203
+ return _mongoose;
204
+ };
205
+
206
+ /**
207
+ * Sets mongoose options
208
+ *
209
+ * `key` can be used a object to set multiple options at once.
210
+ * If a error gets thrown for one option, other options will still be evaluated.
211
+ *
212
+ * #### Example:
213
+ *
214
+ * mongoose.set('test', value) // sets the 'test' option to `value`
215
+ *
216
+ * mongoose.set('debug', true) // enable logging collection methods + arguments to the console/file
217
+ *
218
+ * mongoose.set('debug', function(collectionName, methodName, ...methodArgs) {}); // use custom function to log collection methods + arguments
219
+ *
220
+ * mongoose.set({ debug: true, autoIndex: false }); // set multiple options at once
221
+ *
222
+ * Currently supported options are:
223
+ * - `allowDiskUse`: Set to `true` to set `allowDiskUse` to true to all aggregation operations by default.
224
+ * - `applyPluginsToChildSchemas`: `true` by default. Set to false to skip applying global plugins to child schemas
225
+ * - `applyPluginsToDiscriminators`: `false` by default. Set to true to apply global plugins to discriminator schemas. This typically isn't necessary because plugins are applied to the base schema and discriminators copy all middleware, methods, statics, and properties from the base schema.
226
+ * - `autoCreate`: Set to `true` to make Mongoose call [`Model.createCollection()`](https://mongoosejs.com/docs/api/model.html#Model.createCollection()) automatically when you create a model with `mongoose.model()` or `conn.model()`. This is useful for testing transactions, change streams, and other features that require the collection to exist.
227
+ * - `autoIndex`: `true` by default. Set to false to disable automatic index creation for all models associated with this Mongoose instance.
228
+ * - `bufferCommands`: enable/disable mongoose's buffering mechanism for all connections and models
229
+ * - `bufferTimeoutMS`: If bufferCommands is on, this option sets the maximum amount of time Mongoose buffering will wait before throwing an error. If not specified, Mongoose will use 10000 (10 seconds).
230
+ * - `cloneSchemas`: `false` by default. Set to `true` to `clone()` all schemas before compiling into a model.
231
+ * - `debug`: If `true`, prints the operations mongoose sends to MongoDB to the console. If a writable stream is passed, it will log to that stream, without colorization. If a callback function is passed, it will receive the collection name, the method name, then all arguments passed to the method. For example, if you wanted to replicate the default logging, you could output from the callback `Mongoose: ${collectionName}.${methodName}(${methodArgs.join(', ')})`.
232
+ * - `id`: If `true`, adds a `id` virtual to all schemas unless overwritten on a per-schema basis.
233
+ * - `timestamps.createdAt.immutable`: `true` by default. If `false`, it will change the `createdAt` field to be [`immutable: false`](https://mongoosejs.com/docs/api/schematype.html#SchemaType.prototype.immutable) which means you can update the `createdAt`
234
+ * - `maxTimeMS`: If set, attaches [maxTimeMS](https://www.mongodb.com/docs/manual/reference/operator/meta/maxTimeMS/) to every query
235
+ * - `objectIdGetter`: `true` by default. Mongoose adds a getter to MongoDB ObjectId's called `_id` that returns `this` for convenience with populate. Set this to false to remove the getter.
236
+ * - `overwriteModels`: Set to `true` to default to overwriting models with the same name when calling `mongoose.model()`, as opposed to throwing an `OverwriteModelError`.
237
+ * - `returnOriginal`: If `false`, changes the default `returnOriginal` option to `findOneAndUpdate()`, `findByIdAndUpdate`, and `findOneAndReplace()` to false. This is equivalent to setting the `new` option to `true` for `findOneAndX()` calls by default. Read our [`findOneAndUpdate()` tutorial](https://mongoosejs.com/docs/tutorials/findoneandupdate.html) for more information.
238
+ * - `runValidators`: `false` by default. Set to true to enable [update validators](https://mongoosejs.com/docs/validation.html#update-validators) for all validators by default.
239
+ * - `sanitizeFilter`: `false` by default. Set to true to enable the [sanitization of the query filters](https://mongoosejs.com/docs/api/mongoose.html#Mongoose.prototype.sanitizeFilter()) against query selector injection attacks by wrapping any nested objects that have a property whose name starts with `$` in a `$eq`.
240
+ * - `selectPopulatedPaths`: `true` by default. Set to false to opt out of Mongoose adding all fields that you `populate()` to your `select()`. The schema-level option `selectPopulatedPaths` overwrites this one.
241
+ * - `strict`: `true` by default, may be `false`, `true`, or `'throw'`. Sets the default strict mode for schemas.
242
+ * - `strictQuery`: `false` by default. May be `false`, `true`, or `'throw'`. Sets the default [strictQuery](https://mongoosejs.com/docs/guide.html#strictQuery) mode for schemas.
243
+ * - `toJSON`: `{ transform: true, flattenDecimals: true }` by default. Overwrites default objects to [`toJSON()`](https://mongoosejs.com/docs/api/document.html#Document.prototype.toJSON()), for determining how Mongoose documents get serialized by `JSON.stringify()`
244
+ * - `toObject`: `{ transform: true, flattenDecimals: true }` by default. Overwrites default objects to [`toObject()`](https://mongoosejs.com/docs/api/document.html#Document.prototype.toObject())
245
+ *
246
+ * @param {String|Object} key The name of the option or a object of multiple key-value pairs
247
+ * @param {String|Function|Boolean} value The value of the option, unused if "key" is a object
248
+ * @returns {Mongoose} The used Mongoose instnace
249
+ * @api public
250
+ */
251
+
252
+ Mongoose.prototype.set = function getsetOptions(key, value) {
253
+ const _mongoose = this instanceof Mongoose ? this : mongoose;
254
+
255
+ if (arguments.length === 1 && typeof key !== 'object') {
256
+ if (VALID_OPTIONS.indexOf(key) === -1) {
257
+ const error = new SetOptionError();
258
+ error.addError(key, new SetOptionError.SetOptionInnerError(key));
259
+ throw error;
260
+ }
261
+
262
+ return _mongoose.options[key];
263
+ }
264
+
265
+ let options = {};
266
+
267
+ if (arguments.length === 2) {
268
+ options = { [key]: value };
269
+ }
270
+
271
+ if (arguments.length === 1 && typeof key === 'object') {
272
+ options = key;
273
+ }
274
+
275
+ // array for errors to collect all errors for all key-value pairs, like ".validate"
276
+ let error = undefined;
277
+
278
+ for (const [optionKey, optionValue] of Object.entries(options)) {
279
+ if (VALID_OPTIONS.indexOf(optionKey) === -1) {
280
+ if (!error) {
281
+ error = new SetOptionError();
282
+ }
283
+ error.addError(optionKey, new SetOptionError.SetOptionInnerError(optionKey));
284
+ continue;
285
+ }
286
+
287
+ _mongoose.options[optionKey] = optionValue;
288
+
289
+ if (optionKey === 'objectIdGetter') {
290
+ if (optionValue) {
291
+ Object.defineProperty(_mongoose.Types.ObjectId.prototype, '_id', {
292
+ enumerable: false,
293
+ configurable: true,
294
+ get: function() {
295
+ return this;
296
+ }
297
+ });
298
+ } else {
299
+ delete _mongoose.Types.ObjectId.prototype._id;
300
+ }
301
+ } else if (optionKey === 'transactionAsyncLocalStorage') {
302
+ if (optionValue && !_mongoose.transactionAsyncLocalStorage) {
303
+ _mongoose.transactionAsyncLocalStorage = new AsyncLocalStorage();
304
+ } else if (!optionValue && _mongoose.transactionAsyncLocalStorage) {
305
+ delete _mongoose.transactionAsyncLocalStorage;
306
+ }
307
+ } else if (optionKey === 'createInitialConnection') {
308
+ if (optionValue && !_mongoose.connection) {
309
+ _createDefaultConnection(_mongoose);
310
+ } else if (optionValue === false && _mongoose.connection && _mongoose.connection[defaultConnectionSymbol]) {
311
+ if (_mongoose.connection.readyState === STATES.disconnected && Object.keys(_mongoose.connection.models).length === 0) {
312
+ _mongoose.connections.shift();
313
+ }
314
+ }
315
+ }
316
+ }
317
+
318
+ if (error) {
319
+ throw error;
320
+ }
321
+
322
+ return _mongoose;
323
+ };
324
+
325
+ /**
326
+ * Gets mongoose options
327
+ *
328
+ * #### Example:
329
+ *
330
+ * mongoose.get('test') // returns the 'test' value
331
+ *
332
+ * @param {String} key
333
+ * @method get
334
+ * @api public
335
+ */
336
+
337
+ Mongoose.prototype.get = Mongoose.prototype.set;
338
+
339
+ /**
340
+ * Creates a Connection instance.
341
+ *
342
+ * Each `connection` instance maps to a single database. This method is helpful when managing multiple db connections.
343
+ *
344
+ *
345
+ * _Options passed take precedence over options included in connection strings._
346
+ *
347
+ * #### Example:
348
+ *
349
+ * // with mongodb:// URI
350
+ * db = mongoose.createConnection('mongodb://user:pass@127.0.0.1:port/database');
351
+ *
352
+ * // and options
353
+ * const opts = { db: { native_parser: true }}
354
+ * db = mongoose.createConnection('mongodb://user:pass@127.0.0.1:port/database', opts);
355
+ *
356
+ * // replica sets
357
+ * db = mongoose.createConnection('mongodb://user:pass@127.0.0.1:port,anotherhost:port,yetanother:port/database');
358
+ *
359
+ * // and options
360
+ * const opts = { replset: { strategy: 'ping', rs_name: 'testSet' }}
361
+ * db = mongoose.createConnection('mongodb://user:pass@127.0.0.1:port,anotherhost:port,yetanother:port/database', opts);
362
+ *
363
+ * // initialize now, connect later
364
+ * db = mongoose.createConnection();
365
+ * await db.openUri('mongodb://127.0.0.1:27017/database');
366
+ *
367
+ * @param {String} uri mongodb URI to connect to
368
+ * @param {Object} [options] passed down to the [MongoDB driver's `connect()` function](https://mongodb.github.io/node-mongodb-native/4.9/interfaces/MongoClientOptions.html), except for 4 mongoose-specific options explained below.
369
+ * @param {Boolean} [options.bufferCommands=true] Mongoose specific option. Set to false to [disable buffering](https://mongoosejs.com/docs/faq.html#callback_never_executes) on all models associated with this connection.
370
+ * @param {String} [options.dbName] The name of the database you want to use. If not provided, Mongoose uses the database name from connection string.
371
+ * @param {String} [options.user] username for authentication, equivalent to `options.auth.username`. Maintained for backwards compatibility.
372
+ * @param {String} [options.pass] password for authentication, equivalent to `options.auth.password`. Maintained for backwards compatibility.
373
+ * @param {Boolean} [options.autoIndex=true] Mongoose-specific option. Set to false to disable automatic index creation for all models associated with this connection.
374
+ * @param {Class} [options.promiseLibrary] Sets the [underlying driver's promise library](https://mongodb.github.io/node-mongodb-native/4.9/interfaces/MongoClientOptions.html#promiseLibrary).
375
+ * @param {Number} [options.maxPoolSize=5] The maximum number of sockets the MongoDB driver will keep open for this connection. Keep in mind that MongoDB only allows one operation per socket at a time, so you may want to increase this if you find you have a few slow queries that are blocking faster queries from proceeding. See [Slow Trains in MongoDB and Node.js](https://thecodebarbarian.com/slow-trains-in-mongodb-and-nodejs).
376
+ * @param {Number} [options.minPoolSize=1] The minimum number of sockets the MongoDB driver will keep open for this connection. Keep in mind that MongoDB only allows one operation per socket at a time, so you may want to increase this if you find you have a few slow queries that are blocking faster queries from proceeding. See [Slow Trains in MongoDB and Node.js](https://thecodebarbarian.com/slow-trains-in-mongodb-and-nodejs).
377
+ * @param {Number} [options.socketTimeoutMS=0] How long the MongoDB driver will wait before killing a socket due to inactivity _after initial connection_. Defaults to 0, which means Node.js will not time out the socket due to inactivity. A socket may be inactive because of either no activity or a long-running operation. This option is passed to [Node.js `socket#setTimeout()` function](https://nodejs.org/api/net.html#net_socket_settimeout_timeout_callback) after the MongoDB driver successfully completes.
378
+ * @param {Number} [options.family=0] Passed transparently to [Node.js' `dns.lookup()`](https://nodejs.org/api/dns.html#dns_dns_lookup_hostname_options_callback) function. May be either `0`, `4`, or `6`. `4` means use IPv4 only, `6` means use IPv6 only, `0` means try both.
379
+ * @return {Connection} the created Connection object. Connections are not thenable, so you can't do `await mongoose.createConnection()`. To await use `mongoose.createConnection(uri).asPromise()` instead.
380
+ * @api public
381
+ */
382
+
383
+ Mongoose.prototype.createConnection = function createConnection(uri, options) {
384
+ const _mongoose = this instanceof Mongoose ? this : mongoose;
385
+
386
+ const Connection = _mongoose.__driver.Connection;
387
+ const conn = new Connection(_mongoose);
388
+ _mongoose.connections.push(conn);
389
+ _mongoose.nextConnectionId++;
390
+ _mongoose.events.emit('createConnection', conn);
391
+
392
+ if (arguments.length > 0) {
393
+ conn.openUri(uri, { ...options, _fireAndForget: true });
394
+ }
395
+
396
+ return conn;
397
+ };
398
+
399
+ /**
400
+ * Opens the default mongoose connection.
401
+ *
402
+ * #### Example:
403
+ *
404
+ * mongoose.connect('mongodb://user:pass@127.0.0.1:port/database');
405
+ *
406
+ * // replica sets
407
+ * const uri = 'mongodb://user:pass@127.0.0.1:port,anotherhost:port,yetanother:port/mydatabase';
408
+ * mongoose.connect(uri);
409
+ *
410
+ * // with options
411
+ * mongoose.connect(uri, options);
412
+ *
413
+ * // Using `await` throws "MongooseServerSelectionError: Server selection timed out after 30000 ms"
414
+ * // if Mongoose can't connect.
415
+ * const uri = 'mongodb://nonexistent.domain:27000';
416
+ * await mongoose.connect(uri);
417
+ *
418
+ * @param {String} uri mongodb URI to connect to
419
+ * @param {Object} [options] passed down to the [MongoDB driver's `connect()` function](https://mongodb.github.io/node-mongodb-native/4.9/interfaces/MongoClientOptions.html), except for 4 mongoose-specific options explained below.
420
+ * @param {Boolean} [options.bufferCommands=true] Mongoose specific option. Set to false to [disable buffering](https://mongoosejs.com/docs/faq.html#callback_never_executes) on all models associated with this connection.
421
+ * @param {Number} [options.bufferTimeoutMS=10000] Mongoose specific option. If `bufferCommands` is true, Mongoose will throw an error after `bufferTimeoutMS` if the operation is still buffered.
422
+ * @param {String} [options.dbName] The name of the database we want to use. If not provided, use database name from connection string.
423
+ * @param {String} [options.user] username for authentication, equivalent to `options.auth.username`. Maintained for backwards compatibility.
424
+ * @param {String} [options.pass] password for authentication, equivalent to `options.auth.password`. Maintained for backwards compatibility.
425
+ * @param {Number} [options.maxPoolSize=100] The maximum number of sockets the MongoDB driver will keep open for this connection. Keep in mind that MongoDB only allows one operation per socket at a time, so you may want to increase this if you find you have a few slow queries that are blocking faster queries from proceeding. See [Slow Trains in MongoDB and Node.js](https://thecodebarbarian.com/slow-trains-in-mongodb-and-nodejs).
426
+ * @param {Number} [options.minPoolSize=0] The minimum number of sockets the MongoDB driver will keep open for this connection.
427
+ * @param {Number} [options.serverSelectionTimeoutMS] If `useUnifiedTopology = true`, the MongoDB driver will try to find a server to send any given operation to, and keep retrying for `serverSelectionTimeoutMS` milliseconds before erroring out. If not set, the MongoDB driver defaults to using `30000` (30 seconds).
428
+ * @param {Number} [options.heartbeatFrequencyMS] If `useUnifiedTopology = true`, the MongoDB driver sends a heartbeat every `heartbeatFrequencyMS` to check on the status of the connection. A heartbeat is subject to `serverSelectionTimeoutMS`, so the MongoDB driver will retry failed heartbeats for up to 30 seconds by default. Mongoose only emits a `'disconnected'` event after a heartbeat has failed, so you may want to decrease this setting to reduce the time between when your server goes down and when Mongoose emits `'disconnected'`. We recommend you do **not** set this setting below 1000, too many heartbeats can lead to performance degradation.
429
+ * @param {Boolean} [options.autoIndex=true] Mongoose-specific option. Set to false to disable automatic index creation for all models associated with this connection.
430
+ * @param {Class} [options.promiseLibrary] Sets the [underlying driver's promise library](https://mongodb.github.io/node-mongodb-native/4.9/interfaces/MongoClientOptions.html#promiseLibrary).
431
+ * @param {Number} [options.socketTimeoutMS=0] How long the MongoDB driver will wait before killing a socket due to inactivity _after initial connection_. A socket may be inactive because of either no activity or a long-running operation. `socketTimeoutMS` defaults to 0, which means Node.js will not time out the socket due to inactivity. This option is passed to [Node.js `socket#setTimeout()` function](https://nodejs.org/api/net.html#net_socket_settimeout_timeout_callback) after the MongoDB driver successfully completes.
432
+ * @param {Number} [options.family=0] Passed transparently to [Node.js' `dns.lookup()`](https://nodejs.org/api/dns.html#dns_dns_lookup_hostname_options_callback) function. May be either `0`, `4`, or `6`. `4` means use IPv4 only, `6` means use IPv6 only, `0` means try both.
433
+ * @param {Boolean} [options.autoCreate=false] Set to `true` to make Mongoose automatically call `createCollection()` on every model created on this connection.
434
+ * @see Mongoose#createConnection https://mongoosejs.com/docs/api/mongoose.html#Mongoose.prototype.createConnection()
435
+ * @api public
436
+ * @return {Promise} resolves to `this` if connection succeeded
437
+ */
438
+
439
+ Mongoose.prototype.connect = async function connect(uri, options) {
440
+ if (typeof options === 'function' || (arguments.length >= 3 && typeof arguments[2] === 'function')) {
441
+ throw new MongooseError('Mongoose.prototype.connect() no longer accepts a callback');
442
+ }
443
+
444
+ const _mongoose = this instanceof Mongoose ? this : mongoose;
445
+ if (_mongoose.connection == null) {
446
+ _createDefaultConnection(_mongoose);
447
+ }
448
+ const conn = _mongoose.connection;
449
+
450
+ return conn.openUri(uri, options).then(() => _mongoose);
451
+ };
452
+
453
+ /**
454
+ * Runs `.close()` on all connections in parallel.
455
+ *
456
+ * @return {Promise} resolves when all connections are closed, or rejects with the first error that occurred.
457
+ * @api public
458
+ */
459
+
460
+ Mongoose.prototype.disconnect = async function disconnect() {
461
+ if (arguments.length >= 1 && typeof arguments[0] === 'function') {
462
+ throw new MongooseError('Mongoose.prototype.disconnect() no longer accepts a callback');
463
+ }
464
+
465
+ const _mongoose = this instanceof Mongoose ? this : mongoose;
466
+
467
+ const remaining = _mongoose.connections.length;
468
+ if (remaining <= 0) {
469
+ return;
470
+ }
471
+ await Promise.all(_mongoose.connections.map(conn => conn.close()));
472
+ };
473
+
474
+ /**
475
+ * _Requires MongoDB >= 3.6.0._ Starts a [MongoDB session](https://www.mongodb.com/docs/manual/release-notes/3.6/#client-sessions)
476
+ * for benefits like causal consistency, [retryable writes](https://www.mongodb.com/docs/manual/core/retryable-writes/),
477
+ * and [transactions](https://thecodebarbarian.com/a-node-js-perspective-on-mongodb-4-transactions.html).
478
+ *
479
+ * Calling `mongoose.startSession()` is equivalent to calling `mongoose.connection.startSession()`.
480
+ * Sessions are scoped to a connection, so calling `mongoose.startSession()`
481
+ * starts a session on the [default mongoose connection](https://mongoosejs.com/docs/api/mongoose.html#Mongoose.prototype.connection).
482
+ *
483
+ * @param {Object} [options] see the [mongodb driver options](https://mongodb.github.io/node-mongodb-native/4.9/classes/MongoClient.html#startSession)
484
+ * @param {Boolean} [options.causalConsistency=true] set to false to disable causal consistency
485
+ * @return {Promise<ClientSession>} promise that resolves to a MongoDB driver `ClientSession`
486
+ * @api public
487
+ */
488
+
489
+ Mongoose.prototype.startSession = function startSession() {
490
+ const _mongoose = this instanceof Mongoose ? this : mongoose;
491
+
492
+ return _mongoose.connection.startSession.apply(_mongoose.connection, arguments);
493
+ };
494
+
495
+ /**
496
+ * Getter/setter around function for pluralizing collection names.
497
+ *
498
+ * @param {Function|null} [fn] overwrites the function used to pluralize collection names
499
+ * @return {Function|null} the current function used to pluralize collection names, defaults to the legacy function from `mongoose-legacy-pluralize`.
500
+ * @api public
501
+ */
502
+
503
+ Mongoose.prototype.pluralize = function pluralize(fn) {
504
+ const _mongoose = this instanceof Mongoose ? this : mongoose;
505
+
506
+ if (arguments.length > 0) {
507
+ _mongoose._pluralize = fn;
508
+ }
509
+ return _mongoose._pluralize;
510
+ };
511
+
512
+ /**
513
+ * Defines a model or retrieves it.
514
+ *
515
+ * Models defined on the `mongoose` instance are available to all connection
516
+ * created by the same `mongoose` instance.
517
+ *
518
+ * If you call `mongoose.model()` with twice the same name but a different schema,
519
+ * you will get an `OverwriteModelError`. If you call `mongoose.model()` with
520
+ * the same name and same schema, you'll get the same schema back.
521
+ *
522
+ * #### Example:
523
+ *
524
+ * const mongoose = require('mongoose');
525
+ *
526
+ * // define an Actor model with this mongoose instance
527
+ * const schema = new Schema({ name: String });
528
+ * mongoose.model('Actor', schema);
529
+ *
530
+ * // create a new connection
531
+ * const conn = mongoose.createConnection(..);
532
+ *
533
+ * // create Actor model
534
+ * const Actor = conn.model('Actor', schema);
535
+ * conn.model('Actor') === Actor; // true
536
+ * conn.model('Actor', schema) === Actor; // true, same schema
537
+ * conn.model('Actor', schema, 'actors') === Actor; // true, same schema and collection name
538
+ *
539
+ * // This throws an `OverwriteModelError` because the schema is different.
540
+ * conn.model('Actor', new Schema({ name: String }));
541
+ *
542
+ * _When no `collection` argument is passed, Mongoose uses the model name. If you don't like this behavior, either pass a collection name, use `mongoose.pluralize()`, or set your schemas collection name option._
543
+ *
544
+ * #### Example:
545
+ *
546
+ * const schema = new Schema({ name: String }, { collection: 'actor' });
547
+ *
548
+ * // or
549
+ *
550
+ * schema.set('collection', 'actor');
551
+ *
552
+ * // or
553
+ *
554
+ * const collectionName = 'actor';
555
+ * const M = mongoose.model('Actor', schema, collectionName);
556
+ *
557
+ * @param {String|Function} name model name or class extending Model
558
+ * @param {Schema} [schema] the schema to use.
559
+ * @param {String} [collection] name (optional, inferred from model name)
560
+ * @param {Object} [options]
561
+ * @param {Boolean} [options.overwriteModels=false] If true, overwrite existing models with the same name to avoid `OverwriteModelError`
562
+ * @return {Model} The model associated with `name`. Mongoose will create the model if it doesn't already exist.
563
+ * @api public
564
+ */
565
+
566
+ Mongoose.prototype.model = function model(name, schema, collection, options) {
567
+ const _mongoose = this instanceof Mongoose ? this : mongoose;
568
+
569
+ if (typeof schema === 'string') {
570
+ collection = schema;
571
+ schema = false;
572
+ }
573
+
574
+ if (arguments.length === 1) {
575
+ const model = _mongoose.models[name];
576
+ if (!model) {
577
+ throw new _mongoose.Error.MissingSchemaError(name);
578
+ }
579
+ return model;
580
+ }
581
+
582
+ if (utils.isObject(schema) && !(schema instanceof Schema)) {
583
+ schema = new Schema(schema);
584
+ }
585
+ if (schema && !(schema instanceof Schema)) {
586
+ throw new _mongoose.Error('The 2nd parameter to `mongoose.model()` should be a ' +
587
+ 'schema or a POJO');
588
+ }
589
+
590
+ // handle internal options from connection.model()
591
+ options = options || {};
592
+
593
+ const originalSchema = schema;
594
+ if (schema) {
595
+ if (_mongoose.get('cloneSchemas')) {
596
+ schema = schema.clone();
597
+ }
598
+ _mongoose._applyPlugins(schema);
599
+ }
600
+
601
+ // connection.model() may be passing a different schema for
602
+ // an existing model name. in this case don't read from cache.
603
+ const overwriteModels = Object.hasOwn(_mongoose.options, 'overwriteModels') ?
604
+ _mongoose.options.overwriteModels :
605
+ options.overwriteModels;
606
+ if (Object.hasOwn(_mongoose.models, name) && options.cache !== false && overwriteModels !== true) {
607
+ if (originalSchema?.instanceOfSchema &&
608
+ originalSchema !== _mongoose.models[name].schema) {
609
+ throw new _mongoose.Error.OverwriteModelError(name);
610
+ }
611
+ if (collection && collection !== _mongoose.models[name].collection.name) {
612
+ // subclass current model with alternate collection
613
+ const model = _mongoose.models[name];
614
+ schema = model.prototype.schema;
615
+ const sub = model.__subclass(_mongoose.connection, schema, collection);
616
+ // do not cache the sub model
617
+ return sub;
618
+ }
619
+ return _mongoose.models[name];
620
+ }
621
+ if (schema == null) {
622
+ throw new _mongoose.Error.MissingSchemaError(name);
623
+ }
624
+
625
+ const model = _mongoose._model(name, schema, collection, options);
626
+ _mongoose.connection.models[name] = model;
627
+ _mongoose.models[name] = model;
628
+
629
+ return model;
630
+ };
631
+
632
+ /*!
633
+ * ignore
634
+ */
635
+
636
+ Mongoose.prototype._model = function _model(name, schema, collection, options) {
637
+ const _mongoose = this instanceof Mongoose ? this : mongoose;
638
+
639
+ let model;
640
+ if (typeof name === 'function') {
641
+ model = name;
642
+ name = model.name;
643
+ if (!(model.prototype instanceof Model)) {
644
+ throw new _mongoose.Error('The provided class ' + name + ' must extend Model');
645
+ }
646
+ }
647
+
648
+ if (schema) {
649
+ if (_mongoose.get('cloneSchemas')) {
650
+ schema = schema.clone();
651
+ }
652
+ _mongoose._applyPlugins(schema);
653
+ }
654
+
655
+ // Apply relevant "global" options to the schema
656
+ if (schema == null || !('pluralization' in schema.options)) {
657
+ schema.options.pluralization = _mongoose.options.pluralization;
658
+ }
659
+
660
+ if (!collection) {
661
+ collection = schema.get('collection') ||
662
+ utils.toCollectionName(name, _mongoose.pluralize());
663
+ }
664
+
665
+ applyEmbeddedDiscriminators(schema);
666
+
667
+ const connection = options.connection || _mongoose.connection;
668
+ model = _mongoose.Model.compile(model || name, schema, collection, connection, _mongoose);
669
+ // Errors handled internally, so safe to ignore error
670
+ model.init().catch(function $modelInitNoop() {});
671
+
672
+ connection.emit('model', model);
673
+
674
+ if (schema._applyDiscriminators != null) {
675
+ for (const disc of schema._applyDiscriminators.keys()) {
676
+ const {
677
+ schema: discriminatorSchema,
678
+ options
679
+ } = schema._applyDiscriminators.get(disc);
680
+ model.discriminator(disc, discriminatorSchema, options);
681
+ }
682
+ }
683
+
684
+ return model;
685
+ };
686
+
687
+ /**
688
+ * Removes the model named `name` from the default connection, if it exists.
689
+ * You can use this function to clean up any models you created in your tests to
690
+ * prevent OverwriteModelErrors.
691
+ *
692
+ * Equivalent to `mongoose.connection.deleteModel(name)`.
693
+ *
694
+ * #### Example:
695
+ *
696
+ * mongoose.model('User', new Schema({ name: String }));
697
+ * console.log(mongoose.model('User')); // Model object
698
+ * mongoose.deleteModel('User');
699
+ * console.log(mongoose.model('User')); // undefined
700
+ *
701
+ * // Usually useful in a Mocha `afterEach()` hook
702
+ * afterEach(function() {
703
+ * mongoose.deleteModel(/.+/); // Delete every model
704
+ * });
705
+ *
706
+ * @api public
707
+ * @param {String|RegExp} name if string, the name of the model to remove. If regexp, removes all models whose name matches the regexp.
708
+ * @return {Mongoose} this
709
+ */
710
+
711
+ Mongoose.prototype.deleteModel = function deleteModel(name) {
712
+ const _mongoose = this instanceof Mongoose ? this : mongoose;
713
+
714
+ _mongoose.connection.deleteModel(name);
715
+ delete _mongoose.models[name];
716
+ return _mongoose;
717
+ };
718
+
719
+ /**
720
+ * Returns an array of model names created on this instance of Mongoose.
721
+ *
722
+ * #### Note:
723
+ *
724
+ * _Does not include names of models created using `connection.model()`._
725
+ *
726
+ * @api public
727
+ * @return {Array}
728
+ */
729
+
730
+ Mongoose.prototype.modelNames = function modelNames() {
731
+ const _mongoose = this instanceof Mongoose ? this : mongoose;
732
+
733
+ const names = Object.keys(_mongoose.models);
734
+ return names;
735
+ };
736
+
737
+ /**
738
+ * Applies global plugins to `schema`.
739
+ *
740
+ * @param {Schema} schema
741
+ * @api private
742
+ */
743
+
744
+ Mongoose.prototype._applyPlugins = function _applyPlugins(schema, options) {
745
+ const _mongoose = this instanceof Mongoose ? this : mongoose;
746
+
747
+ options = options || {};
748
+ options.applyPluginsToDiscriminators = _mongoose.options && _mongoose.options.applyPluginsToDiscriminators || false;
749
+ options.applyPluginsToChildSchemas = typeof (_mongoose.options && _mongoose.options.applyPluginsToChildSchemas) === 'boolean' ?
750
+ _mongoose.options.applyPluginsToChildSchemas :
751
+ true;
752
+ applyPlugins(schema, _mongoose.plugins, options, '$globalPluginsApplied');
753
+ };
754
+
755
+ /**
756
+ * Declares a global plugin executed on all Schemas.
757
+ *
758
+ * Equivalent to calling `.plugin(fn)` on each Schema you create.
759
+ *
760
+ * @param {Function} fn plugin callback
761
+ * @param {Object} [opts] optional options
762
+ * @return {Mongoose} this
763
+ * @see plugins https://mongoosejs.com/docs/plugins.html
764
+ * @api public
765
+ */
766
+
767
+ Mongoose.prototype.plugin = function plugin(fn, opts) {
768
+ const _mongoose = this instanceof Mongoose ? this : mongoose;
769
+
770
+ _mongoose.plugins.push([fn, opts]);
771
+ return _mongoose;
772
+ };
773
+
774
+ /**
775
+ * The Mongoose module's default connection. Equivalent to `mongoose.connections[0]`, see [`connections`](https://mongoosejs.com/docs/api/mongoose.html#Mongoose.prototype.connections).
776
+ *
777
+ * #### Example:
778
+ *
779
+ * const mongoose = require('mongoose');
780
+ * mongoose.connect(...);
781
+ * mongoose.connection.on('error', cb);
782
+ *
783
+ * This is the connection used by default for every model created using [mongoose.model](https://mongoosejs.com/docs/api/mongoose.html#Mongoose.prototype.model()).
784
+ *
785
+ * To create a new connection, use [`createConnection()`](https://mongoosejs.com/docs/api/mongoose.html#Mongoose.prototype.createConnection()).
786
+ *
787
+ * @memberOf Mongoose
788
+ * @instance
789
+ * @property {Connection} connection
790
+ * @api public
791
+ */
792
+
793
+ Mongoose.prototype.__defineGetter__('connection', function() {
794
+ return this.connections[0];
795
+ });
796
+
797
+ Mongoose.prototype.__defineSetter__('connection', function(v) {
798
+ if (v instanceof this.__driver.Connection) {
799
+ this.connections[0] = v;
800
+ this.models = v.models;
801
+ }
802
+ });
803
+
804
+ /**
805
+ * An array containing all [connections](connection.html) associated with this
806
+ * Mongoose instance. By default, there is 1 connection. Calling
807
+ * [`createConnection()`](https://mongoosejs.com/docs/api/mongoose.html#Mongoose.prototype.createConnection()) adds a connection
808
+ * to this array.
809
+ *
810
+ * #### Example:
811
+ *
812
+ * const mongoose = require('mongoose');
813
+ * mongoose.connections.length; // 1, just the default connection
814
+ * mongoose.connections[0] === mongoose.connection; // true
815
+ *
816
+ * mongoose.createConnection('mongodb://127.0.0.1:27017/test');
817
+ * mongoose.connections.length; // 2
818
+ *
819
+ * @memberOf Mongoose
820
+ * @instance
821
+ * @property {Array} connections
822
+ * @api public
823
+ */
824
+
825
+ Mongoose.prototype.connections;
826
+
827
+ /**
828
+ * An integer containing the value of the next connection id. Calling
829
+ * [`createConnection()`](https://mongoosejs.com/docs/api/mongoose.html#Mongoose.prototype.createConnection()) increments
830
+ * this value.
831
+ *
832
+ * #### Example:
833
+ *
834
+ * const mongoose = require('mongoose');
835
+ * mongoose.createConnection(); // id `0`, `nextConnectionId` becomes `1`
836
+ * mongoose.createConnection(); // id `1`, `nextConnectionId` becomes `2`
837
+ * mongoose.connections[0].destroy() // Removes connection with id `0`
838
+ * mongoose.createConnection(); // id `2`, `nextConnectionId` becomes `3`
839
+ *
840
+ * @memberOf Mongoose
841
+ * @instance
842
+ * @property {Number} nextConnectionId
843
+ * @api private
844
+ */
845
+
846
+ Mongoose.prototype.nextConnectionId;
847
+
848
+ /**
849
+ * The Mongoose Aggregate constructor
850
+ *
851
+ * @method Aggregate
852
+ * @api public
853
+ */
854
+
855
+ Mongoose.prototype.Aggregate = Aggregate;
856
+
857
+ /**
858
+ * The Base Mongoose Collection class. `mongoose.Collection` extends from this class.
859
+ *
860
+ * @memberOf Mongoose
861
+ * @instance
862
+ * @method Collection
863
+ * @api public
864
+ */
865
+
866
+ Mongoose.prototype.BaseCollection = require('./collection');
867
+
868
+ /**
869
+ * The Mongoose Collection constructor
870
+ *
871
+ * @memberOf Mongoose
872
+ * @instance
873
+ * @method Collection
874
+ * @api public
875
+ */
876
+
877
+ Object.defineProperty(Mongoose.prototype, 'Collection', {
878
+ get: function() {
879
+ return this.__driver.Collection;
880
+ },
881
+ set: function(Collection) {
882
+ this.__driver.Collection = Collection;
883
+ }
884
+ });
885
+
886
+ /**
887
+ * The Mongoose [Connection](https://mongoosejs.com/docs/api/connection.html#Connection()) constructor
888
+ *
889
+ * @memberOf Mongoose
890
+ * @instance
891
+ * @method Connection
892
+ * @api public
893
+ */
894
+
895
+ Object.defineProperty(Mongoose.prototype, 'Connection', {
896
+ get: function() {
897
+ return this.__driver.Connection;
898
+ },
899
+ set: function(Connection) {
900
+ if (Connection === this.__driver.Connection) {
901
+ return;
902
+ }
903
+
904
+ this.__driver.Connection = Connection;
905
+ }
906
+ });
907
+
908
+ /**
909
+ * The Base Mongoose Connection class. `mongoose.Connection` extends from this class.
910
+ *
911
+ * @memberOf Mongoose
912
+ * @instance
913
+ * @method Connection
914
+ * @api public
915
+ */
916
+
917
+ Mongoose.prototype.BaseConnection = require('./connection');
918
+
919
+ /**
920
+ * The Mongoose version
921
+ *
922
+ * #### Example:
923
+ *
924
+ * console.log(mongoose.version); // '5.x.x'
925
+ *
926
+ * @property version
927
+ * @api public
928
+ */
929
+
930
+ Mongoose.prototype.version = pkg.version;
931
+
932
+ /**
933
+ * The Mongoose constructor
934
+ *
935
+ * The exports of the mongoose module is an instance of this class.
936
+ *
937
+ * #### Example:
938
+ *
939
+ * const mongoose = require('mongoose');
940
+ * const mongoose2 = new mongoose.Mongoose();
941
+ *
942
+ * @method Mongoose
943
+ * @api public
944
+ */
945
+
946
+ Mongoose.prototype.Mongoose = Mongoose;
947
+
948
+ /**
949
+ * The Mongoose [Schema](https://mongoosejs.com/docs/api/schema.html#Schema()) constructor
950
+ *
951
+ * #### Example:
952
+ *
953
+ * const mongoose = require('mongoose');
954
+ * const Schema = mongoose.Schema;
955
+ * const CatSchema = new Schema(..);
956
+ *
957
+ * @method Schema
958
+ * @api public
959
+ */
960
+
961
+ Mongoose.prototype.Schema = Schema;
962
+
963
+ /**
964
+ * The Mongoose [SchemaType](https://mongoosejs.com/docs/api/schematype.html#SchemaType()) constructor
965
+ *
966
+ * @method SchemaType
967
+ * @api public
968
+ */
969
+
970
+ Mongoose.prototype.SchemaType = SchemaType;
971
+
972
+ /**
973
+ * The various Mongoose SchemaTypes.
974
+ *
975
+ * #### Note:
976
+ *
977
+ * _Alias of mongoose.Schema.Types for backwards compatibility._
978
+ *
979
+ * @property SchemaTypes
980
+ * @see Schema.SchemaTypes https://mongoosejs.com/docs/schematypes.html
981
+ * @api public
982
+ */
983
+
984
+ Mongoose.prototype.SchemaTypes = Schema.Types;
985
+
986
+ /**
987
+ * The Mongoose [VirtualType](https://mongoosejs.com/docs/api/virtualtype.html#VirtualType()) constructor
988
+ *
989
+ * @method VirtualType
990
+ * @api public
991
+ */
992
+
993
+ Mongoose.prototype.VirtualType = VirtualType;
994
+
995
+ /**
996
+ * The various Mongoose Types.
997
+ *
998
+ * #### Example:
999
+ *
1000
+ * const mongoose = require('mongoose');
1001
+ * const array = mongoose.Types.Array;
1002
+ *
1003
+ * #### Types:
1004
+ *
1005
+ * - [Array](https://mongoosejs.com/docs/schematypes.html#arrays)
1006
+ * - [Buffer](https://mongoosejs.com/docs/schematypes.html#buffers)
1007
+ * - [Embedded](https://mongoosejs.com/docs/schematypes.html#schemas)
1008
+ * - [DocumentArray](https://mongoosejs.com/docs/api/documentarraypath.html)
1009
+ * - [Decimal128](https://mongoosejs.com/docs/api/mongoose.html#Mongoose.prototype.Decimal128)
1010
+ * - [ObjectId](https://mongoosejs.com/docs/schematypes.html#objectids)
1011
+ * - [Map](https://mongoosejs.com/docs/schematypes.html#maps)
1012
+ * - [Subdocument](https://mongoosejs.com/docs/schematypes.html#schemas)
1013
+ * - [Int32](https://mongoosejs.com/docs/schematypes.html#int32)
1014
+ *
1015
+ * Using this exposed access to the `ObjectId` type, we can construct ids on demand.
1016
+ *
1017
+ * const ObjectId = mongoose.Types.ObjectId;
1018
+ * const id1 = new ObjectId;
1019
+ *
1020
+ * @property Types
1021
+ * @api public
1022
+ */
1023
+
1024
+ Mongoose.prototype.Types = Types;
1025
+
1026
+ /**
1027
+ * The Mongoose [Query](https://mongoosejs.com/docs/api/query.html#Query()) constructor.
1028
+ *
1029
+ * @method Query
1030
+ * @api public
1031
+ */
1032
+
1033
+ Mongoose.prototype.Query = Query;
1034
+
1035
+ /**
1036
+ * The Mongoose [Model](https://mongoosejs.com/docs/api/model.html#Model()) constructor.
1037
+ *
1038
+ * @method Model
1039
+ * @api public
1040
+ */
1041
+
1042
+ Mongoose.prototype.Model = Model;
1043
+
1044
+ /**
1045
+ * The Mongoose [Document](https://mongoosejs.com/docs/api/document.html#Document()) constructor.
1046
+ *
1047
+ * @method Document
1048
+ * @api public
1049
+ */
1050
+
1051
+ Mongoose.prototype.Document = Document;
1052
+
1053
+ /**
1054
+ * The Mongoose DocumentProvider constructor. Mongoose users should not have to
1055
+ * use this directly
1056
+ *
1057
+ * @method DocumentProvider
1058
+ * @api public
1059
+ */
1060
+
1061
+ Mongoose.prototype.DocumentProvider = require('./documentProvider');
1062
+
1063
+ /**
1064
+ * The Mongoose ObjectId [SchemaType](https://mongoosejs.com/docs/schematypes.html). Used for
1065
+ * declaring paths in your schema that should be
1066
+ * [MongoDB ObjectIds](https://www.mongodb.com/docs/manual/reference/method/ObjectId/).
1067
+ * Do not use this to create a new ObjectId instance, use `mongoose.Types.ObjectId`
1068
+ * instead.
1069
+ *
1070
+ * #### Example:
1071
+ *
1072
+ * const childSchema = new Schema({ parentId: mongoose.ObjectId });
1073
+ *
1074
+ * @property ObjectId
1075
+ * @api public
1076
+ */
1077
+
1078
+ Mongoose.prototype.ObjectId = SchemaTypes.ObjectId;
1079
+
1080
+ /**
1081
+ * Returns true if Mongoose can cast the given value to an ObjectId, or
1082
+ * false otherwise.
1083
+ *
1084
+ * #### Example:
1085
+ *
1086
+ * mongoose.isValidObjectId(new mongoose.Types.ObjectId()); // true
1087
+ * mongoose.isValidObjectId('0123456789ab'); // true
1088
+ * mongoose.isValidObjectId(6); // true
1089
+ * mongoose.isValidObjectId(new User({ name: 'test' })); // true
1090
+ *
1091
+ * mongoose.isValidObjectId({ test: 42 }); // false
1092
+ *
1093
+ * @method isValidObjectId
1094
+ * @param {Any} v
1095
+ * @returns {boolean} true if `v` is something Mongoose can coerce to an ObjectId
1096
+ * @api public
1097
+ */
1098
+
1099
+ Mongoose.prototype.isValidObjectId = function isValidObjectId(v) {
1100
+ const _mongoose = this instanceof Mongoose ? this : mongoose;
1101
+ return _mongoose.Types.ObjectId.isValid(v);
1102
+ };
1103
+
1104
+ /**
1105
+ * Returns true if the given value is a Mongoose ObjectId (using `instanceof`) or if the
1106
+ * given value is a 24 character hex string, which is the most commonly used string representation
1107
+ * of an ObjectId.
1108
+ *
1109
+ * This function is similar to `isValidObjectId()`, but considerably more strict, because
1110
+ * `isValidObjectId()` will return `true` for _any_ value that Mongoose can convert to an
1111
+ * ObjectId. That includes Mongoose documents, any string of length 12, and any number.
1112
+ * `isObjectIdOrHexString()` returns true only for `ObjectId` instances or 24 character hex
1113
+ * strings, and will return false for numbers, documents, and strings of length 12.
1114
+ *
1115
+ * #### Example:
1116
+ *
1117
+ * mongoose.isObjectIdOrHexString(new mongoose.Types.ObjectId()); // true
1118
+ * mongoose.isObjectIdOrHexString('62261a65d66c6be0a63c051f'); // true
1119
+ *
1120
+ * mongoose.isObjectIdOrHexString('0123456789ab'); // false
1121
+ * mongoose.isObjectIdOrHexString(6); // false
1122
+ * mongoose.isObjectIdOrHexString(new User({ name: 'test' })); // false
1123
+ * mongoose.isObjectIdOrHexString({ test: 42 }); // false
1124
+ *
1125
+ * @method isObjectIdOrHexString
1126
+ * @param {Any} v
1127
+ * @returns {boolean} true if `v` is an ObjectId instance _or_ a 24 char hex string
1128
+ * @api public
1129
+ */
1130
+
1131
+ Mongoose.prototype.isObjectIdOrHexString = function isObjectIdOrHexString(v) {
1132
+ return isBsonType(v, 'ObjectId') || (typeof v === 'string' && objectIdHexRegexp.test(v));
1133
+ };
1134
+
1135
+ /**
1136
+ *
1137
+ * Syncs all the indexes for the models registered with this connection.
1138
+ *
1139
+ * @param {Object} options
1140
+ * @param {Boolean} options.continueOnError `false` by default. If set to `true`, mongoose will not throw an error if one model syncing failed, and will return an object where the keys are the names of the models, and the values are the results/errors for each model.
1141
+ * @return {Promise} Returns a Promise, when the Promise resolves the value is a list of the dropped indexes.
1142
+ */
1143
+ Mongoose.prototype.syncIndexes = function syncIndexes(options) {
1144
+ const _mongoose = this instanceof Mongoose ? this : mongoose;
1145
+ return _mongoose.connection.syncIndexes(options);
1146
+ };
1147
+
1148
+ /**
1149
+ * The Mongoose Decimal128 [SchemaType](https://mongoosejs.com/docs/schematypes.html). Used for
1150
+ * declaring paths in your schema that should be
1151
+ * [128-bit decimal floating points](https://thecodebarbarian.com/a-nodejs-perspective-on-mongodb-34-decimal.html).
1152
+ * Do not use this to create a new Decimal128 instance, use `mongoose.Types.Decimal128`
1153
+ * instead.
1154
+ *
1155
+ * #### Example:
1156
+ *
1157
+ * const vehicleSchema = new Schema({ fuelLevel: mongoose.Decimal128 });
1158
+ *
1159
+ * @property Decimal128
1160
+ * @api public
1161
+ */
1162
+
1163
+ Mongoose.prototype.Decimal128 = SchemaTypes.Decimal128;
1164
+
1165
+
1166
+ /**
1167
+ * The Mongoose Mixed [SchemaType](https://mongoosejs.com/docs/schematypes.html). Used for
1168
+ * declaring paths in your schema that Mongoose's change tracking, casting,
1169
+ * and validation should ignore.
1170
+ *
1171
+ * #### Example:
1172
+ *
1173
+ * const schema = new Schema({ arbitrary: mongoose.Mixed });
1174
+ *
1175
+ * @property Mixed
1176
+ * @api public
1177
+ */
1178
+
1179
+ Mongoose.prototype.Mixed = SchemaTypes.Mixed;
1180
+
1181
+ /**
1182
+ * The Mongoose Date [SchemaType](https://mongoosejs.com/docs/schematypes.html).
1183
+ *
1184
+ * #### Example:
1185
+ *
1186
+ * const schema = new Schema({ test: Date });
1187
+ * schema.path('test') instanceof mongoose.Date; // true
1188
+ *
1189
+ * @property Date
1190
+ * @api public
1191
+ */
1192
+
1193
+ Mongoose.prototype.Date = SchemaTypes.Date;
1194
+
1195
+ /**
1196
+ * The Mongoose Number [SchemaType](https://mongoosejs.com/docs/schematypes.html). Used for
1197
+ * declaring paths in your schema that Mongoose should cast to numbers.
1198
+ *
1199
+ * #### Example:
1200
+ *
1201
+ * const schema = new Schema({ num: mongoose.Number });
1202
+ * // Equivalent to:
1203
+ * const schema = new Schema({ num: 'number' });
1204
+ *
1205
+ * @property Number
1206
+ * @api public
1207
+ */
1208
+
1209
+ Mongoose.prototype.Number = SchemaTypes.Number;
1210
+
1211
+ /**
1212
+ * The [MongooseError](https://mongoosejs.com/docs/api/error.html#Error()) constructor.
1213
+ *
1214
+ * @method Error
1215
+ * @api public
1216
+ */
1217
+
1218
+ Mongoose.prototype.Error = MongooseError;
1219
+ Mongoose.prototype.MongooseError = MongooseError;
1220
+
1221
+ /**
1222
+ * Mongoose uses this function to get the current time when setting
1223
+ * [timestamps](https://mongoosejs.com/docs/guide.html#timestamps). You may stub out this function
1224
+ * using a tool like [Sinon](https://www.npmjs.com/package/sinon) for testing.
1225
+ *
1226
+ * @method now
1227
+ * @returns Date the current time
1228
+ * @api public
1229
+ */
1230
+
1231
+ Mongoose.prototype.now = function now() { return new Date(); };
1232
+
1233
+ /**
1234
+ * The Mongoose CastError constructor
1235
+ *
1236
+ * @method CastError
1237
+ * @param {String} type The name of the type
1238
+ * @param {Any} value The value that failed to cast
1239
+ * @param {String} path The path `a.b.c` in the doc where this cast error occurred
1240
+ * @param {Error} [reason] The original error that was thrown
1241
+ * @api public
1242
+ */
1243
+
1244
+ Mongoose.prototype.CastError = MongooseError.CastError;
1245
+
1246
+ /**
1247
+ * The constructor used for schematype options
1248
+ *
1249
+ * @method SchemaTypeOptions
1250
+ * @api public
1251
+ */
1252
+
1253
+ Mongoose.prototype.SchemaTypeOptions = require('./options/schemaTypeOptions');
1254
+
1255
+ /**
1256
+ * The [mquery](https://github.com/aheckmann/mquery) query builder Mongoose uses.
1257
+ *
1258
+ * @property mquery
1259
+ * @api public
1260
+ */
1261
+
1262
+ Mongoose.prototype.mquery = require('mquery');
1263
+
1264
+ /**
1265
+ * Sanitizes query filters against [query selector injection attacks](https://thecodebarbarian.com/2014/09/04/defending-against-query-selector-injection-attacks.html)
1266
+ * by wrapping any nested objects that have a property whose name starts with `$` in a `$eq`.
1267
+ *
1268
+ * ```javascript
1269
+ * const obj = { username: 'val', pwd: { $ne: null } };
1270
+ * sanitizeFilter(obj);
1271
+ * obj; // { username: 'val', pwd: { $eq: { $ne: null } } });
1272
+ * ```
1273
+ *
1274
+ * @method sanitizeFilter
1275
+ * @param {Object} filter
1276
+ * @returns Object the sanitized object
1277
+ * @api public
1278
+ */
1279
+
1280
+ Mongoose.prototype.sanitizeFilter = sanitizeFilter;
1281
+
1282
+ /**
1283
+ * Tells `sanitizeFilter()` to skip the given object when filtering out potential [query selector injection attacks](https://thecodebarbarian.com/2014/09/04/defending-against-query-selector-injection-attacks.html).
1284
+ * Use this method when you have a known query selector that you want to use.
1285
+ *
1286
+ * ```javascript
1287
+ * const obj = { username: 'val', pwd: trusted({ $type: 'string', $eq: 'my secret' }) };
1288
+ * sanitizeFilter(obj);
1289
+ *
1290
+ * // Note that `sanitizeFilter()` did not add `$eq` around `$type`.
1291
+ * obj; // { username: 'val', pwd: { $type: 'string', $eq: 'my secret' } });
1292
+ * ```
1293
+ *
1294
+ * @method trusted
1295
+ * @param {Object} obj
1296
+ * @returns Object the passed in object
1297
+ * @api public
1298
+ */
1299
+
1300
+ Mongoose.prototype.trusted = trusted;
1301
+
1302
+ /**
1303
+ * Use this function in `pre()` middleware to skip calling the wrapped function.
1304
+ *
1305
+ * #### Example:
1306
+ *
1307
+ * schema.pre('save', function() {
1308
+ * // Will skip executing `save()`, but will execute post hooks as if
1309
+ * // `save()` had executed with the result `{ matchedCount: 0 }`
1310
+ * return mongoose.skipMiddlewareFunction({ matchedCount: 0 });
1311
+ * });
1312
+ *
1313
+ * @method skipMiddlewareFunction
1314
+ * @param {any} result
1315
+ * @api public
1316
+ */
1317
+
1318
+ Mongoose.prototype.skipMiddlewareFunction = Kareem.skipWrappedFunction;
1319
+
1320
+ /**
1321
+ * Use this function in `post()` middleware to replace the result
1322
+ *
1323
+ * #### Example:
1324
+ *
1325
+ * schema.post('find', function(res) {
1326
+ * // Normally you have to modify `res` in place. But with
1327
+ * // `overwriteMiddlewarResult()`, you can make `find()` return a
1328
+ * // completely different value.
1329
+ * return mongoose.overwriteMiddlewareResult(res.filter(doc => !doc.isDeleted));
1330
+ * });
1331
+ *
1332
+ * @method overwriteMiddlewareResult
1333
+ * @param {any} result
1334
+ * @api public
1335
+ */
1336
+
1337
+ Mongoose.prototype.overwriteMiddlewareResult = Kareem.overwriteResult;
1338
+
1339
+ /**
1340
+ * Takes in an object and deletes any keys from the object whose values
1341
+ * are strictly equal to `undefined`.
1342
+ * This function is useful for query filters because Mongoose treats
1343
+ * `TestModel.find({ name: undefined })` as `TestModel.find({ name: null })`.
1344
+ *
1345
+ * #### Example:
1346
+ *
1347
+ * const filter = { name: 'John', age: undefined, status: 'active' };
1348
+ * mongoose.omitUndefined(filter); // { name: 'John', status: 'active' }
1349
+ * filter; // { name: 'John', status: 'active' }
1350
+ *
1351
+ * await UserModel.findOne(mongoose.omitUndefined(filter));
1352
+ *
1353
+ * @method omitUndefined
1354
+ * @param {Object} [val] the object to remove undefined keys from
1355
+ * @returns {Object} the object passed in
1356
+ * @api public
1357
+ */
1358
+
1359
+ Mongoose.prototype.omitUndefined = require('./helpers/omitUndefined');
1360
+
1361
+ /*!
1362
+ * Create a new default connection (`mongoose.connection`) for a Mongoose instance.
1363
+ * No-op if there is already a default connection.
1364
+ */
1365
+
1366
+ function _createDefaultConnection(mongoose) {
1367
+ if (mongoose.connection) {
1368
+ return;
1369
+ }
1370
+ const conn = mongoose.createConnection(); // default connection
1371
+ conn[defaultConnectionSymbol] = true;
1372
+ conn.models = mongoose.models;
1373
+ }
1374
+
1375
+ /**
1376
+ * The exports object is an instance of Mongoose.
1377
+ *
1378
+ * @api private
1379
+ */
1380
+
1381
+ const mongoose = module.exports = exports = new Mongoose({
1382
+ [defaultMongooseSymbol]: true
1383
+ });