@colyseus/core 0.14.21 → 0.14.25

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 (2970) hide show
  1. package/build/Logger.d.ts +9 -0
  2. package/build/Logger.js +12 -0
  3. package/build/Logger.js.map +1 -0
  4. package/build/Logger.mjs +8 -0
  5. package/build/Logger.mjs.map +1 -0
  6. package/build/Room.js +2 -0
  7. package/build/Room.js.map +1 -1
  8. package/build/Room.mjs +2 -0
  9. package/build/Room.mjs.map +1 -1
  10. package/build/Server.js +1 -1
  11. package/build/Server.js.map +1 -1
  12. package/build/Server.mjs +1 -1
  13. package/build/Server.mjs.map +1 -1
  14. package/build/_virtual/AggregationCursor.js_commonjs-proxy +3 -0
  15. package/build/_virtual/AggregationCursor.js_commonjs-proxy.map +1 -0
  16. package/build/_virtual/BufferList.js_commonjs-proxy +3 -0
  17. package/build/_virtual/BufferList.js_commonjs-proxy.map +1 -0
  18. package/build/_virtual/ChangeStream.js_commonjs-proxy +3 -0
  19. package/build/_virtual/ChangeStream.js_commonjs-proxy.map +1 -0
  20. package/build/_virtual/PopulateOptions.js_commonjs-proxy +3 -0
  21. package/build/_virtual/PopulateOptions.js_commonjs-proxy.map +1 -0
  22. package/build/_virtual/QueryCursor.js_commonjs-proxy +3 -0
  23. package/build/_virtual/QueryCursor.js_commonjs-proxy.map +1 -0
  24. package/build/_virtual/ReadPreference.js_commonjs-proxy +3 -0
  25. package/build/_virtual/ReadPreference.js_commonjs-proxy.map +1 -0
  26. package/build/_virtual/SchemaArrayOptions.js_commonjs-proxy +3 -0
  27. package/build/_virtual/SchemaArrayOptions.js_commonjs-proxy.map +1 -0
  28. package/build/_virtual/SchemaBufferOptions.js_commonjs-proxy +3 -0
  29. package/build/_virtual/SchemaBufferOptions.js_commonjs-proxy.map +1 -0
  30. package/build/_virtual/SchemaDateOptions.js_commonjs-proxy +3 -0
  31. package/build/_virtual/SchemaDateOptions.js_commonjs-proxy.map +1 -0
  32. package/build/_virtual/SchemaDocumentArrayOptions.js_commonjs-proxy +3 -0
  33. package/build/_virtual/SchemaDocumentArrayOptions.js_commonjs-proxy.map +1 -0
  34. package/build/_virtual/SchemaMapOptions.js_commonjs-proxy +3 -0
  35. package/build/_virtual/SchemaMapOptions.js_commonjs-proxy.map +1 -0
  36. package/build/_virtual/SchemaNumberOptions.js_commonjs-proxy +3 -0
  37. package/build/_virtual/SchemaNumberOptions.js_commonjs-proxy.map +1 -0
  38. package/build/_virtual/SchemaObjectIdOptions.js_commonjs-proxy +3 -0
  39. package/build/_virtual/SchemaObjectIdOptions.js_commonjs-proxy.map +1 -0
  40. package/build/_virtual/SchemaSingleNestedOptions.js_commonjs-proxy +3 -0
  41. package/build/_virtual/SchemaSingleNestedOptions.js_commonjs-proxy.map +1 -0
  42. package/build/_virtual/SchemaStringOptions.js_commonjs-proxy +3 -0
  43. package/build/_virtual/SchemaStringOptions.js_commonjs-proxy.map +1 -0
  44. package/build/_virtual/SchemaTypeOptions.js_commonjs-proxy +3 -0
  45. package/build/_virtual/SchemaTypeOptions.js_commonjs-proxy.map +1 -0
  46. package/build/_virtual/SingleNestedPath.js_commonjs-proxy +3 -0
  47. package/build/_virtual/SingleNestedPath.js_commonjs-proxy.map +1 -0
  48. package/build/_virtual/SkipPopulateValue.js_commonjs-proxy +3 -0
  49. package/build/_virtual/SkipPopulateValue.js_commonjs-proxy.map +1 -0
  50. package/build/_virtual/VirtualOptions.js_commonjs-proxy +3 -0
  51. package/build/_virtual/VirtualOptions.js_commonjs-proxy.map +1 -0
  52. package/build/_virtual/_commonjsHelpers.js +28 -0
  53. package/build/_virtual/_commonjsHelpers.js.map +1 -0
  54. package/build/_virtual/_stream_duplex.js_commonjs-proxy +3 -0
  55. package/build/_virtual/_stream_duplex.js_commonjs-proxy.map +1 -0
  56. package/build/_virtual/_stream_passthrough.js_commonjs-proxy +3 -0
  57. package/build/_virtual/_stream_passthrough.js_commonjs-proxy.map +1 -0
  58. package/build/_virtual/_stream_readable.js_commonjs-proxy +3 -0
  59. package/build/_virtual/_stream_readable.js_commonjs-proxy.map +1 -0
  60. package/build/_virtual/_stream_transform.js_commonjs-proxy +3 -0
  61. package/build/_virtual/_stream_transform.js_commonjs-proxy.map +1 -0
  62. package/build/_virtual/_stream_writable.js_commonjs-proxy +3 -0
  63. package/build/_virtual/_stream_writable.js_commonjs-proxy.map +1 -0
  64. package/build/_virtual/addAutoId.js_commonjs-proxy +3 -0
  65. package/build/_virtual/addAutoId.js_commonjs-proxy.map +1 -0
  66. package/build/_virtual/add_user.js_commonjs-proxy +3 -0
  67. package/build/_virtual/add_user.js_commonjs-proxy.map +1 -0
  68. package/build/_virtual/admin.js_commonjs-proxy +3 -0
  69. package/build/_virtual/admin.js_commonjs-proxy.map +1 -0
  70. package/build/_virtual/aggregate.js_commonjs-proxy +3 -0
  71. package/build/_virtual/aggregate.js_commonjs-proxy.map +1 -0
  72. package/build/_virtual/aggregate2.js_commonjs-proxy +3 -0
  73. package/build/_virtual/aggregate2.js_commonjs-proxy.map +1 -0
  74. package/build/_virtual/aggregation_cursor.js_commonjs-proxy +3 -0
  75. package/build/_virtual/aggregation_cursor.js_commonjs-proxy.map +1 -0
  76. package/build/_virtual/allServersUnknown.js_commonjs-proxy +3 -0
  77. package/build/_virtual/allServersUnknown.js_commonjs-proxy.map +1 -0
  78. package/build/_virtual/any.js_commonjs-proxy +3 -0
  79. package/build/_virtual/any.js_commonjs-proxy.map +1 -0
  80. package/build/_virtual/apm.js_commonjs-proxy +3 -0
  81. package/build/_virtual/apm.js_commonjs-proxy.map +1 -0
  82. package/build/_virtual/apm2.js_commonjs-proxy +3 -0
  83. package/build/_virtual/apm2.js_commonjs-proxy.map +1 -0
  84. package/build/_virtual/applyGlobalMaxTimeMS.js_commonjs-proxy +3 -0
  85. package/build/_virtual/applyGlobalMaxTimeMS.js_commonjs-proxy.map +1 -0
  86. package/build/_virtual/applyHooks.js_commonjs-proxy +3 -0
  87. package/build/_virtual/applyHooks.js_commonjs-proxy.map +1 -0
  88. package/build/_virtual/applyMethods.js_commonjs-proxy +3 -0
  89. package/build/_virtual/applyMethods.js_commonjs-proxy.map +1 -0
  90. package/build/_virtual/applyPlugins.js_commonjs-proxy +3 -0
  91. package/build/_virtual/applyPlugins.js_commonjs-proxy.map +1 -0
  92. package/build/_virtual/applyQueryMiddleware.js_commonjs-proxy +3 -0
  93. package/build/_virtual/applyQueryMiddleware.js_commonjs-proxy.map +1 -0
  94. package/build/_virtual/applyStaticHooks.js_commonjs-proxy +3 -0
  95. package/build/_virtual/applyStaticHooks.js_commonjs-proxy.map +1 -0
  96. package/build/_virtual/applyStatics.js_commonjs-proxy +3 -0
  97. package/build/_virtual/applyStatics.js_commonjs-proxy.map +1 -0
  98. package/build/_virtual/applyTimestampsToChildren.js_commonjs-proxy +3 -0
  99. package/build/_virtual/applyTimestampsToChildren.js_commonjs-proxy.map +1 -0
  100. package/build/_virtual/applyTimestampsToUpdate.js_commonjs-proxy +3 -0
  101. package/build/_virtual/applyTimestampsToUpdate.js_commonjs-proxy.map +1 -0
  102. package/build/_virtual/applyWriteConcern.js_commonjs-proxy +3 -0
  103. package/build/_virtual/applyWriteConcern.js_commonjs-proxy.map +1 -0
  104. package/build/_virtual/areDiscriminatorValuesEqual.js_commonjs-proxy +3 -0
  105. package/build/_virtual/areDiscriminatorValuesEqual.js_commonjs-proxy.map +1 -0
  106. package/build/_virtual/array.js_commonjs-proxy +3 -0
  107. package/build/_virtual/array.js_commonjs-proxy.map +1 -0
  108. package/build/_virtual/array2.js_commonjs-proxy +3 -0
  109. package/build/_virtual/array2.js_commonjs-proxy.map +1 -0
  110. package/build/_virtual/arrayDepth.js_commonjs-proxy +3 -0
  111. package/build/_virtual/arrayDepth.js_commonjs-proxy.map +1 -0
  112. package/build/_virtual/assignRawDocsToIdStructure.js_commonjs-proxy +3 -0
  113. package/build/_virtual/assignRawDocsToIdStructure.js_commonjs-proxy.map +1 -0
  114. package/build/_virtual/assignVals.js_commonjs-proxy +3 -0
  115. package/build/_virtual/assignVals.js_commonjs-proxy.map +1 -0
  116. package/build/_virtual/async.js_commonjs-proxy +3 -0
  117. package/build/_virtual/async.js_commonjs-proxy.map +1 -0
  118. package/build/_virtual/async_iterator.js_commonjs-proxy +3 -0
  119. package/build/_virtual/async_iterator.js_commonjs-proxy.map +1 -0
  120. package/build/_virtual/auth_provider.js_commonjs-proxy +3 -0
  121. package/build/_virtual/auth_provider.js_commonjs-proxy.map +1 -0
  122. package/build/_virtual/aws4.js_commonjs-proxy +3 -0
  123. package/build/_virtual/aws4.js_commonjs-proxy.map +1 -0
  124. package/build/_virtual/binary.js_commonjs-proxy +3 -0
  125. package/build/_virtual/binary.js_commonjs-proxy.map +1 -0
  126. package/build/_virtual/binary2.js_commonjs-proxy +3 -0
  127. package/build/_virtual/binary2.js_commonjs-proxy.map +1 -0
  128. package/build/_virtual/bind.js_commonjs-proxy +3 -0
  129. package/build/_virtual/bind.js_commonjs-proxy.map +1 -0
  130. package/build/_virtual/bitwise.js_commonjs-proxy +3 -0
  131. package/build/_virtual/bitwise.js_commonjs-proxy.map +1 -0
  132. package/build/_virtual/bl.js_commonjs-proxy +3 -0
  133. package/build/_virtual/bl.js_commonjs-proxy.map +1 -0
  134. package/build/_virtual/bluebird.js_commonjs-proxy +3 -0
  135. package/build/_virtual/bluebird.js_commonjs-proxy.map +1 -0
  136. package/build/_virtual/boolean.js_commonjs-proxy +3 -0
  137. package/build/_virtual/boolean.js_commonjs-proxy.map +1 -0
  138. package/build/_virtual/boolean2.js_commonjs-proxy +3 -0
  139. package/build/_virtual/boolean2.js_commonjs-proxy.map +1 -0
  140. package/build/_virtual/browserDocument.js_commonjs-proxy +3 -0
  141. package/build/_virtual/browserDocument.js_commonjs-proxy.map +1 -0
  142. package/build/_virtual/bson.js_commonjs-proxy +3 -0
  143. package/build/_virtual/bson.js_commonjs-proxy.map +1 -0
  144. package/build/_virtual/buffer-util.js_commonjs-proxy +3 -0
  145. package/build/_virtual/buffer-util.js_commonjs-proxy.map +1 -0
  146. package/build/_virtual/buffer.js_commonjs-proxy +3 -0
  147. package/build/_virtual/buffer.js_commonjs-proxy.map +1 -0
  148. package/build/_virtual/buffer2.js_commonjs-proxy +3 -0
  149. package/build/_virtual/buffer2.js_commonjs-proxy.map +1 -0
  150. package/build/_virtual/bulk_write.js_commonjs-proxy +3 -0
  151. package/build/_virtual/bulk_write.js_commonjs-proxy.map +1 -0
  152. package/build/_virtual/calculate_size.js_commonjs-proxy +3 -0
  153. package/build/_virtual/calculate_size.js_commonjs-proxy.map +1 -0
  154. package/build/_virtual/call_get.js_commonjs-proxy +3 -0
  155. package/build/_virtual/call_get.js_commonjs-proxy.map +1 -0
  156. package/build/_virtual/cancel.js_commonjs-proxy +3 -0
  157. package/build/_virtual/cancel.js_commonjs-proxy.map +1 -0
  158. package/build/_virtual/cast.js_commonjs-proxy +3 -0
  159. package/build/_virtual/cast.js_commonjs-proxy.map +1 -0
  160. package/build/_virtual/cast2.js_commonjs-proxy +3 -0
  161. package/build/_virtual/cast2.js_commonjs-proxy.map +1 -0
  162. package/build/_virtual/castArrayFilters.js_commonjs-proxy +3 -0
  163. package/build/_virtual/castArrayFilters.js_commonjs-proxy.map +1 -0
  164. package/build/_virtual/castBulkWrite.js_commonjs-proxy +3 -0
  165. package/build/_virtual/castBulkWrite.js_commonjs-proxy.map +1 -0
  166. package/build/_virtual/castFilterPath.js_commonjs-proxy +3 -0
  167. package/build/_virtual/castFilterPath.js_commonjs-proxy.map +1 -0
  168. package/build/_virtual/castUpdate.js_commonjs-proxy +3 -0
  169. package/build/_virtual/castUpdate.js_commonjs-proxy.map +1 -0
  170. package/build/_virtual/catch_filter.js_commonjs-proxy +3 -0
  171. package/build/_virtual/catch_filter.js_commonjs-proxy.map +1 -0
  172. package/build/_virtual/change_stream.js_commonjs-proxy +3 -0
  173. package/build/_virtual/change_stream.js_commonjs-proxy.map +1 -0
  174. package/build/_virtual/checkEmbeddedDiscriminatorKeyProjection.js_commonjs-proxy +3 -0
  175. package/build/_virtual/checkEmbeddedDiscriminatorKeyProjection.js_commonjs-proxy.map +1 -0
  176. package/build/_virtual/chunk.js_commonjs-proxy +3 -0
  177. package/build/_virtual/chunk.js_commonjs-proxy.map +1 -0
  178. package/build/_virtual/cleanModifiedSubpaths.js_commonjs-proxy +3 -0
  179. package/build/_virtual/cleanModifiedSubpaths.js_commonjs-proxy.map +1 -0
  180. package/build/_virtual/cleanPositionalOperators.js_commonjs-proxy +3 -0
  181. package/build/_virtual/cleanPositionalOperators.js_commonjs-proxy.map +1 -0
  182. package/build/_virtual/clone.js_commonjs-proxy +3 -0
  183. package/build/_virtual/clone.js_commonjs-proxy.map +1 -0
  184. package/build/_virtual/code.js_commonjs-proxy +3 -0
  185. package/build/_virtual/code.js_commonjs-proxy.map +1 -0
  186. package/build/_virtual/collection.js_commonjs-proxy +3 -0
  187. package/build/_virtual/collection.js_commonjs-proxy.map +1 -0
  188. package/build/_virtual/collection2.js_commonjs-proxy +3 -0
  189. package/build/_virtual/collection2.js_commonjs-proxy.map +1 -0
  190. package/build/_virtual/collection3.js_commonjs-proxy +3 -0
  191. package/build/_virtual/collection3.js_commonjs-proxy.map +1 -0
  192. package/build/_virtual/collection4.js_commonjs-proxy +3 -0
  193. package/build/_virtual/collection4.js_commonjs-proxy.map +1 -0
  194. package/build/_virtual/collection_ops.js_commonjs-proxy +3 -0
  195. package/build/_virtual/collection_ops.js_commonjs-proxy.map +1 -0
  196. package/build/_virtual/collections.js_commonjs-proxy +3 -0
  197. package/build/_virtual/collections.js_commonjs-proxy.map +1 -0
  198. package/build/_virtual/command.js_commonjs-proxy +3 -0
  199. package/build/_virtual/command.js_commonjs-proxy.map +1 -0
  200. package/build/_virtual/command2.js_commonjs-proxy +3 -0
  201. package/build/_virtual/command2.js_commonjs-proxy.map +1 -0
  202. package/build/_virtual/command3.js_commonjs-proxy +3 -0
  203. package/build/_virtual/command3.js_commonjs-proxy.map +1 -0
  204. package/build/_virtual/command_cursor.js_commonjs-proxy +3 -0
  205. package/build/_virtual/command_cursor.js_commonjs-proxy.map +1 -0
  206. package/build/_virtual/command_result.js_commonjs-proxy +3 -0
  207. package/build/_virtual/command_result.js_commonjs-proxy.map +1 -0
  208. package/build/_virtual/command_v2.js_commonjs-proxy +3 -0
  209. package/build/_virtual/command_v2.js_commonjs-proxy.map +1 -0
  210. package/build/_virtual/commands.js_commonjs-proxy +3 -0
  211. package/build/_virtual/commands.js_commonjs-proxy.map +1 -0
  212. package/build/_virtual/commands2.js_commonjs-proxy +3 -0
  213. package/build/_virtual/commands2.js_commonjs-proxy.map +1 -0
  214. package/build/_virtual/common.js_commonjs-proxy +3 -0
  215. package/build/_virtual/common.js_commonjs-proxy.map +1 -0
  216. package/build/_virtual/common2.js_commonjs-proxy +3 -0
  217. package/build/_virtual/common2.js_commonjs-proxy.map +1 -0
  218. package/build/_virtual/common3.js_commonjs-proxy +3 -0
  219. package/build/_virtual/common3.js_commonjs-proxy.map +1 -0
  220. package/build/_virtual/common_functions.js_commonjs-proxy +3 -0
  221. package/build/_virtual/common_functions.js_commonjs-proxy.map +1 -0
  222. package/build/_virtual/compile.js_commonjs-proxy +3 -0
  223. package/build/_virtual/compile.js_commonjs-proxy.map +1 -0
  224. package/build/_virtual/completeMany.js_commonjs-proxy +3 -0
  225. package/build/_virtual/completeMany.js_commonjs-proxy.map +1 -0
  226. package/build/_virtual/compression.js_commonjs-proxy +3 -0
  227. package/build/_virtual/compression.js_commonjs-proxy.map +1 -0
  228. package/build/_virtual/connect.js_commonjs-proxy +3 -0
  229. package/build/_virtual/connect.js_commonjs-proxy.map +1 -0
  230. package/build/_virtual/connect2.js_commonjs-proxy +3 -0
  231. package/build/_virtual/connect2.js_commonjs-proxy.map +1 -0
  232. package/build/_virtual/connection.js_commonjs-proxy +3 -0
  233. package/build/_virtual/connection.js_commonjs-proxy.map +1 -0
  234. package/build/_virtual/connection2.js_commonjs-proxy +3 -0
  235. package/build/_virtual/connection2.js_commonjs-proxy.map +1 -0
  236. package/build/_virtual/connection3.js_commonjs-proxy +3 -0
  237. package/build/_virtual/connection3.js_commonjs-proxy.map +1 -0
  238. package/build/_virtual/connection4.js_commonjs-proxy +3 -0
  239. package/build/_virtual/connection4.js_commonjs-proxy.map +1 -0
  240. package/build/_virtual/connection_pool.js_commonjs-proxy +3 -0
  241. package/build/_virtual/connection_pool.js_commonjs-proxy.map +1 -0
  242. package/build/_virtual/connectionstate.js_commonjs-proxy +3 -0
  243. package/build/_virtual/connectionstate.js_commonjs-proxy.map +1 -0
  244. package/build/_virtual/constants.js_commonjs-proxy +3 -0
  245. package/build/_virtual/constants.js_commonjs-proxy.map +1 -0
  246. package/build/_virtual/constants2.js_commonjs-proxy +3 -0
  247. package/build/_virtual/constants2.js_commonjs-proxy.map +1 -0
  248. package/build/_virtual/constants3.js_commonjs-proxy +3 -0
  249. package/build/_virtual/constants3.js_commonjs-proxy.map +1 -0
  250. package/build/_virtual/context.js_commonjs-proxy +3 -0
  251. package/build/_virtual/context.js_commonjs-proxy.map +1 -0
  252. package/build/_virtual/core_array.js_commonjs-proxy +3 -0
  253. package/build/_virtual/core_array.js_commonjs-proxy.map +1 -0
  254. package/build/_virtual/count.js_commonjs-proxy +3 -0
  255. package/build/_virtual/count.js_commonjs-proxy.map +1 -0
  256. package/build/_virtual/count_documents.js_commonjs-proxy +3 -0
  257. package/build/_virtual/count_documents.js_commonjs-proxy.map +1 -0
  258. package/build/_virtual/createClient.js_commonjs-proxy +3 -0
  259. package/build/_virtual/createClient.js_commonjs-proxy.map +1 -0
  260. package/build/_virtual/createPopulateQueryFilter.js_commonjs-proxy +3 -0
  261. package/build/_virtual/createPopulateQueryFilter.js_commonjs-proxy.map +1 -0
  262. package/build/_virtual/create_collection.js_commonjs-proxy +3 -0
  263. package/build/_virtual/create_collection.js_commonjs-proxy.map +1 -0
  264. package/build/_virtual/create_indexes.js_commonjs-proxy +3 -0
  265. package/build/_virtual/create_indexes.js_commonjs-proxy.map +1 -0
  266. package/build/_virtual/cursor.js_commonjs-proxy +3 -0
  267. package/build/_virtual/cursor.js_commonjs-proxy.map +1 -0
  268. package/build/_virtual/cursor2.js_commonjs-proxy +3 -0
  269. package/build/_virtual/cursor2.js_commonjs-proxy.map +1 -0
  270. package/build/_virtual/cursor_ops.js_commonjs-proxy +3 -0
  271. package/build/_virtual/cursor_ops.js_commonjs-proxy.map +1 -0
  272. package/build/_virtual/customErrors.js_commonjs-proxy +3 -0
  273. package/build/_virtual/customErrors.js_commonjs-proxy.map +1 -0
  274. package/build/_virtual/date.js_commonjs-proxy +3 -0
  275. package/build/_virtual/date.js_commonjs-proxy.map +1 -0
  276. package/build/_virtual/date2.js_commonjs-proxy +3 -0
  277. package/build/_virtual/date2.js_commonjs-proxy.map +1 -0
  278. package/build/_virtual/db.js_commonjs-proxy +3 -0
  279. package/build/_virtual/db.js_commonjs-proxy.map +1 -0
  280. package/build/_virtual/db_ops.js_commonjs-proxy +3 -0
  281. package/build/_virtual/db_ops.js_commonjs-proxy.map +1 -0
  282. package/build/_virtual/db_ref.js_commonjs-proxy +3 -0
  283. package/build/_virtual/db_ref.js_commonjs-proxy.map +1 -0
  284. package/build/_virtual/debug.js_commonjs-proxy +3 -0
  285. package/build/_virtual/debug.js_commonjs-proxy.map +1 -0
  286. package/build/_virtual/debuggability.js_commonjs-proxy +3 -0
  287. package/build/_virtual/debuggability.js_commonjs-proxy.map +1 -0
  288. package/build/_virtual/decimal128.js_commonjs-proxy +3 -0
  289. package/build/_virtual/decimal128.js_commonjs-proxy.map +1 -0
  290. package/build/_virtual/decimal1282.js_commonjs-proxy +3 -0
  291. package/build/_virtual/decimal1282.js_commonjs-proxy.map +1 -0
  292. package/build/_virtual/decimal1283.js_commonjs-proxy +3 -0
  293. package/build/_virtual/decimal1283.js_commonjs-proxy.map +1 -0
  294. package/build/_virtual/decimal1284.js_commonjs-proxy +3 -0
  295. package/build/_virtual/decimal1284.js_commonjs-proxy.map +1 -0
  296. package/build/_virtual/decimal1285.js_commonjs-proxy +3 -0
  297. package/build/_virtual/decimal1285.js_commonjs-proxy.map +1 -0
  298. package/build/_virtual/defaultAuthProviders.js_commonjs-proxy +3 -0
  299. package/build/_virtual/defaultAuthProviders.js_commonjs-proxy.map +1 -0
  300. package/build/_virtual/delete_many.js_commonjs-proxy +3 -0
  301. package/build/_virtual/delete_many.js_commonjs-proxy.map +1 -0
  302. package/build/_virtual/delete_one.js_commonjs-proxy +3 -0
  303. package/build/_virtual/delete_one.js_commonjs-proxy.map +1 -0
  304. package/build/_virtual/deque.js_commonjs-proxy +3 -0
  305. package/build/_virtual/deque.js_commonjs-proxy.map +1 -0
  306. package/build/_virtual/deserializer.js_commonjs-proxy +3 -0
  307. package/build/_virtual/deserializer.js_commonjs-proxy.map +1 -0
  308. package/build/_virtual/destroy.js_commonjs-proxy +3 -0
  309. package/build/_virtual/destroy.js_commonjs-proxy.map +1 -0
  310. package/build/_virtual/direct_resolve.js_commonjs-proxy +3 -0
  311. package/build/_virtual/direct_resolve.js_commonjs-proxy.map +1 -0
  312. package/build/_virtual/discriminator.js_commonjs-proxy +3 -0
  313. package/build/_virtual/discriminator.js_commonjs-proxy.map +1 -0
  314. package/build/_virtual/distinct.js_commonjs-proxy +3 -0
  315. package/build/_virtual/distinct.js_commonjs-proxy.map +1 -0
  316. package/build/_virtual/divergentArray.js_commonjs-proxy +3 -0
  317. package/build/_virtual/divergentArray.js_commonjs-proxy.map +1 -0
  318. package/build/_virtual/document.js_commonjs-proxy +3 -0
  319. package/build/_virtual/document.js_commonjs-proxy.map +1 -0
  320. package/build/_virtual/document_provider.js_commonjs-proxy +3 -0
  321. package/build/_virtual/document_provider.js_commonjs-proxy.map +1 -0
  322. package/build/_virtual/documentarray.js_commonjs-proxy +3 -0
  323. package/build/_virtual/documentarray.js_commonjs-proxy.map +1 -0
  324. package/build/_virtual/documentarray2.js_commonjs-proxy +3 -0
  325. package/build/_virtual/documentarray2.js_commonjs-proxy.map +1 -0
  326. package/build/_virtual/double.js_commonjs-proxy +3 -0
  327. package/build/_virtual/double.js_commonjs-proxy.map +1 -0
  328. package/build/_virtual/download.js_commonjs-proxy +3 -0
  329. package/build/_virtual/download.js_commonjs-proxy.map +1 -0
  330. package/build/_virtual/driver.js_commonjs-proxy +3 -0
  331. package/build/_virtual/driver.js_commonjs-proxy.map +1 -0
  332. package/build/_virtual/drop.js_commonjs-proxy +3 -0
  333. package/build/_virtual/drop.js_commonjs-proxy.map +1 -0
  334. package/build/_virtual/drop_index.js_commonjs-proxy +3 -0
  335. package/build/_virtual/drop_index.js_commonjs-proxy.map +1 -0
  336. package/build/_virtual/drop_indexes.js_commonjs-proxy +3 -0
  337. package/build/_virtual/drop_indexes.js_commonjs-proxy.map +1 -0
  338. package/build/_virtual/dynamic_loaders.js_commonjs-proxy +3 -0
  339. package/build/_virtual/dynamic_loaders.js_commonjs-proxy.map +1 -0
  340. package/build/_virtual/each.js_commonjs-proxy +3 -0
  341. package/build/_virtual/each.js_commonjs-proxy.map +1 -0
  342. package/build/_virtual/each2.js_commonjs-proxy +3 -0
  343. package/build/_virtual/each2.js_commonjs-proxy.map +1 -0
  344. package/build/_virtual/eachAsync.js_commonjs-proxy +3 -0
  345. package/build/_virtual/eachAsync.js_commonjs-proxy.map +1 -0
  346. package/build/_virtual/embedded.js_commonjs-proxy +3 -0
  347. package/build/_virtual/embedded.js_commonjs-proxy.map +1 -0
  348. package/build/_virtual/encrypter.js_commonjs-proxy +3 -0
  349. package/build/_virtual/encrypter.js_commonjs-proxy.map +1 -0
  350. package/build/_virtual/env.js_commonjs-proxy +3 -0
  351. package/build/_virtual/env.js_commonjs-proxy.map +1 -0
  352. package/build/_virtual/error.js_commonjs-proxy +3 -0
  353. package/build/_virtual/error.js_commonjs-proxy.map +1 -0
  354. package/build/_virtual/error2.js_commonjs-proxy +3 -0
  355. package/build/_virtual/error2.js_commonjs-proxy.map +1 -0
  356. package/build/_virtual/errors.js_commonjs-proxy +3 -0
  357. package/build/_virtual/errors.js_commonjs-proxy.map +1 -0
  358. package/build/_virtual/errors2.js_commonjs-proxy +3 -0
  359. package/build/_virtual/errors2.js_commonjs-proxy.map +1 -0
  360. package/build/_virtual/es5.js_commonjs-proxy +3 -0
  361. package/build/_virtual/es5.js_commonjs-proxy.map +1 -0
  362. package/build/_virtual/estimated_document_count.js_commonjs-proxy +3 -0
  363. package/build/_virtual/estimated_document_count.js_commonjs-proxy.map +1 -0
  364. package/build/_virtual/event-target.js_commonjs-proxy +3 -0
  365. package/build/_virtual/event-target.js_commonjs-proxy.map +1 -0
  366. package/build/_virtual/events.js_commonjs-proxy +3 -0
  367. package/build/_virtual/events.js_commonjs-proxy.map +1 -0
  368. package/build/_virtual/events2.js_commonjs-proxy +3 -0
  369. package/build/_virtual/events2.js_commonjs-proxy.map +1 -0
  370. package/build/_virtual/execute_db_admin_command.js_commonjs-proxy +3 -0
  371. package/build/_virtual/execute_db_admin_command.js_commonjs-proxy.map +1 -0
  372. package/build/_virtual/execute_operation.js_commonjs-proxy +3 -0
  373. package/build/_virtual/execute_operation.js_commonjs-proxy.map +1 -0
  374. package/build/_virtual/exists.js_commonjs-proxy +3 -0
  375. package/build/_virtual/exists.js_commonjs-proxy.map +1 -0
  376. package/build/_virtual/explain.js_commonjs-proxy +3 -0
  377. package/build/_virtual/explain.js_commonjs-proxy.map +1 -0
  378. package/build/_virtual/extension.js_commonjs-proxy +3 -0
  379. package/build/_virtual/extension.js_commonjs-proxy.map +1 -0
  380. package/build/_virtual/filter.js_commonjs-proxy +3 -0
  381. package/build/_virtual/filter.js_commonjs-proxy.map +1 -0
  382. package/build/_virtual/finally.js_commonjs-proxy +3 -0
  383. package/build/_virtual/finally.js_commonjs-proxy.map +1 -0
  384. package/build/_virtual/find.js_commonjs-proxy +3 -0
  385. package/build/_virtual/find.js_commonjs-proxy.map +1 -0
  386. package/build/_virtual/find_and_modify.js_commonjs-proxy +3 -0
  387. package/build/_virtual/find_and_modify.js_commonjs-proxy.map +1 -0
  388. package/build/_virtual/find_one.js_commonjs-proxy +3 -0
  389. package/build/_virtual/find_one.js_commonjs-proxy.map +1 -0
  390. package/build/_virtual/find_one_and_delete.js_commonjs-proxy +3 -0
  391. package/build/_virtual/find_one_and_delete.js_commonjs-proxy.map +1 -0
  392. package/build/_virtual/find_one_and_replace.js_commonjs-proxy +3 -0
  393. package/build/_virtual/find_one_and_replace.js_commonjs-proxy.map +1 -0
  394. package/build/_virtual/find_one_and_update.js_commonjs-proxy +3 -0
  395. package/build/_virtual/find_one_and_update.js_commonjs-proxy.map +1 -0
  396. package/build/_virtual/float_parser.js_commonjs-proxy +3 -0
  397. package/build/_virtual/float_parser.js_commonjs-proxy.map +1 -0
  398. package/build/_virtual/generators.js_commonjs-proxy +3 -0
  399. package/build/_virtual/generators.js_commonjs-proxy.map +1 -0
  400. package/build/_virtual/geo_haystack_search.js_commonjs-proxy +3 -0
  401. package/build/_virtual/geo_haystack_search.js_commonjs-proxy.map +1 -0
  402. package/build/_virtual/geospatial.js_commonjs-proxy +3 -0
  403. package/build/_virtual/geospatial.js_commonjs-proxy.map +1 -0
  404. package/build/_virtual/get.js_commonjs-proxy +3 -0
  405. package/build/_virtual/get.js_commonjs-proxy.map +1 -0
  406. package/build/_virtual/getConstructor.js_commonjs-proxy +3 -0
  407. package/build/_virtual/getConstructor.js_commonjs-proxy.map +1 -0
  408. package/build/_virtual/getDefaultBulkwriteResult.js_commonjs-proxy +3 -0
  409. package/build/_virtual/getDefaultBulkwriteResult.js_commonjs-proxy.map +1 -0
  410. package/build/_virtual/getDiscriminatorByValue.js_commonjs-proxy +3 -0
  411. package/build/_virtual/getDiscriminatorByValue.js_commonjs-proxy.map +1 -0
  412. package/build/_virtual/getEmbeddedDiscriminatorPath.js_commonjs-proxy +3 -0
  413. package/build/_virtual/getEmbeddedDiscriminatorPath.js_commonjs-proxy.map +1 -0
  414. package/build/_virtual/getEmbeddedDiscriminatorPath2.js_commonjs-proxy +3 -0
  415. package/build/_virtual/getEmbeddedDiscriminatorPath2.js_commonjs-proxy.map +1 -0
  416. package/build/_virtual/getFunctionName.js_commonjs-proxy +3 -0
  417. package/build/_virtual/getFunctionName.js_commonjs-proxy.map +1 -0
  418. package/build/_virtual/getIndexes.js_commonjs-proxy +3 -0
  419. package/build/_virtual/getIndexes.js_commonjs-proxy.map +1 -0
  420. package/build/_virtual/getModelsMapForPopulate.js_commonjs-proxy +3 -0
  421. package/build/_virtual/getModelsMapForPopulate.js_commonjs-proxy.map +1 -0
  422. package/build/_virtual/getPath.js_commonjs-proxy +3 -0
  423. package/build/_virtual/getPath.js_commonjs-proxy.map +1 -0
  424. package/build/_virtual/getSchemaDiscriminatorByValue.js_commonjs-proxy +3 -0
  425. package/build/_virtual/getSchemaDiscriminatorByValue.js_commonjs-proxy.map +1 -0
  426. package/build/_virtual/getSchemaTypes.js_commonjs-proxy +3 -0
  427. package/build/_virtual/getSchemaTypes.js_commonjs-proxy.map +1 -0
  428. package/build/_virtual/getVirtual.js_commonjs-proxy +3 -0
  429. package/build/_virtual/getVirtual.js_commonjs-proxy.map +1 -0
  430. package/build/_virtual/get_more.js_commonjs-proxy +3 -0
  431. package/build/_virtual/get_more.js_commonjs-proxy.map +1 -0
  432. package/build/_virtual/grid_store.js_commonjs-proxy +3 -0
  433. package/build/_virtual/grid_store.js_commonjs-proxy.map +1 -0
  434. package/build/_virtual/gssapi.js_commonjs-proxy +3 -0
  435. package/build/_virtual/gssapi.js_commonjs-proxy.map +1 -0
  436. package/build/_virtual/handleIdOption.js_commonjs-proxy +3 -0
  437. package/build/_virtual/handleIdOption.js_commonjs-proxy.map +1 -0
  438. package/build/_virtual/handleImmutable.js_commonjs-proxy +3 -0
  439. package/build/_virtual/handleImmutable.js_commonjs-proxy.map +1 -0
  440. package/build/_virtual/handleImmutable2.js_commonjs-proxy +3 -0
  441. package/build/_virtual/handleImmutable2.js_commonjs-proxy.map +1 -0
  442. package/build/_virtual/handleSpreadDoc.js_commonjs-proxy +3 -0
  443. package/build/_virtual/handleSpreadDoc.js_commonjs-proxy.map +1 -0
  444. package/build/_virtual/handleTimestampOption.js_commonjs-proxy +3 -0
  445. package/build/_virtual/handleTimestampOption.js_commonjs-proxy.map +1 -0
  446. package/build/_virtual/hasDollarKeys.js_commonjs-proxy +3 -0
  447. package/build/_virtual/hasDollarKeys.js_commonjs-proxy.map +1 -0
  448. package/build/_virtual/helpers.js_commonjs-proxy +3 -0
  449. package/build/_virtual/helpers.js_commonjs-proxy.map +1 -0
  450. package/build/_virtual/hiredis.js_commonjs-proxy +3 -0
  451. package/build/_virtual/hiredis.js_commonjs-proxy.map +1 -0
  452. package/build/_virtual/idGetter.js_commonjs-proxy +3 -0
  453. package/build/_virtual/idGetter.js_commonjs-proxy.map +1 -0
  454. package/build/_virtual/immediate.js_commonjs-proxy +3 -0
  455. package/build/_virtual/immediate.js_commonjs-proxy.map +1 -0
  456. package/build/_virtual/index.js_commonjs-proxy +3 -0
  457. package/build/_virtual/index.js_commonjs-proxy.map +1 -0
  458. package/build/_virtual/index10.js_commonjs-proxy +3 -0
  459. package/build/_virtual/index10.js_commonjs-proxy.map +1 -0
  460. package/build/_virtual/index11.js_commonjs-proxy +3 -0
  461. package/build/_virtual/index11.js_commonjs-proxy.map +1 -0
  462. package/build/_virtual/index12.js_commonjs-proxy +3 -0
  463. package/build/_virtual/index12.js_commonjs-proxy.map +1 -0
  464. package/build/_virtual/index13.js_commonjs-proxy +3 -0
  465. package/build/_virtual/index13.js_commonjs-proxy.map +1 -0
  466. package/build/_virtual/index14.js_commonjs-proxy +3 -0
  467. package/build/_virtual/index14.js_commonjs-proxy.map +1 -0
  468. package/build/_virtual/index15.js_commonjs-proxy +3 -0
  469. package/build/_virtual/index15.js_commonjs-proxy.map +1 -0
  470. package/build/_virtual/index16.js_commonjs-proxy +3 -0
  471. package/build/_virtual/index16.js_commonjs-proxy.map +1 -0
  472. package/build/_virtual/index17.js_commonjs-proxy +3 -0
  473. package/build/_virtual/index17.js_commonjs-proxy.map +1 -0
  474. package/build/_virtual/index18.js_commonjs-proxy +3 -0
  475. package/build/_virtual/index18.js_commonjs-proxy.map +1 -0
  476. package/build/_virtual/index19.js_commonjs-proxy +3 -0
  477. package/build/_virtual/index19.js_commonjs-proxy.map +1 -0
  478. package/build/_virtual/index2.js_commonjs-proxy +3 -0
  479. package/build/_virtual/index2.js_commonjs-proxy.map +1 -0
  480. package/build/_virtual/index20.js_commonjs-proxy +3 -0
  481. package/build/_virtual/index20.js_commonjs-proxy.map +1 -0
  482. package/build/_virtual/index21.js_commonjs-proxy +7 -0
  483. package/build/_virtual/index21.js_commonjs-proxy.map +1 -0
  484. package/build/_virtual/index22.js_commonjs-proxy +3 -0
  485. package/build/_virtual/index22.js_commonjs-proxy.map +1 -0
  486. package/build/_virtual/index23.js_commonjs-proxy +3 -0
  487. package/build/_virtual/index23.js_commonjs-proxy.map +1 -0
  488. package/build/_virtual/index24.js_commonjs-proxy +3 -0
  489. package/build/_virtual/index24.js_commonjs-proxy.map +1 -0
  490. package/build/_virtual/index25.js_commonjs-proxy +3 -0
  491. package/build/_virtual/index25.js_commonjs-proxy.map +1 -0
  492. package/build/_virtual/index26.js_commonjs-proxy +3 -0
  493. package/build/_virtual/index26.js_commonjs-proxy.map +1 -0
  494. package/build/_virtual/index27.js_commonjs-proxy +3 -0
  495. package/build/_virtual/index27.js_commonjs-proxy.map +1 -0
  496. package/build/_virtual/index28.js_commonjs-proxy +3 -0
  497. package/build/_virtual/index28.js_commonjs-proxy.map +1 -0
  498. package/build/_virtual/index29.js_commonjs-proxy +3 -0
  499. package/build/_virtual/index29.js_commonjs-proxy.map +1 -0
  500. package/build/_virtual/index3.js_commonjs-proxy +3 -0
  501. package/build/_virtual/index3.js_commonjs-proxy.map +1 -0
  502. package/build/_virtual/index30.js_commonjs-proxy +3 -0
  503. package/build/_virtual/index30.js_commonjs-proxy.map +1 -0
  504. package/build/_virtual/index31.js_commonjs-proxy +3 -0
  505. package/build/_virtual/index31.js_commonjs-proxy.map +1 -0
  506. package/build/_virtual/index4.js_commonjs-proxy +3 -0
  507. package/build/_virtual/index4.js_commonjs-proxy.map +1 -0
  508. package/build/_virtual/index5.js_commonjs-proxy +3 -0
  509. package/build/_virtual/index5.js_commonjs-proxy.map +1 -0
  510. package/build/_virtual/index6.js_commonjs-proxy +3 -0
  511. package/build/_virtual/index6.js_commonjs-proxy.map +1 -0
  512. package/build/_virtual/index7.js_commonjs-proxy +3 -0
  513. package/build/_virtual/index7.js_commonjs-proxy.map +1 -0
  514. package/build/_virtual/index8.js_commonjs-proxy +3 -0
  515. package/build/_virtual/index8.js_commonjs-proxy.map +1 -0
  516. package/build/_virtual/index9.js_commonjs-proxy +3 -0
  517. package/build/_virtual/index9.js_commonjs-proxy.map +1 -0
  518. package/build/_virtual/index_exists.js_commonjs-proxy +3 -0
  519. package/build/_virtual/index_exists.js_commonjs-proxy.map +1 -0
  520. package/build/_virtual/index_information.js_commonjs-proxy +3 -0
  521. package/build/_virtual/index_information.js_commonjs-proxy.map +1 -0
  522. package/build/_virtual/indexes.js_commonjs-proxy +3 -0
  523. package/build/_virtual/indexes.js_commonjs-proxy.map +1 -0
  524. package/build/_virtual/inherits.js_commonjs-proxy +3 -0
  525. package/build/_virtual/inherits.js_commonjs-proxy.map +1 -0
  526. package/build/_virtual/inherits_browser.js_commonjs-proxy +3 -0
  527. package/build/_virtual/inherits_browser.js_commonjs-proxy.map +1 -0
  528. package/build/_virtual/insert_many.js_commonjs-proxy +3 -0
  529. package/build/_virtual/insert_many.js_commonjs-proxy.map +1 -0
  530. package/build/_virtual/insert_one.js_commonjs-proxy +3 -0
  531. package/build/_virtual/insert_one.js_commonjs-proxy.map +1 -0
  532. package/build/_virtual/int_32.js_commonjs-proxy +3 -0
  533. package/build/_virtual/int_32.js_commonjs-proxy.map +1 -0
  534. package/build/_virtual/internal.js_commonjs-proxy +3 -0
  535. package/build/_virtual/internal.js_commonjs-proxy.map +1 -0
  536. package/build/_virtual/isAtlas.js_commonjs-proxy +3 -0
  537. package/build/_virtual/isAtlas.js_commonjs-proxy.map +1 -0
  538. package/build/_virtual/isBsonType.js_commonjs-proxy +3 -0
  539. package/build/_virtual/isBsonType.js_commonjs-proxy.map +1 -0
  540. package/build/_virtual/isDefaultIdIndex.js_commonjs-proxy +3 -0
  541. package/build/_virtual/isDefaultIdIndex.js_commonjs-proxy.map +1 -0
  542. package/build/_virtual/isDefiningProjection.js_commonjs-proxy +3 -0
  543. package/build/_virtual/isDefiningProjection.js_commonjs-proxy.map +1 -0
  544. package/build/_virtual/isExclusive.js_commonjs-proxy +3 -0
  545. package/build/_virtual/isExclusive.js_commonjs-proxy.map +1 -0
  546. package/build/_virtual/isInclusive.js_commonjs-proxy +3 -0
  547. package/build/_virtual/isInclusive.js_commonjs-proxy.map +1 -0
  548. package/build/_virtual/isIndexEqual.js_commonjs-proxy +3 -0
  549. package/build/_virtual/isIndexEqual.js_commonjs-proxy.map +1 -0
  550. package/build/_virtual/isMongooseObject.js_commonjs-proxy +3 -0
  551. package/build/_virtual/isMongooseObject.js_commonjs-proxy.map +1 -0
  552. package/build/_virtual/isObject.js_commonjs-proxy +3 -0
  553. package/build/_virtual/isObject.js_commonjs-proxy.map +1 -0
  554. package/build/_virtual/isOperator.js_commonjs-proxy +3 -0
  555. package/build/_virtual/isOperator.js_commonjs-proxy.map +1 -0
  556. package/build/_virtual/isPathExcluded.js_commonjs-proxy +3 -0
  557. package/build/_virtual/isPathExcluded.js_commonjs-proxy.map +1 -0
  558. package/build/_virtual/isPathSelectedInclusive.js_commonjs-proxy +3 -0
  559. package/build/_virtual/isPathSelectedInclusive.js_commonjs-proxy.map +1 -0
  560. package/build/_virtual/isPromise.js_commonjs-proxy +3 -0
  561. package/build/_virtual/isPromise.js_commonjs-proxy.map +1 -0
  562. package/build/_virtual/isSSLError.js_commonjs-proxy +3 -0
  563. package/build/_virtual/isSSLError.js_commonjs-proxy.map +1 -0
  564. package/build/_virtual/is_capped.js_commonjs-proxy +3 -0
  565. package/build/_virtual/is_capped.js_commonjs-proxy.map +1 -0
  566. package/build/_virtual/join.js_commonjs-proxy +3 -0
  567. package/build/_virtual/join.js_commonjs-proxy.map +1 -0
  568. package/build/_virtual/kill_cursors.js_commonjs-proxy +3 -0
  569. package/build/_virtual/kill_cursors.js_commonjs-proxy.map +1 -0
  570. package/build/_virtual/leanPopulateMap.js_commonjs-proxy +3 -0
  571. package/build/_virtual/leanPopulateMap.js_commonjs-proxy.map +1 -0
  572. package/build/_virtual/limiter.js_commonjs-proxy +3 -0
  573. package/build/_virtual/limiter.js_commonjs-proxy.map +1 -0
  574. package/build/_virtual/list_collections.js_commonjs-proxy +3 -0
  575. package/build/_virtual/list_collections.js_commonjs-proxy.map +1 -0
  576. package/build/_virtual/list_databases.js_commonjs-proxy +3 -0
  577. package/build/_virtual/list_databases.js_commonjs-proxy.map +1 -0
  578. package/build/_virtual/list_indexes.js_commonjs-proxy +3 -0
  579. package/build/_virtual/list_indexes.js_commonjs-proxy.map +1 -0
  580. package/build/_virtual/logger.js_commonjs-proxy +3 -0
  581. package/build/_virtual/logger.js_commonjs-proxy.map +1 -0
  582. package/build/_virtual/long.js_commonjs-proxy +3 -0
  583. package/build/_virtual/long.js_commonjs-proxy.map +1 -0
  584. package/build/_virtual/lookupLocalFields.js_commonjs-proxy +3 -0
  585. package/build/_virtual/lookupLocalFields.js_commonjs-proxy.map +1 -0
  586. package/build/_virtual/lru.js_commonjs-proxy +3 -0
  587. package/build/_virtual/lru.js_commonjs-proxy.map +1 -0
  588. package/build/_virtual/map.js_commonjs-proxy +3 -0
  589. package/build/_virtual/map.js_commonjs-proxy.map +1 -0
  590. package/build/_virtual/map2.js_commonjs-proxy +3 -0
  591. package/build/_virtual/map2.js_commonjs-proxy.map +1 -0
  592. package/build/_virtual/map3.js_commonjs-proxy +3 -0
  593. package/build/_virtual/map3.js_commonjs-proxy.map +1 -0
  594. package/build/_virtual/map4.js_commonjs-proxy +3 -0
  595. package/build/_virtual/map4.js_commonjs-proxy.map +1 -0
  596. package/build/_virtual/map_reduce.js_commonjs-proxy +3 -0
  597. package/build/_virtual/map_reduce.js_commonjs-proxy.map +1 -0
  598. package/build/_virtual/max_key.js_commonjs-proxy +3 -0
  599. package/build/_virtual/max_key.js_commonjs-proxy.map +1 -0
  600. package/build/_virtual/memory-code-points.js_commonjs-proxy +3 -0
  601. package/build/_virtual/memory-code-points.js_commonjs-proxy.map +1 -0
  602. package/build/_virtual/merge.js_commonjs-proxy +3 -0
  603. package/build/_virtual/merge.js_commonjs-proxy.map +1 -0
  604. package/build/_virtual/message_stream.js_commonjs-proxy +3 -0
  605. package/build/_virtual/message_stream.js_commonjs-proxy.map +1 -0
  606. package/build/_virtual/messages.js_commonjs-proxy +3 -0
  607. package/build/_virtual/messages.js_commonjs-proxy.map +1 -0
  608. package/build/_virtual/method.js_commonjs-proxy +3 -0
  609. package/build/_virtual/method.js_commonjs-proxy.map +1 -0
  610. package/build/_virtual/min_key.js_commonjs-proxy +3 -0
  611. package/build/_virtual/min_key.js_commonjs-proxy.map +1 -0
  612. package/build/_virtual/missingSchema.js_commonjs-proxy +3 -0
  613. package/build/_virtual/missingSchema.js_commonjs-proxy.map +1 -0
  614. package/build/_virtual/mixed.js_commonjs-proxy +3 -0
  615. package/build/_virtual/mixed.js_commonjs-proxy.map +1 -0
  616. package/build/_virtual/model.js_commonjs-proxy +3 -0
  617. package/build/_virtual/model.js_commonjs-proxy.map +1 -0
  618. package/build/_virtual/modifiedPaths.js_commonjs-proxy +3 -0
  619. package/build/_virtual/modifiedPaths.js_commonjs-proxy.map +1 -0
  620. package/build/_virtual/mongo_client.js_commonjs-proxy +3 -0
  621. package/build/_virtual/mongo_client.js_commonjs-proxy.map +1 -0
  622. package/build/_virtual/mongo_credentials.js_commonjs-proxy +3 -0
  623. package/build/_virtual/mongo_credentials.js_commonjs-proxy.map +1 -0
  624. package/build/_virtual/mongocr.js_commonjs-proxy +3 -0
  625. package/build/_virtual/mongocr.js_commonjs-proxy.map +1 -0
  626. package/build/_virtual/mongodb_aws.js_commonjs-proxy +3 -0
  627. package/build/_virtual/mongodb_aws.js_commonjs-proxy.map +1 -0
  628. package/build/_virtual/mongooseError.js_commonjs-proxy +3 -0
  629. package/build/_virtual/mongooseError.js_commonjs-proxy.map +1 -0
  630. package/build/_virtual/mongos.js_commonjs-proxy +3 -0
  631. package/build/_virtual/mongos.js_commonjs-proxy.map +1 -0
  632. package/build/_virtual/mongos2.js_commonjs-proxy +3 -0
  633. package/build/_virtual/mongos2.js_commonjs-proxy.map +1 -0
  634. package/build/_virtual/monitor.js_commonjs-proxy +3 -0
  635. package/build/_virtual/monitor.js_commonjs-proxy.map +1 -0
  636. package/build/_virtual/moveImmutableProperties.js_commonjs-proxy +3 -0
  637. package/build/_virtual/moveImmutableProperties.js_commonjs-proxy.map +1 -0
  638. package/build/_virtual/mquery.js_commonjs-proxy +3 -0
  639. package/build/_virtual/mquery.js_commonjs-proxy.map +1 -0
  640. package/build/_virtual/msg.js_commonjs-proxy +3 -0
  641. package/build/_virtual/msg.js_commonjs-proxy.map +1 -0
  642. package/build/_virtual/multi.js_commonjs-proxy +3 -0
  643. package/build/_virtual/multi.js_commonjs-proxy.map +1 -0
  644. package/build/_virtual/native_topology.js_commonjs-proxy +3 -0
  645. package/build/_virtual/native_topology.js_commonjs-proxy.map +1 -0
  646. package/build/_virtual/node.js_commonjs-proxy +3 -0
  647. package/build/_virtual/node.js_commonjs-proxy.map +1 -0
  648. package/build/_virtual/node2.js_commonjs-proxy +3 -0
  649. package/build/_virtual/node2.js_commonjs-proxy.map +1 -0
  650. package/build/_virtual/nodeback.js_commonjs-proxy +3 -0
  651. package/build/_virtual/nodeback.js_commonjs-proxy.map +1 -0
  652. package/build/_virtual/nodeify.js_commonjs-proxy +3 -0
  653. package/build/_virtual/nodeify.js_commonjs-proxy.map +1 -0
  654. package/build/_virtual/normalizeRefPath.js_commonjs-proxy +3 -0
  655. package/build/_virtual/normalizeRefPath.js_commonjs-proxy.map +1 -0
  656. package/build/_virtual/notFound.js_commonjs-proxy +3 -0
  657. package/build/_virtual/notFound.js_commonjs-proxy.map +1 -0
  658. package/build/_virtual/number.js_commonjs-proxy +3 -0
  659. package/build/_virtual/number.js_commonjs-proxy.map +1 -0
  660. package/build/_virtual/number2.js_commonjs-proxy +3 -0
  661. package/build/_virtual/number2.js_commonjs-proxy.map +1 -0
  662. package/build/_virtual/objectExpected.js_commonjs-proxy +3 -0
  663. package/build/_virtual/objectExpected.js_commonjs-proxy.map +1 -0
  664. package/build/_virtual/objectParameter.js_commonjs-proxy +3 -0
  665. package/build/_virtual/objectParameter.js_commonjs-proxy.map +1 -0
  666. package/build/_virtual/objectid.js_commonjs-proxy +3 -0
  667. package/build/_virtual/objectid.js_commonjs-proxy.map +1 -0
  668. package/build/_virtual/objectid2.js_commonjs-proxy +3 -0
  669. package/build/_virtual/objectid2.js_commonjs-proxy.map +1 -0
  670. package/build/_virtual/objectid3.js_commonjs-proxy +3 -0
  671. package/build/_virtual/objectid3.js_commonjs-proxy.map +1 -0
  672. package/build/_virtual/objectid4.js_commonjs-proxy +3 -0
  673. package/build/_virtual/objectid4.js_commonjs-proxy.map +1 -0
  674. package/build/_virtual/objectid5.js_commonjs-proxy +3 -0
  675. package/build/_virtual/objectid5.js_commonjs-proxy.map +1 -0
  676. package/build/_virtual/operation.js_commonjs-proxy +3 -0
  677. package/build/_virtual/operation.js_commonjs-proxy.map +1 -0
  678. package/build/_virtual/options.js_commonjs-proxy +3 -0
  679. package/build/_virtual/options.js_commonjs-proxy.map +1 -0
  680. package/build/_virtual/options_operation.js_commonjs-proxy +3 -0
  681. package/build/_virtual/options_operation.js_commonjs-proxy.map +1 -0
  682. package/build/_virtual/ordered.js_commonjs-proxy +3 -0
  683. package/build/_virtual/ordered.js_commonjs-proxy.map +1 -0
  684. package/build/_virtual/overwriteModel.js_commonjs-proxy +3 -0
  685. package/build/_virtual/overwriteModel.js_commonjs-proxy.map +1 -0
  686. package/build/_virtual/parallelLimit.js_commonjs-proxy +3 -0
  687. package/build/_virtual/parallelLimit.js_commonjs-proxy.map +1 -0
  688. package/build/_virtual/parallelSave.js_commonjs-proxy +3 -0
  689. package/build/_virtual/parallelSave.js_commonjs-proxy.map +1 -0
  690. package/build/_virtual/parallelValidate.js_commonjs-proxy +3 -0
  691. package/build/_virtual/parallelValidate.js_commonjs-proxy.map +1 -0
  692. package/build/_virtual/parentPaths.js_commonjs-proxy +3 -0
  693. package/build/_virtual/parentPaths.js_commonjs-proxy.map +1 -0
  694. package/build/_virtual/parseProjection.js_commonjs-proxy +3 -0
  695. package/build/_virtual/parseProjection.js_commonjs-proxy.map +1 -0
  696. package/build/_virtual/parser.js_commonjs-proxy +3 -0
  697. package/build/_virtual/parser.js_commonjs-proxy.map +1 -0
  698. package/build/_virtual/parserError.js_commonjs-proxy +3 -0
  699. package/build/_virtual/parserError.js_commonjs-proxy.map +1 -0
  700. package/build/_virtual/permessage-deflate.js_commonjs-proxy +3 -0
  701. package/build/_virtual/permessage-deflate.js_commonjs-proxy.map +1 -0
  702. package/build/_virtual/permissions.js_commonjs-proxy +3 -0
  703. package/build/_virtual/permissions.js_commonjs-proxy.map +1 -0
  704. package/build/_virtual/plain.js_commonjs-proxy +3 -0
  705. package/build/_virtual/plain.js_commonjs-proxy.map +1 -0
  706. package/build/_virtual/pool.js_commonjs-proxy +3 -0
  707. package/build/_virtual/pool.js_commonjs-proxy.map +1 -0
  708. package/build/_virtual/profiling_level.js_commonjs-proxy +3 -0
  709. package/build/_virtual/profiling_level.js_commonjs-proxy.map +1 -0
  710. package/build/_virtual/promise.js_commonjs-proxy +3 -0
  711. package/build/_virtual/promise.js_commonjs-proxy.map +1 -0
  712. package/build/_virtual/promiseOrCallback.js_commonjs-proxy +3 -0
  713. package/build/_virtual/promiseOrCallback.js_commonjs-proxy.map +1 -0
  714. package/build/_virtual/promise_array.js_commonjs-proxy +3 -0
  715. package/build/_virtual/promise_array.js_commonjs-proxy.map +1 -0
  716. package/build/_virtual/promise_provider.js_commonjs-proxy +3 -0
  717. package/build/_virtual/promise_provider.js_commonjs-proxy.map +1 -0
  718. package/build/_virtual/promisify.js_commonjs-proxy +3 -0
  719. package/build/_virtual/promisify.js_commonjs-proxy.map +1 -0
  720. package/build/_virtual/propertyOptions.js_commonjs-proxy +3 -0
  721. package/build/_virtual/propertyOptions.js_commonjs-proxy.map +1 -0
  722. package/build/_virtual/props.js_commonjs-proxy +3 -0
  723. package/build/_virtual/props.js_commonjs-proxy.map +1 -0
  724. package/build/_virtual/query.js_commonjs-proxy +3 -0
  725. package/build/_virtual/query.js_commonjs-proxy.map +1 -0
  726. package/build/_virtual/query2.js_commonjs-proxy +3 -0
  727. package/build/_virtual/query2.js_commonjs-proxy.map +1 -0
  728. package/build/_virtual/queryhelpers.js_commonjs-proxy +3 -0
  729. package/build/_virtual/queryhelpers.js_commonjs-proxy.map +1 -0
  730. package/build/_virtual/queue.js_commonjs-proxy +3 -0
  731. package/build/_virtual/queue.js_commonjs-proxy.map +1 -0
  732. package/build/_virtual/race.js_commonjs-proxy +3 -0
  733. package/build/_virtual/race.js_commonjs-proxy.map +1 -0
  734. package/build/_virtual/re_index.js_commonjs-proxy +3 -0
  735. package/build/_virtual/re_index.js_commonjs-proxy.map +1 -0
  736. package/build/_virtual/read_concern.js_commonjs-proxy +3 -0
  737. package/build/_virtual/read_concern.js_commonjs-proxy.map +1 -0
  738. package/build/_virtual/read_preference.js_commonjs-proxy +3 -0
  739. package/build/_virtual/read_preference.js_commonjs-proxy.map +1 -0
  740. package/build/_virtual/readable.js_commonjs-proxy +3 -0
  741. package/build/_virtual/readable.js_commonjs-proxy.map +1 -0
  742. package/build/_virtual/receiver.js_commonjs-proxy +3 -0
  743. package/build/_virtual/receiver.js_commonjs-proxy.map +1 -0
  744. package/build/_virtual/redisError.js_commonjs-proxy +3 -0
  745. package/build/_virtual/redisError.js_commonjs-proxy.map +1 -0
  746. package/build/_virtual/reduce.js_commonjs-proxy +3 -0
  747. package/build/_virtual/reduce.js_commonjs-proxy.map +1 -0
  748. package/build/_virtual/regexp.js_commonjs-proxy +3 -0
  749. package/build/_virtual/regexp.js_commonjs-proxy.map +1 -0
  750. package/build/_virtual/removeDeselectedForeignField.js_commonjs-proxy +3 -0
  751. package/build/_virtual/removeDeselectedForeignField.js_commonjs-proxy.map +1 -0
  752. package/build/_virtual/removeOptions.js_commonjs-proxy +3 -0
  753. package/build/_virtual/removeOptions.js_commonjs-proxy.map +1 -0
  754. package/build/_virtual/removeSubdocs.js_commonjs-proxy +3 -0
  755. package/build/_virtual/removeSubdocs.js_commonjs-proxy.map +1 -0
  756. package/build/_virtual/removeUnusedArrayFilters.js_commonjs-proxy +3 -0
  757. package/build/_virtual/removeUnusedArrayFilters.js_commonjs-proxy.map +1 -0
  758. package/build/_virtual/remove_user.js_commonjs-proxy +3 -0
  759. package/build/_virtual/remove_user.js_commonjs-proxy.map +1 -0
  760. package/build/_virtual/rename.js_commonjs-proxy +3 -0
  761. package/build/_virtual/rename.js_commonjs-proxy.map +1 -0
  762. package/build/_virtual/replace_one.js_commonjs-proxy +3 -0
  763. package/build/_virtual/replace_one.js_commonjs-proxy.map +1 -0
  764. package/build/_virtual/replset.js_commonjs-proxy +3 -0
  765. package/build/_virtual/replset.js_commonjs-proxy.map +1 -0
  766. package/build/_virtual/replset2.js_commonjs-proxy +3 -0
  767. package/build/_virtual/replset2.js_commonjs-proxy.map +1 -0
  768. package/build/_virtual/replset_state.js_commonjs-proxy +3 -0
  769. package/build/_virtual/replset_state.js_commonjs-proxy.map +1 -0
  770. package/build/_virtual/replyError.js_commonjs-proxy +3 -0
  771. package/build/_virtual/replyError.js_commonjs-proxy.map +1 -0
  772. package/build/_virtual/run_command.js_commonjs-proxy +3 -0
  773. package/build/_virtual/run_command.js_commonjs-proxy.map +1 -0
  774. package/build/_virtual/sanitizeProjection.js_commonjs-proxy +3 -0
  775. package/build/_virtual/sanitizeProjection.js_commonjs-proxy.map +1 -0
  776. package/build/_virtual/saveOptions.js_commonjs-proxy +3 -0
  777. package/build/_virtual/saveOptions.js_commonjs-proxy.map +1 -0
  778. package/build/_virtual/saveSubdocs.js_commonjs-proxy +3 -0
  779. package/build/_virtual/saveSubdocs.js_commonjs-proxy.map +1 -0
  780. package/build/_virtual/schedule.js_commonjs-proxy +3 -0
  781. package/build/_virtual/schedule.js_commonjs-proxy.map +1 -0
  782. package/build/_virtual/schema.js_commonjs-proxy +3 -0
  783. package/build/_virtual/schema.js_commonjs-proxy.map +1 -0
  784. package/build/_virtual/schematype.js_commonjs-proxy +3 -0
  785. package/build/_virtual/schematype.js_commonjs-proxy.map +1 -0
  786. package/build/_virtual/scram.js_commonjs-proxy +3 -0
  787. package/build/_virtual/scram.js_commonjs-proxy.map +1 -0
  788. package/build/_virtual/selectPopulatedFields.js_commonjs-proxy +3 -0
  789. package/build/_virtual/selectPopulatedFields.js_commonjs-proxy.map +1 -0
  790. package/build/_virtual/sender.js_commonjs-proxy +3 -0
  791. package/build/_virtual/sender.js_commonjs-proxy.map +1 -0
  792. package/build/_virtual/serializer.js_commonjs-proxy +3 -0
  793. package/build/_virtual/serializer.js_commonjs-proxy.map +1 -0
  794. package/build/_virtual/server.js_commonjs-proxy +3 -0
  795. package/build/_virtual/server.js_commonjs-proxy.map +1 -0
  796. package/build/_virtual/server2.js_commonjs-proxy +3 -0
  797. package/build/_virtual/server2.js_commonjs-proxy.map +1 -0
  798. package/build/_virtual/server3.js_commonjs-proxy +3 -0
  799. package/build/_virtual/server3.js_commonjs-proxy.map +1 -0
  800. package/build/_virtual/serverSelection.js_commonjs-proxy +3 -0
  801. package/build/_virtual/serverSelection.js_commonjs-proxy.map +1 -0
  802. package/build/_virtual/server_description.js_commonjs-proxy +3 -0
  803. package/build/_virtual/server_description.js_commonjs-proxy.map +1 -0
  804. package/build/_virtual/server_selection.js_commonjs-proxy +3 -0
  805. package/build/_virtual/server_selection.js_commonjs-proxy.map +1 -0
  806. package/build/_virtual/sessions.js_commonjs-proxy +3 -0
  807. package/build/_virtual/sessions.js_commonjs-proxy.map +1 -0
  808. package/build/_virtual/setDefaultsOnInsert.js_commonjs-proxy +3 -0
  809. package/build/_virtual/setDefaultsOnInsert.js_commonjs-proxy.map +1 -0
  810. package/build/_virtual/setDottedPath.js_commonjs-proxy +3 -0
  811. package/build/_virtual/setDottedPath.js_commonjs-proxy.map +1 -0
  812. package/build/_virtual/set_profiling_level.js_commonjs-proxy +3 -0
  813. package/build/_virtual/set_profiling_level.js_commonjs-proxy.map +1 -0
  814. package/build/_virtual/settle.js_commonjs-proxy +3 -0
  815. package/build/_virtual/settle.js_commonjs-proxy.map +1 -0
  816. package/build/_virtual/setupTimestamps.js_commonjs-proxy +3 -0
  817. package/build/_virtual/setupTimestamps.js_commonjs-proxy.map +1 -0
  818. package/build/_virtual/sharding.js_commonjs-proxy +3 -0
  819. package/build/_virtual/sharding.js_commonjs-proxy.map +1 -0
  820. package/build/_virtual/shared.js_commonjs-proxy +3 -0
  821. package/build/_virtual/shared.js_commonjs-proxy.map +1 -0
  822. package/build/_virtual/shared2.js_commonjs-proxy +3 -0
  823. package/build/_virtual/shared2.js_commonjs-proxy.map +1 -0
  824. package/build/_virtual/some.js_commonjs-proxy +3 -0
  825. package/build/_virtual/some.js_commonjs-proxy.map +1 -0
  826. package/build/_virtual/specialProperties.js_commonjs-proxy +3 -0
  827. package/build/_virtual/specialProperties.js_commonjs-proxy.map +1 -0
  828. package/build/_virtual/srv_polling.js_commonjs-proxy +3 -0
  829. package/build/_virtual/srv_polling.js_commonjs-proxy.map +1 -0
  830. package/build/_virtual/statemachine.js_commonjs-proxy +3 -0
  831. package/build/_virtual/statemachine.js_commonjs-proxy.map +1 -0
  832. package/build/_virtual/stats.js_commonjs-proxy +3 -0
  833. package/build/_virtual/stats.js_commonjs-proxy.map +1 -0
  834. package/build/_virtual/stream.js_commonjs-proxy +3 -0
  835. package/build/_virtual/stream.js_commonjs-proxy.map +1 -0
  836. package/build/_virtual/stream2.js_commonjs-proxy +3 -0
  837. package/build/_virtual/stream2.js_commonjs-proxy.map +1 -0
  838. package/build/_virtual/stream_description.js_commonjs-proxy +3 -0
  839. package/build/_virtual/stream_description.js_commonjs-proxy.map +1 -0
  840. package/build/_virtual/strict.js_commonjs-proxy +3 -0
  841. package/build/_virtual/strict.js_commonjs-proxy.map +1 -0
  842. package/build/_virtual/string.js_commonjs-proxy +3 -0
  843. package/build/_virtual/string.js_commonjs-proxy.map +1 -0
  844. package/build/_virtual/string2.js_commonjs-proxy +3 -0
  845. package/build/_virtual/string2.js_commonjs-proxy.map +1 -0
  846. package/build/_virtual/stringToParts.js_commonjs-proxy +3 -0
  847. package/build/_virtual/stringToParts.js_commonjs-proxy.map +1 -0
  848. package/build/_virtual/string_decoder.js_commonjs-proxy +3 -0
  849. package/build/_virtual/string_decoder.js_commonjs-proxy.map +1 -0
  850. package/build/_virtual/stringifyFunctionOperators.js_commonjs-proxy +3 -0
  851. package/build/_virtual/stringifyFunctionOperators.js_commonjs-proxy.map +1 -0
  852. package/build/_virtual/subdocument.js_commonjs-proxy +3 -0
  853. package/build/_virtual/subdocument.js_commonjs-proxy.map +1 -0
  854. package/build/_virtual/symbol.js_commonjs-proxy +3 -0
  855. package/build/_virtual/symbol.js_commonjs-proxy.map +1 -0
  856. package/build/_virtual/symbols.js_commonjs-proxy +3 -0
  857. package/build/_virtual/symbols.js_commonjs-proxy.map +1 -0
  858. package/build/_virtual/symbols2.js_commonjs-proxy +3 -0
  859. package/build/_virtual/symbols2.js_commonjs-proxy.map +1 -0
  860. package/build/_virtual/synchronous_inspection.js_commonjs-proxy +3 -0
  861. package/build/_virtual/synchronous_inspection.js_commonjs-proxy.map +1 -0
  862. package/build/_virtual/text.js_commonjs-proxy +3 -0
  863. package/build/_virtual/text.js_commonjs-proxy.map +1 -0
  864. package/build/_virtual/thenables.js_commonjs-proxy +3 -0
  865. package/build/_virtual/thenables.js_commonjs-proxy.map +1 -0
  866. package/build/_virtual/timers.js_commonjs-proxy +3 -0
  867. package/build/_virtual/timers.js_commonjs-proxy.map +1 -0
  868. package/build/_virtual/timers2.js_commonjs-proxy +3 -0
  869. package/build/_virtual/timers2.js_commonjs-proxy.map +1 -0
  870. package/build/_virtual/timestamp.js_commonjs-proxy +3 -0
  871. package/build/_virtual/timestamp.js_commonjs-proxy.map +1 -0
  872. package/build/_virtual/topology.js_commonjs-proxy +3 -0
  873. package/build/_virtual/topology.js_commonjs-proxy.map +1 -0
  874. package/build/_virtual/topology_base.js_commonjs-proxy +3 -0
  875. package/build/_virtual/topology_base.js_commonjs-proxy.map +1 -0
  876. package/build/_virtual/topology_description.js_commonjs-proxy +3 -0
  877. package/build/_virtual/topology_description.js_commonjs-proxy.map +1 -0
  878. package/build/_virtual/trackTransaction.js_commonjs-proxy +3 -0
  879. package/build/_virtual/trackTransaction.js_commonjs-proxy.map +1 -0
  880. package/build/_virtual/transactions.js_commonjs-proxy +3 -0
  881. package/build/_virtual/transactions.js_commonjs-proxy.map +1 -0
  882. package/build/_virtual/type.js_commonjs-proxy +3 -0
  883. package/build/_virtual/type.js_commonjs-proxy.map +1 -0
  884. package/build/_virtual/unordered.js_commonjs-proxy +3 -0
  885. package/build/_virtual/unordered.js_commonjs-proxy.map +1 -0
  886. package/build/_virtual/updateValidators.js_commonjs-proxy +3 -0
  887. package/build/_virtual/updateValidators.js_commonjs-proxy.map +1 -0
  888. package/build/_virtual/update_many.js_commonjs-proxy +3 -0
  889. package/build/_virtual/update_many.js_commonjs-proxy.map +1 -0
  890. package/build/_virtual/update_one.js_commonjs-proxy +3 -0
  891. package/build/_virtual/update_one.js_commonjs-proxy.map +1 -0
  892. package/build/_virtual/updatedPathsByArrayFilter.js_commonjs-proxy +3 -0
  893. package/build/_virtual/updatedPathsByArrayFilter.js_commonjs-proxy.map +1 -0
  894. package/build/_virtual/upload.js_commonjs-proxy +3 -0
  895. package/build/_virtual/upload.js_commonjs-proxy.map +1 -0
  896. package/build/_virtual/uri_parser.js_commonjs-proxy +3 -0
  897. package/build/_virtual/uri_parser.js_commonjs-proxy.map +1 -0
  898. package/build/_virtual/url_parser.js_commonjs-proxy +3 -0
  899. package/build/_virtual/url_parser.js_commonjs-proxy.map +1 -0
  900. package/build/_virtual/using.js_commonjs-proxy +3 -0
  901. package/build/_virtual/using.js_commonjs-proxy.map +1 -0
  902. package/build/_virtual/util.js_commonjs-proxy +3 -0
  903. package/build/_virtual/util.js_commonjs-proxy.map +1 -0
  904. package/build/_virtual/util2.js_commonjs-proxy +3 -0
  905. package/build/_virtual/util2.js_commonjs-proxy.map +1 -0
  906. package/build/_virtual/utils.js_commonjs-proxy +3 -0
  907. package/build/_virtual/utils.js_commonjs-proxy.map +1 -0
  908. package/build/_virtual/utils2.js_commonjs-proxy +3 -0
  909. package/build/_virtual/utils2.js_commonjs-proxy.map +1 -0
  910. package/build/_virtual/utils3.js_commonjs-proxy +3 -0
  911. package/build/_virtual/utils3.js_commonjs-proxy.map +1 -0
  912. package/build/_virtual/utils4.js_commonjs-proxy +3 -0
  913. package/build/_virtual/utils4.js_commonjs-proxy.map +1 -0
  914. package/build/_virtual/utils5.js_commonjs-proxy +3 -0
  915. package/build/_virtual/utils5.js_commonjs-proxy.map +1 -0
  916. package/build/_virtual/utils6.js_commonjs-proxy +3 -0
  917. package/build/_virtual/utils6.js_commonjs-proxy.map +1 -0
  918. package/build/_virtual/utils7.js_commonjs-proxy +3 -0
  919. package/build/_virtual/utils7.js_commonjs-proxy.map +1 -0
  920. package/build/_virtual/validateBeforeSave.js_commonjs-proxy +3 -0
  921. package/build/_virtual/validateBeforeSave.js_commonjs-proxy.map +1 -0
  922. package/build/_virtual/validateRef.js_commonjs-proxy +3 -0
  923. package/build/_virtual/validateRef.js_commonjs-proxy.map +1 -0
  924. package/build/_virtual/validate_collection.js_commonjs-proxy +3 -0
  925. package/build/_virtual/validate_collection.js_commonjs-proxy.map +1 -0
  926. package/build/_virtual/validation.js_commonjs-proxy +3 -0
  927. package/build/_virtual/validation.js_commonjs-proxy.map +1 -0
  928. package/build/_virtual/validation2.js_commonjs-proxy +3 -0
  929. package/build/_virtual/validation2.js_commonjs-proxy.map +1 -0
  930. package/build/_virtual/validator.js_commonjs-proxy +3 -0
  931. package/build/_virtual/validator.js_commonjs-proxy.map +1 -0
  932. package/build/_virtual/validoptions.js_commonjs-proxy +3 -0
  933. package/build/_virtual/validoptions.js_commonjs-proxy.map +1 -0
  934. package/build/_virtual/version.js_commonjs-proxy +3 -0
  935. package/build/_virtual/version.js_commonjs-proxy.map +1 -0
  936. package/build/_virtual/virtualtype.js_commonjs-proxy +3 -0
  937. package/build/_virtual/virtualtype.js_commonjs-proxy.map +1 -0
  938. package/build/_virtual/websocket-server.js_commonjs-proxy +3 -0
  939. package/build/_virtual/websocket-server.js_commonjs-proxy.map +1 -0
  940. package/build/_virtual/websocket.js_commonjs-proxy +3 -0
  941. package/build/_virtual/websocket.js_commonjs-proxy.map +1 -0
  942. package/build/_virtual/wrapThunk.js_commonjs-proxy +3 -0
  943. package/build/_virtual/wrapThunk.js_commonjs-proxy.map +1 -0
  944. package/build/_virtual/write_command.js_commonjs-proxy +3 -0
  945. package/build/_virtual/write_command.js_commonjs-proxy.map +1 -0
  946. package/build/_virtual/write_concern.js_commonjs-proxy +3 -0
  947. package/build/_virtual/write_concern.js_commonjs-proxy.map +1 -0
  948. package/build/_virtual/x509.js_commonjs-proxy +3 -0
  949. package/build/_virtual/x509.js_commonjs-proxy.map +1 -0
  950. package/build/bundles/colyseus/build/index.mjs +13 -0
  951. package/build/bundles/colyseus/build/index.mjs.js +25 -0
  952. package/build/bundles/colyseus/build/index.mjs.js.map +1 -0
  953. package/build/bundles/colyseus/build/index.mjs.map +1 -0
  954. package/build/matchmaker/controller.js +3 -1
  955. package/build/matchmaker/controller.js.map +1 -1
  956. package/build/matchmaker/controller.mjs +3 -1
  957. package/build/matchmaker/controller.mjs.map +1 -1
  958. package/build/node_modules/aws4/aws4.js +388 -0
  959. package/build/node_modules/aws4/aws4.js.map +1 -0
  960. package/build/node_modules/aws4/aws4.mjs +380 -0
  961. package/build/node_modules/aws4/aws4.mjs.map +1 -0
  962. package/build/node_modules/aws4/lru.js +101 -0
  963. package/build/node_modules/aws4/lru.js.map +1 -0
  964. package/build/node_modules/aws4/lru.mjs +99 -0
  965. package/build/node_modules/aws4/lru.mjs.map +1 -0
  966. package/build/node_modules/bl/bl.js +403 -0
  967. package/build/node_modules/bl/bl.js.map +1 -0
  968. package/build/node_modules/bl/bl.mjs +397 -0
  969. package/build/node_modules/bl/bl.mjs.map +1 -0
  970. package/build/node_modules/bl/node_modules/readable-stream/lib/_stream_duplex.js +114 -0
  971. package/build/node_modules/bl/node_modules/readable-stream/lib/_stream_duplex.js.map +1 -0
  972. package/build/node_modules/bl/node_modules/readable-stream/lib/_stream_duplex.mjs +112 -0
  973. package/build/node_modules/bl/node_modules/readable-stream/lib/_stream_duplex.mjs.map +1 -0
  974. package/build/node_modules/bl/node_modules/readable-stream/lib/_stream_passthrough.js +29 -0
  975. package/build/node_modules/bl/node_modules/readable-stream/lib/_stream_passthrough.js.map +1 -0
  976. package/build/node_modules/bl/node_modules/readable-stream/lib/_stream_passthrough.mjs +27 -0
  977. package/build/node_modules/bl/node_modules/readable-stream/lib/_stream_passthrough.mjs.map +1 -0
  978. package/build/node_modules/bl/node_modules/readable-stream/lib/_stream_readable.js +1020 -0
  979. package/build/node_modules/bl/node_modules/readable-stream/lib/_stream_readable.js.map +1 -0
  980. package/build/node_modules/bl/node_modules/readable-stream/lib/_stream_readable.mjs +1013 -0
  981. package/build/node_modules/bl/node_modules/readable-stream/lib/_stream_readable.mjs.map +1 -0
  982. package/build/node_modules/bl/node_modules/readable-stream/lib/_stream_transform.js +158 -0
  983. package/build/node_modules/bl/node_modules/readable-stream/lib/_stream_transform.js.map +1 -0
  984. package/build/node_modules/bl/node_modules/readable-stream/lib/_stream_transform.mjs +156 -0
  985. package/build/node_modules/bl/node_modules/readable-stream/lib/_stream_transform.mjs.map +1 -0
  986. package/build/node_modules/bl/node_modules/readable-stream/lib/_stream_writable.js +667 -0
  987. package/build/node_modules/bl/node_modules/readable-stream/lib/_stream_writable.js.map +1 -0
  988. package/build/node_modules/bl/node_modules/readable-stream/lib/_stream_writable.mjs +665 -0
  989. package/build/node_modules/bl/node_modules/readable-stream/lib/_stream_writable.mjs.map +1 -0
  990. package/build/node_modules/bl/node_modules/readable-stream/lib/internal/streams/BufferList.js +93 -0
  991. package/build/node_modules/bl/node_modules/readable-stream/lib/internal/streams/BufferList.js.map +1 -0
  992. package/build/node_modules/bl/node_modules/readable-stream/lib/internal/streams/BufferList.mjs +87 -0
  993. package/build/node_modules/bl/node_modules/readable-stream/lib/internal/streams/BufferList.mjs.map +1 -0
  994. package/build/node_modules/bl/node_modules/readable-stream/lib/internal/streams/destroy.js +79 -0
  995. package/build/node_modules/bl/node_modules/readable-stream/lib/internal/streams/destroy.js.map +1 -0
  996. package/build/node_modules/bl/node_modules/readable-stream/lib/internal/streams/destroy.mjs +77 -0
  997. package/build/node_modules/bl/node_modules/readable-stream/lib/internal/streams/destroy.mjs.map +1 -0
  998. package/build/node_modules/bl/node_modules/readable-stream/lib/internal/streams/stream.js +12 -0
  999. package/build/node_modules/bl/node_modules/readable-stream/lib/internal/streams/stream.js.map +1 -0
  1000. package/build/node_modules/bl/node_modules/readable-stream/lib/internal/streams/stream.mjs +6 -0
  1001. package/build/node_modules/bl/node_modules/readable-stream/lib/internal/streams/stream.mjs.map +1 -0
  1002. package/build/node_modules/bl/node_modules/readable-stream/readable.js +37 -0
  1003. package/build/node_modules/bl/node_modules/readable-stream/readable.js.map +1 -0
  1004. package/build/node_modules/bl/node_modules/readable-stream/readable.mjs +31 -0
  1005. package/build/node_modules/bl/node_modules/readable-stream/readable.mjs.map +1 -0
  1006. package/build/node_modules/bl/node_modules/string_decoder/lib/string_decoder.js +286 -0
  1007. package/build/node_modules/bl/node_modules/string_decoder/lib/string_decoder.js.map +1 -0
  1008. package/build/node_modules/bl/node_modules/string_decoder/lib/string_decoder.mjs +282 -0
  1009. package/build/node_modules/bl/node_modules/string_decoder/lib/string_decoder.mjs.map +1 -0
  1010. package/build/node_modules/bluebird/js/release/any.js +25 -0
  1011. package/build/node_modules/bluebird/js/release/any.js.map +1 -0
  1012. package/build/node_modules/bluebird/js/release/any.mjs +23 -0
  1013. package/build/node_modules/bluebird/js/release/any.mjs.map +1 -0
  1014. package/build/node_modules/bluebird/js/release/async.js +173 -0
  1015. package/build/node_modules/bluebird/js/release/async.js.map +1 -0
  1016. package/build/node_modules/bluebird/js/release/async.mjs +169 -0
  1017. package/build/node_modules/bluebird/js/release/async.mjs.map +1 -0
  1018. package/build/node_modules/bluebird/js/release/bind.js +71 -0
  1019. package/build/node_modules/bluebird/js/release/bind.js.map +1 -0
  1020. package/build/node_modules/bluebird/js/release/bind.mjs +69 -0
  1021. package/build/node_modules/bluebird/js/release/bind.mjs.map +1 -0
  1022. package/build/node_modules/bluebird/js/release/bluebird.js +17 -0
  1023. package/build/node_modules/bluebird/js/release/bluebird.js.map +1 -0
  1024. package/build/node_modules/bluebird/js/release/bluebird.mjs +15 -0
  1025. package/build/node_modules/bluebird/js/release/bluebird.mjs.map +1 -0
  1026. package/build/node_modules/bluebird/js/release/call_get.js +128 -0
  1027. package/build/node_modules/bluebird/js/release/call_get.js.map +1 -0
  1028. package/build/node_modules/bluebird/js/release/call_get.mjs +126 -0
  1029. package/build/node_modules/bluebird/js/release/call_get.mjs.map +1 -0
  1030. package/build/node_modules/bluebird/js/release/cancel.js +135 -0
  1031. package/build/node_modules/bluebird/js/release/cancel.js.map +1 -0
  1032. package/build/node_modules/bluebird/js/release/cancel.mjs +133 -0
  1033. package/build/node_modules/bluebird/js/release/cancel.mjs.map +1 -0
  1034. package/build/node_modules/bluebird/js/release/catch_filter.js +49 -0
  1035. package/build/node_modules/bluebird/js/release/catch_filter.js.map +1 -0
  1036. package/build/node_modules/bluebird/js/release/catch_filter.mjs +47 -0
  1037. package/build/node_modules/bluebird/js/release/catch_filter.mjs.map +1 -0
  1038. package/build/node_modules/bluebird/js/release/context.js +73 -0
  1039. package/build/node_modules/bluebird/js/release/context.js.map +1 -0
  1040. package/build/node_modules/bluebird/js/release/context.mjs +71 -0
  1041. package/build/node_modules/bluebird/js/release/context.mjs.map +1 -0
  1042. package/build/node_modules/bluebird/js/release/debuggability.js +922 -0
  1043. package/build/node_modules/bluebird/js/release/debuggability.js.map +1 -0
  1044. package/build/node_modules/bluebird/js/release/debuggability.mjs +920 -0
  1045. package/build/node_modules/bluebird/js/release/debuggability.mjs.map +1 -0
  1046. package/build/node_modules/bluebird/js/release/direct_resolve.js +50 -0
  1047. package/build/node_modules/bluebird/js/release/direct_resolve.js.map +1 -0
  1048. package/build/node_modules/bluebird/js/release/direct_resolve.mjs +48 -0
  1049. package/build/node_modules/bluebird/js/release/direct_resolve.mjs.map +1 -0
  1050. package/build/node_modules/bluebird/js/release/each.js +33 -0
  1051. package/build/node_modules/bluebird/js/release/each.js.map +1 -0
  1052. package/build/node_modules/bluebird/js/release/each.mjs +31 -0
  1053. package/build/node_modules/bluebird/js/release/each.mjs.map +1 -0
  1054. package/build/node_modules/bluebird/js/release/errors.js +122 -0
  1055. package/build/node_modules/bluebird/js/release/errors.js.map +1 -0
  1056. package/build/node_modules/bluebird/js/release/errors.mjs +120 -0
  1057. package/build/node_modules/bluebird/js/release/errors.mjs.map +1 -0
  1058. package/build/node_modules/bluebird/js/release/es5.js +88 -0
  1059. package/build/node_modules/bluebird/js/release/es5.js.map +1 -0
  1060. package/build/node_modules/bluebird/js/release/es5.mjs +86 -0
  1061. package/build/node_modules/bluebird/js/release/es5.mjs.map +1 -0
  1062. package/build/node_modules/bluebird/js/release/filter.js +16 -0
  1063. package/build/node_modules/bluebird/js/release/filter.js.map +1 -0
  1064. package/build/node_modules/bluebird/js/release/filter.mjs +14 -0
  1065. package/build/node_modules/bluebird/js/release/filter.mjs.map +1 -0
  1066. package/build/node_modules/bluebird/js/release/finally.js +153 -0
  1067. package/build/node_modules/bluebird/js/release/finally.js.map +1 -0
  1068. package/build/node_modules/bluebird/js/release/finally.mjs +151 -0
  1069. package/build/node_modules/bluebird/js/release/finally.mjs.map +1 -0
  1070. package/build/node_modules/bluebird/js/release/generators.js +229 -0
  1071. package/build/node_modules/bluebird/js/release/generators.js.map +1 -0
  1072. package/build/node_modules/bluebird/js/release/generators.mjs +227 -0
  1073. package/build/node_modules/bluebird/js/release/generators.mjs.map +1 -0
  1074. package/build/node_modules/bluebird/js/release/join.js +172 -0
  1075. package/build/node_modules/bluebird/js/release/join.js.map +1 -0
  1076. package/build/node_modules/bluebird/js/release/join.mjs +170 -0
  1077. package/build/node_modules/bluebird/js/release/join.mjs.map +1 -0
  1078. package/build/node_modules/bluebird/js/release/map.js +173 -0
  1079. package/build/node_modules/bluebird/js/release/map.js.map +1 -0
  1080. package/build/node_modules/bluebird/js/release/map.mjs +171 -0
  1081. package/build/node_modules/bluebird/js/release/map.mjs.map +1 -0
  1082. package/build/node_modules/bluebird/js/release/method.js +61 -0
  1083. package/build/node_modules/bluebird/js/release/method.js.map +1 -0
  1084. package/build/node_modules/bluebird/js/release/method.mjs +59 -0
  1085. package/build/node_modules/bluebird/js/release/method.mjs.map +1 -0
  1086. package/build/node_modules/bluebird/js/release/nodeback.js +57 -0
  1087. package/build/node_modules/bluebird/js/release/nodeback.js.map +1 -0
  1088. package/build/node_modules/bluebird/js/release/nodeback.mjs +55 -0
  1089. package/build/node_modules/bluebird/js/release/nodeback.mjs.map +1 -0
  1090. package/build/node_modules/bluebird/js/release/nodeify.js +64 -0
  1091. package/build/node_modules/bluebird/js/release/nodeify.js.map +1 -0
  1092. package/build/node_modules/bluebird/js/release/nodeify.mjs +62 -0
  1093. package/build/node_modules/bluebird/js/release/nodeify.mjs.map +1 -0
  1094. package/build/node_modules/bluebird/js/release/promise.js +815 -0
  1095. package/build/node_modules/bluebird/js/release/promise.js.map +1 -0
  1096. package/build/node_modules/bluebird/js/release/promise.mjs +813 -0
  1097. package/build/node_modules/bluebird/js/release/promise.mjs.map +1 -0
  1098. package/build/node_modules/bluebird/js/release/promise_array.js +190 -0
  1099. package/build/node_modules/bluebird/js/release/promise_array.js.map +1 -0
  1100. package/build/node_modules/bluebird/js/release/promise_array.mjs +188 -0
  1101. package/build/node_modules/bluebird/js/release/promise_array.mjs.map +1 -0
  1102. package/build/node_modules/bluebird/js/release/promisify.js +321 -0
  1103. package/build/node_modules/bluebird/js/release/promisify.js.map +1 -0
  1104. package/build/node_modules/bluebird/js/release/promisify.mjs +319 -0
  1105. package/build/node_modules/bluebird/js/release/promisify.mjs.map +1 -0
  1106. package/build/node_modules/bluebird/js/release/props.js +125 -0
  1107. package/build/node_modules/bluebird/js/release/props.js.map +1 -0
  1108. package/build/node_modules/bluebird/js/release/props.mjs +123 -0
  1109. package/build/node_modules/bluebird/js/release/props.mjs.map +1 -0
  1110. package/build/node_modules/bluebird/js/release/queue.js +77 -0
  1111. package/build/node_modules/bluebird/js/release/queue.js.map +1 -0
  1112. package/build/node_modules/bluebird/js/release/queue.mjs +75 -0
  1113. package/build/node_modules/bluebird/js/release/queue.mjs.map +1 -0
  1114. package/build/node_modules/bluebird/js/release/race.js +55 -0
  1115. package/build/node_modules/bluebird/js/release/race.js.map +1 -0
  1116. package/build/node_modules/bluebird/js/release/race.mjs +53 -0
  1117. package/build/node_modules/bluebird/js/release/race.mjs.map +1 -0
  1118. package/build/node_modules/bluebird/js/release/reduce.js +178 -0
  1119. package/build/node_modules/bluebird/js/release/reduce.js.map +1 -0
  1120. package/build/node_modules/bluebird/js/release/reduce.mjs +176 -0
  1121. package/build/node_modules/bluebird/js/release/reduce.mjs.map +1 -0
  1122. package/build/node_modules/bluebird/js/release/schedule.js +67 -0
  1123. package/build/node_modules/bluebird/js/release/schedule.js.map +1 -0
  1124. package/build/node_modules/bluebird/js/release/schedule.mjs +65 -0
  1125. package/build/node_modules/bluebird/js/release/schedule.mjs.map +1 -0
  1126. package/build/node_modules/bluebird/js/release/settle.js +49 -0
  1127. package/build/node_modules/bluebird/js/release/settle.js.map +1 -0
  1128. package/build/node_modules/bluebird/js/release/settle.mjs +47 -0
  1129. package/build/node_modules/bluebird/js/release/settle.mjs.map +1 -0
  1130. package/build/node_modules/bluebird/js/release/some.js +155 -0
  1131. package/build/node_modules/bluebird/js/release/some.js.map +1 -0
  1132. package/build/node_modules/bluebird/js/release/some.mjs +153 -0
  1133. package/build/node_modules/bluebird/js/release/some.mjs.map +1 -0
  1134. package/build/node_modules/bluebird/js/release/synchronous_inspection.js +107 -0
  1135. package/build/node_modules/bluebird/js/release/synchronous_inspection.js.map +1 -0
  1136. package/build/node_modules/bluebird/js/release/synchronous_inspection.mjs +105 -0
  1137. package/build/node_modules/bluebird/js/release/synchronous_inspection.mjs.map +1 -0
  1138. package/build/node_modules/bluebird/js/release/thenables.js +92 -0
  1139. package/build/node_modules/bluebird/js/release/thenables.js.map +1 -0
  1140. package/build/node_modules/bluebird/js/release/thenables.mjs +90 -0
  1141. package/build/node_modules/bluebird/js/release/thenables.mjs.map +1 -0
  1142. package/build/node_modules/bluebird/js/release/timers.js +99 -0
  1143. package/build/node_modules/bluebird/js/release/timers.js.map +1 -0
  1144. package/build/node_modules/bluebird/js/release/timers.mjs +97 -0
  1145. package/build/node_modules/bluebird/js/release/timers.mjs.map +1 -0
  1146. package/build/node_modules/bluebird/js/release/using.js +233 -0
  1147. package/build/node_modules/bluebird/js/release/using.js.map +1 -0
  1148. package/build/node_modules/bluebird/js/release/using.mjs +231 -0
  1149. package/build/node_modules/bluebird/js/release/using.mjs.map +1 -0
  1150. package/build/node_modules/bluebird/js/release/util.js +380 -0
  1151. package/build/node_modules/bluebird/js/release/util.js.map +1 -0
  1152. package/build/node_modules/bluebird/js/release/util.mjs +378 -0
  1153. package/build/node_modules/bluebird/js/release/util.mjs.map +1 -0
  1154. package/build/node_modules/bson/index.js +51 -0
  1155. package/build/node_modules/bson/index.js.map +1 -0
  1156. package/build/node_modules/bson/index.mjs +49 -0
  1157. package/build/node_modules/bson/index.mjs.map +1 -0
  1158. package/build/node_modules/bson/lib/bson/binary.js +401 -0
  1159. package/build/node_modules/bson/lib/bson/binary.js.map +1 -0
  1160. package/build/node_modules/bson/lib/bson/binary.mjs +393 -0
  1161. package/build/node_modules/bson/lib/bson/binary.mjs.map +1 -0
  1162. package/build/node_modules/bson/lib/bson/bson.js +422 -0
  1163. package/build/node_modules/bson/lib/bson/bson.js.map +1 -0
  1164. package/build/node_modules/bson/lib/bson/bson.mjs +404 -0
  1165. package/build/node_modules/bson/lib/bson/bson.mjs.map +1 -0
  1166. package/build/node_modules/bson/lib/bson/code.js +33 -0
  1167. package/build/node_modules/bson/lib/bson/code.js.map +1 -0
  1168. package/build/node_modules/bson/lib/bson/code.mjs +29 -0
  1169. package/build/node_modules/bson/lib/bson/code.mjs.map +1 -0
  1170. package/build/node_modules/bson/lib/bson/db_ref.js +41 -0
  1171. package/build/node_modules/bson/lib/bson/db_ref.js.map +1 -0
  1172. package/build/node_modules/bson/lib/bson/db_ref.mjs +37 -0
  1173. package/build/node_modules/bson/lib/bson/db_ref.mjs.map +1 -0
  1174. package/build/node_modules/bson/lib/bson/decimal128.js +826 -0
  1175. package/build/node_modules/bson/lib/bson/decimal128.js.map +1 -0
  1176. package/build/node_modules/bson/lib/bson/decimal128.mjs +822 -0
  1177. package/build/node_modules/bson/lib/bson/decimal128.mjs.map +1 -0
  1178. package/build/node_modules/bson/lib/bson/double.js +42 -0
  1179. package/build/node_modules/bson/lib/bson/double.js.map +1 -0
  1180. package/build/node_modules/bson/lib/bson/double.mjs +38 -0
  1181. package/build/node_modules/bson/lib/bson/double.mjs.map +1 -0
  1182. package/build/node_modules/bson/lib/bson/float_parser.js +138 -0
  1183. package/build/node_modules/bson/lib/bson/float_parser.js.map +1 -0
  1184. package/build/node_modules/bson/lib/bson/float_parser.mjs +133 -0
  1185. package/build/node_modules/bson/lib/bson/float_parser.mjs.map +1 -0
  1186. package/build/node_modules/bson/lib/bson/int_32.js +42 -0
  1187. package/build/node_modules/bson/lib/bson/int_32.js.map +1 -0
  1188. package/build/node_modules/bson/lib/bson/int_32.mjs +38 -0
  1189. package/build/node_modules/bson/lib/bson/int_32.mjs.map +1 -0
  1190. package/build/node_modules/bson/lib/bson/long.js +874 -0
  1191. package/build/node_modules/bson/lib/bson/long.js.map +1 -0
  1192. package/build/node_modules/bson/lib/bson/long.mjs +870 -0
  1193. package/build/node_modules/bson/lib/bson/long.mjs.map +1 -0
  1194. package/build/node_modules/bson/lib/bson/map.js +136 -0
  1195. package/build/node_modules/bson/lib/bson/map.js.map +1 -0
  1196. package/build/node_modules/bson/lib/bson/map.mjs +134 -0
  1197. package/build/node_modules/bson/lib/bson/map.mjs.map +1 -0
  1198. package/build/node_modules/bson/lib/bson/max_key.js +23 -0
  1199. package/build/node_modules/bson/lib/bson/max_key.js.map +1 -0
  1200. package/build/node_modules/bson/lib/bson/max_key.mjs +19 -0
  1201. package/build/node_modules/bson/lib/bson/max_key.mjs.map +1 -0
  1202. package/build/node_modules/bson/lib/bson/min_key.js +23 -0
  1203. package/build/node_modules/bson/lib/bson/min_key.js.map +1 -0
  1204. package/build/node_modules/bson/lib/bson/min_key.mjs +19 -0
  1205. package/build/node_modules/bson/lib/bson/min_key.mjs.map +1 -0
  1206. package/build/node_modules/bson/lib/bson/objectid.js +410 -0
  1207. package/build/node_modules/bson/lib/bson/objectid.js.map +1 -0
  1208. package/build/node_modules/bson/lib/bson/objectid.mjs +401 -0
  1209. package/build/node_modules/bson/lib/bson/objectid.mjs.map +1 -0
  1210. package/build/node_modules/bson/lib/bson/parser/calculate_size.js +271 -0
  1211. package/build/node_modules/bson/lib/bson/parser/calculate_size.js.map +1 -0
  1212. package/build/node_modules/bson/lib/bson/parser/calculate_size.mjs +269 -0
  1213. package/build/node_modules/bson/lib/bson/parser/calculate_size.mjs.map +1 -0
  1214. package/build/node_modules/bson/lib/bson/parser/deserializer.js +798 -0
  1215. package/build/node_modules/bson/lib/bson/parser/deserializer.js.map +1 -0
  1216. package/build/node_modules/bson/lib/bson/parser/deserializer.mjs +796 -0
  1217. package/build/node_modules/bson/lib/bson/parser/deserializer.mjs.map +1 -0
  1218. package/build/node_modules/bson/lib/bson/parser/serializer.js +1200 -0
  1219. package/build/node_modules/bson/lib/bson/parser/serializer.js.map +1 -0
  1220. package/build/node_modules/bson/lib/bson/parser/serializer.mjs +1198 -0
  1221. package/build/node_modules/bson/lib/bson/parser/serializer.mjs.map +1 -0
  1222. package/build/node_modules/bson/lib/bson/parser/utils.js +30 -0
  1223. package/build/node_modules/bson/lib/bson/parser/utils.js.map +1 -0
  1224. package/build/node_modules/bson/lib/bson/parser/utils.mjs +28 -0
  1225. package/build/node_modules/bson/lib/bson/parser/utils.mjs.map +1 -0
  1226. package/build/node_modules/bson/lib/bson/regexp.js +42 -0
  1227. package/build/node_modules/bson/lib/bson/regexp.js.map +1 -0
  1228. package/build/node_modules/bson/lib/bson/regexp.mjs +38 -0
  1229. package/build/node_modules/bson/lib/bson/regexp.mjs.map +1 -0
  1230. package/build/node_modules/bson/lib/bson/symbol.js +65 -0
  1231. package/build/node_modules/bson/lib/bson/symbol.js.map +1 -0
  1232. package/build/node_modules/bson/lib/bson/symbol.mjs +57 -0
  1233. package/build/node_modules/bson/lib/bson/symbol.mjs.map +1 -0
  1234. package/build/node_modules/bson/lib/bson/timestamp.js +863 -0
  1235. package/build/node_modules/bson/lib/bson/timestamp.js.map +1 -0
  1236. package/build/node_modules/bson/lib/bson/timestamp.mjs +859 -0
  1237. package/build/node_modules/bson/lib/bson/timestamp.mjs.map +1 -0
  1238. package/build/node_modules/core-util-is/lib/util.js +147 -0
  1239. package/build/node_modules/core-util-is/lib/util.js.map +1 -0
  1240. package/build/node_modules/core-util-is/lib/util.mjs +129 -0
  1241. package/build/node_modules/core-util-is/lib/util.mjs.map +1 -0
  1242. package/build/node_modules/denque/index.js +446 -0
  1243. package/build/node_modules/denque/index.js.map +1 -0
  1244. package/build/node_modules/denque/index.mjs +444 -0
  1245. package/build/node_modules/denque/index.mjs.map +1 -0
  1246. package/build/node_modules/double-ended-queue/js/deque.js +279 -0
  1247. package/build/node_modules/double-ended-queue/js/deque.js.map +1 -0
  1248. package/build/node_modules/double-ended-queue/js/deque.mjs +277 -0
  1249. package/build/node_modules/double-ended-queue/js/deque.mjs.map +1 -0
  1250. package/build/node_modules/inherits/inherits.js +24 -0
  1251. package/build/node_modules/inherits/inherits.js.map +1 -0
  1252. package/build/node_modules/inherits/inherits.mjs +18 -0
  1253. package/build/node_modules/inherits/inherits.mjs.map +1 -0
  1254. package/build/node_modules/inherits/inherits_browser.js +36 -0
  1255. package/build/node_modules/inherits/inherits_browser.js.map +1 -0
  1256. package/build/node_modules/inherits/inherits_browser.mjs +34 -0
  1257. package/build/node_modules/inherits/inherits_browser.mjs.map +1 -0
  1258. package/build/node_modules/isarray/index.js +10 -0
  1259. package/build/node_modules/isarray/index.js.map +1 -0
  1260. package/build/node_modules/isarray/index.mjs +8 -0
  1261. package/build/node_modules/isarray/index.mjs.map +1 -0
  1262. package/build/node_modules/kareem/index.js +514 -0
  1263. package/build/node_modules/kareem/index.js.map +1 -0
  1264. package/build/node_modules/kareem/index.mjs +512 -0
  1265. package/build/node_modules/kareem/index.mjs.map +1 -0
  1266. package/build/node_modules/memory-pager/index.js +165 -0
  1267. package/build/node_modules/memory-pager/index.js.map +1 -0
  1268. package/build/node_modules/memory-pager/index.mjs +163 -0
  1269. package/build/node_modules/memory-pager/index.mjs.map +1 -0
  1270. package/build/node_modules/mongodb/index.js +93 -0
  1271. package/build/node_modules/mongodb/index.js.map +1 -0
  1272. package/build/node_modules/mongodb/index.mjs +91 -0
  1273. package/build/node_modules/mongodb/index.mjs.map +1 -0
  1274. package/build/node_modules/mongodb/lib/admin.js +307 -0
  1275. package/build/node_modules/mongodb/lib/admin.js.map +1 -0
  1276. package/build/node_modules/mongodb/lib/admin.mjs +305 -0
  1277. package/build/node_modules/mongodb/lib/admin.mjs.map +1 -0
  1278. package/build/node_modules/mongodb/lib/aggregation_cursor.js +376 -0
  1279. package/build/node_modules/mongodb/lib/aggregation_cursor.js.map +1 -0
  1280. package/build/node_modules/mongodb/lib/aggregation_cursor.mjs +374 -0
  1281. package/build/node_modules/mongodb/lib/aggregation_cursor.mjs.map +1 -0
  1282. package/build/node_modules/mongodb/lib/apm.js +41 -0
  1283. package/build/node_modules/mongodb/lib/apm.js.map +1 -0
  1284. package/build/node_modules/mongodb/lib/apm.mjs +35 -0
  1285. package/build/node_modules/mongodb/lib/apm.mjs.map +1 -0
  1286. package/build/node_modules/mongodb/lib/async/async_iterator.js +43 -0
  1287. package/build/node_modules/mongodb/lib/async/async_iterator.js.map +1 -0
  1288. package/build/node_modules/mongodb/lib/async/async_iterator.mjs +39 -0
  1289. package/build/node_modules/mongodb/lib/async/async_iterator.mjs.map +1 -0
  1290. package/build/node_modules/mongodb/lib/bulk/common.js +1381 -0
  1291. package/build/node_modules/mongodb/lib/bulk/common.js.map +1 -0
  1292. package/build/node_modules/mongodb/lib/bulk/common.mjs +1379 -0
  1293. package/build/node_modules/mongodb/lib/bulk/common.mjs.map +1 -0
  1294. package/build/node_modules/mongodb/lib/bulk/ordered.js +119 -0
  1295. package/build/node_modules/mongodb/lib/bulk/ordered.js.map +1 -0
  1296. package/build/node_modules/mongodb/lib/bulk/ordered.mjs +115 -0
  1297. package/build/node_modules/mongodb/lib/bulk/ordered.mjs.map +1 -0
  1298. package/build/node_modules/mongodb/lib/bulk/unordered.js +140 -0
  1299. package/build/node_modules/mongodb/lib/bulk/unordered.js.map +1 -0
  1300. package/build/node_modules/mongodb/lib/bulk/unordered.mjs +136 -0
  1301. package/build/node_modules/mongodb/lib/bulk/unordered.mjs.map +1 -0
  1302. package/build/node_modules/mongodb/lib/change_stream.js +640 -0
  1303. package/build/node_modules/mongodb/lib/change_stream.js.map +1 -0
  1304. package/build/node_modules/mongodb/lib/change_stream.mjs +634 -0
  1305. package/build/node_modules/mongodb/lib/change_stream.mjs.map +1 -0
  1306. package/build/node_modules/mongodb/lib/cmap/connection.js +404 -0
  1307. package/build/node_modules/mongodb/lib/cmap/connection.js.map +1 -0
  1308. package/build/node_modules/mongodb/lib/cmap/connection.mjs +398 -0
  1309. package/build/node_modules/mongodb/lib/cmap/connection.mjs.map +1 -0
  1310. package/build/node_modules/mongodb/lib/cmap/connection_pool.js +608 -0
  1311. package/build/node_modules/mongodb/lib/cmap/connection_pool.js.map +1 -0
  1312. package/build/node_modules/mongodb/lib/cmap/connection_pool.mjs +602 -0
  1313. package/build/node_modules/mongodb/lib/cmap/connection_pool.mjs.map +1 -0
  1314. package/build/node_modules/mongodb/lib/cmap/errors.js +41 -0
  1315. package/build/node_modules/mongodb/lib/cmap/errors.js.map +1 -0
  1316. package/build/node_modules/mongodb/lib/cmap/errors.mjs +39 -0
  1317. package/build/node_modules/mongodb/lib/cmap/errors.mjs.map +1 -0
  1318. package/build/node_modules/mongodb/lib/cmap/events.js +157 -0
  1319. package/build/node_modules/mongodb/lib/cmap/events.js.map +1 -0
  1320. package/build/node_modules/mongodb/lib/cmap/events.mjs +155 -0
  1321. package/build/node_modules/mongodb/lib/cmap/events.mjs.map +1 -0
  1322. package/build/node_modules/mongodb/lib/cmap/message_stream.js +211 -0
  1323. package/build/node_modules/mongodb/lib/cmap/message_stream.js.map +1 -0
  1324. package/build/node_modules/mongodb/lib/cmap/message_stream.mjs +205 -0
  1325. package/build/node_modules/mongodb/lib/cmap/message_stream.mjs.map +1 -0
  1326. package/build/node_modules/mongodb/lib/cmap/stream_description.js +51 -0
  1327. package/build/node_modules/mongodb/lib/cmap/stream_description.js.map +1 -0
  1328. package/build/node_modules/mongodb/lib/cmap/stream_description.mjs +49 -0
  1329. package/build/node_modules/mongodb/lib/cmap/stream_description.mjs.map +1 -0
  1330. package/build/node_modules/mongodb/lib/collection.js +2294 -0
  1331. package/build/node_modules/mongodb/lib/collection.js.map +1 -0
  1332. package/build/node_modules/mongodb/lib/collection.mjs +2288 -0
  1333. package/build/node_modules/mongodb/lib/collection.mjs.map +1 -0
  1334. package/build/node_modules/mongodb/lib/command_cursor.js +276 -0
  1335. package/build/node_modules/mongodb/lib/command_cursor.js.map +1 -0
  1336. package/build/node_modules/mongodb/lib/command_cursor.mjs +274 -0
  1337. package/build/node_modules/mongodb/lib/command_cursor.mjs.map +1 -0
  1338. package/build/node_modules/mongodb/lib/constants.js +13 -0
  1339. package/build/node_modules/mongodb/lib/constants.js.map +1 -0
  1340. package/build/node_modules/mongodb/lib/constants.mjs +11 -0
  1341. package/build/node_modules/mongodb/lib/constants.mjs.map +1 -0
  1342. package/build/node_modules/mongodb/lib/core/auth/auth_provider.js +58 -0
  1343. package/build/node_modules/mongodb/lib/core/auth/auth_provider.js.map +1 -0
  1344. package/build/node_modules/mongodb/lib/core/auth/auth_provider.mjs +56 -0
  1345. package/build/node_modules/mongodb/lib/core/auth/auth_provider.mjs.map +1 -0
  1346. package/build/node_modules/mongodb/lib/core/auth/defaultAuthProviders.js +35 -0
  1347. package/build/node_modules/mongodb/lib/core/auth/defaultAuthProviders.js.map +1 -0
  1348. package/build/node_modules/mongodb/lib/core/auth/defaultAuthProviders.mjs +33 -0
  1349. package/build/node_modules/mongodb/lib/core/auth/defaultAuthProviders.mjs.map +1 -0
  1350. package/build/node_modules/mongodb/lib/core/auth/gssapi.js +162 -0
  1351. package/build/node_modules/mongodb/lib/core/auth/gssapi.js.map +1 -0
  1352. package/build/node_modules/mongodb/lib/core/auth/gssapi.mjs +156 -0
  1353. package/build/node_modules/mongodb/lib/core/auth/gssapi.mjs.map +1 -0
  1354. package/build/node_modules/mongodb/lib/core/auth/mongo_credentials.js +110 -0
  1355. package/build/node_modules/mongodb/lib/core/auth/mongo_credentials.js.map +1 -0
  1356. package/build/node_modules/mongodb/lib/core/auth/mongo_credentials.mjs +108 -0
  1357. package/build/node_modules/mongodb/lib/core/auth/mongo_credentials.mjs.map +1 -0
  1358. package/build/node_modules/mongodb/lib/core/auth/mongocr.js +54 -0
  1359. package/build/node_modules/mongodb/lib/core/auth/mongocr.js.map +1 -0
  1360. package/build/node_modules/mongodb/lib/core/auth/mongocr.mjs +48 -0
  1361. package/build/node_modules/mongodb/lib/core/auth/mongocr.mjs.map +1 -0
  1362. package/build/node_modules/mongodb/lib/core/auth/mongodb_aws.js +275 -0
  1363. package/build/node_modules/mongodb/lib/core/auth/mongodb_aws.js.map +1 -0
  1364. package/build/node_modules/mongodb/lib/core/auth/mongodb_aws.mjs +267 -0
  1365. package/build/node_modules/mongodb/lib/core/auth/mongodb_aws.mjs.map +1 -0
  1366. package/build/node_modules/mongodb/lib/core/auth/plain.js +35 -0
  1367. package/build/node_modules/mongodb/lib/core/auth/plain.js.map +1 -0
  1368. package/build/node_modules/mongodb/lib/core/auth/plain.mjs +33 -0
  1369. package/build/node_modules/mongodb/lib/core/auth/plain.mjs.map +1 -0
  1370. package/build/node_modules/mongodb/lib/core/auth/scram.js +362 -0
  1371. package/build/node_modules/mongodb/lib/core/auth/scram.js.map +1 -0
  1372. package/build/node_modules/mongodb/lib/core/auth/scram.mjs +356 -0
  1373. package/build/node_modules/mongodb/lib/core/auth/scram.mjs.map +1 -0
  1374. package/build/node_modules/mongodb/lib/core/auth/x509.js +41 -0
  1375. package/build/node_modules/mongodb/lib/core/auth/x509.js.map +1 -0
  1376. package/build/node_modules/mongodb/lib/core/auth/x509.mjs +39 -0
  1377. package/build/node_modules/mongodb/lib/core/auth/x509.mjs.map +1 -0
  1378. package/build/node_modules/mongodb/lib/core/connection/apm.js +259 -0
  1379. package/build/node_modules/mongodb/lib/core/connection/apm.js.map +1 -0
  1380. package/build/node_modules/mongodb/lib/core/connection/apm.mjs +257 -0
  1381. package/build/node_modules/mongodb/lib/core/connection/apm.mjs.map +1 -0
  1382. package/build/node_modules/mongodb/lib/core/connection/command_result.js +39 -0
  1383. package/build/node_modules/mongodb/lib/core/connection/command_result.js.map +1 -0
  1384. package/build/node_modules/mongodb/lib/core/connection/command_result.mjs +37 -0
  1385. package/build/node_modules/mongodb/lib/core/connection/command_result.mjs.map +1 -0
  1386. package/build/node_modules/mongodb/lib/core/connection/commands.js +514 -0
  1387. package/build/node_modules/mongodb/lib/core/connection/commands.js.map +1 -0
  1388. package/build/node_modules/mongodb/lib/core/connection/commands.mjs +512 -0
  1389. package/build/node_modules/mongodb/lib/core/connection/commands.mjs.map +1 -0
  1390. package/build/node_modules/mongodb/lib/core/connection/connect.js +367 -0
  1391. package/build/node_modules/mongodb/lib/core/connection/connect.js.map +1 -0
  1392. package/build/node_modules/mongodb/lib/core/connection/connect.mjs +360 -0
  1393. package/build/node_modules/mongodb/lib/core/connection/connect.mjs.map +1 -0
  1394. package/build/node_modules/mongodb/lib/core/connection/connection.js +731 -0
  1395. package/build/node_modules/mongodb/lib/core/connection/connection.js.map +1 -0
  1396. package/build/node_modules/mongodb/lib/core/connection/connection.mjs +724 -0
  1397. package/build/node_modules/mongodb/lib/core/connection/connection.mjs.map +1 -0
  1398. package/build/node_modules/mongodb/lib/core/connection/logger.js +262 -0
  1399. package/build/node_modules/mongodb/lib/core/connection/logger.js.map +1 -0
  1400. package/build/node_modules/mongodb/lib/core/connection/logger.mjs +256 -0
  1401. package/build/node_modules/mongodb/lib/core/connection/logger.mjs.map +1 -0
  1402. package/build/node_modules/mongodb/lib/core/connection/msg.js +232 -0
  1403. package/build/node_modules/mongodb/lib/core/connection/msg.js.map +1 -0
  1404. package/build/node_modules/mongodb/lib/core/connection/msg.mjs +230 -0
  1405. package/build/node_modules/mongodb/lib/core/connection/msg.mjs.map +1 -0
  1406. package/build/node_modules/mongodb/lib/core/connection/pool.js +1304 -0
  1407. package/build/node_modules/mongodb/lib/core/connection/pool.js.map +1 -0
  1408. package/build/node_modules/mongodb/lib/core/connection/pool.mjs +1297 -0
  1409. package/build/node_modules/mongodb/lib/core/connection/pool.mjs.map +1 -0
  1410. package/build/node_modules/mongodb/lib/core/connection/utils.js +59 -0
  1411. package/build/node_modules/mongodb/lib/core/connection/utils.js.map +1 -0
  1412. package/build/node_modules/mongodb/lib/core/connection/utils.mjs +57 -0
  1413. package/build/node_modules/mongodb/lib/core/connection/utils.mjs.map +1 -0
  1414. package/build/node_modules/mongodb/lib/core/cursor.js +891 -0
  1415. package/build/node_modules/mongodb/lib/core/cursor.js.map +1 -0
  1416. package/build/node_modules/mongodb/lib/core/cursor.mjs +885 -0
  1417. package/build/node_modules/mongodb/lib/core/cursor.mjs.map +1 -0
  1418. package/build/node_modules/mongodb/lib/core/error.js +354 -0
  1419. package/build/node_modules/mongodb/lib/core/error.js.map +1 -0
  1420. package/build/node_modules/mongodb/lib/core/error.mjs +352 -0
  1421. package/build/node_modules/mongodb/lib/core/error.mjs.map +1 -0
  1422. package/build/node_modules/mongodb/lib/core/index.js +77 -0
  1423. package/build/node_modules/mongodb/lib/core/index.js.map +1 -0
  1424. package/build/node_modules/mongodb/lib/core/index.mjs +75 -0
  1425. package/build/node_modules/mongodb/lib/core/index.mjs.map +1 -0
  1426. package/build/node_modules/mongodb/lib/core/sdam/common.js +70 -0
  1427. package/build/node_modules/mongodb/lib/core/sdam/common.js.map +1 -0
  1428. package/build/node_modules/mongodb/lib/core/sdam/common.mjs +68 -0
  1429. package/build/node_modules/mongodb/lib/core/sdam/common.mjs.map +1 -0
  1430. package/build/node_modules/mongodb/lib/core/sdam/events.js +127 -0
  1431. package/build/node_modules/mongodb/lib/core/sdam/events.js.map +1 -0
  1432. package/build/node_modules/mongodb/lib/core/sdam/events.mjs +125 -0
  1433. package/build/node_modules/mongodb/lib/core/sdam/events.mjs.map +1 -0
  1434. package/build/node_modules/mongodb/lib/core/sdam/monitor.js +430 -0
  1435. package/build/node_modules/mongodb/lib/core/sdam/monitor.js.map +1 -0
  1436. package/build/node_modules/mongodb/lib/core/sdam/monitor.mjs +424 -0
  1437. package/build/node_modules/mongodb/lib/core/sdam/monitor.mjs.map +1 -0
  1438. package/build/node_modules/mongodb/lib/core/sdam/server.js +584 -0
  1439. package/build/node_modules/mongodb/lib/core/sdam/server.js.map +1 -0
  1440. package/build/node_modules/mongodb/lib/core/sdam/server.mjs +578 -0
  1441. package/build/node_modules/mongodb/lib/core/sdam/server.mjs.map +1 -0
  1442. package/build/node_modules/mongodb/lib/core/sdam/server_description.js +234 -0
  1443. package/build/node_modules/mongodb/lib/core/sdam/server_description.js.map +1 -0
  1444. package/build/node_modules/mongodb/lib/core/sdam/server_description.mjs +232 -0
  1445. package/build/node_modules/mongodb/lib/core/sdam/server_description.mjs.map +1 -0
  1446. package/build/node_modules/mongodb/lib/core/sdam/server_selection.js +246 -0
  1447. package/build/node_modules/mongodb/lib/core/sdam/server_selection.js.map +1 -0
  1448. package/build/node_modules/mongodb/lib/core/sdam/server_selection.mjs +244 -0
  1449. package/build/node_modules/mongodb/lib/core/sdam/server_selection.mjs.map +1 -0
  1450. package/build/node_modules/mongodb/lib/core/sdam/srv_polling.js +155 -0
  1451. package/build/node_modules/mongodb/lib/core/sdam/srv_polling.js.map +1 -0
  1452. package/build/node_modules/mongodb/lib/core/sdam/srv_polling.mjs +145 -0
  1453. package/build/node_modules/mongodb/lib/core/sdam/srv_polling.mjs.map +1 -0
  1454. package/build/node_modules/mongodb/lib/core/sdam/topology.js +1170 -0
  1455. package/build/node_modules/mongodb/lib/core/sdam/topology.js.map +1 -0
  1456. package/build/node_modules/mongodb/lib/core/sdam/topology.mjs +1163 -0
  1457. package/build/node_modules/mongodb/lib/core/sdam/topology.mjs.map +1 -0
  1458. package/build/node_modules/mongodb/lib/core/sdam/topology_description.js +468 -0
  1459. package/build/node_modules/mongodb/lib/core/sdam/topology_description.js.map +1 -0
  1460. package/build/node_modules/mongodb/lib/core/sdam/topology_description.mjs +466 -0
  1461. package/build/node_modules/mongodb/lib/core/sdam/topology_description.mjs.map +1 -0
  1462. package/build/node_modules/mongodb/lib/core/sessions.js +797 -0
  1463. package/build/node_modules/mongodb/lib/core/sessions.js.map +1 -0
  1464. package/build/node_modules/mongodb/lib/core/sessions.mjs +791 -0
  1465. package/build/node_modules/mongodb/lib/core/sessions.mjs.map +1 -0
  1466. package/build/node_modules/mongodb/lib/core/topologies/mongos.js +1415 -0
  1467. package/build/node_modules/mongodb/lib/core/topologies/mongos.js.map +1 -0
  1468. package/build/node_modules/mongodb/lib/core/topologies/mongos.mjs +1408 -0
  1469. package/build/node_modules/mongodb/lib/core/topologies/mongos.mjs.map +1 -0
  1470. package/build/node_modules/mongodb/lib/core/topologies/read_preference.js +273 -0
  1471. package/build/node_modules/mongodb/lib/core/topologies/read_preference.js.map +1 -0
  1472. package/build/node_modules/mongodb/lib/core/topologies/read_preference.mjs +271 -0
  1473. package/build/node_modules/mongodb/lib/core/topologies/read_preference.mjs.map +1 -0
  1474. package/build/node_modules/mongodb/lib/core/topologies/replset.js +1586 -0
  1475. package/build/node_modules/mongodb/lib/core/topologies/replset.js.map +1 -0
  1476. package/build/node_modules/mongodb/lib/core/topologies/replset.mjs +1579 -0
  1477. package/build/node_modules/mongodb/lib/core/topologies/replset.mjs.map +1 -0
  1478. package/build/node_modules/mongodb/lib/core/topologies/replset_state.js +1135 -0
  1479. package/build/node_modules/mongodb/lib/core/topologies/replset_state.js.map +1 -0
  1480. package/build/node_modules/mongodb/lib/core/topologies/replset_state.mjs +1128 -0
  1481. package/build/node_modules/mongodb/lib/core/topologies/replset_state.mjs.map +1 -0
  1482. package/build/node_modules/mongodb/lib/core/topologies/server.js +1006 -0
  1483. package/build/node_modules/mongodb/lib/core/topologies/server.js.map +1 -0
  1484. package/build/node_modules/mongodb/lib/core/topologies/server.mjs +999 -0
  1485. package/build/node_modules/mongodb/lib/core/topologies/server.mjs.map +1 -0
  1486. package/build/node_modules/mongodb/lib/core/topologies/shared.js +464 -0
  1487. package/build/node_modules/mongodb/lib/core/topologies/shared.js.map +1 -0
  1488. package/build/node_modules/mongodb/lib/core/topologies/shared.mjs +462 -0
  1489. package/build/node_modules/mongodb/lib/core/topologies/shared.mjs.map +1 -0
  1490. package/build/node_modules/mongodb/lib/core/transactions.js +188 -0
  1491. package/build/node_modules/mongodb/lib/core/transactions.js.map +1 -0
  1492. package/build/node_modules/mongodb/lib/core/transactions.mjs +186 -0
  1493. package/build/node_modules/mongodb/lib/core/transactions.mjs.map +1 -0
  1494. package/build/node_modules/mongodb/lib/core/uri_parser.js +745 -0
  1495. package/build/node_modules/mongodb/lib/core/uri_parser.js.map +1 -0
  1496. package/build/node_modules/mongodb/lib/core/uri_parser.mjs +737 -0
  1497. package/build/node_modules/mongodb/lib/core/uri_parser.mjs.map +1 -0
  1498. package/build/node_modules/mongodb/lib/core/utils.js +307 -0
  1499. package/build/node_modules/mongodb/lib/core/utils.js.map +1 -0
  1500. package/build/node_modules/mongodb/lib/core/utils.mjs +300 -0
  1501. package/build/node_modules/mongodb/lib/core/utils.mjs.map +1 -0
  1502. package/build/node_modules/mongodb/lib/core/wireprotocol/command.js +193 -0
  1503. package/build/node_modules/mongodb/lib/core/wireprotocol/command.js.map +1 -0
  1504. package/build/node_modules/mongodb/lib/core/wireprotocol/command.mjs +191 -0
  1505. package/build/node_modules/mongodb/lib/core/wireprotocol/command.mjs.map +1 -0
  1506. package/build/node_modules/mongodb/lib/core/wireprotocol/compression.js +83 -0
  1507. package/build/node_modules/mongodb/lib/core/wireprotocol/compression.js.map +1 -0
  1508. package/build/node_modules/mongodb/lib/core/wireprotocol/compression.mjs +77 -0
  1509. package/build/node_modules/mongodb/lib/core/wireprotocol/compression.mjs.map +1 -0
  1510. package/build/node_modules/mongodb/lib/core/wireprotocol/constants.js +16 -0
  1511. package/build/node_modules/mongodb/lib/core/wireprotocol/constants.js.map +1 -0
  1512. package/build/node_modules/mongodb/lib/core/wireprotocol/constants.mjs +14 -0
  1513. package/build/node_modules/mongodb/lib/core/wireprotocol/constants.mjs.map +1 -0
  1514. package/build/node_modules/mongodb/lib/core/wireprotocol/get_more.js +105 -0
  1515. package/build/node_modules/mongodb/lib/core/wireprotocol/get_more.js.map +1 -0
  1516. package/build/node_modules/mongodb/lib/core/wireprotocol/get_more.mjs +103 -0
  1517. package/build/node_modules/mongodb/lib/core/wireprotocol/get_more.mjs.map +1 -0
  1518. package/build/node_modules/mongodb/lib/core/wireprotocol/index.js +26 -0
  1519. package/build/node_modules/mongodb/lib/core/wireprotocol/index.js.map +1 -0
  1520. package/build/node_modules/mongodb/lib/core/wireprotocol/index.mjs +24 -0
  1521. package/build/node_modules/mongodb/lib/core/wireprotocol/index.mjs.map +1 -0
  1522. package/build/node_modules/mongodb/lib/core/wireprotocol/kill_cursors.js +80 -0
  1523. package/build/node_modules/mongodb/lib/core/wireprotocol/kill_cursors.js.map +1 -0
  1524. package/build/node_modules/mongodb/lib/core/wireprotocol/kill_cursors.mjs +78 -0
  1525. package/build/node_modules/mongodb/lib/core/wireprotocol/kill_cursors.mjs.map +1 -0
  1526. package/build/node_modules/mongodb/lib/core/wireprotocol/query.js +247 -0
  1527. package/build/node_modules/mongodb/lib/core/wireprotocol/query.js.map +1 -0
  1528. package/build/node_modules/mongodb/lib/core/wireprotocol/query.mjs +245 -0
  1529. package/build/node_modules/mongodb/lib/core/wireprotocol/query.mjs.map +1 -0
  1530. package/build/node_modules/mongodb/lib/core/wireprotocol/shared.js +122 -0
  1531. package/build/node_modules/mongodb/lib/core/wireprotocol/shared.js.map +1 -0
  1532. package/build/node_modules/mongodb/lib/core/wireprotocol/shared.mjs +120 -0
  1533. package/build/node_modules/mongodb/lib/core/wireprotocol/shared.mjs.map +1 -0
  1534. package/build/node_modules/mongodb/lib/core/wireprotocol/write_command.js +68 -0
  1535. package/build/node_modules/mongodb/lib/core/wireprotocol/write_command.js.map +1 -0
  1536. package/build/node_modules/mongodb/lib/core/wireprotocol/write_command.mjs +66 -0
  1537. package/build/node_modules/mongodb/lib/core/wireprotocol/write_command.mjs.map +1 -0
  1538. package/build/node_modules/mongodb/lib/cursor.js +1156 -0
  1539. package/build/node_modules/mongodb/lib/cursor.js.map +1 -0
  1540. package/build/node_modules/mongodb/lib/cursor.mjs +1149 -0
  1541. package/build/node_modules/mongodb/lib/cursor.mjs.map +1 -0
  1542. package/build/node_modules/mongodb/lib/db.js +1092 -0
  1543. package/build/node_modules/mongodb/lib/db.js.map +1 -0
  1544. package/build/node_modules/mongodb/lib/db.mjs +1085 -0
  1545. package/build/node_modules/mongodb/lib/db.mjs.map +1 -0
  1546. package/build/node_modules/mongodb/lib/dynamic_loaders.js +39 -0
  1547. package/build/node_modules/mongodb/lib/dynamic_loaders.js.map +1 -0
  1548. package/build/node_modules/mongodb/lib/dynamic_loaders.mjs +37 -0
  1549. package/build/node_modules/mongodb/lib/dynamic_loaders.mjs.map +1 -0
  1550. package/build/node_modules/mongodb/lib/encrypter.js +176 -0
  1551. package/build/node_modules/mongodb/lib/encrypter.js.map +1 -0
  1552. package/build/node_modules/mongodb/lib/encrypter.mjs +170 -0
  1553. package/build/node_modules/mongodb/lib/encrypter.mjs.map +1 -0
  1554. package/build/node_modules/mongodb/lib/error.js +48 -0
  1555. package/build/node_modules/mongodb/lib/error.js.map +1 -0
  1556. package/build/node_modules/mongodb/lib/error.mjs +46 -0
  1557. package/build/node_modules/mongodb/lib/error.mjs.map +1 -0
  1558. package/build/node_modules/mongodb/lib/explain.js +60 -0
  1559. package/build/node_modules/mongodb/lib/explain.js.map +1 -0
  1560. package/build/node_modules/mongodb/lib/explain.mjs +58 -0
  1561. package/build/node_modules/mongodb/lib/explain.mjs.map +1 -0
  1562. package/build/node_modules/mongodb/lib/gridfs/chunk.js +242 -0
  1563. package/build/node_modules/mongodb/lib/gridfs/chunk.js.map +1 -0
  1564. package/build/node_modules/mongodb/lib/gridfs/chunk.mjs +240 -0
  1565. package/build/node_modules/mongodb/lib/gridfs/chunk.mjs.map +1 -0
  1566. package/build/node_modules/mongodb/lib/gridfs/grid_store.js +1940 -0
  1567. package/build/node_modules/mongodb/lib/gridfs/grid_store.js.map +1 -0
  1568. package/build/node_modules/mongodb/lib/gridfs/grid_store.mjs +1932 -0
  1569. package/build/node_modules/mongodb/lib/gridfs/grid_store.mjs.map +1 -0
  1570. package/build/node_modules/mongodb/lib/gridfs-stream/download.js +441 -0
  1571. package/build/node_modules/mongodb/lib/gridfs-stream/download.js.map +1 -0
  1572. package/build/node_modules/mongodb/lib/gridfs-stream/download.mjs +434 -0
  1573. package/build/node_modules/mongodb/lib/gridfs-stream/download.mjs.map +1 -0
  1574. package/build/node_modules/mongodb/lib/gridfs-stream/index.js +366 -0
  1575. package/build/node_modules/mongodb/lib/gridfs-stream/index.js.map +1 -0
  1576. package/build/node_modules/mongodb/lib/gridfs-stream/index.mjs +359 -0
  1577. package/build/node_modules/mongodb/lib/gridfs-stream/index.mjs.map +1 -0
  1578. package/build/node_modules/mongodb/lib/gridfs-stream/upload.js +552 -0
  1579. package/build/node_modules/mongodb/lib/gridfs-stream/upload.js.map +1 -0
  1580. package/build/node_modules/mongodb/lib/gridfs-stream/upload.mjs +544 -0
  1581. package/build/node_modules/mongodb/lib/gridfs-stream/upload.mjs.map +1 -0
  1582. package/build/node_modules/mongodb/lib/mongo_client.js +514 -0
  1583. package/build/node_modules/mongodb/lib/mongo_client.js.map +1 -0
  1584. package/build/node_modules/mongodb/lib/mongo_client.mjs +507 -0
  1585. package/build/node_modules/mongodb/lib/mongo_client.mjs.map +1 -0
  1586. package/build/node_modules/mongodb/lib/operations/add_user.js +111 -0
  1587. package/build/node_modules/mongodb/lib/operations/add_user.js.map +1 -0
  1588. package/build/node_modules/mongodb/lib/operations/add_user.mjs +105 -0
  1589. package/build/node_modules/mongodb/lib/operations/add_user.mjs.map +1 -0
  1590. package/build/node_modules/mongodb/lib/operations/aggregate.js +111 -0
  1591. package/build/node_modules/mongodb/lib/operations/aggregate.js.map +1 -0
  1592. package/build/node_modules/mongodb/lib/operations/aggregate.mjs +109 -0
  1593. package/build/node_modules/mongodb/lib/operations/aggregate.mjs.map +1 -0
  1594. package/build/node_modules/mongodb/lib/operations/bulk_write.js +103 -0
  1595. package/build/node_modules/mongodb/lib/operations/bulk_write.js.map +1 -0
  1596. package/build/node_modules/mongodb/lib/operations/bulk_write.mjs +101 -0
  1597. package/build/node_modules/mongodb/lib/operations/bulk_write.mjs.map +1 -0
  1598. package/build/node_modules/mongodb/lib/operations/collection_ops.js +361 -0
  1599. package/build/node_modules/mongodb/lib/operations/collection_ops.js.map +1 -0
  1600. package/build/node_modules/mongodb/lib/operations/collection_ops.mjs +359 -0
  1601. package/build/node_modules/mongodb/lib/operations/collection_ops.mjs.map +1 -0
  1602. package/build/node_modules/mongodb/lib/operations/collections.js +62 -0
  1603. package/build/node_modules/mongodb/lib/operations/collections.js.map +1 -0
  1604. package/build/node_modules/mongodb/lib/operations/collections.mjs +60 -0
  1605. package/build/node_modules/mongodb/lib/operations/collections.mjs.map +1 -0
  1606. package/build/node_modules/mongodb/lib/operations/command.js +126 -0
  1607. package/build/node_modules/mongodb/lib/operations/command.js.map +1 -0
  1608. package/build/node_modules/mongodb/lib/operations/command.mjs +124 -0
  1609. package/build/node_modules/mongodb/lib/operations/command.mjs.map +1 -0
  1610. package/build/node_modules/mongodb/lib/operations/command_v2.js +131 -0
  1611. package/build/node_modules/mongodb/lib/operations/command_v2.js.map +1 -0
  1612. package/build/node_modules/mongodb/lib/operations/command_v2.mjs +129 -0
  1613. package/build/node_modules/mongodb/lib/operations/command_v2.mjs.map +1 -0
  1614. package/build/node_modules/mongodb/lib/operations/common_functions.js +408 -0
  1615. package/build/node_modules/mongodb/lib/operations/common_functions.js.map +1 -0
  1616. package/build/node_modules/mongodb/lib/operations/common_functions.mjs +406 -0
  1617. package/build/node_modules/mongodb/lib/operations/common_functions.mjs.map +1 -0
  1618. package/build/node_modules/mongodb/lib/operations/connect.js +805 -0
  1619. package/build/node_modules/mongodb/lib/operations/connect.js.map +1 -0
  1620. package/build/node_modules/mongodb/lib/operations/connect.mjs +798 -0
  1621. package/build/node_modules/mongodb/lib/operations/connect.mjs.map +1 -0
  1622. package/build/node_modules/mongodb/lib/operations/count.js +74 -0
  1623. package/build/node_modules/mongodb/lib/operations/count.js.map +1 -0
  1624. package/build/node_modules/mongodb/lib/operations/count.mjs +72 -0
  1625. package/build/node_modules/mongodb/lib/operations/count.mjs.map +1 -0
  1626. package/build/node_modules/mongodb/lib/operations/count_documents.js +44 -0
  1627. package/build/node_modules/mongodb/lib/operations/count_documents.js.map +1 -0
  1628. package/build/node_modules/mongodb/lib/operations/count_documents.mjs +42 -0
  1629. package/build/node_modules/mongodb/lib/operations/count_documents.mjs.map +1 -0
  1630. package/build/node_modules/mongodb/lib/operations/create_collection.js +111 -0
  1631. package/build/node_modules/mongodb/lib/operations/create_collection.js.map +1 -0
  1632. package/build/node_modules/mongodb/lib/operations/create_collection.mjs +109 -0
  1633. package/build/node_modules/mongodb/lib/operations/create_collection.mjs.map +1 -0
  1634. package/build/node_modules/mongodb/lib/operations/create_indexes.js +146 -0
  1635. package/build/node_modules/mongodb/lib/operations/create_indexes.js.map +1 -0
  1636. package/build/node_modules/mongodb/lib/operations/create_indexes.mjs +144 -0
  1637. package/build/node_modules/mongodb/lib/operations/create_indexes.mjs.map +1 -0
  1638. package/build/node_modules/mongodb/lib/operations/cursor_ops.js +175 -0
  1639. package/build/node_modules/mongodb/lib/operations/cursor_ops.js.map +1 -0
  1640. package/build/node_modules/mongodb/lib/operations/cursor_ops.mjs +173 -0
  1641. package/build/node_modules/mongodb/lib/operations/cursor_ops.mjs.map +1 -0
  1642. package/build/node_modules/mongodb/lib/operations/db_ops.js +474 -0
  1643. package/build/node_modules/mongodb/lib/operations/db_ops.js.map +1 -0
  1644. package/build/node_modules/mongodb/lib/operations/db_ops.mjs +472 -0
  1645. package/build/node_modules/mongodb/lib/operations/db_ops.mjs.map +1 -0
  1646. package/build/node_modules/mongodb/lib/operations/delete_many.js +44 -0
  1647. package/build/node_modules/mongodb/lib/operations/delete_many.js.map +1 -0
  1648. package/build/node_modules/mongodb/lib/operations/delete_many.mjs +42 -0
  1649. package/build/node_modules/mongodb/lib/operations/delete_many.mjs.map +1 -0
  1650. package/build/node_modules/mongodb/lib/operations/delete_one.js +44 -0
  1651. package/build/node_modules/mongodb/lib/operations/delete_one.js.map +1 -0
  1652. package/build/node_modules/mongodb/lib/operations/delete_one.mjs +42 -0
  1653. package/build/node_modules/mongodb/lib/operations/delete_one.mjs.map +1 -0
  1654. package/build/node_modules/mongodb/lib/operations/distinct.js +102 -0
  1655. package/build/node_modules/mongodb/lib/operations/distinct.js.map +1 -0
  1656. package/build/node_modules/mongodb/lib/operations/distinct.mjs +100 -0
  1657. package/build/node_modules/mongodb/lib/operations/distinct.mjs.map +1 -0
  1658. package/build/node_modules/mongodb/lib/operations/drop.js +60 -0
  1659. package/build/node_modules/mongodb/lib/operations/drop.js.map +1 -0
  1660. package/build/node_modules/mongodb/lib/operations/drop.mjs +58 -0
  1661. package/build/node_modules/mongodb/lib/operations/drop.mjs.map +1 -0
  1662. package/build/node_modules/mongodb/lib/operations/drop_index.js +49 -0
  1663. package/build/node_modules/mongodb/lib/operations/drop_index.js.map +1 -0
  1664. package/build/node_modules/mongodb/lib/operations/drop_index.mjs +47 -0
  1665. package/build/node_modules/mongodb/lib/operations/drop_index.mjs.map +1 -0
  1666. package/build/node_modules/mongodb/lib/operations/drop_indexes.js +30 -0
  1667. package/build/node_modules/mongodb/lib/operations/drop_indexes.js.map +1 -0
  1668. package/build/node_modules/mongodb/lib/operations/drop_indexes.mjs +28 -0
  1669. package/build/node_modules/mongodb/lib/operations/drop_indexes.mjs.map +1 -0
  1670. package/build/node_modules/mongodb/lib/operations/estimated_document_count.js +64 -0
  1671. package/build/node_modules/mongodb/lib/operations/estimated_document_count.js.map +1 -0
  1672. package/build/node_modules/mongodb/lib/operations/estimated_document_count.mjs +62 -0
  1673. package/build/node_modules/mongodb/lib/operations/estimated_document_count.mjs.map +1 -0
  1674. package/build/node_modules/mongodb/lib/operations/execute_db_admin_command.js +41 -0
  1675. package/build/node_modules/mongodb/lib/operations/execute_db_admin_command.js.map +1 -0
  1676. package/build/node_modules/mongodb/lib/operations/execute_db_admin_command.mjs +39 -0
  1677. package/build/node_modules/mongodb/lib/operations/execute_db_admin_command.mjs.map +1 -0
  1678. package/build/node_modules/mongodb/lib/operations/execute_operation.js +173 -0
  1679. package/build/node_modules/mongodb/lib/operations/execute_operation.js.map +1 -0
  1680. package/build/node_modules/mongodb/lib/operations/execute_operation.mjs +171 -0
  1681. package/build/node_modules/mongodb/lib/operations/execute_operation.mjs.map +1 -0
  1682. package/build/node_modules/mongodb/lib/operations/find.js +57 -0
  1683. package/build/node_modules/mongodb/lib/operations/find.js.map +1 -0
  1684. package/build/node_modules/mongodb/lib/operations/find.mjs +55 -0
  1685. package/build/node_modules/mongodb/lib/operations/find.mjs.map +1 -0
  1686. package/build/node_modules/mongodb/lib/operations/find_and_modify.js +138 -0
  1687. package/build/node_modules/mongodb/lib/operations/find_and_modify.js.map +1 -0
  1688. package/build/node_modules/mongodb/lib/operations/find_and_modify.mjs +136 -0
  1689. package/build/node_modules/mongodb/lib/operations/find_and_modify.mjs.map +1 -0
  1690. package/build/node_modules/mongodb/lib/operations/find_one.js +47 -0
  1691. package/build/node_modules/mongodb/lib/operations/find_one.js.map +1 -0
  1692. package/build/node_modules/mongodb/lib/operations/find_one.mjs +45 -0
  1693. package/build/node_modules/mongodb/lib/operations/find_one.mjs.map +1 -0
  1694. package/build/node_modules/mongodb/lib/operations/find_one_and_delete.js +24 -0
  1695. package/build/node_modules/mongodb/lib/operations/find_one_and_delete.js.map +1 -0
  1696. package/build/node_modules/mongodb/lib/operations/find_one_and_delete.mjs +22 -0
  1697. package/build/node_modules/mongodb/lib/operations/find_one_and_delete.mjs.map +1 -0
  1698. package/build/node_modules/mongodb/lib/operations/find_one_and_replace.js +44 -0
  1699. package/build/node_modules/mongodb/lib/operations/find_one_and_replace.js.map +1 -0
  1700. package/build/node_modules/mongodb/lib/operations/find_one_and_replace.mjs +42 -0
  1701. package/build/node_modules/mongodb/lib/operations/find_one_and_replace.mjs.map +1 -0
  1702. package/build/node_modules/mongodb/lib/operations/find_one_and_update.js +44 -0
  1703. package/build/node_modules/mongodb/lib/operations/find_one_and_update.js.map +1 -0
  1704. package/build/node_modules/mongodb/lib/operations/find_one_and_update.mjs +42 -0
  1705. package/build/node_modules/mongodb/lib/operations/find_one_and_update.mjs.map +1 -0
  1706. package/build/node_modules/mongodb/lib/operations/geo_haystack_search.js +87 -0
  1707. package/build/node_modules/mongodb/lib/operations/geo_haystack_search.js.map +1 -0
  1708. package/build/node_modules/mongodb/lib/operations/geo_haystack_search.mjs +85 -0
  1709. package/build/node_modules/mongodb/lib/operations/geo_haystack_search.mjs.map +1 -0
  1710. package/build/node_modules/mongodb/lib/operations/index_exists.js +46 -0
  1711. package/build/node_modules/mongodb/lib/operations/index_exists.js.map +1 -0
  1712. package/build/node_modules/mongodb/lib/operations/index_exists.mjs +44 -0
  1713. package/build/node_modules/mongodb/lib/operations/index_exists.mjs.map +1 -0
  1714. package/build/node_modules/mongodb/lib/operations/index_information.js +29 -0
  1715. package/build/node_modules/mongodb/lib/operations/index_information.js.map +1 -0
  1716. package/build/node_modules/mongodb/lib/operations/index_information.mjs +27 -0
  1717. package/build/node_modules/mongodb/lib/operations/index_information.mjs.map +1 -0
  1718. package/build/node_modules/mongodb/lib/operations/indexes.js +28 -0
  1719. package/build/node_modules/mongodb/lib/operations/indexes.js.map +1 -0
  1720. package/build/node_modules/mongodb/lib/operations/indexes.mjs +26 -0
  1721. package/build/node_modules/mongodb/lib/operations/indexes.mjs.map +1 -0
  1722. package/build/node_modules/mongodb/lib/operations/insert_many.js +67 -0
  1723. package/build/node_modules/mongodb/lib/operations/insert_many.js.map +1 -0
  1724. package/build/node_modules/mongodb/lib/operations/insert_many.mjs +65 -0
  1725. package/build/node_modules/mongodb/lib/operations/insert_many.mjs.map +1 -0
  1726. package/build/node_modules/mongodb/lib/operations/insert_one.js +46 -0
  1727. package/build/node_modules/mongodb/lib/operations/insert_one.js.map +1 -0
  1728. package/build/node_modules/mongodb/lib/operations/insert_one.mjs +44 -0
  1729. package/build/node_modules/mongodb/lib/operations/insert_one.mjs.map +1 -0
  1730. package/build/node_modules/mongodb/lib/operations/is_capped.js +24 -0
  1731. package/build/node_modules/mongodb/lib/operations/is_capped.js.map +1 -0
  1732. package/build/node_modules/mongodb/lib/operations/is_capped.mjs +22 -0
  1733. package/build/node_modules/mongodb/lib/operations/is_capped.mjs.map +1 -0
  1734. package/build/node_modules/mongodb/lib/operations/list_collections.js +113 -0
  1735. package/build/node_modules/mongodb/lib/operations/list_collections.js.map +1 -0
  1736. package/build/node_modules/mongodb/lib/operations/list_collections.mjs +111 -0
  1737. package/build/node_modules/mongodb/lib/operations/list_collections.mjs.map +1 -0
  1738. package/build/node_modules/mongodb/lib/operations/list_databases.js +44 -0
  1739. package/build/node_modules/mongodb/lib/operations/list_databases.js.map +1 -0
  1740. package/build/node_modules/mongodb/lib/operations/list_databases.mjs +42 -0
  1741. package/build/node_modules/mongodb/lib/operations/list_databases.mjs.map +1 -0
  1742. package/build/node_modules/mongodb/lib/operations/list_indexes.js +48 -0
  1743. package/build/node_modules/mongodb/lib/operations/list_indexes.js.map +1 -0
  1744. package/build/node_modules/mongodb/lib/operations/list_indexes.mjs +46 -0
  1745. package/build/node_modules/mongodb/lib/operations/list_indexes.mjs.map +1 -0
  1746. package/build/node_modules/mongodb/lib/operations/map_reduce.js +220 -0
  1747. package/build/node_modules/mongodb/lib/operations/map_reduce.js.map +1 -0
  1748. package/build/node_modules/mongodb/lib/operations/map_reduce.mjs +218 -0
  1749. package/build/node_modules/mongodb/lib/operations/map_reduce.mjs.map +1 -0
  1750. package/build/node_modules/mongodb/lib/operations/operation.js +82 -0
  1751. package/build/node_modules/mongodb/lib/operations/operation.js.map +1 -0
  1752. package/build/node_modules/mongodb/lib/operations/operation.mjs +80 -0
  1753. package/build/node_modules/mongodb/lib/operations/operation.mjs.map +1 -0
  1754. package/build/node_modules/mongodb/lib/operations/options_operation.js +39 -0
  1755. package/build/node_modules/mongodb/lib/operations/options_operation.js.map +1 -0
  1756. package/build/node_modules/mongodb/lib/operations/options_operation.mjs +37 -0
  1757. package/build/node_modules/mongodb/lib/operations/options_operation.mjs.map +1 -0
  1758. package/build/node_modules/mongodb/lib/operations/profiling_level.js +34 -0
  1759. package/build/node_modules/mongodb/lib/operations/profiling_level.js.map +1 -0
  1760. package/build/node_modules/mongodb/lib/operations/profiling_level.mjs +32 -0
  1761. package/build/node_modules/mongodb/lib/operations/profiling_level.mjs.map +1 -0
  1762. package/build/node_modules/mongodb/lib/operations/re_index.js +41 -0
  1763. package/build/node_modules/mongodb/lib/operations/re_index.js.map +1 -0
  1764. package/build/node_modules/mongodb/lib/operations/re_index.mjs +39 -0
  1765. package/build/node_modules/mongodb/lib/operations/re_index.mjs.map +1 -0
  1766. package/build/node_modules/mongodb/lib/operations/remove_user.js +60 -0
  1767. package/build/node_modules/mongodb/lib/operations/remove_user.js.map +1 -0
  1768. package/build/node_modules/mongodb/lib/operations/remove_user.mjs +58 -0
  1769. package/build/node_modules/mongodb/lib/operations/remove_user.mjs.map +1 -0
  1770. package/build/node_modules/mongodb/lib/operations/rename.js +69 -0
  1771. package/build/node_modules/mongodb/lib/operations/rename.js.map +1 -0
  1772. package/build/node_modules/mongodb/lib/operations/rename.mjs +67 -0
  1773. package/build/node_modules/mongodb/lib/operations/rename.mjs.map +1 -0
  1774. package/build/node_modules/mongodb/lib/operations/replace_one.js +61 -0
  1775. package/build/node_modules/mongodb/lib/operations/replace_one.js.map +1 -0
  1776. package/build/node_modules/mongodb/lib/operations/replace_one.mjs +59 -0
  1777. package/build/node_modules/mongodb/lib/operations/replace_one.mjs.map +1 -0
  1778. package/build/node_modules/mongodb/lib/operations/run_command.js +24 -0
  1779. package/build/node_modules/mongodb/lib/operations/run_command.js.map +1 -0
  1780. package/build/node_modules/mongodb/lib/operations/run_command.mjs +22 -0
  1781. package/build/node_modules/mongodb/lib/operations/run_command.mjs.map +1 -0
  1782. package/build/node_modules/mongodb/lib/operations/set_profiling_level.js +52 -0
  1783. package/build/node_modules/mongodb/lib/operations/set_profiling_level.js.map +1 -0
  1784. package/build/node_modules/mongodb/lib/operations/set_profiling_level.mjs +50 -0
  1785. package/build/node_modules/mongodb/lib/operations/set_profiling_level.mjs.map +1 -0
  1786. package/build/node_modules/mongodb/lib/operations/stats.js +51 -0
  1787. package/build/node_modules/mongodb/lib/operations/stats.js.map +1 -0
  1788. package/build/node_modules/mongodb/lib/operations/stats.mjs +49 -0
  1789. package/build/node_modules/mongodb/lib/operations/stats.mjs.map +1 -0
  1790. package/build/node_modules/mongodb/lib/operations/update_many.js +62 -0
  1791. package/build/node_modules/mongodb/lib/operations/update_many.js.map +1 -0
  1792. package/build/node_modules/mongodb/lib/operations/update_many.mjs +60 -0
  1793. package/build/node_modules/mongodb/lib/operations/update_many.mjs.map +1 -0
  1794. package/build/node_modules/mongodb/lib/operations/update_one.js +62 -0
  1795. package/build/node_modules/mongodb/lib/operations/update_one.js.map +1 -0
  1796. package/build/node_modules/mongodb/lib/operations/update_one.mjs +60 -0
  1797. package/build/node_modules/mongodb/lib/operations/update_one.mjs.map +1 -0
  1798. package/build/node_modules/mongodb/lib/operations/validate_collection.js +42 -0
  1799. package/build/node_modules/mongodb/lib/operations/validate_collection.js.map +1 -0
  1800. package/build/node_modules/mongodb/lib/operations/validate_collection.mjs +40 -0
  1801. package/build/node_modules/mongodb/lib/operations/validate_collection.mjs.map +1 -0
  1802. package/build/node_modules/mongodb/lib/read_concern.js +64 -0
  1803. package/build/node_modules/mongodb/lib/read_concern.js.map +1 -0
  1804. package/build/node_modules/mongodb/lib/read_concern.mjs +62 -0
  1805. package/build/node_modules/mongodb/lib/read_concern.mjs.map +1 -0
  1806. package/build/node_modules/mongodb/lib/topologies/mongos.js +454 -0
  1807. package/build/node_modules/mongodb/lib/topologies/mongos.js.map +1 -0
  1808. package/build/node_modules/mongodb/lib/topologies/mongos.mjs +452 -0
  1809. package/build/node_modules/mongodb/lib/topologies/mongos.mjs.map +1 -0
  1810. package/build/node_modules/mongodb/lib/topologies/native_topology.js +86 -0
  1811. package/build/node_modules/mongodb/lib/topologies/native_topology.js.map +1 -0
  1812. package/build/node_modules/mongodb/lib/topologies/native_topology.mjs +84 -0
  1813. package/build/node_modules/mongodb/lib/topologies/native_topology.mjs.map +1 -0
  1814. package/build/node_modules/mongodb/lib/topologies/replset.js +496 -0
  1815. package/build/node_modules/mongodb/lib/topologies/replset.js.map +1 -0
  1816. package/build/node_modules/mongodb/lib/topologies/replset.mjs +494 -0
  1817. package/build/node_modules/mongodb/lib/topologies/replset.mjs.map +1 -0
  1818. package/build/node_modules/mongodb/lib/topologies/server.js +456 -0
  1819. package/build/node_modules/mongodb/lib/topologies/server.js.map +1 -0
  1820. package/build/node_modules/mongodb/lib/topologies/server.mjs +454 -0
  1821. package/build/node_modules/mongodb/lib/topologies/server.mjs.map +1 -0
  1822. package/build/node_modules/mongodb/lib/topologies/topology_base.js +439 -0
  1823. package/build/node_modules/mongodb/lib/topologies/topology_base.js.map +1 -0
  1824. package/build/node_modules/mongodb/lib/topologies/topology_base.mjs +428 -0
  1825. package/build/node_modules/mongodb/lib/topologies/topology_base.mjs.map +1 -0
  1826. package/build/node_modules/mongodb/lib/url_parser.js +646 -0
  1827. package/build/node_modules/mongodb/lib/url_parser.js.map +1 -0
  1828. package/build/node_modules/mongodb/lib/url_parser.mjs +637 -0
  1829. package/build/node_modules/mongodb/lib/url_parser.mjs.map +1 -0
  1830. package/build/node_modules/mongodb/lib/utils.js +919 -0
  1831. package/build/node_modules/mongodb/lib/utils.js.map +1 -0
  1832. package/build/node_modules/mongodb/lib/utils.mjs +917 -0
  1833. package/build/node_modules/mongodb/lib/utils.mjs.map +1 -0
  1834. package/build/node_modules/mongodb/lib/write_concern.js +99 -0
  1835. package/build/node_modules/mongodb/lib/write_concern.js.map +1 -0
  1836. package/build/node_modules/mongodb/lib/write_concern.mjs +97 -0
  1837. package/build/node_modules/mongodb/lib/write_concern.mjs.map +1 -0
  1838. package/build/node_modules/mongodb/package.json.js +146 -0
  1839. package/build/node_modules/mongodb/package.json.js.map +1 -0
  1840. package/build/node_modules/mongodb/package.mjs +127 -0
  1841. package/build/node_modules/mongodb/package.mjs.map +1 -0
  1842. package/build/node_modules/mongoose/index.js +8 -0
  1843. package/build/node_modules/mongoose/index.js.map +1 -0
  1844. package/build/node_modules/mongoose/index.mjs +6 -0
  1845. package/build/node_modules/mongoose/index.mjs.map +1 -0
  1846. package/build/node_modules/mongoose/lib/aggregate.js +1176 -0
  1847. package/build/node_modules/mongoose/lib/aggregate.js.map +1 -0
  1848. package/build/node_modules/mongoose/lib/aggregate.mjs +1170 -0
  1849. package/build/node_modules/mongoose/lib/aggregate.mjs.map +1 -0
  1850. package/build/node_modules/mongoose/lib/browserDocument.js +119 -0
  1851. package/build/node_modules/mongoose/lib/browserDocument.js.map +1 -0
  1852. package/build/node_modules/mongoose/lib/browserDocument.mjs +113 -0
  1853. package/build/node_modules/mongoose/lib/browserDocument.mjs.map +1 -0
  1854. package/build/node_modules/mongoose/lib/cast/boolean.js +41 -0
  1855. package/build/node_modules/mongoose/lib/cast/boolean.js.map +1 -0
  1856. package/build/node_modules/mongoose/lib/cast/boolean.mjs +39 -0
  1857. package/build/node_modules/mongoose/lib/cast/boolean.mjs.map +1 -0
  1858. package/build/node_modules/mongoose/lib/cast/date.js +48 -0
  1859. package/build/node_modules/mongoose/lib/cast/date.js.map +1 -0
  1860. package/build/node_modules/mongoose/lib/cast/date.mjs +42 -0
  1861. package/build/node_modules/mongoose/lib/cast/date.mjs.map +1 -0
  1862. package/build/node_modules/mongoose/lib/cast/decimal128.js +43 -0
  1863. package/build/node_modules/mongoose/lib/cast/decimal128.js.map +1 -0
  1864. package/build/node_modules/mongoose/lib/cast/decimal128.mjs +37 -0
  1865. package/build/node_modules/mongoose/lib/cast/decimal128.mjs.map +1 -0
  1866. package/build/node_modules/mongoose/lib/cast/number.js +50 -0
  1867. package/build/node_modules/mongoose/lib/cast/number.js.map +1 -0
  1868. package/build/node_modules/mongoose/lib/cast/number.mjs +44 -0
  1869. package/build/node_modules/mongoose/lib/cast/number.mjs.map +1 -0
  1870. package/build/node_modules/mongoose/lib/cast/objectid.js +39 -0
  1871. package/build/node_modules/mongoose/lib/cast/objectid.js.map +1 -0
  1872. package/build/node_modules/mongoose/lib/cast/objectid.mjs +33 -0
  1873. package/build/node_modules/mongoose/lib/cast/objectid.mjs.map +1 -0
  1874. package/build/node_modules/mongoose/lib/cast/string.js +40 -0
  1875. package/build/node_modules/mongoose/lib/cast/string.js.map +1 -0
  1876. package/build/node_modules/mongoose/lib/cast/string.mjs +38 -0
  1877. package/build/node_modules/mongoose/lib/cast/string.mjs.map +1 -0
  1878. package/build/node_modules/mongoose/lib/cast.js +382 -0
  1879. package/build/node_modules/mongoose/lib/cast.js.map +1 -0
  1880. package/build/node_modules/mongoose/lib/cast.mjs +376 -0
  1881. package/build/node_modules/mongoose/lib/cast.mjs.map +1 -0
  1882. package/build/node_modules/mongoose/lib/collection.js +333 -0
  1883. package/build/node_modules/mongoose/lib/collection.js.map +1 -0
  1884. package/build/node_modules/mongoose/lib/collection.mjs +327 -0
  1885. package/build/node_modules/mongoose/lib/collection.mjs.map +1 -0
  1886. package/build/node_modules/mongoose/lib/connection.js +1534 -0
  1887. package/build/node_modules/mongoose/lib/connection.js.map +1 -0
  1888. package/build/node_modules/mongoose/lib/connection.mjs +1528 -0
  1889. package/build/node_modules/mongoose/lib/connection.mjs.map +1 -0
  1890. package/build/node_modules/mongoose/lib/connectionstate.js +29 -0
  1891. package/build/node_modules/mongoose/lib/connectionstate.js.map +1 -0
  1892. package/build/node_modules/mongoose/lib/connectionstate.mjs +27 -0
  1893. package/build/node_modules/mongoose/lib/connectionstate.mjs.map +1 -0
  1894. package/build/node_modules/mongoose/lib/cursor/AggregationCursor.js +384 -0
  1895. package/build/node_modules/mongoose/lib/cursor/AggregationCursor.js.map +1 -0
  1896. package/build/node_modules/mongoose/lib/cursor/AggregationCursor.mjs +377 -0
  1897. package/build/node_modules/mongoose/lib/cursor/AggregationCursor.mjs.map +1 -0
  1898. package/build/node_modules/mongoose/lib/cursor/ChangeStream.js +70 -0
  1899. package/build/node_modules/mongoose/lib/cursor/ChangeStream.js.map +1 -0
  1900. package/build/node_modules/mongoose/lib/cursor/ChangeStream.mjs +64 -0
  1901. package/build/node_modules/mongoose/lib/cursor/ChangeStream.mjs.map +1 -0
  1902. package/build/node_modules/mongoose/lib/cursor/QueryCursor.js +522 -0
  1903. package/build/node_modules/mongoose/lib/cursor/QueryCursor.js.map +1 -0
  1904. package/build/node_modules/mongoose/lib/cursor/QueryCursor.mjs +515 -0
  1905. package/build/node_modules/mongoose/lib/cursor/QueryCursor.mjs.map +1 -0
  1906. package/build/node_modules/mongoose/lib/document.js +4305 -0
  1907. package/build/node_modules/mongoose/lib/document.js.map +1 -0
  1908. package/build/node_modules/mongoose/lib/document.mjs +4298 -0
  1909. package/build/node_modules/mongoose/lib/document.mjs.map +1 -0
  1910. package/build/node_modules/mongoose/lib/document_provider.js +40 -0
  1911. package/build/node_modules/mongoose/lib/document_provider.js.map +1 -0
  1912. package/build/node_modules/mongoose/lib/document_provider.mjs +36 -0
  1913. package/build/node_modules/mongoose/lib/document_provider.mjs.map +1 -0
  1914. package/build/node_modules/mongoose/lib/driver.js +27 -0
  1915. package/build/node_modules/mongoose/lib/driver.js.map +1 -0
  1916. package/build/node_modules/mongoose/lib/driver.mjs +22 -0
  1917. package/build/node_modules/mongoose/lib/driver.mjs.map +1 -0
  1918. package/build/node_modules/mongoose/lib/drivers/node-mongodb-native/ReadPreference.js +52 -0
  1919. package/build/node_modules/mongoose/lib/drivers/node-mongodb-native/ReadPreference.js.map +1 -0
  1920. package/build/node_modules/mongoose/lib/drivers/node-mongodb-native/ReadPreference.mjs +50 -0
  1921. package/build/node_modules/mongoose/lib/drivers/node-mongodb-native/ReadPreference.mjs.map +1 -0
  1922. package/build/node_modules/mongoose/lib/drivers/node-mongodb-native/binary.js +14 -0
  1923. package/build/node_modules/mongoose/lib/drivers/node-mongodb-native/binary.js.map +1 -0
  1924. package/build/node_modules/mongoose/lib/drivers/node-mongodb-native/binary.mjs +12 -0
  1925. package/build/node_modules/mongoose/lib/drivers/node-mongodb-native/binary.mjs.map +1 -0
  1926. package/build/node_modules/mongoose/lib/drivers/node-mongodb-native/collection.js +470 -0
  1927. package/build/node_modules/mongoose/lib/drivers/node-mongodb-native/collection.js.map +1 -0
  1928. package/build/node_modules/mongoose/lib/drivers/node-mongodb-native/collection.mjs +463 -0
  1929. package/build/node_modules/mongoose/lib/drivers/node-mongodb-native/collection.mjs.map +1 -0
  1930. package/build/node_modules/mongoose/lib/drivers/node-mongodb-native/connection.js +219 -0
  1931. package/build/node_modules/mongoose/lib/drivers/node-mongodb-native/connection.js.map +1 -0
  1932. package/build/node_modules/mongoose/lib/drivers/node-mongodb-native/connection.mjs +217 -0
  1933. package/build/node_modules/mongoose/lib/drivers/node-mongodb-native/connection.mjs.map +1 -0
  1934. package/build/node_modules/mongoose/lib/drivers/node-mongodb-native/decimal128.js +12 -0
  1935. package/build/node_modules/mongoose/lib/drivers/node-mongodb-native/decimal128.js.map +1 -0
  1936. package/build/node_modules/mongoose/lib/drivers/node-mongodb-native/decimal128.mjs +10 -0
  1937. package/build/node_modules/mongoose/lib/drivers/node-mongodb-native/decimal128.mjs.map +1 -0
  1938. package/build/node_modules/mongoose/lib/drivers/node-mongodb-native/index.js +39 -0
  1939. package/build/node_modules/mongoose/lib/drivers/node-mongodb-native/index.js.map +1 -0
  1940. package/build/node_modules/mongoose/lib/drivers/node-mongodb-native/index.mjs +30 -0
  1941. package/build/node_modules/mongoose/lib/drivers/node-mongodb-native/index.mjs.map +1 -0
  1942. package/build/node_modules/mongoose/lib/drivers/node-mongodb-native/objectid.js +18 -0
  1943. package/build/node_modules/mongoose/lib/drivers/node-mongodb-native/objectid.js.map +1 -0
  1944. package/build/node_modules/mongoose/lib/drivers/node-mongodb-native/objectid.mjs +16 -0
  1945. package/build/node_modules/mongoose/lib/drivers/node-mongodb-native/objectid.mjs.map +1 -0
  1946. package/build/node_modules/mongoose/lib/error/cast.js +161 -0
  1947. package/build/node_modules/mongoose/lib/error/cast.js.map +1 -0
  1948. package/build/node_modules/mongoose/lib/error/cast.mjs +155 -0
  1949. package/build/node_modules/mongoose/lib/error/cast.mjs.map +1 -0
  1950. package/build/node_modules/mongoose/lib/error/divergentArray.js +35 -0
  1951. package/build/node_modules/mongoose/lib/error/divergentArray.js.map +1 -0
  1952. package/build/node_modules/mongoose/lib/error/divergentArray.mjs +33 -0
  1953. package/build/node_modules/mongoose/lib/error/divergentArray.mjs.map +1 -0
  1954. package/build/node_modules/mongoose/lib/error/index.js +225 -0
  1955. package/build/node_modules/mongoose/lib/error/index.js.map +1 -0
  1956. package/build/node_modules/mongoose/lib/error/index.mjs +223 -0
  1957. package/build/node_modules/mongoose/lib/error/index.mjs.map +1 -0
  1958. package/build/node_modules/mongoose/lib/error/messages.js +32 -0
  1959. package/build/node_modules/mongoose/lib/error/messages.js.map +1 -0
  1960. package/build/node_modules/mongoose/lib/error/messages.mjs +30 -0
  1961. package/build/node_modules/mongoose/lib/error/messages.mjs.map +1 -0
  1962. package/build/node_modules/mongoose/lib/error/missingSchema.js +28 -0
  1963. package/build/node_modules/mongoose/lib/error/missingSchema.js.map +1 -0
  1964. package/build/node_modules/mongoose/lib/error/missingSchema.mjs +26 -0
  1965. package/build/node_modules/mongoose/lib/error/missingSchema.mjs.map +1 -0
  1966. package/build/node_modules/mongoose/lib/error/mongooseError.js +16 -0
  1967. package/build/node_modules/mongoose/lib/error/mongooseError.js.map +1 -0
  1968. package/build/node_modules/mongoose/lib/error/mongooseError.mjs +14 -0
  1969. package/build/node_modules/mongoose/lib/error/mongooseError.mjs.map +1 -0
  1970. package/build/node_modules/mongoose/lib/error/notFound.js +54 -0
  1971. package/build/node_modules/mongoose/lib/error/notFound.js.map +1 -0
  1972. package/build/node_modules/mongoose/lib/error/notFound.mjs +48 -0
  1973. package/build/node_modules/mongoose/lib/error/notFound.mjs.map +1 -0
  1974. package/build/node_modules/mongoose/lib/error/objectExpected.js +35 -0
  1975. package/build/node_modules/mongoose/lib/error/objectExpected.js.map +1 -0
  1976. package/build/node_modules/mongoose/lib/error/objectExpected.mjs +33 -0
  1977. package/build/node_modules/mongoose/lib/error/objectExpected.mjs.map +1 -0
  1978. package/build/node_modules/mongoose/lib/error/objectParameter.js +35 -0
  1979. package/build/node_modules/mongoose/lib/error/objectParameter.js.map +1 -0
  1980. package/build/node_modules/mongoose/lib/error/objectParameter.mjs +33 -0
  1981. package/build/node_modules/mongoose/lib/error/objectParameter.mjs.map +1 -0
  1982. package/build/node_modules/mongoose/lib/error/overwriteModel.js +26 -0
  1983. package/build/node_modules/mongoose/lib/error/overwriteModel.js.map +1 -0
  1984. package/build/node_modules/mongoose/lib/error/overwriteModel.mjs +24 -0
  1985. package/build/node_modules/mongoose/lib/error/overwriteModel.mjs.map +1 -0
  1986. package/build/node_modules/mongoose/lib/error/parallelSave.js +35 -0
  1987. package/build/node_modules/mongoose/lib/error/parallelSave.js.map +1 -0
  1988. package/build/node_modules/mongoose/lib/error/parallelSave.mjs +33 -0
  1989. package/build/node_modules/mongoose/lib/error/parallelSave.mjs.map +1 -0
  1990. package/build/node_modules/mongoose/lib/error/parallelValidate.js +36 -0
  1991. package/build/node_modules/mongoose/lib/error/parallelValidate.js.map +1 -0
  1992. package/build/node_modules/mongoose/lib/error/parallelValidate.mjs +34 -0
  1993. package/build/node_modules/mongoose/lib/error/parallelValidate.mjs.map +1 -0
  1994. package/build/node_modules/mongoose/lib/error/serverSelection.js +69 -0
  1995. package/build/node_modules/mongoose/lib/error/serverSelection.js.map +1 -0
  1996. package/build/node_modules/mongoose/lib/error/serverSelection.mjs +67 -0
  1997. package/build/node_modules/mongoose/lib/error/serverSelection.mjs.map +1 -0
  1998. package/build/node_modules/mongoose/lib/error/strict.js +38 -0
  1999. package/build/node_modules/mongoose/lib/error/strict.js.map +1 -0
  2000. package/build/node_modules/mongoose/lib/error/strict.mjs +36 -0
  2001. package/build/node_modules/mongoose/lib/error/strict.mjs.map +1 -0
  2002. package/build/node_modules/mongoose/lib/error/validation.js +121 -0
  2003. package/build/node_modules/mongoose/lib/error/validation.js.map +1 -0
  2004. package/build/node_modules/mongoose/lib/error/validation.mjs +115 -0
  2005. package/build/node_modules/mongoose/lib/error/validation.mjs.map +1 -0
  2006. package/build/node_modules/mongoose/lib/error/validator.js +99 -0
  2007. package/build/node_modules/mongoose/lib/error/validator.js.map +1 -0
  2008. package/build/node_modules/mongoose/lib/error/validator.mjs +97 -0
  2009. package/build/node_modules/mongoose/lib/error/validator.mjs.map +1 -0
  2010. package/build/node_modules/mongoose/lib/error/version.js +41 -0
  2011. package/build/node_modules/mongoose/lib/error/version.js.map +1 -0
  2012. package/build/node_modules/mongoose/lib/error/version.mjs +39 -0
  2013. package/build/node_modules/mongoose/lib/error/version.mjs.map +1 -0
  2014. package/build/node_modules/mongoose/lib/helpers/aggregate/stringifyFunctionOperators.js +53 -0
  2015. package/build/node_modules/mongoose/lib/helpers/aggregate/stringifyFunctionOperators.js.map +1 -0
  2016. package/build/node_modules/mongoose/lib/helpers/aggregate/stringifyFunctionOperators.mjs +51 -0
  2017. package/build/node_modules/mongoose/lib/helpers/aggregate/stringifyFunctionOperators.mjs.map +1 -0
  2018. package/build/node_modules/mongoose/lib/helpers/arrayDepth.js +36 -0
  2019. package/build/node_modules/mongoose/lib/helpers/arrayDepth.js.map +1 -0
  2020. package/build/node_modules/mongoose/lib/helpers/arrayDepth.mjs +34 -0
  2021. package/build/node_modules/mongoose/lib/helpers/arrayDepth.mjs.map +1 -0
  2022. package/build/node_modules/mongoose/lib/helpers/clone.js +141 -0
  2023. package/build/node_modules/mongoose/lib/helpers/clone.js.map +1 -0
  2024. package/build/node_modules/mongoose/lib/helpers/clone.mjs +139 -0
  2025. package/build/node_modules/mongoose/lib/helpers/clone.mjs.map +1 -0
  2026. package/build/node_modules/mongoose/lib/helpers/common.js +123 -0
  2027. package/build/node_modules/mongoose/lib/helpers/common.js.map +1 -0
  2028. package/build/node_modules/mongoose/lib/helpers/common.mjs +118 -0
  2029. package/build/node_modules/mongoose/lib/helpers/common.mjs.map +1 -0
  2030. package/build/node_modules/mongoose/lib/helpers/cursor/eachAsync.js +163 -0
  2031. package/build/node_modules/mongoose/lib/helpers/cursor/eachAsync.js.map +1 -0
  2032. package/build/node_modules/mongoose/lib/helpers/cursor/eachAsync.mjs +161 -0
  2033. package/build/node_modules/mongoose/lib/helpers/cursor/eachAsync.mjs.map +1 -0
  2034. package/build/node_modules/mongoose/lib/helpers/discriminator/areDiscriminatorValuesEqual.js +19 -0
  2035. package/build/node_modules/mongoose/lib/helpers/discriminator/areDiscriminatorValuesEqual.js.map +1 -0
  2036. package/build/node_modules/mongoose/lib/helpers/discriminator/areDiscriminatorValuesEqual.mjs +17 -0
  2037. package/build/node_modules/mongoose/lib/helpers/discriminator/areDiscriminatorValuesEqual.mjs.map +1 -0
  2038. package/build/node_modules/mongoose/lib/helpers/discriminator/checkEmbeddedDiscriminatorKeyProjection.js +15 -0
  2039. package/build/node_modules/mongoose/lib/helpers/discriminator/checkEmbeddedDiscriminatorKeyProjection.js.map +1 -0
  2040. package/build/node_modules/mongoose/lib/helpers/discriminator/checkEmbeddedDiscriminatorKeyProjection.mjs +13 -0
  2041. package/build/node_modules/mongoose/lib/helpers/discriminator/checkEmbeddedDiscriminatorKeyProjection.mjs.map +1 -0
  2042. package/build/node_modules/mongoose/lib/helpers/discriminator/getConstructor.js +28 -0
  2043. package/build/node_modules/mongoose/lib/helpers/discriminator/getConstructor.js.map +1 -0
  2044. package/build/node_modules/mongoose/lib/helpers/discriminator/getConstructor.mjs +26 -0
  2045. package/build/node_modules/mongoose/lib/helpers/discriminator/getConstructor.mjs.map +1 -0
  2046. package/build/node_modules/mongoose/lib/helpers/discriminator/getDiscriminatorByValue.js +30 -0
  2047. package/build/node_modules/mongoose/lib/helpers/discriminator/getDiscriminatorByValue.js.map +1 -0
  2048. package/build/node_modules/mongoose/lib/helpers/discriminator/getDiscriminatorByValue.mjs +28 -0
  2049. package/build/node_modules/mongoose/lib/helpers/discriminator/getDiscriminatorByValue.mjs.map +1 -0
  2050. package/build/node_modules/mongoose/lib/helpers/discriminator/getSchemaDiscriminatorByValue.js +29 -0
  2051. package/build/node_modules/mongoose/lib/helpers/discriminator/getSchemaDiscriminatorByValue.js.map +1 -0
  2052. package/build/node_modules/mongoose/lib/helpers/discriminator/getSchemaDiscriminatorByValue.mjs +27 -0
  2053. package/build/node_modules/mongoose/lib/helpers/discriminator/getSchemaDiscriminatorByValue.mjs.map +1 -0
  2054. package/build/node_modules/mongoose/lib/helpers/document/cleanModifiedSubpaths.js +31 -0
  2055. package/build/node_modules/mongoose/lib/helpers/document/cleanModifiedSubpaths.js.map +1 -0
  2056. package/build/node_modules/mongoose/lib/helpers/document/cleanModifiedSubpaths.mjs +29 -0
  2057. package/build/node_modules/mongoose/lib/helpers/document/cleanModifiedSubpaths.mjs.map +1 -0
  2058. package/build/node_modules/mongoose/lib/helpers/document/compile.js +229 -0
  2059. package/build/node_modules/mongoose/lib/helpers/document/compile.js.map +1 -0
  2060. package/build/node_modules/mongoose/lib/helpers/document/compile.mjs +224 -0
  2061. package/build/node_modules/mongoose/lib/helpers/document/compile.mjs.map +1 -0
  2062. package/build/node_modules/mongoose/lib/helpers/document/getEmbeddedDiscriminatorPath.js +46 -0
  2063. package/build/node_modules/mongoose/lib/helpers/document/getEmbeddedDiscriminatorPath.js.map +1 -0
  2064. package/build/node_modules/mongoose/lib/helpers/document/getEmbeddedDiscriminatorPath.mjs +44 -0
  2065. package/build/node_modules/mongoose/lib/helpers/document/getEmbeddedDiscriminatorPath.mjs.map +1 -0
  2066. package/build/node_modules/mongoose/lib/helpers/document/handleSpreadDoc.js +20 -0
  2067. package/build/node_modules/mongoose/lib/helpers/document/handleSpreadDoc.js.map +1 -0
  2068. package/build/node_modules/mongoose/lib/helpers/document/handleSpreadDoc.mjs +18 -0
  2069. package/build/node_modules/mongoose/lib/helpers/document/handleSpreadDoc.mjs.map +1 -0
  2070. package/build/node_modules/mongoose/lib/helpers/each.js +28 -0
  2071. package/build/node_modules/mongoose/lib/helpers/each.js.map +1 -0
  2072. package/build/node_modules/mongoose/lib/helpers/each.mjs +26 -0
  2073. package/build/node_modules/mongoose/lib/helpers/each.mjs.map +1 -0
  2074. package/build/node_modules/mongoose/lib/helpers/get.js +67 -0
  2075. package/build/node_modules/mongoose/lib/helpers/get.js.map +1 -0
  2076. package/build/node_modules/mongoose/lib/helpers/get.mjs +65 -0
  2077. package/build/node_modules/mongoose/lib/helpers/get.mjs.map +1 -0
  2078. package/build/node_modules/mongoose/lib/helpers/getDefaultBulkwriteResult.js +31 -0
  2079. package/build/node_modules/mongoose/lib/helpers/getDefaultBulkwriteResult.js.map +1 -0
  2080. package/build/node_modules/mongoose/lib/helpers/getDefaultBulkwriteResult.mjs +29 -0
  2081. package/build/node_modules/mongoose/lib/helpers/getDefaultBulkwriteResult.mjs.map +1 -0
  2082. package/build/node_modules/mongoose/lib/helpers/getFunctionName.js +11 -0
  2083. package/build/node_modules/mongoose/lib/helpers/getFunctionName.js.map +1 -0
  2084. package/build/node_modules/mongoose/lib/helpers/getFunctionName.mjs +9 -0
  2085. package/build/node_modules/mongoose/lib/helpers/getFunctionName.mjs.map +1 -0
  2086. package/build/node_modules/mongoose/lib/helpers/immediate.js +17 -0
  2087. package/build/node_modules/mongoose/lib/helpers/immediate.js.map +1 -0
  2088. package/build/node_modules/mongoose/lib/helpers/immediate.mjs +15 -0
  2089. package/build/node_modules/mongoose/lib/helpers/immediate.mjs.map +1 -0
  2090. package/build/node_modules/mongoose/lib/helpers/indexes/isDefaultIdIndex.js +21 -0
  2091. package/build/node_modules/mongoose/lib/helpers/indexes/isDefaultIdIndex.js.map +1 -0
  2092. package/build/node_modules/mongoose/lib/helpers/indexes/isDefaultIdIndex.mjs +19 -0
  2093. package/build/node_modules/mongoose/lib/helpers/indexes/isDefaultIdIndex.mjs.map +1 -0
  2094. package/build/node_modules/mongoose/lib/helpers/indexes/isIndexEqual.js +98 -0
  2095. package/build/node_modules/mongoose/lib/helpers/indexes/isIndexEqual.js.map +1 -0
  2096. package/build/node_modules/mongoose/lib/helpers/indexes/isIndexEqual.mjs +96 -0
  2097. package/build/node_modules/mongoose/lib/helpers/indexes/isIndexEqual.mjs.map +1 -0
  2098. package/build/node_modules/mongoose/lib/helpers/isBsonType.js +16 -0
  2099. package/build/node_modules/mongoose/lib/helpers/isBsonType.js.map +1 -0
  2100. package/build/node_modules/mongoose/lib/helpers/isBsonType.mjs +14 -0
  2101. package/build/node_modules/mongoose/lib/helpers/isBsonType.mjs.map +1 -0
  2102. package/build/node_modules/mongoose/lib/helpers/isMongooseObject.js +24 -0
  2103. package/build/node_modules/mongoose/lib/helpers/isMongooseObject.js.map +1 -0
  2104. package/build/node_modules/mongoose/lib/helpers/isMongooseObject.mjs +22 -0
  2105. package/build/node_modules/mongoose/lib/helpers/isMongooseObject.mjs.map +1 -0
  2106. package/build/node_modules/mongoose/lib/helpers/isObject.js +19 -0
  2107. package/build/node_modules/mongoose/lib/helpers/isObject.js.map +1 -0
  2108. package/build/node_modules/mongoose/lib/helpers/isObject.mjs +17 -0
  2109. package/build/node_modules/mongoose/lib/helpers/isObject.mjs.map +1 -0
  2110. package/build/node_modules/mongoose/lib/helpers/isPromise.js +10 -0
  2111. package/build/node_modules/mongoose/lib/helpers/isPromise.js.map +1 -0
  2112. package/build/node_modules/mongoose/lib/helpers/isPromise.mjs +8 -0
  2113. package/build/node_modules/mongoose/lib/helpers/isPromise.mjs.map +1 -0
  2114. package/build/node_modules/mongoose/lib/helpers/model/applyHooks.js +141 -0
  2115. package/build/node_modules/mongoose/lib/helpers/model/applyHooks.js.map +1 -0
  2116. package/build/node_modules/mongoose/lib/helpers/model/applyHooks.mjs +139 -0
  2117. package/build/node_modules/mongoose/lib/helpers/model/applyHooks.mjs.map +1 -0
  2118. package/build/node_modules/mongoose/lib/helpers/model/applyMethods.js +59 -0
  2119. package/build/node_modules/mongoose/lib/helpers/model/applyMethods.js.map +1 -0
  2120. package/build/node_modules/mongoose/lib/helpers/model/applyMethods.mjs +57 -0
  2121. package/build/node_modules/mongoose/lib/helpers/model/applyMethods.mjs.map +1 -0
  2122. package/build/node_modules/mongoose/lib/helpers/model/applyStaticHooks.js +77 -0
  2123. package/build/node_modules/mongoose/lib/helpers/model/applyStaticHooks.js.map +1 -0
  2124. package/build/node_modules/mongoose/lib/helpers/model/applyStaticHooks.mjs +75 -0
  2125. package/build/node_modules/mongoose/lib/helpers/model/applyStaticHooks.mjs.map +1 -0
  2126. package/build/node_modules/mongoose/lib/helpers/model/applyStatics.js +15 -0
  2127. package/build/node_modules/mongoose/lib/helpers/model/applyStatics.js.map +1 -0
  2128. package/build/node_modules/mongoose/lib/helpers/model/applyStatics.mjs +13 -0
  2129. package/build/node_modules/mongoose/lib/helpers/model/applyStatics.mjs.map +1 -0
  2130. package/build/node_modules/mongoose/lib/helpers/model/castBulkWrite.js +227 -0
  2131. package/build/node_modules/mongoose/lib/helpers/model/castBulkWrite.js.map +1 -0
  2132. package/build/node_modules/mongoose/lib/helpers/model/castBulkWrite.mjs +225 -0
  2133. package/build/node_modules/mongoose/lib/helpers/model/castBulkWrite.mjs.map +1 -0
  2134. package/build/node_modules/mongoose/lib/helpers/model/discriminator.js +212 -0
  2135. package/build/node_modules/mongoose/lib/helpers/model/discriminator.js.map +1 -0
  2136. package/build/node_modules/mongoose/lib/helpers/model/discriminator.mjs +210 -0
  2137. package/build/node_modules/mongoose/lib/helpers/model/discriminator.mjs.map +1 -0
  2138. package/build/node_modules/mongoose/lib/helpers/parallelLimit.js +58 -0
  2139. package/build/node_modules/mongoose/lib/helpers/parallelLimit.js.map +1 -0
  2140. package/build/node_modules/mongoose/lib/helpers/parallelLimit.mjs +56 -0
  2141. package/build/node_modules/mongoose/lib/helpers/parallelLimit.mjs.map +1 -0
  2142. package/build/node_modules/mongoose/lib/helpers/path/parentPaths.js +16 -0
  2143. package/build/node_modules/mongoose/lib/helpers/path/parentPaths.js.map +1 -0
  2144. package/build/node_modules/mongoose/lib/helpers/path/parentPaths.mjs +14 -0
  2145. package/build/node_modules/mongoose/lib/helpers/path/parentPaths.mjs.map +1 -0
  2146. package/build/node_modules/mongoose/lib/helpers/path/setDottedPath.js +19 -0
  2147. package/build/node_modules/mongoose/lib/helpers/path/setDottedPath.js.map +1 -0
  2148. package/build/node_modules/mongoose/lib/helpers/path/setDottedPath.mjs +17 -0
  2149. package/build/node_modules/mongoose/lib/helpers/path/setDottedPath.mjs.map +1 -0
  2150. package/build/node_modules/mongoose/lib/helpers/populate/SkipPopulateValue.js +13 -0
  2151. package/build/node_modules/mongoose/lib/helpers/populate/SkipPopulateValue.js.map +1 -0
  2152. package/build/node_modules/mongoose/lib/helpers/populate/SkipPopulateValue.mjs +11 -0
  2153. package/build/node_modules/mongoose/lib/helpers/populate/SkipPopulateValue.mjs.map +1 -0
  2154. package/build/node_modules/mongoose/lib/helpers/populate/assignRawDocsToIdStructure.js +104 -0
  2155. package/build/node_modules/mongoose/lib/helpers/populate/assignRawDocsToIdStructure.js.map +1 -0
  2156. package/build/node_modules/mongoose/lib/helpers/populate/assignRawDocsToIdStructure.mjs +102 -0
  2157. package/build/node_modules/mongoose/lib/helpers/populate/assignRawDocsToIdStructure.mjs.map +1 -0
  2158. package/build/node_modules/mongoose/lib/helpers/populate/assignVals.js +291 -0
  2159. package/build/node_modules/mongoose/lib/helpers/populate/assignVals.js.map +1 -0
  2160. package/build/node_modules/mongoose/lib/helpers/populate/assignVals.mjs +289 -0
  2161. package/build/node_modules/mongoose/lib/helpers/populate/assignVals.mjs.map +1 -0
  2162. package/build/node_modules/mongoose/lib/helpers/populate/createPopulateQueryFilter.js +82 -0
  2163. package/build/node_modules/mongoose/lib/helpers/populate/createPopulateQueryFilter.js.map +1 -0
  2164. package/build/node_modules/mongoose/lib/helpers/populate/createPopulateQueryFilter.mjs +80 -0
  2165. package/build/node_modules/mongoose/lib/helpers/populate/createPopulateQueryFilter.mjs.map +1 -0
  2166. package/build/node_modules/mongoose/lib/helpers/populate/getModelsMapForPopulate.js +550 -0
  2167. package/build/node_modules/mongoose/lib/helpers/populate/getModelsMapForPopulate.js.map +1 -0
  2168. package/build/node_modules/mongoose/lib/helpers/populate/getModelsMapForPopulate.mjs +544 -0
  2169. package/build/node_modules/mongoose/lib/helpers/populate/getModelsMapForPopulate.mjs.map +1 -0
  2170. package/build/node_modules/mongoose/lib/helpers/populate/getSchemaTypes.js +218 -0
  2171. package/build/node_modules/mongoose/lib/helpers/populate/getSchemaTypes.js.map +1 -0
  2172. package/build/node_modules/mongoose/lib/helpers/populate/getSchemaTypes.mjs +216 -0
  2173. package/build/node_modules/mongoose/lib/helpers/populate/getSchemaTypes.mjs.map +1 -0
  2174. package/build/node_modules/mongoose/lib/helpers/populate/getVirtual.js +75 -0
  2175. package/build/node_modules/mongoose/lib/helpers/populate/getVirtual.js.map +1 -0
  2176. package/build/node_modules/mongoose/lib/helpers/populate/getVirtual.mjs +73 -0
  2177. package/build/node_modules/mongoose/lib/helpers/populate/getVirtual.mjs.map +1 -0
  2178. package/build/node_modules/mongoose/lib/helpers/populate/leanPopulateMap.js +10 -0
  2179. package/build/node_modules/mongoose/lib/helpers/populate/leanPopulateMap.js.map +1 -0
  2180. package/build/node_modules/mongoose/lib/helpers/populate/leanPopulateMap.mjs +8 -0
  2181. package/build/node_modules/mongoose/lib/helpers/populate/leanPopulateMap.mjs.map +1 -0
  2182. package/build/node_modules/mongoose/lib/helpers/populate/lookupLocalFields.js +31 -0
  2183. package/build/node_modules/mongoose/lib/helpers/populate/lookupLocalFields.js.map +1 -0
  2184. package/build/node_modules/mongoose/lib/helpers/populate/lookupLocalFields.mjs +29 -0
  2185. package/build/node_modules/mongoose/lib/helpers/populate/lookupLocalFields.mjs.map +1 -0
  2186. package/build/node_modules/mongoose/lib/helpers/populate/normalizeRefPath.js +48 -0
  2187. package/build/node_modules/mongoose/lib/helpers/populate/normalizeRefPath.js.map +1 -0
  2188. package/build/node_modules/mongoose/lib/helpers/populate/normalizeRefPath.mjs +46 -0
  2189. package/build/node_modules/mongoose/lib/helpers/populate/normalizeRefPath.mjs.map +1 -0
  2190. package/build/node_modules/mongoose/lib/helpers/populate/removeDeselectedForeignField.js +34 -0
  2191. package/build/node_modules/mongoose/lib/helpers/populate/removeDeselectedForeignField.js.map +1 -0
  2192. package/build/node_modules/mongoose/lib/helpers/populate/removeDeselectedForeignField.mjs +32 -0
  2193. package/build/node_modules/mongoose/lib/helpers/populate/removeDeselectedForeignField.mjs.map +1 -0
  2194. package/build/node_modules/mongoose/lib/helpers/populate/validateRef.js +26 -0
  2195. package/build/node_modules/mongoose/lib/helpers/populate/validateRef.js.map +1 -0
  2196. package/build/node_modules/mongoose/lib/helpers/populate/validateRef.mjs +20 -0
  2197. package/build/node_modules/mongoose/lib/helpers/populate/validateRef.mjs.map +1 -0
  2198. package/build/node_modules/mongoose/lib/helpers/printJestWarning.js +16 -0
  2199. package/build/node_modules/mongoose/lib/helpers/printJestWarning.js.map +1 -0
  2200. package/build/node_modules/mongoose/lib/helpers/printJestWarning.mjs +14 -0
  2201. package/build/node_modules/mongoose/lib/helpers/printJestWarning.mjs.map +1 -0
  2202. package/build/node_modules/mongoose/lib/helpers/projection/isDefiningProjection.js +21 -0
  2203. package/build/node_modules/mongoose/lib/helpers/projection/isDefiningProjection.js.map +1 -0
  2204. package/build/node_modules/mongoose/lib/helpers/projection/isDefiningProjection.mjs +19 -0
  2205. package/build/node_modules/mongoose/lib/helpers/projection/isDefiningProjection.mjs.map +1 -0
  2206. package/build/node_modules/mongoose/lib/helpers/projection/isExclusive.js +35 -0
  2207. package/build/node_modules/mongoose/lib/helpers/projection/isExclusive.js.map +1 -0
  2208. package/build/node_modules/mongoose/lib/helpers/projection/isExclusive.mjs +33 -0
  2209. package/build/node_modules/mongoose/lib/helpers/projection/isExclusive.mjs.map +1 -0
  2210. package/build/node_modules/mongoose/lib/helpers/projection/isInclusive.js +37 -0
  2211. package/build/node_modules/mongoose/lib/helpers/projection/isInclusive.js.map +1 -0
  2212. package/build/node_modules/mongoose/lib/helpers/projection/isInclusive.mjs +35 -0
  2213. package/build/node_modules/mongoose/lib/helpers/projection/isInclusive.mjs.map +1 -0
  2214. package/build/node_modules/mongoose/lib/helpers/projection/isPathExcluded.js +38 -0
  2215. package/build/node_modules/mongoose/lib/helpers/projection/isPathExcluded.js.map +1 -0
  2216. package/build/node_modules/mongoose/lib/helpers/projection/isPathExcluded.mjs +36 -0
  2217. package/build/node_modules/mongoose/lib/helpers/projection/isPathExcluded.mjs.map +1 -0
  2218. package/build/node_modules/mongoose/lib/helpers/projection/isPathSelectedInclusive.js +31 -0
  2219. package/build/node_modules/mongoose/lib/helpers/projection/isPathSelectedInclusive.js.map +1 -0
  2220. package/build/node_modules/mongoose/lib/helpers/projection/isPathSelectedInclusive.mjs +29 -0
  2221. package/build/node_modules/mongoose/lib/helpers/projection/isPathSelectedInclusive.mjs.map +1 -0
  2222. package/build/node_modules/mongoose/lib/helpers/projection/parseProjection.js +36 -0
  2223. package/build/node_modules/mongoose/lib/helpers/projection/parseProjection.js.map +1 -0
  2224. package/build/node_modules/mongoose/lib/helpers/projection/parseProjection.mjs +34 -0
  2225. package/build/node_modules/mongoose/lib/helpers/projection/parseProjection.mjs.map +1 -0
  2226. package/build/node_modules/mongoose/lib/helpers/promiseOrCallback.js +49 -0
  2227. package/build/node_modules/mongoose/lib/helpers/promiseOrCallback.js.map +1 -0
  2228. package/build/node_modules/mongoose/lib/helpers/promiseOrCallback.mjs +47 -0
  2229. package/build/node_modules/mongoose/lib/helpers/promiseOrCallback.mjs.map +1 -0
  2230. package/build/node_modules/mongoose/lib/helpers/query/applyGlobalMaxTimeMS.js +18 -0
  2231. package/build/node_modules/mongoose/lib/helpers/query/applyGlobalMaxTimeMS.js.map +1 -0
  2232. package/build/node_modules/mongoose/lib/helpers/query/applyGlobalMaxTimeMS.mjs +16 -0
  2233. package/build/node_modules/mongoose/lib/helpers/query/applyGlobalMaxTimeMS.mjs.map +1 -0
  2234. package/build/node_modules/mongoose/lib/helpers/query/applyQueryMiddleware.js +96 -0
  2235. package/build/node_modules/mongoose/lib/helpers/query/applyQueryMiddleware.js.map +1 -0
  2236. package/build/node_modules/mongoose/lib/helpers/query/applyQueryMiddleware.mjs +94 -0
  2237. package/build/node_modules/mongoose/lib/helpers/query/applyQueryMiddleware.mjs.map +1 -0
  2238. package/build/node_modules/mongoose/lib/helpers/query/castFilterPath.js +58 -0
  2239. package/build/node_modules/mongoose/lib/helpers/query/castFilterPath.js.map +1 -0
  2240. package/build/node_modules/mongoose/lib/helpers/query/castFilterPath.mjs +56 -0
  2241. package/build/node_modules/mongoose/lib/helpers/query/castFilterPath.mjs.map +1 -0
  2242. package/build/node_modules/mongoose/lib/helpers/query/castUpdate.js +561 -0
  2243. package/build/node_modules/mongoose/lib/helpers/query/castUpdate.js.map +1 -0
  2244. package/build/node_modules/mongoose/lib/helpers/query/castUpdate.mjs +559 -0
  2245. package/build/node_modules/mongoose/lib/helpers/query/castUpdate.mjs.map +1 -0
  2246. package/build/node_modules/mongoose/lib/helpers/query/completeMany.js +54 -0
  2247. package/build/node_modules/mongoose/lib/helpers/query/completeMany.js.map +1 -0
  2248. package/build/node_modules/mongoose/lib/helpers/query/completeMany.mjs +52 -0
  2249. package/build/node_modules/mongoose/lib/helpers/query/completeMany.mjs.map +1 -0
  2250. package/build/node_modules/mongoose/lib/helpers/query/getEmbeddedDiscriminatorPath.js +87 -0
  2251. package/build/node_modules/mongoose/lib/helpers/query/getEmbeddedDiscriminatorPath.js.map +1 -0
  2252. package/build/node_modules/mongoose/lib/helpers/query/getEmbeddedDiscriminatorPath.mjs +85 -0
  2253. package/build/node_modules/mongoose/lib/helpers/query/getEmbeddedDiscriminatorPath.mjs.map +1 -0
  2254. package/build/node_modules/mongoose/lib/helpers/query/handleImmutable.js +31 -0
  2255. package/build/node_modules/mongoose/lib/helpers/query/handleImmutable.js.map +1 -0
  2256. package/build/node_modules/mongoose/lib/helpers/query/handleImmutable.mjs +29 -0
  2257. package/build/node_modules/mongoose/lib/helpers/query/handleImmutable.mjs.map +1 -0
  2258. package/build/node_modules/mongoose/lib/helpers/query/hasDollarKeys.js +22 -0
  2259. package/build/node_modules/mongoose/lib/helpers/query/hasDollarKeys.js.map +1 -0
  2260. package/build/node_modules/mongoose/lib/helpers/query/hasDollarKeys.mjs +20 -0
  2261. package/build/node_modules/mongoose/lib/helpers/query/hasDollarKeys.mjs.map +1 -0
  2262. package/build/node_modules/mongoose/lib/helpers/query/isOperator.js +14 -0
  2263. package/build/node_modules/mongoose/lib/helpers/query/isOperator.js.map +1 -0
  2264. package/build/node_modules/mongoose/lib/helpers/query/isOperator.mjs +12 -0
  2265. package/build/node_modules/mongoose/lib/helpers/query/isOperator.mjs.map +1 -0
  2266. package/build/node_modules/mongoose/lib/helpers/query/sanitizeProjection.js +17 -0
  2267. package/build/node_modules/mongoose/lib/helpers/query/sanitizeProjection.js.map +1 -0
  2268. package/build/node_modules/mongoose/lib/helpers/query/sanitizeProjection.mjs +15 -0
  2269. package/build/node_modules/mongoose/lib/helpers/query/sanitizeProjection.mjs.map +1 -0
  2270. package/build/node_modules/mongoose/lib/helpers/query/selectPopulatedFields.js +52 -0
  2271. package/build/node_modules/mongoose/lib/helpers/query/selectPopulatedFields.js.map +1 -0
  2272. package/build/node_modules/mongoose/lib/helpers/query/selectPopulatedFields.mjs +50 -0
  2273. package/build/node_modules/mongoose/lib/helpers/query/selectPopulatedFields.mjs.map +1 -0
  2274. package/build/node_modules/mongoose/lib/helpers/query/wrapThunk.js +21 -0
  2275. package/build/node_modules/mongoose/lib/helpers/query/wrapThunk.js.map +1 -0
  2276. package/build/node_modules/mongoose/lib/helpers/query/wrapThunk.mjs +19 -0
  2277. package/build/node_modules/mongoose/lib/helpers/query/wrapThunk.mjs.map +1 -0
  2278. package/build/node_modules/mongoose/lib/helpers/schema/addAutoId.js +10 -0
  2279. package/build/node_modules/mongoose/lib/helpers/schema/addAutoId.js.map +1 -0
  2280. package/build/node_modules/mongoose/lib/helpers/schema/addAutoId.mjs +8 -0
  2281. package/build/node_modules/mongoose/lib/helpers/schema/addAutoId.mjs.map +1 -0
  2282. package/build/node_modules/mongoose/lib/helpers/schema/applyPlugins.js +47 -0
  2283. package/build/node_modules/mongoose/lib/helpers/schema/applyPlugins.js.map +1 -0
  2284. package/build/node_modules/mongoose/lib/helpers/schema/applyPlugins.mjs +45 -0
  2285. package/build/node_modules/mongoose/lib/helpers/schema/applyPlugins.mjs.map +1 -0
  2286. package/build/node_modules/mongoose/lib/helpers/schema/applyWriteConcern.js +33 -0
  2287. package/build/node_modules/mongoose/lib/helpers/schema/applyWriteConcern.js.map +1 -0
  2288. package/build/node_modules/mongoose/lib/helpers/schema/applyWriteConcern.mjs +31 -0
  2289. package/build/node_modules/mongoose/lib/helpers/schema/applyWriteConcern.mjs.map +1 -0
  2290. package/build/node_modules/mongoose/lib/helpers/schema/cleanPositionalOperators.js +15 -0
  2291. package/build/node_modules/mongoose/lib/helpers/schema/cleanPositionalOperators.js.map +1 -0
  2292. package/build/node_modules/mongoose/lib/helpers/schema/cleanPositionalOperators.mjs +13 -0
  2293. package/build/node_modules/mongoose/lib/helpers/schema/cleanPositionalOperators.mjs.map +1 -0
  2294. package/build/node_modules/mongoose/lib/helpers/schema/getIndexes.js +158 -0
  2295. package/build/node_modules/mongoose/lib/helpers/schema/getIndexes.js.map +1 -0
  2296. package/build/node_modules/mongoose/lib/helpers/schema/getIndexes.mjs +156 -0
  2297. package/build/node_modules/mongoose/lib/helpers/schema/getIndexes.mjs.map +1 -0
  2298. package/build/node_modules/mongoose/lib/helpers/schema/getPath.js +38 -0
  2299. package/build/node_modules/mongoose/lib/helpers/schema/getPath.js.map +1 -0
  2300. package/build/node_modules/mongoose/lib/helpers/schema/getPath.mjs +36 -0
  2301. package/build/node_modules/mongoose/lib/helpers/schema/getPath.mjs.map +1 -0
  2302. package/build/node_modules/mongoose/lib/helpers/schema/handleIdOption.js +23 -0
  2303. package/build/node_modules/mongoose/lib/helpers/schema/handleIdOption.js.map +1 -0
  2304. package/build/node_modules/mongoose/lib/helpers/schema/handleIdOption.mjs +21 -0
  2305. package/build/node_modules/mongoose/lib/helpers/schema/handleIdOption.mjs.map +1 -0
  2306. package/build/node_modules/mongoose/lib/helpers/schema/handleTimestampOption.js +27 -0
  2307. package/build/node_modules/mongoose/lib/helpers/schema/handleTimestampOption.js.map +1 -0
  2308. package/build/node_modules/mongoose/lib/helpers/schema/handleTimestampOption.mjs +25 -0
  2309. package/build/node_modules/mongoose/lib/helpers/schema/handleTimestampOption.mjs.map +1 -0
  2310. package/build/node_modules/mongoose/lib/helpers/schema/merge.js +30 -0
  2311. package/build/node_modules/mongoose/lib/helpers/schema/merge.js.map +1 -0
  2312. package/build/node_modules/mongoose/lib/helpers/schema/merge.mjs +28 -0
  2313. package/build/node_modules/mongoose/lib/helpers/schema/merge.mjs.map +1 -0
  2314. package/build/node_modules/mongoose/lib/helpers/schematype/handleImmutable.js +48 -0
  2315. package/build/node_modules/mongoose/lib/helpers/schematype/handleImmutable.js.map +1 -0
  2316. package/build/node_modules/mongoose/lib/helpers/schematype/handleImmutable.mjs +46 -0
  2317. package/build/node_modules/mongoose/lib/helpers/schematype/handleImmutable.mjs.map +1 -0
  2318. package/build/node_modules/mongoose/lib/helpers/setDefaultsOnInsert.js +134 -0
  2319. package/build/node_modules/mongoose/lib/helpers/setDefaultsOnInsert.js.map +1 -0
  2320. package/build/node_modules/mongoose/lib/helpers/setDefaultsOnInsert.mjs +132 -0
  2321. package/build/node_modules/mongoose/lib/helpers/setDefaultsOnInsert.mjs.map +1 -0
  2322. package/build/node_modules/mongoose/lib/helpers/specialProperties.js +6 -0
  2323. package/build/node_modules/mongoose/lib/helpers/specialProperties.js.map +1 -0
  2324. package/build/node_modules/mongoose/lib/helpers/specialProperties.mjs +4 -0
  2325. package/build/node_modules/mongoose/lib/helpers/specialProperties.mjs.map +1 -0
  2326. package/build/node_modules/mongoose/lib/helpers/symbols.js +61 -0
  2327. package/build/node_modules/mongoose/lib/helpers/symbols.js.map +1 -0
  2328. package/build/node_modules/mongoose/lib/helpers/symbols.mjs +41 -0
  2329. package/build/node_modules/mongoose/lib/helpers/symbols.mjs.map +1 -0
  2330. package/build/node_modules/mongoose/lib/helpers/timers.js +13 -0
  2331. package/build/node_modules/mongoose/lib/helpers/timers.js.map +1 -0
  2332. package/build/node_modules/mongoose/lib/helpers/timers.mjs +9 -0
  2333. package/build/node_modules/mongoose/lib/helpers/timers.mjs.map +1 -0
  2334. package/build/node_modules/mongoose/lib/helpers/timestamps/setupTimestamps.js +114 -0
  2335. package/build/node_modules/mongoose/lib/helpers/timestamps/setupTimestamps.js.map +1 -0
  2336. package/build/node_modules/mongoose/lib/helpers/timestamps/setupTimestamps.mjs +112 -0
  2337. package/build/node_modules/mongoose/lib/helpers/timestamps/setupTimestamps.mjs.map +1 -0
  2338. package/build/node_modules/mongoose/lib/helpers/topology/allServersUnknown.js +14 -0
  2339. package/build/node_modules/mongoose/lib/helpers/topology/allServersUnknown.js.map +1 -0
  2340. package/build/node_modules/mongoose/lib/helpers/topology/allServersUnknown.mjs +12 -0
  2341. package/build/node_modules/mongoose/lib/helpers/topology/allServersUnknown.mjs.map +1 -0
  2342. package/build/node_modules/mongoose/lib/helpers/topology/isAtlas.js +15 -0
  2343. package/build/node_modules/mongoose/lib/helpers/topology/isAtlas.js.map +1 -0
  2344. package/build/node_modules/mongoose/lib/helpers/topology/isAtlas.mjs +13 -0
  2345. package/build/node_modules/mongoose/lib/helpers/topology/isAtlas.mjs.map +1 -0
  2346. package/build/node_modules/mongoose/lib/helpers/topology/isSSLError.js +18 -0
  2347. package/build/node_modules/mongoose/lib/helpers/topology/isSSLError.js.map +1 -0
  2348. package/build/node_modules/mongoose/lib/helpers/topology/isSSLError.mjs +16 -0
  2349. package/build/node_modules/mongoose/lib/helpers/topology/isSSLError.mjs.map +1 -0
  2350. package/build/node_modules/mongoose/lib/helpers/update/applyTimestampsToChildren.js +175 -0
  2351. package/build/node_modules/mongoose/lib/helpers/update/applyTimestampsToChildren.js.map +1 -0
  2352. package/build/node_modules/mongoose/lib/helpers/update/applyTimestampsToChildren.mjs +173 -0
  2353. package/build/node_modules/mongoose/lib/helpers/update/applyTimestampsToChildren.mjs.map +1 -0
  2354. package/build/node_modules/mongoose/lib/helpers/update/applyTimestampsToUpdate.js +124 -0
  2355. package/build/node_modules/mongoose/lib/helpers/update/applyTimestampsToUpdate.js.map +1 -0
  2356. package/build/node_modules/mongoose/lib/helpers/update/applyTimestampsToUpdate.mjs +122 -0
  2357. package/build/node_modules/mongoose/lib/helpers/update/applyTimestampsToUpdate.mjs.map +1 -0
  2358. package/build/node_modules/mongoose/lib/helpers/update/castArrayFilters.js +63 -0
  2359. package/build/node_modules/mongoose/lib/helpers/update/castArrayFilters.js.map +1 -0
  2360. package/build/node_modules/mongoose/lib/helpers/update/castArrayFilters.mjs +61 -0
  2361. package/build/node_modules/mongoose/lib/helpers/update/castArrayFilters.mjs.map +1 -0
  2362. package/build/node_modules/mongoose/lib/helpers/update/modifiedPaths.js +38 -0
  2363. package/build/node_modules/mongoose/lib/helpers/update/modifiedPaths.js.map +1 -0
  2364. package/build/node_modules/mongoose/lib/helpers/update/modifiedPaths.mjs +36 -0
  2365. package/build/node_modules/mongoose/lib/helpers/update/modifiedPaths.mjs.map +1 -0
  2366. package/build/node_modules/mongoose/lib/helpers/update/moveImmutableProperties.js +56 -0
  2367. package/build/node_modules/mongoose/lib/helpers/update/moveImmutableProperties.js.map +1 -0
  2368. package/build/node_modules/mongoose/lib/helpers/update/moveImmutableProperties.mjs +54 -0
  2369. package/build/node_modules/mongoose/lib/helpers/update/moveImmutableProperties.mjs.map +1 -0
  2370. package/build/node_modules/mongoose/lib/helpers/update/removeUnusedArrayFilters.js +21 -0
  2371. package/build/node_modules/mongoose/lib/helpers/update/removeUnusedArrayFilters.js.map +1 -0
  2372. package/build/node_modules/mongoose/lib/helpers/update/removeUnusedArrayFilters.mjs +19 -0
  2373. package/build/node_modules/mongoose/lib/helpers/update/removeUnusedArrayFilters.mjs.map +1 -0
  2374. package/build/node_modules/mongoose/lib/helpers/update/updatedPathsByArrayFilter.js +27 -0
  2375. package/build/node_modules/mongoose/lib/helpers/update/updatedPathsByArrayFilter.js.map +1 -0
  2376. package/build/node_modules/mongoose/lib/helpers/update/updatedPathsByArrayFilter.mjs +25 -0
  2377. package/build/node_modules/mongoose/lib/helpers/update/updatedPathsByArrayFilter.mjs.map +1 -0
  2378. package/build/node_modules/mongoose/lib/helpers/updateValidators.js +263 -0
  2379. package/build/node_modules/mongoose/lib/helpers/updateValidators.js.map +1 -0
  2380. package/build/node_modules/mongoose/lib/helpers/updateValidators.mjs +261 -0
  2381. package/build/node_modules/mongoose/lib/helpers/updateValidators.mjs.map +1 -0
  2382. package/build/node_modules/mongoose/lib/index.js +1208 -0
  2383. package/build/node_modules/mongoose/lib/index.js.map +1 -0
  2384. package/build/node_modules/mongoose/lib/index.mjs +1201 -0
  2385. package/build/node_modules/mongoose/lib/index.mjs.map +1 -0
  2386. package/build/node_modules/mongoose/lib/internal.js +47 -0
  2387. package/build/node_modules/mongoose/lib/internal.js.map +1 -0
  2388. package/build/node_modules/mongoose/lib/internal.mjs +45 -0
  2389. package/build/node_modules/mongoose/lib/internal.mjs.map +1 -0
  2390. package/build/node_modules/mongoose/lib/model.js +5089 -0
  2391. package/build/node_modules/mongoose/lib/model.js.map +1 -0
  2392. package/build/node_modules/mongoose/lib/model.mjs +5082 -0
  2393. package/build/node_modules/mongoose/lib/model.mjs.map +1 -0
  2394. package/build/node_modules/mongoose/lib/options/PopulateOptions.js +39 -0
  2395. package/build/node_modules/mongoose/lib/options/PopulateOptions.js.map +1 -0
  2396. package/build/node_modules/mongoose/lib/options/PopulateOptions.mjs +37 -0
  2397. package/build/node_modules/mongoose/lib/options/PopulateOptions.mjs.map +1 -0
  2398. package/build/node_modules/mongoose/lib/options/SchemaArrayOptions.js +63 -0
  2399. package/build/node_modules/mongoose/lib/options/SchemaArrayOptions.js.map +1 -0
  2400. package/build/node_modules/mongoose/lib/options/SchemaArrayOptions.mjs +61 -0
  2401. package/build/node_modules/mongoose/lib/options/SchemaArrayOptions.mjs.map +1 -0
  2402. package/build/node_modules/mongoose/lib/options/SchemaBufferOptions.js +42 -0
  2403. package/build/node_modules/mongoose/lib/options/SchemaBufferOptions.js.map +1 -0
  2404. package/build/node_modules/mongoose/lib/options/SchemaBufferOptions.mjs +40 -0
  2405. package/build/node_modules/mongoose/lib/options/SchemaBufferOptions.mjs.map +1 -0
  2406. package/build/node_modules/mongoose/lib/options/SchemaDateOptions.js +68 -0
  2407. package/build/node_modules/mongoose/lib/options/SchemaDateOptions.js.map +1 -0
  2408. package/build/node_modules/mongoose/lib/options/SchemaDateOptions.mjs +66 -0
  2409. package/build/node_modules/mongoose/lib/options/SchemaDateOptions.mjs.map +1 -0
  2410. package/build/node_modules/mongoose/lib/options/SchemaDocumentArrayOptions.js +72 -0
  2411. package/build/node_modules/mongoose/lib/options/SchemaDocumentArrayOptions.js.map +1 -0
  2412. package/build/node_modules/mongoose/lib/options/SchemaDocumentArrayOptions.mjs +70 -0
  2413. package/build/node_modules/mongoose/lib/options/SchemaDocumentArrayOptions.mjs.map +1 -0
  2414. package/build/node_modules/mongoose/lib/options/SchemaMapOptions.js +47 -0
  2415. package/build/node_modules/mongoose/lib/options/SchemaMapOptions.js.map +1 -0
  2416. package/build/node_modules/mongoose/lib/options/SchemaMapOptions.mjs +45 -0
  2417. package/build/node_modules/mongoose/lib/options/SchemaMapOptions.mjs.map +1 -0
  2418. package/build/node_modules/mongoose/lib/options/SchemaNumberOptions.js +103 -0
  2419. package/build/node_modules/mongoose/lib/options/SchemaNumberOptions.js.map +1 -0
  2420. package/build/node_modules/mongoose/lib/options/SchemaNumberOptions.mjs +101 -0
  2421. package/build/node_modules/mongoose/lib/options/SchemaNumberOptions.mjs.map +1 -0
  2422. package/build/node_modules/mongoose/lib/options/SchemaObjectIdOptions.js +67 -0
  2423. package/build/node_modules/mongoose/lib/options/SchemaObjectIdOptions.js.map +1 -0
  2424. package/build/node_modules/mongoose/lib/options/SchemaObjectIdOptions.mjs +65 -0
  2425. package/build/node_modules/mongoose/lib/options/SchemaObjectIdOptions.mjs.map +1 -0
  2426. package/build/node_modules/mongoose/lib/options/SchemaSingleNestedOptions.js +46 -0
  2427. package/build/node_modules/mongoose/lib/options/SchemaSingleNestedOptions.js.map +1 -0
  2428. package/build/node_modules/mongoose/lib/options/SchemaSingleNestedOptions.mjs +44 -0
  2429. package/build/node_modules/mongoose/lib/options/SchemaSingleNestedOptions.mjs.map +1 -0
  2430. package/build/node_modules/mongoose/lib/options/SchemaStringOptions.js +142 -0
  2431. package/build/node_modules/mongoose/lib/options/SchemaStringOptions.js.map +1 -0
  2432. package/build/node_modules/mongoose/lib/options/SchemaStringOptions.mjs +140 -0
  2433. package/build/node_modules/mongoose/lib/options/SchemaStringOptions.mjs.map +1 -0
  2434. package/build/node_modules/mongoose/lib/options/SchemaTypeOptions.js +235 -0
  2435. package/build/node_modules/mongoose/lib/options/SchemaTypeOptions.js.map +1 -0
  2436. package/build/node_modules/mongoose/lib/options/SchemaTypeOptions.mjs +233 -0
  2437. package/build/node_modules/mongoose/lib/options/SchemaTypeOptions.mjs.map +1 -0
  2438. package/build/node_modules/mongoose/lib/options/VirtualOptions.js +167 -0
  2439. package/build/node_modules/mongoose/lib/options/VirtualOptions.js.map +1 -0
  2440. package/build/node_modules/mongoose/lib/options/VirtualOptions.mjs +165 -0
  2441. package/build/node_modules/mongoose/lib/options/VirtualOptions.mjs.map +1 -0
  2442. package/build/node_modules/mongoose/lib/options/propertyOptions.js +11 -0
  2443. package/build/node_modules/mongoose/lib/options/propertyOptions.js.map +1 -0
  2444. package/build/node_modules/mongoose/lib/options/propertyOptions.mjs +9 -0
  2445. package/build/node_modules/mongoose/lib/options/propertyOptions.mjs.map +1 -0
  2446. package/build/node_modules/mongoose/lib/options/removeOptions.js +17 -0
  2447. package/build/node_modules/mongoose/lib/options/removeOptions.js.map +1 -0
  2448. package/build/node_modules/mongoose/lib/options/removeOptions.mjs +15 -0
  2449. package/build/node_modules/mongoose/lib/options/removeOptions.mjs.map +1 -0
  2450. package/build/node_modules/mongoose/lib/options/saveOptions.js +17 -0
  2451. package/build/node_modules/mongoose/lib/options/saveOptions.js.map +1 -0
  2452. package/build/node_modules/mongoose/lib/options/saveOptions.mjs +15 -0
  2453. package/build/node_modules/mongoose/lib/options/saveOptions.mjs.map +1 -0
  2454. package/build/node_modules/mongoose/lib/options.js +25 -0
  2455. package/build/node_modules/mongoose/lib/options.js.map +1 -0
  2456. package/build/node_modules/mongoose/lib/options.mjs +21 -0
  2457. package/build/node_modules/mongoose/lib/options.mjs.map +1 -0
  2458. package/build/node_modules/mongoose/lib/plugins/idGetter.js +31 -0
  2459. package/build/node_modules/mongoose/lib/plugins/idGetter.js.map +1 -0
  2460. package/build/node_modules/mongoose/lib/plugins/idGetter.mjs +29 -0
  2461. package/build/node_modules/mongoose/lib/plugins/idGetter.mjs.map +1 -0
  2462. package/build/node_modules/mongoose/lib/plugins/removeSubdocs.js +34 -0
  2463. package/build/node_modules/mongoose/lib/plugins/removeSubdocs.js.map +1 -0
  2464. package/build/node_modules/mongoose/lib/plugins/removeSubdocs.mjs +32 -0
  2465. package/build/node_modules/mongoose/lib/plugins/removeSubdocs.mjs.map +1 -0
  2466. package/build/node_modules/mongoose/lib/plugins/saveSubdocs.js +69 -0
  2467. package/build/node_modules/mongoose/lib/plugins/saveSubdocs.js.map +1 -0
  2468. package/build/node_modules/mongoose/lib/plugins/saveSubdocs.mjs +67 -0
  2469. package/build/node_modules/mongoose/lib/plugins/saveSubdocs.mjs.map +1 -0
  2470. package/build/node_modules/mongoose/lib/plugins/sharding.js +93 -0
  2471. package/build/node_modules/mongoose/lib/plugins/sharding.js.map +1 -0
  2472. package/build/node_modules/mongoose/lib/plugins/sharding.mjs +89 -0
  2473. package/build/node_modules/mongoose/lib/plugins/sharding.mjs.map +1 -0
  2474. package/build/node_modules/mongoose/lib/plugins/trackTransaction.js +96 -0
  2475. package/build/node_modules/mongoose/lib/plugins/trackTransaction.js.map +1 -0
  2476. package/build/node_modules/mongoose/lib/plugins/trackTransaction.mjs +94 -0
  2477. package/build/node_modules/mongoose/lib/plugins/trackTransaction.mjs.map +1 -0
  2478. package/build/node_modules/mongoose/lib/plugins/validateBeforeSave.js +48 -0
  2479. package/build/node_modules/mongoose/lib/plugins/validateBeforeSave.js.map +1 -0
  2480. package/build/node_modules/mongoose/lib/plugins/validateBeforeSave.mjs +46 -0
  2481. package/build/node_modules/mongoose/lib/plugins/validateBeforeSave.mjs.map +1 -0
  2482. package/build/node_modules/mongoose/lib/promise_provider.js +60 -0
  2483. package/build/node_modules/mongoose/lib/promise_provider.js.map +1 -0
  2484. package/build/node_modules/mongoose/lib/promise_provider.mjs +54 -0
  2485. package/build/node_modules/mongoose/lib/promise_provider.mjs.map +1 -0
  2486. package/build/node_modules/mongoose/lib/query.js +5588 -0
  2487. package/build/node_modules/mongoose/lib/query.js.map +1 -0
  2488. package/build/node_modules/mongoose/lib/query.mjs +5582 -0
  2489. package/build/node_modules/mongoose/lib/query.mjs.map +1 -0
  2490. package/build/node_modules/mongoose/lib/queryhelpers.js +341 -0
  2491. package/build/node_modules/mongoose/lib/queryhelpers.js.map +1 -0
  2492. package/build/node_modules/mongoose/lib/queryhelpers.mjs +339 -0
  2493. package/build/node_modules/mongoose/lib/queryhelpers.mjs.map +1 -0
  2494. package/build/node_modules/mongoose/lib/schema/SingleNestedPath.js +358 -0
  2495. package/build/node_modules/mongoose/lib/schema/SingleNestedPath.js.map +1 -0
  2496. package/build/node_modules/mongoose/lib/schema/SingleNestedPath.mjs +352 -0
  2497. package/build/node_modules/mongoose/lib/schema/SingleNestedPath.mjs.map +1 -0
  2498. package/build/node_modules/mongoose/lib/schema/array.js +676 -0
  2499. package/build/node_modules/mongoose/lib/schema/array.js.map +1 -0
  2500. package/build/node_modules/mongoose/lib/schema/array.mjs +670 -0
  2501. package/build/node_modules/mongoose/lib/schema/array.mjs.map +1 -0
  2502. package/build/node_modules/mongoose/lib/schema/boolean.js +278 -0
  2503. package/build/node_modules/mongoose/lib/schema/boolean.js.map +1 -0
  2504. package/build/node_modules/mongoose/lib/schema/boolean.mjs +276 -0
  2505. package/build/node_modules/mongoose/lib/schema/boolean.mjs.map +1 -0
  2506. package/build/node_modules/mongoose/lib/schema/buffer.js +276 -0
  2507. package/build/node_modules/mongoose/lib/schema/buffer.js.map +1 -0
  2508. package/build/node_modules/mongoose/lib/schema/buffer.mjs +274 -0
  2509. package/build/node_modules/mongoose/lib/schema/buffer.mjs.map +1 -0
  2510. package/build/node_modules/mongoose/lib/schema/date.js +411 -0
  2511. package/build/node_modules/mongoose/lib/schema/date.js.map +1 -0
  2512. package/build/node_modules/mongoose/lib/schema/date.mjs +409 -0
  2513. package/build/node_modules/mongoose/lib/schema/date.mjs.map +1 -0
  2514. package/build/node_modules/mongoose/lib/schema/decimal128.js +218 -0
  2515. package/build/node_modules/mongoose/lib/schema/decimal128.js.map +1 -0
  2516. package/build/node_modules/mongoose/lib/schema/decimal128.mjs +216 -0
  2517. package/build/node_modules/mongoose/lib/schema/decimal128.mjs.map +1 -0
  2518. package/build/node_modules/mongoose/lib/schema/documentarray.js +591 -0
  2519. package/build/node_modules/mongoose/lib/schema/documentarray.js.map +1 -0
  2520. package/build/node_modules/mongoose/lib/schema/documentarray.mjs +584 -0
  2521. package/build/node_modules/mongoose/lib/schema/documentarray.mjs.map +1 -0
  2522. package/build/node_modules/mongoose/lib/schema/index.js +52 -0
  2523. package/build/node_modules/mongoose/lib/schema/index.js.map +1 -0
  2524. package/build/node_modules/mongoose/lib/schema/index.mjs +50 -0
  2525. package/build/node_modules/mongoose/lib/schema/index.mjs.map +1 -0
  2526. package/build/node_modules/mongoose/lib/schema/map.js +84 -0
  2527. package/build/node_modules/mongoose/lib/schema/map.js.map +1 -0
  2528. package/build/node_modules/mongoose/lib/schema/map.mjs +82 -0
  2529. package/build/node_modules/mongoose/lib/schema/map.mjs.map +1 -0
  2530. package/build/node_modules/mongoose/lib/schema/mixed.js +140 -0
  2531. package/build/node_modules/mongoose/lib/schema/mixed.js.map +1 -0
  2532. package/build/node_modules/mongoose/lib/schema/mixed.mjs +138 -0
  2533. package/build/node_modules/mongoose/lib/schema/mixed.mjs.map +1 -0
  2534. package/build/node_modules/mongoose/lib/schema/number.js +443 -0
  2535. package/build/node_modules/mongoose/lib/schema/number.js.map +1 -0
  2536. package/build/node_modules/mongoose/lib/schema/number.mjs +441 -0
  2537. package/build/node_modules/mongoose/lib/schema/number.mjs.map +1 -0
  2538. package/build/node_modules/mongoose/lib/schema/objectid.js +307 -0
  2539. package/build/node_modules/mongoose/lib/schema/objectid.js.map +1 -0
  2540. package/build/node_modules/mongoose/lib/schema/objectid.mjs +305 -0
  2541. package/build/node_modules/mongoose/lib/schema/objectid.mjs.map +1 -0
  2542. package/build/node_modules/mongoose/lib/schema/operators/bitwise.js +43 -0
  2543. package/build/node_modules/mongoose/lib/schema/operators/bitwise.js.map +1 -0
  2544. package/build/node_modules/mongoose/lib/schema/operators/bitwise.mjs +41 -0
  2545. package/build/node_modules/mongoose/lib/schema/operators/bitwise.mjs.map +1 -0
  2546. package/build/node_modules/mongoose/lib/schema/operators/exists.js +15 -0
  2547. package/build/node_modules/mongoose/lib/schema/operators/exists.js.map +1 -0
  2548. package/build/node_modules/mongoose/lib/schema/operators/exists.mjs +13 -0
  2549. package/build/node_modules/mongoose/lib/schema/operators/exists.mjs.map +1 -0
  2550. package/build/node_modules/mongoose/lib/schema/operators/geospatial.js +121 -0
  2551. package/build/node_modules/mongoose/lib/schema/operators/geospatial.js.map +1 -0
  2552. package/build/node_modules/mongoose/lib/schema/operators/geospatial.mjs +115 -0
  2553. package/build/node_modules/mongoose/lib/schema/operators/geospatial.mjs.map +1 -0
  2554. package/build/node_modules/mongoose/lib/schema/operators/helpers.js +46 -0
  2555. package/build/node_modules/mongoose/lib/schema/operators/helpers.js.map +1 -0
  2556. package/build/node_modules/mongoose/lib/schema/operators/helpers.mjs +41 -0
  2557. package/build/node_modules/mongoose/lib/schema/operators/helpers.mjs.map +1 -0
  2558. package/build/node_modules/mongoose/lib/schema/operators/text.js +42 -0
  2559. package/build/node_modules/mongoose/lib/schema/operators/text.js.map +1 -0
  2560. package/build/node_modules/mongoose/lib/schema/operators/text.mjs +40 -0
  2561. package/build/node_modules/mongoose/lib/schema/operators/text.mjs.map +1 -0
  2562. package/build/node_modules/mongoose/lib/schema/operators/type.js +23 -0
  2563. package/build/node_modules/mongoose/lib/schema/operators/type.js.map +1 -0
  2564. package/build/node_modules/mongoose/lib/schema/operators/type.mjs +21 -0
  2565. package/build/node_modules/mongoose/lib/schema/operators/type.mjs.map +1 -0
  2566. package/build/node_modules/mongoose/lib/schema/string.js +681 -0
  2567. package/build/node_modules/mongoose/lib/schema/string.js.map +1 -0
  2568. package/build/node_modules/mongoose/lib/schema/string.mjs +679 -0
  2569. package/build/node_modules/mongoose/lib/schema/string.mjs.map +1 -0
  2570. package/build/node_modules/mongoose/lib/schema/symbols.js +17 -0
  2571. package/build/node_modules/mongoose/lib/schema/symbols.js.map +1 -0
  2572. package/build/node_modules/mongoose/lib/schema/symbols.mjs +12 -0
  2573. package/build/node_modules/mongoose/lib/schema/symbols.mjs.map +1 -0
  2574. package/build/node_modules/mongoose/lib/schema.js +2205 -0
  2575. package/build/node_modules/mongoose/lib/schema.js.map +1 -0
  2576. package/build/node_modules/mongoose/lib/schema.mjs +2198 -0
  2577. package/build/node_modules/mongoose/lib/schema.mjs.map +1 -0
  2578. package/build/node_modules/mongoose/lib/schematype.js +1694 -0
  2579. package/build/node_modules/mongoose/lib/schematype.js.map +1 -0
  2580. package/build/node_modules/mongoose/lib/schematype.mjs +1688 -0
  2581. package/build/node_modules/mongoose/lib/schematype.mjs.map +1 -0
  2582. package/build/node_modules/mongoose/lib/statemachine.js +184 -0
  2583. package/build/node_modules/mongoose/lib/statemachine.js.map +1 -0
  2584. package/build/node_modules/mongoose/lib/statemachine.mjs +182 -0
  2585. package/build/node_modules/mongoose/lib/statemachine.mjs.map +1 -0
  2586. package/build/node_modules/mongoose/lib/types/array.js +91 -0
  2587. package/build/node_modules/mongoose/lib/types/array.js.map +1 -0
  2588. package/build/node_modules/mongoose/lib/types/array.mjs +89 -0
  2589. package/build/node_modules/mongoose/lib/types/array.mjs.map +1 -0
  2590. package/build/node_modules/mongoose/lib/types/buffer.js +283 -0
  2591. package/build/node_modules/mongoose/lib/types/buffer.js.map +1 -0
  2592. package/build/node_modules/mongoose/lib/types/buffer.mjs +281 -0
  2593. package/build/node_modules/mongoose/lib/types/buffer.mjs.map +1 -0
  2594. package/build/node_modules/mongoose/lib/types/core_array.js +982 -0
  2595. package/build/node_modules/mongoose/lib/types/core_array.js.map +1 -0
  2596. package/build/node_modules/mongoose/lib/types/core_array.mjs +976 -0
  2597. package/build/node_modules/mongoose/lib/types/core_array.mjs.map +1 -0
  2598. package/build/node_modules/mongoose/lib/types/decimal128.js +18 -0
  2599. package/build/node_modules/mongoose/lib/types/decimal128.js.map +1 -0
  2600. package/build/node_modules/mongoose/lib/types/decimal128.mjs +16 -0
  2601. package/build/node_modules/mongoose/lib/types/decimal128.mjs.map +1 -0
  2602. package/build/node_modules/mongoose/lib/types/documentarray.js +462 -0
  2603. package/build/node_modules/mongoose/lib/types/documentarray.js.map +1 -0
  2604. package/build/node_modules/mongoose/lib/types/documentarray.mjs +456 -0
  2605. package/build/node_modules/mongoose/lib/types/documentarray.mjs.map +1 -0
  2606. package/build/node_modules/mongoose/lib/types/embedded.js +474 -0
  2607. package/build/node_modules/mongoose/lib/types/embedded.js.map +1 -0
  2608. package/build/node_modules/mongoose/lib/types/embedded.mjs +467 -0
  2609. package/build/node_modules/mongoose/lib/types/embedded.mjs.map +1 -0
  2610. package/build/node_modules/mongoose/lib/types/index.js +31 -0
  2611. package/build/node_modules/mongoose/lib/types/index.js.map +1 -0
  2612. package/build/node_modules/mongoose/lib/types/index.mjs +29 -0
  2613. package/build/node_modules/mongoose/lib/types/index.mjs.map +1 -0
  2614. package/build/node_modules/mongoose/lib/types/map.js +252 -0
  2615. package/build/node_modules/mongoose/lib/types/map.js.map +1 -0
  2616. package/build/node_modules/mongoose/lib/types/map.mjs +246 -0
  2617. package/build/node_modules/mongoose/lib/types/map.mjs.map +1 -0
  2618. package/build/node_modules/mongoose/lib/types/objectid.js +36 -0
  2619. package/build/node_modules/mongoose/lib/types/objectid.js.map +1 -0
  2620. package/build/node_modules/mongoose/lib/types/objectid.mjs +34 -0
  2621. package/build/node_modules/mongoose/lib/types/objectid.mjs.map +1 -0
  2622. package/build/node_modules/mongoose/lib/types/subdocument.js +308 -0
  2623. package/build/node_modules/mongoose/lib/types/subdocument.js.map +1 -0
  2624. package/build/node_modules/mongoose/lib/types/subdocument.mjs +306 -0
  2625. package/build/node_modules/mongoose/lib/types/subdocument.mjs.map +1 -0
  2626. package/build/node_modules/mongoose/lib/utils.js +962 -0
  2627. package/build/node_modules/mongoose/lib/utils.js.map +1 -0
  2628. package/build/node_modules/mongoose/lib/utils.mjs +960 -0
  2629. package/build/node_modules/mongoose/lib/utils.mjs.map +1 -0
  2630. package/build/node_modules/mongoose/lib/validoptions.js +39 -0
  2631. package/build/node_modules/mongoose/lib/validoptions.js.map +1 -0
  2632. package/build/node_modules/mongoose/lib/validoptions.mjs +37 -0
  2633. package/build/node_modules/mongoose/lib/validoptions.mjs.map +1 -0
  2634. package/build/node_modules/mongoose/lib/virtualtype.js +179 -0
  2635. package/build/node_modules/mongoose/lib/virtualtype.js.map +1 -0
  2636. package/build/node_modules/mongoose/lib/virtualtype.mjs +177 -0
  2637. package/build/node_modules/mongoose/lib/virtualtype.mjs.map +1 -0
  2638. package/build/node_modules/mongoose/node_modules/safe-buffer/index.js +80 -0
  2639. package/build/node_modules/mongoose/node_modules/safe-buffer/index.js.map +1 -0
  2640. package/build/node_modules/mongoose/node_modules/safe-buffer/index.mjs +74 -0
  2641. package/build/node_modules/mongoose/node_modules/safe-buffer/index.mjs.map +1 -0
  2642. package/build/node_modules/mongoose/package.json.js +299 -0
  2643. package/build/node_modules/mongoose/package.json.js.map +1 -0
  2644. package/build/node_modules/mongoose/package.mjs +277 -0
  2645. package/build/node_modules/mongoose/package.mjs.map +1 -0
  2646. package/build/node_modules/mongoose-legacy-pluralize/index.js +104 -0
  2647. package/build/node_modules/mongoose-legacy-pluralize/index.js.map +1 -0
  2648. package/build/node_modules/mongoose-legacy-pluralize/index.mjs +102 -0
  2649. package/build/node_modules/mongoose-legacy-pluralize/index.mjs.map +1 -0
  2650. package/build/node_modules/mpath/index.js +12 -0
  2651. package/build/node_modules/mpath/index.js.map +1 -0
  2652. package/build/node_modules/mpath/index.mjs +10 -0
  2653. package/build/node_modules/mpath/index.mjs.map +1 -0
  2654. package/build/node_modules/mpath/lib/index.js +325 -0
  2655. package/build/node_modules/mpath/lib/index.js.map +1 -0
  2656. package/build/node_modules/mpath/lib/index.mjs +323 -0
  2657. package/build/node_modules/mpath/lib/index.mjs.map +1 -0
  2658. package/build/node_modules/mpath/lib/stringToParts.js +51 -0
  2659. package/build/node_modules/mpath/lib/stringToParts.js.map +1 -0
  2660. package/build/node_modules/mpath/lib/stringToParts.mjs +49 -0
  2661. package/build/node_modules/mpath/lib/stringToParts.mjs.map +1 -0
  2662. package/build/node_modules/mquery/lib/collection/collection.js +54 -0
  2663. package/build/node_modules/mquery/lib/collection/collection.js.map +1 -0
  2664. package/build/node_modules/mquery/lib/collection/collection.mjs +52 -0
  2665. package/build/node_modules/mquery/lib/collection/collection.mjs.map +1 -0
  2666. package/build/node_modules/mquery/lib/collection/index.js +17 -0
  2667. package/build/node_modules/mquery/lib/collection/index.js.map +1 -0
  2668. package/build/node_modules/mquery/lib/collection/index.mjs +15 -0
  2669. package/build/node_modules/mquery/lib/collection/index.mjs.map +1 -0
  2670. package/build/node_modules/mquery/lib/collection/node.js +161 -0
  2671. package/build/node_modules/mquery/lib/collection/node.js.map +1 -0
  2672. package/build/node_modules/mquery/lib/collection/node.mjs +159 -0
  2673. package/build/node_modules/mquery/lib/collection/node.mjs.map +1 -0
  2674. package/build/node_modules/mquery/lib/env.js +30 -0
  2675. package/build/node_modules/mquery/lib/env.js.map +1 -0
  2676. package/build/node_modules/mquery/lib/env.mjs +28 -0
  2677. package/build/node_modules/mquery/lib/env.mjs.map +1 -0
  2678. package/build/node_modules/mquery/lib/mquery.js +3276 -0
  2679. package/build/node_modules/mquery/lib/mquery.js.map +1 -0
  2680. package/build/node_modules/mquery/lib/mquery.mjs +3268 -0
  2681. package/build/node_modules/mquery/lib/mquery.mjs.map +1 -0
  2682. package/build/node_modules/mquery/lib/permissions.js +96 -0
  2683. package/build/node_modules/mquery/lib/permissions.js.map +1 -0
  2684. package/build/node_modules/mquery/lib/permissions.mjs +94 -0
  2685. package/build/node_modules/mquery/lib/permissions.mjs.map +1 -0
  2686. package/build/node_modules/mquery/lib/utils.js +373 -0
  2687. package/build/node_modules/mquery/lib/utils.js.map +1 -0
  2688. package/build/node_modules/mquery/lib/utils.mjs +371 -0
  2689. package/build/node_modules/mquery/lib/utils.mjs.map +1 -0
  2690. package/build/node_modules/ms/index.js +166 -0
  2691. package/build/node_modules/ms/index.js.map +1 -0
  2692. package/build/node_modules/ms/index.mjs +164 -0
  2693. package/build/node_modules/ms/index.mjs.map +1 -0
  2694. package/build/node_modules/optional-require/index.js +82 -0
  2695. package/build/node_modules/optional-require/index.js.map +1 -0
  2696. package/build/node_modules/optional-require/index.mjs +76 -0
  2697. package/build/node_modules/optional-require/index.mjs.map +1 -0
  2698. package/build/node_modules/process-nextick-args/index.js +52 -0
  2699. package/build/node_modules/process-nextick-args/index.js.map +1 -0
  2700. package/build/node_modules/process-nextick-args/index.mjs +50 -0
  2701. package/build/node_modules/process-nextick-args/index.mjs.map +1 -0
  2702. package/build/node_modules/redis/index.js +1136 -0
  2703. package/build/node_modules/redis/index.js.map +1 -0
  2704. package/build/node_modules/redis/index.mjs +1127 -0
  2705. package/build/node_modules/redis/index.mjs.map +1 -0
  2706. package/build/node_modules/redis/lib/command.js +19 -0
  2707. package/build/node_modules/redis/lib/command.js.map +1 -0
  2708. package/build/node_modules/redis/lib/command.mjs +17 -0
  2709. package/build/node_modules/redis/lib/command.mjs.map +1 -0
  2710. package/build/node_modules/redis/lib/commands.js +127 -0
  2711. package/build/node_modules/redis/lib/commands.js.map +1 -0
  2712. package/build/node_modules/redis/lib/commands.mjs +125 -0
  2713. package/build/node_modules/redis/lib/commands.mjs.map +1 -0
  2714. package/build/node_modules/redis/lib/createClient.js +87 -0
  2715. package/build/node_modules/redis/lib/createClient.js.map +1 -0
  2716. package/build/node_modules/redis/lib/createClient.mjs +81 -0
  2717. package/build/node_modules/redis/lib/createClient.mjs.map +1 -0
  2718. package/build/node_modules/redis/lib/customErrors.js +69 -0
  2719. package/build/node_modules/redis/lib/customErrors.js.map +1 -0
  2720. package/build/node_modules/redis/lib/customErrors.mjs +62 -0
  2721. package/build/node_modules/redis/lib/customErrors.mjs.map +1 -0
  2722. package/build/node_modules/redis/lib/debug.js +14 -0
  2723. package/build/node_modules/redis/lib/debug.js.map +1 -0
  2724. package/build/node_modules/redis/lib/debug.mjs +12 -0
  2725. package/build/node_modules/redis/lib/debug.mjs.map +1 -0
  2726. package/build/node_modules/redis/lib/extendedApi.js +117 -0
  2727. package/build/node_modules/redis/lib/extendedApi.js.map +1 -0
  2728. package/build/node_modules/redis/lib/extendedApi.mjs +115 -0
  2729. package/build/node_modules/redis/lib/extendedApi.mjs.map +1 -0
  2730. package/build/node_modules/redis/lib/individualCommands.js +620 -0
  2731. package/build/node_modules/redis/lib/individualCommands.js.map +1 -0
  2732. package/build/node_modules/redis/lib/individualCommands.mjs +618 -0
  2733. package/build/node_modules/redis/lib/individualCommands.mjs.map +1 -0
  2734. package/build/node_modules/redis/lib/multi.js +190 -0
  2735. package/build/node_modules/redis/lib/multi.js.map +1 -0
  2736. package/build/node_modules/redis/lib/multi.mjs +188 -0
  2737. package/build/node_modules/redis/lib/multi.mjs.map +1 -0
  2738. package/build/node_modules/redis/lib/utils.js +137 -0
  2739. package/build/node_modules/redis/lib/utils.js.map +1 -0
  2740. package/build/node_modules/redis/lib/utils.mjs +135 -0
  2741. package/build/node_modules/redis/lib/utils.mjs.map +1 -0
  2742. package/build/node_modules/redis-commands/commands.json.js +2785 -0
  2743. package/build/node_modules/redis-commands/commands.json.js.map +1 -0
  2744. package/build/node_modules/redis-commands/commands.mjs +2560 -0
  2745. package/build/node_modules/redis-commands/commands.mjs.map +1 -0
  2746. package/build/node_modules/redis-commands/index.js +177 -0
  2747. package/build/node_modules/redis-commands/index.js.map +1 -0
  2748. package/build/node_modules/redis-commands/index.mjs +175 -0
  2749. package/build/node_modules/redis-commands/index.mjs.map +1 -0
  2750. package/build/node_modules/redis-parser/index.js +21 -0
  2751. package/build/node_modules/redis-parser/index.js.map +1 -0
  2752. package/build/node_modules/redis-parser/index.mjs +15 -0
  2753. package/build/node_modules/redis-parser/index.mjs.map +1 -0
  2754. package/build/node_modules/redis-parser/lib/hiredis.js +69 -0
  2755. package/build/node_modules/redis-parser/lib/hiredis.js.map +1 -0
  2756. package/build/node_modules/redis-parser/lib/hiredis.mjs +63 -0
  2757. package/build/node_modules/redis-parser/lib/hiredis.mjs.map +1 -0
  2758. package/build/node_modules/redis-parser/lib/parser.js +593 -0
  2759. package/build/node_modules/redis-parser/lib/parser.js.map +1 -0
  2760. package/build/node_modules/redis-parser/lib/parser.mjs +587 -0
  2761. package/build/node_modules/redis-parser/lib/parser.mjs.map +1 -0
  2762. package/build/node_modules/redis-parser/lib/parserError.js +34 -0
  2763. package/build/node_modules/redis-parser/lib/parserError.js.map +1 -0
  2764. package/build/node_modules/redis-parser/lib/parserError.mjs +27 -0
  2765. package/build/node_modules/redis-parser/lib/parserError.mjs.map +1 -0
  2766. package/build/node_modules/redis-parser/lib/redisError.js +31 -0
  2767. package/build/node_modules/redis-parser/lib/redisError.js.map +1 -0
  2768. package/build/node_modules/redis-parser/lib/redisError.mjs +25 -0
  2769. package/build/node_modules/redis-parser/lib/redisError.mjs.map +1 -0
  2770. package/build/node_modules/redis-parser/lib/replyError.js +31 -0
  2771. package/build/node_modules/redis-parser/lib/replyError.js.map +1 -0
  2772. package/build/node_modules/redis-parser/lib/replyError.mjs +25 -0
  2773. package/build/node_modules/redis-parser/lib/replyError.mjs.map +1 -0
  2774. package/build/node_modules/regexp-clone/index.js +34 -0
  2775. package/build/node_modules/regexp-clone/index.js.map +1 -0
  2776. package/build/node_modules/regexp-clone/index.mjs +32 -0
  2777. package/build/node_modules/regexp-clone/index.mjs.map +1 -0
  2778. package/build/node_modules/safe-buffer/index.js +76 -0
  2779. package/build/node_modules/safe-buffer/index.js.map +1 -0
  2780. package/build/node_modules/safe-buffer/index.mjs +70 -0
  2781. package/build/node_modules/safe-buffer/index.mjs.map +1 -0
  2782. package/build/node_modules/saslprep/index.js +162 -0
  2783. package/build/node_modules/saslprep/index.js.map +1 -0
  2784. package/build/node_modules/saslprep/index.mjs +160 -0
  2785. package/build/node_modules/saslprep/index.mjs.map +1 -0
  2786. package/build/node_modules/saslprep/lib/memory-code-points.js +47 -0
  2787. package/build/node_modules/saslprep/lib/memory-code-points.js.map +1 -0
  2788. package/build/node_modules/saslprep/lib/memory-code-points.mjs +40 -0
  2789. package/build/node_modules/saslprep/lib/memory-code-points.mjs.map +1 -0
  2790. package/build/node_modules/sift/es5m/index.js +683 -0
  2791. package/build/node_modules/sift/es5m/index.js.map +1 -0
  2792. package/build/node_modules/sift/es5m/index.mjs +652 -0
  2793. package/build/node_modules/sift/es5m/index.mjs.map +1 -0
  2794. package/build/node_modules/sliced/index.js +36 -0
  2795. package/build/node_modules/sliced/index.js.map +1 -0
  2796. package/build/node_modules/sliced/index.mjs +34 -0
  2797. package/build/node_modules/sliced/index.mjs.map +1 -0
  2798. package/build/node_modules/sparse-bitfield/index.js +100 -0
  2799. package/build/node_modules/sparse-bitfield/index.js.map +1 -0
  2800. package/build/node_modules/sparse-bitfield/index.mjs +98 -0
  2801. package/build/node_modules/sparse-bitfield/index.mjs.map +1 -0
  2802. package/build/node_modules/util-deprecate/node.js +16 -0
  2803. package/build/node_modules/util-deprecate/node.js.map +1 -0
  2804. package/build/node_modules/util-deprecate/node.mjs +10 -0
  2805. package/build/node_modules/util-deprecate/node.mjs.map +1 -0
  2806. package/build/node_modules/ws/index.js +17 -0
  2807. package/build/node_modules/ws/index.js.map +1 -0
  2808. package/build/node_modules/ws/index.mjs +15 -0
  2809. package/build/node_modules/ws/index.mjs.map +1 -0
  2810. package/build/node_modules/ws/lib/buffer-util.js +143 -0
  2811. package/build/node_modules/ws/lib/buffer-util.js.map +1 -0
  2812. package/build/node_modules/ws/lib/buffer-util.mjs +137 -0
  2813. package/build/node_modules/ws/lib/buffer-util.mjs.map +1 -0
  2814. package/build/node_modules/ws/lib/constants.js +13 -0
  2815. package/build/node_modules/ws/lib/constants.js.map +1 -0
  2816. package/build/node_modules/ws/lib/constants.mjs +11 -0
  2817. package/build/node_modules/ws/lib/constants.mjs.map +1 -0
  2818. package/build/node_modules/ws/lib/event-target.js +187 -0
  2819. package/build/node_modules/ws/lib/event-target.js.map +1 -0
  2820. package/build/node_modules/ws/lib/event-target.mjs +185 -0
  2821. package/build/node_modules/ws/lib/event-target.mjs.map +1 -0
  2822. package/build/node_modules/ws/lib/extension.js +226 -0
  2823. package/build/node_modules/ws/lib/extension.js.map +1 -0
  2824. package/build/node_modules/ws/lib/extension.mjs +224 -0
  2825. package/build/node_modules/ws/lib/extension.mjs.map +1 -0
  2826. package/build/node_modules/ws/lib/limiter.js +58 -0
  2827. package/build/node_modules/ws/lib/limiter.js.map +1 -0
  2828. package/build/node_modules/ws/lib/limiter.mjs +56 -0
  2829. package/build/node_modules/ws/lib/limiter.mjs.map +1 -0
  2830. package/build/node_modules/ws/lib/permessage-deflate.js +526 -0
  2831. package/build/node_modules/ws/lib/permessage-deflate.js.map +1 -0
  2832. package/build/node_modules/ws/lib/permessage-deflate.mjs +520 -0
  2833. package/build/node_modules/ws/lib/permessage-deflate.mjs.map +1 -0
  2834. package/build/node_modules/ws/lib/receiver.js +620 -0
  2835. package/build/node_modules/ws/lib/receiver.js.map +1 -0
  2836. package/build/node_modules/ws/lib/receiver.mjs +614 -0
  2837. package/build/node_modules/ws/lib/receiver.mjs.map +1 -0
  2838. package/build/node_modules/ws/lib/sender.js +424 -0
  2839. package/build/node_modules/ws/lib/sender.js.map +1 -0
  2840. package/build/node_modules/ws/lib/sender.mjs +418 -0
  2841. package/build/node_modules/ws/lib/sender.mjs.map +1 -0
  2842. package/build/node_modules/ws/lib/stream.js +186 -0
  2843. package/build/node_modules/ws/lib/stream.js.map +1 -0
  2844. package/build/node_modules/ws/lib/stream.mjs +180 -0
  2845. package/build/node_modules/ws/lib/stream.mjs.map +1 -0
  2846. package/build/node_modules/ws/lib/validation.js +117 -0
  2847. package/build/node_modules/ws/lib/validation.js.map +1 -0
  2848. package/build/node_modules/ws/lib/validation.mjs +111 -0
  2849. package/build/node_modules/ws/lib/validation.mjs.map +1 -0
  2850. package/build/node_modules/ws/lib/websocket-server.js +467 -0
  2851. package/build/node_modules/ws/lib/websocket-server.js.map +1 -0
  2852. package/build/node_modules/ws/lib/websocket-server.mjs +459 -0
  2853. package/build/node_modules/ws/lib/websocket-server.mjs.map +1 -0
  2854. package/build/node_modules/ws/lib/websocket.js +1138 -0
  2855. package/build/node_modules/ws/lib/websocket.js.map +1 -0
  2856. package/build/node_modules/ws/lib/websocket.mjs +1126 -0
  2857. package/build/node_modules/ws/lib/websocket.mjs.map +1 -0
  2858. package/build/packages/core/src/Debug.js +34 -0
  2859. package/build/packages/core/src/Debug.js.map +1 -0
  2860. package/build/packages/core/src/Debug.mjs +20 -0
  2861. package/build/packages/core/src/Debug.mjs.map +1 -0
  2862. package/build/packages/core/src/IPC.js +65 -0
  2863. package/build/packages/core/src/IPC.js.map +1 -0
  2864. package/build/packages/core/src/IPC.mjs +60 -0
  2865. package/build/packages/core/src/IPC.mjs.map +1 -0
  2866. package/build/packages/core/src/Logger.js +12 -0
  2867. package/build/packages/core/src/Logger.js.map +1 -0
  2868. package/build/packages/core/src/Logger.mjs +8 -0
  2869. package/build/packages/core/src/Logger.mjs.map +1 -0
  2870. package/build/packages/core/src/MatchMaker.js +401 -0
  2871. package/build/packages/core/src/MatchMaker.js.map +1 -0
  2872. package/build/packages/core/src/MatchMaker.mjs +382 -0
  2873. package/build/packages/core/src/MatchMaker.mjs.map +1 -0
  2874. package/build/packages/core/src/Protocol.js +164 -0
  2875. package/build/packages/core/src/Protocol.js.map +1 -0
  2876. package/build/packages/core/src/Protocol.mjs +154 -0
  2877. package/build/packages/core/src/Protocol.mjs.map +1 -0
  2878. package/build/packages/core/src/Room.js +569 -0
  2879. package/build/packages/core/src/Room.js.map +1 -0
  2880. package/build/packages/core/src/Room.mjs +559 -0
  2881. package/build/packages/core/src/Room.mjs.map +1 -0
  2882. package/build/packages/core/src/Server.js +222 -0
  2883. package/build/packages/core/src/Server.js.map +1 -0
  2884. package/build/packages/core/src/Server.mjs +218 -0
  2885. package/build/packages/core/src/Server.mjs.map +1 -0
  2886. package/build/packages/core/src/Transport.js +17 -0
  2887. package/build/packages/core/src/Transport.js.map +1 -0
  2888. package/build/packages/core/src/Transport.mjs +13 -0
  2889. package/build/packages/core/src/Transport.mjs.map +1 -0
  2890. package/build/packages/core/src/Utils.js +225 -0
  2891. package/build/packages/core/src/Utils.js.map +1 -0
  2892. package/build/packages/core/src/Utils.mjs +209 -0
  2893. package/build/packages/core/src/Utils.mjs.map +1 -0
  2894. package/build/packages/core/src/discovery/index.js +31 -0
  2895. package/build/packages/core/src/discovery/index.js.map +1 -0
  2896. package/build/packages/core/src/discovery/index.mjs +22 -0
  2897. package/build/packages/core/src/discovery/index.mjs.map +1 -0
  2898. package/build/packages/core/src/errors/SeatReservationError.js +12 -0
  2899. package/build/packages/core/src/errors/SeatReservationError.js.map +1 -0
  2900. package/build/packages/core/src/errors/SeatReservationError.mjs +8 -0
  2901. package/build/packages/core/src/errors/SeatReservationError.mjs.map +1 -0
  2902. package/build/packages/core/src/errors/ServerError.js +21 -0
  2903. package/build/packages/core/src/errors/ServerError.js.map +1 -0
  2904. package/build/packages/core/src/errors/ServerError.mjs +17 -0
  2905. package/build/packages/core/src/errors/ServerError.mjs.map +1 -0
  2906. package/build/packages/core/src/index.js +96 -0
  2907. package/build/packages/core/src/index.js.map +1 -0
  2908. package/build/packages/core/src/index.mjs +19 -0
  2909. package/build/packages/core/src/index.mjs.map +1 -0
  2910. package/build/packages/core/src/matchmaker/Lobby.js +31 -0
  2911. package/build/packages/core/src/matchmaker/Lobby.js.map +1 -0
  2912. package/build/packages/core/src/matchmaker/Lobby.mjs +26 -0
  2913. package/build/packages/core/src/matchmaker/Lobby.mjs.map +1 -0
  2914. package/build/packages/core/src/matchmaker/RegisteredHandler.js +72 -0
  2915. package/build/packages/core/src/matchmaker/RegisteredHandler.js.map +1 -0
  2916. package/build/packages/core/src/matchmaker/RegisteredHandler.mjs +67 -0
  2917. package/build/packages/core/src/matchmaker/RegisteredHandler.mjs.map +1 -0
  2918. package/build/packages/core/src/matchmaker/controller.js +46 -0
  2919. package/build/packages/core/src/matchmaker/controller.js.map +1 -0
  2920. package/build/packages/core/src/matchmaker/controller.mjs +39 -0
  2921. package/build/packages/core/src/matchmaker/controller.mjs.map +1 -0
  2922. package/build/packages/core/src/matchmaker/driver/Query.js +53 -0
  2923. package/build/packages/core/src/matchmaker/driver/Query.js.map +1 -0
  2924. package/build/packages/core/src/matchmaker/driver/Query.mjs +49 -0
  2925. package/build/packages/core/src/matchmaker/driver/Query.mjs.map +1 -0
  2926. package/build/packages/core/src/matchmaker/driver/RoomData.js +80 -0
  2927. package/build/packages/core/src/matchmaker/driver/RoomData.js.map +1 -0
  2928. package/build/packages/core/src/matchmaker/driver/RoomData.mjs +76 -0
  2929. package/build/packages/core/src/matchmaker/driver/RoomData.mjs.map +1 -0
  2930. package/build/packages/core/src/matchmaker/driver/index.js +34 -0
  2931. package/build/packages/core/src/matchmaker/driver/index.js.map +1 -0
  2932. package/build/packages/core/src/matchmaker/driver/index.mjs +30 -0
  2933. package/build/packages/core/src/matchmaker/driver/index.mjs.map +1 -0
  2934. package/build/packages/core/src/presence/LocalPresence.js +156 -0
  2935. package/build/packages/core/src/presence/LocalPresence.js.map +1 -0
  2936. package/build/packages/core/src/presence/LocalPresence.mjs +152 -0
  2937. package/build/packages/core/src/presence/LocalPresence.mjs.map +1 -0
  2938. package/build/packages/core/src/rooms/LobbyRoom.js +101 -0
  2939. package/build/packages/core/src/rooms/LobbyRoom.js.map +1 -0
  2940. package/build/packages/core/src/rooms/LobbyRoom.mjs +97 -0
  2941. package/build/packages/core/src/rooms/LobbyRoom.mjs.map +1 -0
  2942. package/build/packages/core/src/rooms/RelayRoom.js +79 -0
  2943. package/build/packages/core/src/rooms/RelayRoom.js.map +1 -0
  2944. package/build/packages/core/src/rooms/RelayRoom.mjs +75 -0
  2945. package/build/packages/core/src/rooms/RelayRoom.mjs.map +1 -0
  2946. package/build/packages/core/src/serializer/NoneSerializer.js +19 -0
  2947. package/build/packages/core/src/serializer/NoneSerializer.js.map +1 -0
  2948. package/build/packages/core/src/serializer/NoneSerializer.mjs +15 -0
  2949. package/build/packages/core/src/serializer/NoneSerializer.mjs.map +1 -0
  2950. package/build/packages/core/src/serializer/SchemaSerializer.js +85 -0
  2951. package/build/packages/core/src/serializer/SchemaSerializer.js.map +1 -0
  2952. package/build/packages/core/src/serializer/SchemaSerializer.mjs +81 -0
  2953. package/build/packages/core/src/serializer/SchemaSerializer.mjs.map +1 -0
  2954. package/build/packages/drivers/mongoose-driver/build/index.mjs +23 -0
  2955. package/build/packages/drivers/mongoose-driver/build/index.mjs.js +25 -0
  2956. package/build/packages/drivers/mongoose-driver/build/index.mjs.js.map +1 -0
  2957. package/build/packages/drivers/mongoose-driver/build/index.mjs.map +1 -0
  2958. package/build/packages/transport/ws-transport/build/WebSocketClient.mjs +70 -0
  2959. package/build/packages/transport/ws-transport/build/WebSocketClient.mjs.js +74 -0
  2960. package/build/packages/transport/ws-transport/build/WebSocketClient.mjs.js.map +1 -0
  2961. package/build/packages/transport/ws-transport/build/WebSocketClient.mjs.map +1 -0
  2962. package/build/packages/transport/ws-transport/build/WebSocketTransport.mjs +102 -0
  2963. package/build/packages/transport/ws-transport/build/WebSocketTransport.mjs.js +110 -0
  2964. package/build/packages/transport/ws-transport/build/WebSocketTransport.mjs.js.map +1 -0
  2965. package/build/packages/transport/ws-transport/build/WebSocketTransport.mjs.map +1 -0
  2966. package/build/rooms/LobbyRoom.js +4 -4
  2967. package/build/rooms/LobbyRoom.js.map +1 -1
  2968. package/build/rooms/LobbyRoom.mjs +4 -4
  2969. package/build/rooms/LobbyRoom.mjs.map +1 -1
  2970. package/package.json +2 -2
@@ -0,0 +1,4305 @@
1
+ 'use strict';
2
+
3
+ var _commonjsHelpers = require('../../../_virtual/_commonjsHelpers.js');
4
+ var require$$0 = require('events');
5
+ var internal = require('./internal.js');
6
+ var index = require('./error/index.js');
7
+ var mixed = require('./schema/mixed.js');
8
+ var objectExpected = require('./error/objectExpected.js');
9
+ var objectParameter = require('./error/objectParameter.js');
10
+ var parallelValidate = require('./error/parallelValidate.js');
11
+ var schema = require('./schema.js');
12
+ var strict = require('./error/strict.js');
13
+ var validation = require('./error/validation.js');
14
+ var validator = require('./error/validator.js');
15
+ var virtualtype = require('./virtualtype.js');
16
+ var promiseOrCallback = require('./helpers/promiseOrCallback.js');
17
+ var cleanModifiedSubpaths = require('./helpers/document/cleanModifiedSubpaths.js');
18
+ var compile = require('./helpers/document/compile.js');
19
+ var common = require('./helpers/common.js');
20
+ var get = require('./helpers/get.js');
21
+ var getEmbeddedDiscriminatorPath = require('./helpers/document/getEmbeddedDiscriminatorPath.js');
22
+ var handleSpreadDoc = require('./helpers/document/handleSpreadDoc.js');
23
+ var idGetter = require('./plugins/idGetter.js');
24
+ var immediate = require('./helpers/immediate.js');
25
+ var isDefiningProjection = require('./helpers/projection/isDefiningProjection.js');
26
+ var isExclusive = require('./helpers/projection/isExclusive.js');
27
+ var util = require('util');
28
+ var options = require('./options.js');
29
+ var index$1 = require('../../mpath/index.js');
30
+ var queryhelpers = require('./queryhelpers.js');
31
+ var utils = require('./utils.js');
32
+ var isPromise = require('./helpers/isPromise.js');
33
+ var symbols = require('./helpers/symbols.js');
34
+ var symbols$1 = require('./schema/symbols.js');
35
+ var embedded = require('./types/embedded.js');
36
+ require('./types/array.js');
37
+ require('./types/documentarray.js');
38
+
39
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
40
+
41
+ var require$$0__default = /*#__PURE__*/_interopDefaultLegacy(require$$0);
42
+ var util__default = /*#__PURE__*/_interopDefaultLegacy(util);
43
+
44
+ var document = _commonjsHelpers.createCommonjsModule(function (module, exports) {
45
+
46
+ /*!
47
+ * Module dependencies.
48
+ */
49
+
50
+ const EventEmitter = require$$0__default['default'].EventEmitter;
51
+
52
+
53
+
54
+
55
+
56
+
57
+
58
+
59
+
60
+
61
+
62
+
63
+
64
+ const compile$1 = compile['default'].compile;
65
+ const defineKey = compile['default'].defineKey;
66
+ const flatten = common['default'].flatten;
67
+
68
+
69
+
70
+
71
+
72
+
73
+
74
+ const inspect = util__default['default'].inspect;
75
+ const internalToObjectOptions = options['default'].internalToObjectOptions;
76
+
77
+
78
+
79
+
80
+
81
+ const clone = utils.clone;
82
+ const deepEqual = utils.deepEqual;
83
+ const isMongooseObject = utils.isMongooseObject;
84
+
85
+ const arrayAtomicsBackupSymbol = Symbol('mongoose.Array#atomicsBackup');
86
+ const arrayAtomicsSymbol = symbols['default'].arrayAtomicsSymbol;
87
+ const documentArrayParent = symbols['default'].documentArrayParent;
88
+ const documentIsModified = symbols['default'].documentIsModified;
89
+ const documentModifiedPaths = symbols['default'].documentModifiedPaths;
90
+ const documentSchemaSymbol = symbols['default'].documentSchemaSymbol;
91
+ const getSymbol = symbols['default'].getSymbol;
92
+ const populateModelSymbol = symbols['default'].populateModelSymbol;
93
+ const scopeSymbol = symbols['default'].scopeSymbol;
94
+ const schemaMixedSymbol = symbols$1['default'].schemaMixedSymbol;
95
+ let Embedded;
96
+
97
+ const specialProperties = utils.specialProperties;
98
+
99
+ /**
100
+ * The core Mongoose document constructor. You should not call this directly,
101
+ * the Mongoose [Model constructor](./api.html#Model) calls this for you.
102
+ *
103
+ * @param {Object} obj the values to set
104
+ * @param {Object} [fields] optional object containing the fields which were selected in the query returning this document and any populated paths data
105
+ * @param {Object} [options] various configuration options for the document
106
+ * @param {Boolean} [options.defaults=true] if `false`, skip applying default values to this document.
107
+ * @inherits NodeJS EventEmitter http://nodejs.org/api/events.html#events_class_events_eventemitter
108
+ * @event `init`: Emitted on a document after it has been retrieved from the db and fully hydrated by Mongoose.
109
+ * @event `save`: Emitted when the document is successfully saved
110
+ * @api private
111
+ */
112
+
113
+ function Document(obj, fields, skipId, options) {
114
+ if (typeof skipId === 'object' && skipId != null) {
115
+ options = skipId;
116
+ skipId = options.skipId;
117
+ }
118
+ options = Object.assign({}, options);
119
+ const defaults = get(options, 'defaults', true);
120
+ options.defaults = defaults;
121
+ // Support `browserDocument.js` syntax
122
+ if (this.$__schema == null) {
123
+ const _schema = utils.isObject(fields) && !fields.instanceOfSchema ?
124
+ new schema(fields) :
125
+ fields;
126
+ this.$__setSchema(_schema);
127
+ fields = skipId;
128
+ skipId = options;
129
+ options = arguments[4] || {};
130
+ }
131
+
132
+ this.$__ = new internal;
133
+ this.$__.emitter = new EventEmitter();
134
+ this.isNew = 'isNew' in options ? options.isNew : true;
135
+ this.errors = undefined;
136
+ this.$__.$options = options || {};
137
+ this.$locals = {};
138
+ this.$op = null;
139
+ if (obj != null && typeof obj !== 'object') {
140
+ throw new objectParameter(obj, 'obj', 'Document');
141
+ }
142
+
143
+ const schema$1 = this.$__schema;
144
+
145
+ if (typeof fields === 'boolean' || fields === 'throw') {
146
+ this.$__.strictMode = fields;
147
+ fields = undefined;
148
+ } else {
149
+ this.$__.strictMode = schema$1.options.strict;
150
+ this.$__.selected = fields;
151
+ }
152
+
153
+ const requiredPaths = schema$1.requiredPaths(true);
154
+ for (const path of requiredPaths) {
155
+ this.$__.activePaths.require(path);
156
+ }
157
+
158
+ this.$__.emitter.setMaxListeners(0);
159
+
160
+ let exclude = null;
161
+
162
+ // determine if this doc is a result of a query with
163
+ // excluded fields
164
+ if (utils.isPOJO(fields)) {
165
+ exclude = isExclusive(fields);
166
+ }
167
+
168
+ const hasIncludedChildren = exclude === false && fields ?
169
+ $__hasIncludedChildren(fields) :
170
+ {};
171
+
172
+ if (this._doc == null) {
173
+ this.$__buildDoc(obj, fields, skipId, exclude, hasIncludedChildren, false);
174
+
175
+ // By default, defaults get applied **before** setting initial values
176
+ // Re: gh-6155
177
+ if (defaults) {
178
+ $__applyDefaults(this, fields, skipId, exclude, hasIncludedChildren, true, {
179
+ isNew: this.isNew
180
+ });
181
+ }
182
+ }
183
+ if (obj) {
184
+ // Skip set hooks
185
+ if (this.$__original_set) {
186
+ this.$__original_set(obj, undefined, true);
187
+ } else {
188
+ this.$set(obj, undefined, true);
189
+ }
190
+
191
+ if (obj instanceof Document) {
192
+ this.isNew = obj.isNew;
193
+ }
194
+ }
195
+
196
+ // Function defaults get applied **after** setting initial values so they
197
+ // see the full doc rather than an empty one, unless they opt out.
198
+ // Re: gh-3781, gh-6155
199
+ if (options.willInit && defaults) {
200
+ EventEmitter.prototype.once.call(this, 'init', () => {
201
+ $__applyDefaults(this, fields, skipId, exclude, hasIncludedChildren, false, options.skipDefaults, {
202
+ isNew: this.isNew
203
+ });
204
+ });
205
+ } else if (defaults) {
206
+ $__applyDefaults(this, fields, skipId, exclude, hasIncludedChildren, false, options.skipDefaults, {
207
+ isNew: this.isNew
208
+ });
209
+ }
210
+
211
+ this.$__._id = this._id;
212
+
213
+ if (!this.$__.strictMode && obj) {
214
+ const _this = this;
215
+ const keys = Object.keys(this._doc);
216
+
217
+ keys.forEach(function(key) {
218
+ if (!(key in schema$1.tree)) {
219
+ defineKey(key, null, _this);
220
+ }
221
+ });
222
+ }
223
+
224
+ applyQueue(this);
225
+ }
226
+
227
+ /*!
228
+ * Document exposes the NodeJS event emitter API, so you can use
229
+ * `on`, `once`, etc.
230
+ */
231
+ utils.each(
232
+ ['on', 'once', 'emit', 'listeners', 'removeListener', 'setMaxListeners',
233
+ 'removeAllListeners', 'addListener'],
234
+ function(emitterFn) {
235
+ Document.prototype[emitterFn] = function() {
236
+ return this.$__.emitter[emitterFn].apply(this.$__.emitter, arguments);
237
+ };
238
+ });
239
+
240
+ Document.prototype.constructor = Document;
241
+
242
+ for (const i in EventEmitter.prototype) {
243
+ Document[i] = EventEmitter.prototype[i];
244
+ }
245
+
246
+ /**
247
+ * The document's internal schema.
248
+ *
249
+ * @api private
250
+ * @property schema
251
+ * @memberOf Document
252
+ * @instance
253
+ */
254
+
255
+ Document.prototype.$__schema;
256
+
257
+ /**
258
+ * The document's schema.
259
+ *
260
+ * @api public
261
+ * @property schema
262
+ * @memberOf Document
263
+ * @instance
264
+ */
265
+
266
+ Document.prototype.schema;
267
+
268
+ /**
269
+ * Empty object that you can use for storing properties on the document. This
270
+ * is handy for passing data to middleware without conflicting with Mongoose
271
+ * internals.
272
+ *
273
+ * ####Example:
274
+ *
275
+ * schema.pre('save', function() {
276
+ * // Mongoose will set `isNew` to `false` if `save()` succeeds
277
+ * this.$locals.wasNew = this.isNew;
278
+ * });
279
+ *
280
+ * schema.post('save', function() {
281
+ * // Prints true if `isNew` was set before `save()`
282
+ * console.log(this.$locals.wasNew);
283
+ * });
284
+ *
285
+ * @api public
286
+ * @property $locals
287
+ * @memberOf Document
288
+ * @instance
289
+ */
290
+
291
+ Object.defineProperty(Document.prototype, '$locals', {
292
+ configurable: false,
293
+ enumerable: false,
294
+ writable: true
295
+ });
296
+
297
+ /**
298
+ * Boolean flag specifying if the document is new.
299
+ *
300
+ * @api public
301
+ * @property isNew
302
+ * @memberOf Document
303
+ * @instance
304
+ */
305
+
306
+ Document.prototype.isNew;
307
+
308
+ /**
309
+ * The string version of this documents _id.
310
+ *
311
+ * ####Note:
312
+ *
313
+ * This getter exists on all documents by default. The getter can be disabled by setting the `id` [option](/docs/guide.html#id) of its `Schema` to false at construction time.
314
+ *
315
+ * new Schema({ name: String }, { id: false });
316
+ *
317
+ * @api public
318
+ * @see Schema options /docs/guide.html#options
319
+ * @property id
320
+ * @memberOf Document
321
+ * @instance
322
+ */
323
+
324
+ Document.prototype.id;
325
+
326
+ /**
327
+ * Hash containing current validation errors.
328
+ *
329
+ * @api public
330
+ * @property errors
331
+ * @memberOf Document
332
+ * @instance
333
+ */
334
+
335
+ Document.prototype.errors;
336
+
337
+ /**
338
+ * A string containing the current operation that Mongoose is executing
339
+ * on this document. May be `null`, `'save'`, `'validate'`, or `'remove'`.
340
+ *
341
+ * ####Example:
342
+ *
343
+ * const doc = new Model({ name: 'test' });
344
+ * doc.$op; // null
345
+ *
346
+ * const promise = doc.save();
347
+ * doc.$op; // 'save'
348
+ *
349
+ * await promise;
350
+ * doc.$op; // null
351
+ *
352
+ * @api public
353
+ * @property $op
354
+ * @memberOf Document
355
+ * @instance
356
+ */
357
+
358
+ Document.prototype.$op;
359
+
360
+ /*!
361
+ * ignore
362
+ */
363
+
364
+ function $__hasIncludedChildren(fields) {
365
+ const hasIncludedChildren = {};
366
+ const keys = Object.keys(fields);
367
+
368
+ for (const key of keys) {
369
+ const parts = key.split('.');
370
+ const c = [];
371
+
372
+ for (const part of parts) {
373
+ c.push(part);
374
+ hasIncludedChildren[c.join('.')] = 1;
375
+ }
376
+ }
377
+
378
+ return hasIncludedChildren;
379
+ }
380
+
381
+ /*!
382
+ * ignore
383
+ */
384
+
385
+ function $__applyDefaults(doc, fields, skipId, exclude, hasIncludedChildren, isBeforeSetters, pathsToSkip) {
386
+ const paths = Object.keys(doc.$__schema.paths);
387
+ const plen = paths.length;
388
+
389
+ for (let i = 0; i < plen; ++i) {
390
+ let def;
391
+ let curPath = '';
392
+ const p = paths[i];
393
+
394
+ if (p === '_id' && skipId) {
395
+ continue;
396
+ }
397
+
398
+ const type = doc.$__schema.paths[p];
399
+ const path = type.splitPath();
400
+ const len = path.length;
401
+ let included = false;
402
+ let doc_ = doc._doc;
403
+ for (let j = 0; j < len; ++j) {
404
+ if (doc_ == null) {
405
+ break;
406
+ }
407
+
408
+ const piece = path[j];
409
+ curPath += (!curPath.length ? '' : '.') + piece;
410
+
411
+ if (exclude === true) {
412
+ if (curPath in fields) {
413
+ break;
414
+ }
415
+ } else if (exclude === false && fields && !included) {
416
+ if (curPath in fields) {
417
+ included = true;
418
+ } else if (!hasIncludedChildren[curPath]) {
419
+ break;
420
+ }
421
+ }
422
+
423
+ if (j === len - 1) {
424
+ if (doc_[piece] !== void 0) {
425
+ break;
426
+ }
427
+
428
+ if (typeof type.defaultValue === 'function') {
429
+ if (!type.defaultValue.$runBeforeSetters && isBeforeSetters) {
430
+ break;
431
+ }
432
+ if (type.defaultValue.$runBeforeSetters && !isBeforeSetters) {
433
+ break;
434
+ }
435
+ } else if (!isBeforeSetters) {
436
+ // Non-function defaults should always run **before** setters
437
+ continue;
438
+ }
439
+
440
+ if (pathsToSkip && pathsToSkip[curPath]) {
441
+ break;
442
+ }
443
+
444
+ if (fields && exclude !== null) {
445
+ if (exclude === true) {
446
+ // apply defaults to all non-excluded fields
447
+ if (p in fields) {
448
+ continue;
449
+ }
450
+
451
+ try {
452
+ def = type.getDefault(doc, false);
453
+ } catch (err) {
454
+ doc.invalidate(p, err);
455
+ break;
456
+ }
457
+
458
+ if (typeof def !== 'undefined') {
459
+ doc_[piece] = def;
460
+ doc.$__.activePaths.default(p);
461
+ }
462
+ } else if (included) {
463
+ // selected field
464
+ try {
465
+ def = type.getDefault(doc, false);
466
+ } catch (err) {
467
+ doc.invalidate(p, err);
468
+ break;
469
+ }
470
+
471
+ if (typeof def !== 'undefined') {
472
+ doc_[piece] = def;
473
+ doc.$__.activePaths.default(p);
474
+ }
475
+ }
476
+ } else {
477
+ try {
478
+ def = type.getDefault(doc, false);
479
+ } catch (err) {
480
+ doc.invalidate(p, err);
481
+ break;
482
+ }
483
+
484
+ if (typeof def !== 'undefined') {
485
+ doc_[piece] = def;
486
+ doc.$__.activePaths.default(p);
487
+ }
488
+ }
489
+ } else {
490
+ doc_ = doc_[piece];
491
+ }
492
+ }
493
+ }
494
+ }
495
+
496
+ /**
497
+ * Builds the default doc structure
498
+ *
499
+ * @param {Object} obj
500
+ * @param {Object} [fields]
501
+ * @param {Boolean} [skipId]
502
+ * @api private
503
+ * @method $__buildDoc
504
+ * @memberOf Document
505
+ * @instance
506
+ */
507
+
508
+ Document.prototype.$__buildDoc = function(obj, fields, skipId, exclude, hasIncludedChildren) {
509
+ const doc = {};
510
+
511
+ const paths = Object.keys(this.$__schema.paths).
512
+ // Don't build up any paths that are underneath a map, we don't know
513
+ // what the keys will be
514
+ filter(p => !p.includes('$*'));
515
+ const plen = paths.length;
516
+ let ii = 0;
517
+
518
+ for (; ii < plen; ++ii) {
519
+ const p = paths[ii];
520
+
521
+ if (p === '_id') {
522
+ if (skipId) {
523
+ continue;
524
+ }
525
+ if (obj && '_id' in obj) {
526
+ continue;
527
+ }
528
+ }
529
+
530
+ const path = this.$__schema.paths[p].splitPath();
531
+ const len = path.length;
532
+ const last = len - 1;
533
+ let curPath = '';
534
+ let doc_ = doc;
535
+ let included = false;
536
+
537
+ for (let i = 0; i < len; ++i) {
538
+ const piece = path[i];
539
+
540
+ curPath += (!curPath.length ? '' : '.') + piece;
541
+
542
+ // support excluding intermediary levels
543
+ if (exclude === true) {
544
+ if (curPath in fields) {
545
+ break;
546
+ }
547
+ } else if (exclude === false && fields && !included) {
548
+ if (curPath in fields) {
549
+ included = true;
550
+ } else if (!hasIncludedChildren[curPath]) {
551
+ break;
552
+ }
553
+ }
554
+
555
+ if (i < last) {
556
+ doc_ = doc_[piece] || (doc_[piece] = {});
557
+ }
558
+ }
559
+ }
560
+
561
+ this._doc = doc;
562
+ };
563
+
564
+ /*!
565
+ * Converts to POJO when you use the document for querying
566
+ */
567
+
568
+ Document.prototype.toBSON = function() {
569
+ return this.toObject(internalToObjectOptions);
570
+ };
571
+
572
+ /**
573
+ * Initializes the document without setters or marking anything modified.
574
+ *
575
+ * Called internally after a document is returned from mongodb. Normally,
576
+ * you do **not** need to call this function on your own.
577
+ *
578
+ * This function triggers `init` [middleware](/docs/middleware.html).
579
+ * Note that `init` hooks are [synchronous](/docs/middleware.html#synchronous).
580
+ *
581
+ * @param {Object} doc document returned by mongo
582
+ * @api public
583
+ * @memberOf Document
584
+ * @instance
585
+ */
586
+
587
+ Document.prototype.init = function(doc, opts, fn) {
588
+ if (typeof opts === 'function') {
589
+ fn = opts;
590
+ opts = null;
591
+ }
592
+
593
+ this.$__init(doc, opts);
594
+
595
+ if (fn) {
596
+ fn(null, this);
597
+ }
598
+
599
+ return this;
600
+ };
601
+
602
+ /*!
603
+ * ignore
604
+ */
605
+
606
+ Document.prototype.$__init = function(doc, opts) {
607
+ this.isNew = false;
608
+ this.$init = true;
609
+ opts = opts || {};
610
+
611
+ // handle docs with populated paths
612
+ // If doc._id is not null or undefined
613
+ if (doc._id != null && opts.populated && opts.populated.length) {
614
+ const id = String(doc._id);
615
+ for (const item of opts.populated) {
616
+ if (item.isVirtual) {
617
+ this.populated(item.path, utils.getValue(item.path, doc), item);
618
+ } else {
619
+ this.populated(item.path, item._docs[id], item);
620
+ }
621
+
622
+ if (item._childDocs == null) {
623
+ continue;
624
+ }
625
+ for (const child of item._childDocs) {
626
+ if (child == null || child.$__ == null) {
627
+ continue;
628
+ }
629
+ child.$__.parent = this;
630
+ }
631
+ item._childDocs = [];
632
+ }
633
+ }
634
+
635
+ init(this, doc, this._doc, opts);
636
+
637
+ markArraySubdocsPopulated(this, opts.populated);
638
+
639
+ this.emit('init', this);
640
+ this.constructor.emit('init', this);
641
+
642
+ this.$__._id = this._id;
643
+ return this;
644
+ };
645
+
646
+ /*!
647
+ * If populating a path within a document array, make sure each
648
+ * subdoc within the array knows its subpaths are populated.
649
+ *
650
+ * ####Example:
651
+ * const doc = await Article.findOne().populate('comments.author');
652
+ * doc.comments[0].populated('author'); // Should be set
653
+ */
654
+
655
+ function markArraySubdocsPopulated(doc, populated) {
656
+ if (doc._id == null || populated == null || populated.length === 0) {
657
+ return;
658
+ }
659
+
660
+ const id = String(doc._id);
661
+ for (const item of populated) {
662
+ if (item.isVirtual) {
663
+ continue;
664
+ }
665
+ const path = item.path;
666
+ const pieces = path.split('.');
667
+ for (let i = 0; i < pieces.length - 1; ++i) {
668
+ const subpath = pieces.slice(0, i + 1).join('.');
669
+ const rest = pieces.slice(i + 1).join('.');
670
+ const val = doc.get(subpath);
671
+ if (val == null) {
672
+ continue;
673
+ }
674
+
675
+ if (val.isMongooseDocumentArray) {
676
+ for (let j = 0; j < val.length; ++j) {
677
+ val[j].populated(rest, item._docs[id] == null ? [] : item._docs[id][j], item);
678
+ }
679
+ break;
680
+ }
681
+ }
682
+ }
683
+ }
684
+
685
+ /*!
686
+ * Init helper.
687
+ *
688
+ * @param {Object} self document instance
689
+ * @param {Object} obj raw mongodb doc
690
+ * @param {Object} doc object we are initializing
691
+ * @api private
692
+ */
693
+
694
+ function init(self, obj, doc, opts, prefix) {
695
+ prefix = prefix || '';
696
+
697
+ const keys = Object.keys(obj);
698
+ const len = keys.length;
699
+ let schema;
700
+ let path;
701
+ let i;
702
+ let index = 0;
703
+
704
+ while (index < len) {
705
+ _init(index++);
706
+ }
707
+
708
+ function _init(index) {
709
+ i = keys[index];
710
+ path = prefix + i;
711
+ schema = self.$__schema.path(path);
712
+
713
+ // Should still work if not a model-level discriminator, but should not be
714
+ // necessary. This is *only* to catch the case where we queried using the
715
+ // base model and the discriminated model has a projection
716
+ if (self.$__schema.$isRootDiscriminator && !self.$__isSelected(path)) {
717
+ return;
718
+ }
719
+
720
+ if (!schema && utils.isPOJO(obj[i])) {
721
+ // assume nested object
722
+ if (!doc[i]) {
723
+ doc[i] = {};
724
+ }
725
+ init(self, obj[i], doc[i], opts, path + '.');
726
+ } else if (!schema) {
727
+ doc[i] = obj[i];
728
+ } else {
729
+ if (obj[i] === null) {
730
+ doc[i] = schema._castNullish(null);
731
+ } else if (obj[i] !== undefined) {
732
+ const intCache = obj[i].$__ || {};
733
+ const wasPopulated = intCache.wasPopulated || null;
734
+
735
+ if (schema && !wasPopulated) {
736
+ try {
737
+ doc[i] = schema.cast(obj[i], self, true);
738
+ } catch (e) {
739
+ self.invalidate(e.path, new validator({
740
+ path: e.path,
741
+ message: e.message,
742
+ type: 'cast',
743
+ value: e.value,
744
+ reason: e
745
+ }));
746
+ }
747
+ } else {
748
+ doc[i] = obj[i];
749
+ }
750
+ }
751
+ // mark as hydrated
752
+ if (!self.isModified(path)) {
753
+ self.$__.activePaths.init(path);
754
+ }
755
+ }
756
+ }
757
+ }
758
+
759
+ /**
760
+ * Sends an update command with this document `_id` as the query selector.
761
+ *
762
+ * ####Example:
763
+ *
764
+ * weirdCar.update({$inc: {wheels:1}}, { w: 1 }, callback);
765
+ *
766
+ * ####Valid options:
767
+ *
768
+ * - same as in [Model.update](#model_Model.update)
769
+ *
770
+ * @see Model.update #model_Model.update
771
+ * @param {Object} doc
772
+ * @param {Object} options
773
+ * @param {Function} callback
774
+ * @return {Query}
775
+ * @api public
776
+ * @memberOf Document
777
+ * @instance
778
+ */
779
+
780
+ Document.prototype.update = function update() {
781
+ const args = utils.args(arguments);
782
+ args.unshift({ _id: this._id });
783
+ const query = this.constructor.update.apply(this.constructor, args);
784
+
785
+ if (this.$session() != null) {
786
+ if (!('session' in query.options)) {
787
+ query.options.session = this.$session();
788
+ }
789
+ }
790
+
791
+ return query;
792
+ };
793
+
794
+ /**
795
+ * Sends an updateOne command with this document `_id` as the query selector.
796
+ *
797
+ * ####Example:
798
+ *
799
+ * weirdCar.updateOne({$inc: {wheels:1}}, { w: 1 }, callback);
800
+ *
801
+ * ####Valid options:
802
+ *
803
+ * - same as in [Model.updateOne](#model_Model.updateOne)
804
+ *
805
+ * @see Model.updateOne #model_Model.updateOne
806
+ * @param {Object} doc
807
+ * @param {Object} [options] optional see [`Query.prototype.setOptions()`](http://mongoosejs.com/docs/api.html#query_Query-setOptions)
808
+ * @param {Object} [options.lean] if truthy, mongoose will return the document as a plain JavaScript object rather than a mongoose document. See [`Query.lean()`](/docs/api.html#query_Query-lean) and the [Mongoose lean tutorial](/docs/tutorials/lean.html).
809
+ * @param {Boolean|String} [options.strict] overwrites the schema's [strict mode option](http://mongoosejs.com/docs/guide.html#strict)
810
+ * @param {Boolean} [options.omitUndefined=false] If true, delete any properties whose value is `undefined` when casting an update. In other words, if this is set, Mongoose will delete `baz` from the update in `Model.updateOne({}, { foo: 'bar', baz: undefined })` before sending the update to the server.
811
+ * @param {Boolean} [options.timestamps=null] If set to `false` and [schema-level timestamps](/docs/guide.html#timestamps) are enabled, skip timestamps for this update. Note that this allows you to overwrite timestamps. Does nothing if schema-level timestamps are not set.
812
+ * @param {Function} callback
813
+ * @return {Query}
814
+ * @api public
815
+ * @memberOf Document
816
+ * @instance
817
+ */
818
+
819
+ Document.prototype.updateOne = function updateOne(doc, options, callback) {
820
+ const query = this.constructor.updateOne({ _id: this._id }, doc, options);
821
+ query.pre(cb => {
822
+ this.constructor._middleware.execPre('updateOne', this, [this], cb);
823
+ });
824
+ query.post(cb => {
825
+ this.constructor._middleware.execPost('updateOne', this, [this], {}, cb);
826
+ });
827
+
828
+ if (this.$session() != null) {
829
+ if (!('session' in query.options)) {
830
+ query.options.session = this.$session();
831
+ }
832
+ }
833
+
834
+ if (callback != null) {
835
+ return query.exec(callback);
836
+ }
837
+
838
+ return query;
839
+ };
840
+
841
+ /**
842
+ * Sends a replaceOne command with this document `_id` as the query selector.
843
+ *
844
+ * ####Valid options:
845
+ *
846
+ * - same as in [Model.replaceOne](https://mongoosejs.com/docs/api/model.html#model_Model.replaceOne)
847
+ *
848
+ * @see Model.replaceOne #model_Model.replaceOne
849
+ * @param {Object} doc
850
+ * @param {Object} options
851
+ * @param {Function} callback
852
+ * @return {Query}
853
+ * @api public
854
+ * @memberOf Document
855
+ * @instance
856
+ */
857
+
858
+ Document.prototype.replaceOne = function replaceOne() {
859
+ const args = utils.args(arguments);
860
+ args.unshift({ _id: this._id });
861
+ return this.constructor.replaceOne.apply(this.constructor, args);
862
+ };
863
+
864
+ /**
865
+ * Getter/setter around the session associated with this document. Used to
866
+ * automatically set `session` if you `save()` a doc that you got from a
867
+ * query with an associated session.
868
+ *
869
+ * ####Example:
870
+ *
871
+ * const session = MyModel.startSession();
872
+ * const doc = await MyModel.findOne().session(session);
873
+ * doc.$session() === session; // true
874
+ * doc.$session(null);
875
+ * doc.$session() === null; // true
876
+ *
877
+ * If this is a top-level document, setting the session propagates to all child
878
+ * docs.
879
+ *
880
+ * @param {ClientSession} [session] overwrite the current session
881
+ * @return {ClientSession}
882
+ * @method $session
883
+ * @api public
884
+ * @memberOf Document
885
+ */
886
+
887
+ Document.prototype.$session = function $session(session) {
888
+ if (arguments.length === 0) {
889
+ if (this.$__.session != null && this.$__.session.hasEnded) {
890
+ this.$__.session = null;
891
+ return null;
892
+ }
893
+ return this.$__.session;
894
+ }
895
+
896
+ if (session != null && session.hasEnded) {
897
+ throw new index('Cannot set a document\'s session to a session that has ended. Make sure you haven\'t ' +
898
+ 'called `endSession()` on the session you are passing to `$session()`.');
899
+ }
900
+
901
+ this.$__.session = session;
902
+
903
+ if (!this.ownerDocument) {
904
+ const subdocs = this.$getAllSubdocs();
905
+ for (const child of subdocs) {
906
+ child.$session(session);
907
+ }
908
+ }
909
+
910
+ return session;
911
+ };
912
+
913
+ /**
914
+ * Overwrite all values in this document with the values of `obj`, except
915
+ * for immutable properties. Behaves similarly to `set()`, except for it
916
+ * unsets all properties that aren't in `obj`.
917
+ *
918
+ * @param {Object} obj the object to overwrite this document with
919
+ * @method overwrite
920
+ * @name overwrite
921
+ * @memberOf Document
922
+ * @instance
923
+ * @api public
924
+ */
925
+
926
+ Document.prototype.overwrite = function overwrite(obj) {
927
+ const keys = Array.from(new Set(Object.keys(this._doc).concat(Object.keys(obj))));
928
+
929
+ for (const key of keys) {
930
+ if (key === '_id') {
931
+ continue;
932
+ }
933
+ // Explicitly skip version key
934
+ if (this.$__schema.options.versionKey && key === this.$__schema.options.versionKey) {
935
+ continue;
936
+ }
937
+ if (this.$__schema.options.discriminatorKey && key === this.$__schema.options.discriminatorKey) {
938
+ continue;
939
+ }
940
+ this.$set(key, obj[key]);
941
+ }
942
+
943
+ return this;
944
+ };
945
+
946
+ /**
947
+ * Alias for `set()`, used internally to avoid conflicts
948
+ *
949
+ * @param {String|Object} path path or object of key/vals to set
950
+ * @param {Any} val the value to set
951
+ * @param {Schema|String|Number|Buffer|*} [type] optionally specify a type for "on-the-fly" attributes
952
+ * @param {Object} [options] optionally specify options that modify the behavior of the set
953
+ * @method $set
954
+ * @name $set
955
+ * @memberOf Document
956
+ * @instance
957
+ * @api public
958
+ */
959
+
960
+ Document.prototype.$set = function $set(path, val, type, options) {
961
+ if (utils.isPOJO(type)) {
962
+ options = type;
963
+ type = undefined;
964
+ }
965
+
966
+ options = options || {};
967
+ const merge = options.merge;
968
+ const adhoc = type && type !== true;
969
+ const constructing = type === true;
970
+ const typeKey = this.$__schema.options.typeKey;
971
+ let adhocs;
972
+ let keys;
973
+ let i = 0;
974
+ let pathtype;
975
+ let key;
976
+ let prefix;
977
+
978
+ const strict$1 = 'strict' in options
979
+ ? options.strict
980
+ : this.$__.strictMode;
981
+
982
+ if (adhoc) {
983
+ adhocs = this.$__.adhocPaths || (this.$__.adhocPaths = {});
984
+ adhocs[path] = this.$__schema.interpretAsType(path, type, this.$__schema.options);
985
+ }
986
+
987
+ if (path == null) {
988
+ const _ = path;
989
+ path = val;
990
+ val = _;
991
+ } else if (typeof path !== 'string') {
992
+ // new Document({ key: val })
993
+ if (path instanceof Document) {
994
+ if (path.$__isNested) {
995
+ path = path.toObject();
996
+ } else {
997
+ path = path._doc;
998
+ }
999
+ }
1000
+ if (path == null) {
1001
+ const _ = path;
1002
+ path = val;
1003
+ val = _;
1004
+ }
1005
+
1006
+ prefix = val ? val + '.' : '';
1007
+ keys = Object.keys(path);
1008
+ const len = keys.length;
1009
+
1010
+ // `_skipMinimizeTopLevel` is because we may have deleted the top-level
1011
+ // nested key to ensure key order.
1012
+ const _skipMinimizeTopLevel = get(options, '_skipMinimizeTopLevel', false);
1013
+ if (len === 0 && _skipMinimizeTopLevel) {
1014
+ delete options._skipMinimizeTopLevel;
1015
+ if (val) {
1016
+ this.$set(val, {});
1017
+ }
1018
+ return this;
1019
+ }
1020
+
1021
+ for (let i = 0; i < len; ++i) {
1022
+ key = keys[i];
1023
+ const pathName = prefix + key;
1024
+ pathtype = this.$__schema.pathType(pathName);
1025
+
1026
+ // On initial set, delete any nested keys if we're going to overwrite
1027
+ // them to ensure we keep the user's key order.
1028
+ if (type === true &&
1029
+ !prefix &&
1030
+ path[key] != null &&
1031
+ pathtype === 'nested' &&
1032
+ this._doc[key] != null &&
1033
+ Object.keys(this._doc[key]).length === 0) {
1034
+ delete this._doc[key];
1035
+ // Make sure we set `{}` back even if we minimize re: gh-8565
1036
+ options = Object.assign({}, options, { _skipMinimizeTopLevel: true });
1037
+ }
1038
+
1039
+ const someCondition = typeof path[key] === 'object' &&
1040
+ !utils.isNativeObject(path[key]) &&
1041
+ !utils.isMongooseType(path[key]) &&
1042
+ path[key] != null &&
1043
+ pathtype !== 'virtual' &&
1044
+ pathtype !== 'real' &&
1045
+ pathtype !== 'adhocOrUndefined' &&
1046
+ !(this.$__path(pathName) instanceof mixed) &&
1047
+ !(this.$__schema.paths[pathName] &&
1048
+ this.$__schema.paths[pathName].options &&
1049
+ this.$__schema.paths[pathName].options.ref);
1050
+
1051
+ if (someCondition) {
1052
+ this.$__.$setCalled.add(prefix + key);
1053
+ this.$set(path[key], prefix + key, constructing, options);
1054
+ } else if (strict$1) {
1055
+ // Don't overwrite defaults with undefined keys (gh-3981) (gh-9039)
1056
+ if (constructing && path[key] === void 0 &&
1057
+ this.get(pathName) !== void 0) {
1058
+ continue;
1059
+ }
1060
+
1061
+ if (pathtype === 'adhocOrUndefined') {
1062
+ pathtype = getEmbeddedDiscriminatorPath(this, pathName, { typeOnly: true });
1063
+ }
1064
+
1065
+ if (pathtype === 'real' || pathtype === 'virtual') {
1066
+ // Check for setting single embedded schema to document (gh-3535)
1067
+ let p = path[key];
1068
+ if (this.$__schema.paths[pathName] &&
1069
+ this.$__schema.paths[pathName].$isSingleNested &&
1070
+ path[key] instanceof Document) {
1071
+ p = p.toObject({ virtuals: false, transform: false });
1072
+ }
1073
+ this.$set(prefix + key, p, constructing, options);
1074
+ } else if (pathtype === 'nested' && path[key] instanceof Document) {
1075
+ this.$set(prefix + key,
1076
+ path[key].toObject({ transform: false }), constructing, options);
1077
+ } else if (strict$1 === 'throw') {
1078
+ if (pathtype === 'nested') {
1079
+ throw new objectExpected(key, path[key]);
1080
+ } else {
1081
+ throw new strict(key);
1082
+ }
1083
+ }
1084
+ } else if (path[key] !== void 0) {
1085
+ this.$set(prefix + key, path[key], constructing, options);
1086
+ }
1087
+ }
1088
+
1089
+ return this;
1090
+ } else {
1091
+ this.$__.$setCalled.add(path);
1092
+ }
1093
+
1094
+ let pathType = this.$__schema.pathType(path);
1095
+ if (pathType === 'adhocOrUndefined') {
1096
+ pathType = getEmbeddedDiscriminatorPath(this, path, { typeOnly: true });
1097
+ }
1098
+
1099
+ // Assume this is a Mongoose document that was copied into a POJO using
1100
+ // `Object.assign()` or `{...doc}`
1101
+ val = handleSpreadDoc(val);
1102
+
1103
+ if (pathType === 'nested' && val) {
1104
+ if (typeof val === 'object' && val != null) {
1105
+ const hasPriorVal = this.$__.savedState != null && this.$__.savedState.hasOwnProperty(path);
1106
+ if (this.$__.savedState != null && !this.isNew && !this.$__.savedState.hasOwnProperty(path)) {
1107
+ const priorVal = this.$__getValue(path);
1108
+ this.$__.savedState[path] = priorVal;
1109
+
1110
+ const keys = Object.keys(priorVal || {});
1111
+ for (const key of keys) {
1112
+ this.$__.savedState[path + '.' + key] = priorVal[key];
1113
+ }
1114
+ }
1115
+
1116
+ if (!merge) {
1117
+ this.$__setValue(path, null);
1118
+ cleanModifiedSubpaths(this, path);
1119
+ } else {
1120
+ return this.$set(val, path, constructing);
1121
+ }
1122
+
1123
+ const keys = Object.keys(val);
1124
+ this.$__setValue(path, {});
1125
+ for (const key of keys) {
1126
+ this.$set(path + '.' + key, val[key], constructing);
1127
+ }
1128
+
1129
+ if (hasPriorVal && utils.deepEqual(this.$__.savedState[path], val)) {
1130
+ this.unmarkModified(path);
1131
+ } else {
1132
+ this.markModified(path);
1133
+ }
1134
+ cleanModifiedSubpaths(this, path, { skipDocArrays: true });
1135
+ return this;
1136
+ }
1137
+ this.invalidate(path, new index.CastError('Object', val, path));
1138
+ return this;
1139
+ }
1140
+
1141
+ let schema;
1142
+ const parts = path.indexOf('.') === -1 ? [path] : path.split('.');
1143
+
1144
+ // Might need to change path for top-level alias
1145
+ if (typeof this.$__schema.aliases[parts[0]] == 'string') {
1146
+ parts[0] = this.$__schema.aliases[parts[0]];
1147
+ }
1148
+
1149
+ if (pathType === 'adhocOrUndefined' && strict$1) {
1150
+ // check for roots that are Mixed types
1151
+ let mixed$1;
1152
+
1153
+ for (i = 0; i < parts.length; ++i) {
1154
+ const subpath = parts.slice(0, i + 1).join('.');
1155
+
1156
+ // If path is underneath a virtual, bypass everything and just set it.
1157
+ if (i + 1 < parts.length && this.$__schema.pathType(subpath) === 'virtual') {
1158
+ index$1.set(path, val, this);
1159
+ return this;
1160
+ }
1161
+
1162
+ schema = this.$__schema.path(subpath);
1163
+ if (schema == null) {
1164
+ continue;
1165
+ }
1166
+
1167
+ if (schema instanceof mixed) {
1168
+ // allow changes to sub paths of mixed types
1169
+ mixed$1 = true;
1170
+ break;
1171
+ }
1172
+ }
1173
+
1174
+ if (schema == null) {
1175
+ // Check for embedded discriminators
1176
+ schema = getEmbeddedDiscriminatorPath(this, path);
1177
+ }
1178
+
1179
+ if (!mixed$1 && !schema) {
1180
+ if (strict$1 === 'throw') {
1181
+ throw new strict(path);
1182
+ }
1183
+ return this;
1184
+ }
1185
+ } else if (pathType === 'virtual') {
1186
+ schema = this.$__schema.virtualpath(path);
1187
+ schema.applySetters(val, this);
1188
+ return this;
1189
+ } else {
1190
+ schema = this.$__path(path);
1191
+ }
1192
+
1193
+ // gh-4578, if setting a deeply nested path that doesn't exist yet, create it
1194
+ let cur = this._doc;
1195
+ let curPath = '';
1196
+ for (i = 0; i < parts.length - 1; ++i) {
1197
+ cur = cur[parts[i]];
1198
+ curPath += (curPath.length > 0 ? '.' : '') + parts[i];
1199
+ if (!cur) {
1200
+ this.$set(curPath, {});
1201
+ // Hack re: gh-5800. If nested field is not selected, it probably exists
1202
+ // so `MongoError: cannot use the part (nested of nested.num) to
1203
+ // traverse the element ({nested: null})` is not likely. If user gets
1204
+ // that error, its their fault for now. We should reconsider disallowing
1205
+ // modifying not selected paths for 6.x
1206
+ if (!this.$__isSelected(curPath)) {
1207
+ this.unmarkModified(curPath);
1208
+ }
1209
+ cur = this.$__getValue(curPath);
1210
+ }
1211
+ }
1212
+
1213
+ let pathToMark;
1214
+
1215
+ // When using the $set operator the path to the field must already exist.
1216
+ // Else mongodb throws: "LEFT_SUBFIELD only supports Object"
1217
+
1218
+ if (parts.length <= 1) {
1219
+ pathToMark = path;
1220
+ } else {
1221
+ for (i = 0; i < parts.length; ++i) {
1222
+ const subpath = parts.slice(0, i + 1).join('.');
1223
+ if (this.get(subpath, null, { getters: false }) === null) {
1224
+ pathToMark = subpath;
1225
+ break;
1226
+ }
1227
+ }
1228
+
1229
+ if (!pathToMark) {
1230
+ pathToMark = path;
1231
+ }
1232
+ }
1233
+
1234
+ // if this doc is being constructed we should not trigger getters
1235
+ const priorVal = (() => {
1236
+ if (this.$__.$options.priorDoc != null) {
1237
+ return this.$__.$options.priorDoc.$__getValue(path);
1238
+ }
1239
+ if (constructing) {
1240
+ return void 0;
1241
+ }
1242
+ return this.$__getValue(path);
1243
+ })();
1244
+
1245
+ if (!schema) {
1246
+ this.$__set(pathToMark, path, constructing, parts, schema, val, priorVal);
1247
+ return this;
1248
+ }
1249
+
1250
+ // If overwriting a subdocument path, make sure to clear out
1251
+ // any errors _before_ setting, so new errors that happen
1252
+ // get persisted. Re: #9080
1253
+ if (schema.$isSingleNested || schema.$isMongooseArray) {
1254
+ _markValidSubpaths(this, path);
1255
+ }
1256
+
1257
+ if (schema.$isSingleNested && val != null && merge) {
1258
+ if (val instanceof Document) {
1259
+ val = val.toObject({ virtuals: false, transform: false });
1260
+ }
1261
+ const keys = Object.keys(val);
1262
+ for (const key of keys) {
1263
+ this.$set(path + '.' + key, val[key], constructing, options);
1264
+ }
1265
+
1266
+ return this;
1267
+ }
1268
+
1269
+ let shouldSet = true;
1270
+ try {
1271
+ // If the user is trying to set a ref path to a document with
1272
+ // the correct model name, treat it as populated
1273
+ const refMatches = (() => {
1274
+ if (schema.options == null) {
1275
+ return false;
1276
+ }
1277
+ if (!(val instanceof Document)) {
1278
+ return false;
1279
+ }
1280
+ const model = val.constructor;
1281
+
1282
+ // Check ref
1283
+ const ref = schema.options.ref;
1284
+ if (ref != null && (ref === model.modelName || ref === model.baseModelName)) {
1285
+ return true;
1286
+ }
1287
+
1288
+ // Check refPath
1289
+ const refPath = schema.options.refPath;
1290
+ if (refPath == null) {
1291
+ return false;
1292
+ }
1293
+ const modelName = val.get(refPath);
1294
+ return modelName === model.modelName || modelName === model.baseModelName;
1295
+ })();
1296
+
1297
+ let didPopulate = false;
1298
+ if (refMatches && val instanceof Document) {
1299
+ this.populated(path, val._id, { [populateModelSymbol]: val.constructor });
1300
+ val.$__.wasPopulated = true;
1301
+ didPopulate = true;
1302
+ }
1303
+
1304
+ let popOpts;
1305
+ if (schema.options &&
1306
+ Array.isArray(schema.options[typeKey]) &&
1307
+ schema.options[typeKey].length &&
1308
+ schema.options[typeKey][0].ref &&
1309
+ _isManuallyPopulatedArray(val, schema.options[typeKey][0].ref)) {
1310
+ popOpts = { [populateModelSymbol]: val[0].constructor };
1311
+ this.populated(path, val.map(function(v) { return v._id; }), popOpts);
1312
+
1313
+ for (const doc of val) {
1314
+ doc.$__.wasPopulated = true;
1315
+ }
1316
+ didPopulate = true;
1317
+ }
1318
+
1319
+ if (this.$__schema.singleNestedPaths[path] == null) {
1320
+ // If this path is underneath a single nested schema, we'll call the setter
1321
+ // later in `$__set()` because we don't take `_doc` when we iterate through
1322
+ // a single nested doc. That's to make sure we get the correct context.
1323
+ // Otherwise we would double-call the setter, see gh-7196.
1324
+ val = schema.applySetters(val, this, false, priorVal);
1325
+ }
1326
+
1327
+ if (schema.$isMongooseDocumentArray &&
1328
+ Array.isArray(val) &&
1329
+ val.length > 0 &&
1330
+ val[0] != null &&
1331
+ val[0].$__ != null &&
1332
+ val[0].$__.populated != null) {
1333
+ const populatedPaths = Object.keys(val[0].$__.populated);
1334
+ for (const populatedPath of populatedPaths) {
1335
+ this.populated(path + '.' + populatedPath,
1336
+ val.map(v => v.populated(populatedPath)),
1337
+ val[0].$__.populated[populatedPath].options);
1338
+ }
1339
+ didPopulate = true;
1340
+ }
1341
+
1342
+ if (!didPopulate && this.$__.populated) {
1343
+ // If this array partially contains populated documents, convert them
1344
+ // all to ObjectIds re: #8443
1345
+ if (Array.isArray(val) && this.$__.populated[path]) {
1346
+ for (let i = 0; i < val.length; ++i) {
1347
+ if (val[i] instanceof Document) {
1348
+ val[i] = val[i]._id;
1349
+ }
1350
+ }
1351
+ }
1352
+ delete this.$__.populated[path];
1353
+ }
1354
+
1355
+ if (schema.$isSingleNested && val != null) {
1356
+ _checkImmutableSubpaths(val, schema, priorVal);
1357
+ }
1358
+
1359
+ this.$markValid(path);
1360
+ } catch (e) {
1361
+ if (e instanceof index.StrictModeError && e.isImmutableError) {
1362
+ this.invalidate(path, e);
1363
+ } else if (e instanceof index.CastError) {
1364
+ this.invalidate(e.path, e);
1365
+ if (e.$originalErrorPath) {
1366
+ this.invalidate(path,
1367
+ new index.CastError(schema.instance, val, path, e.$originalErrorPath));
1368
+ }
1369
+ } else {
1370
+ this.invalidate(path,
1371
+ new index.CastError(schema.instance, val, path, e));
1372
+ }
1373
+ shouldSet = false;
1374
+ }
1375
+
1376
+ if (shouldSet) {
1377
+ this.$__set(pathToMark, path, constructing, parts, schema, val, priorVal);
1378
+
1379
+ if (this.$__.savedState != null) {
1380
+ if (!this.isNew && !this.$__.savedState.hasOwnProperty(path)) {
1381
+ this.$__.savedState[path] = priorVal;
1382
+ } else if (this.$__.savedState.hasOwnProperty(path) && utils.deepEqual(val, this.$__.savedState[path])) {
1383
+ this.unmarkModified(path);
1384
+ }
1385
+ }
1386
+ }
1387
+
1388
+ if (schema.$isSingleNested && (this.isDirectModified(path) || val == null)) {
1389
+ cleanModifiedSubpaths(this, path);
1390
+ }
1391
+
1392
+ return this;
1393
+ };
1394
+
1395
+ /*!
1396
+ * ignore
1397
+ */
1398
+
1399
+ function _isManuallyPopulatedArray(val, ref) {
1400
+ if (!Array.isArray(val)) {
1401
+ return false;
1402
+ }
1403
+ if (val.length === 0) {
1404
+ return false;
1405
+ }
1406
+
1407
+ for (const el of val) {
1408
+ if (!(el instanceof Document)) {
1409
+ return false;
1410
+ }
1411
+ const modelName = el.constructor.modelName;
1412
+ if (modelName == null) {
1413
+ return false;
1414
+ }
1415
+ if (el.constructor.modelName != ref && el.constructor.baseModelName != ref) {
1416
+ return false;
1417
+ }
1418
+ }
1419
+
1420
+ return true;
1421
+ }
1422
+
1423
+ /**
1424
+ * Sets the value of a path, or many paths.
1425
+ *
1426
+ * ####Example:
1427
+ *
1428
+ * // path, value
1429
+ * doc.set(path, value)
1430
+ *
1431
+ * // object
1432
+ * doc.set({
1433
+ * path : value
1434
+ * , path2 : {
1435
+ * path : value
1436
+ * }
1437
+ * })
1438
+ *
1439
+ * // on-the-fly cast to number
1440
+ * doc.set(path, value, Number)
1441
+ *
1442
+ * // on-the-fly cast to string
1443
+ * doc.set(path, value, String)
1444
+ *
1445
+ * // changing strict mode behavior
1446
+ * doc.set(path, value, { strict: false });
1447
+ *
1448
+ * @param {String|Object} path path or object of key/vals to set
1449
+ * @param {Any} val the value to set
1450
+ * @param {Schema|String|Number|Buffer|*} [type] optionally specify a type for "on-the-fly" attributes
1451
+ * @param {Object} [options] optionally specify options that modify the behavior of the set
1452
+ * @api public
1453
+ * @method set
1454
+ * @memberOf Document
1455
+ * @instance
1456
+ */
1457
+
1458
+ Document.prototype.set = Document.prototype.$set;
1459
+
1460
+ /**
1461
+ * Determine if we should mark this change as modified.
1462
+ *
1463
+ * @return {Boolean}
1464
+ * @api private
1465
+ * @method $__shouldModify
1466
+ * @memberOf Document
1467
+ * @instance
1468
+ */
1469
+
1470
+ Document.prototype.$__shouldModify = function(pathToMark, path, constructing, parts, schema, val, priorVal) {
1471
+ if (this.isNew) {
1472
+ return true;
1473
+ }
1474
+
1475
+ // Re: the note about gh-7196, `val` is the raw value without casting or
1476
+ // setters if the full path is under a single nested subdoc because we don't
1477
+ // want to double run setters. So don't set it as modified. See gh-7264.
1478
+ if (this.$__schema.singleNestedPaths[path] != null) {
1479
+ return false;
1480
+ }
1481
+
1482
+ if (val === void 0 && !this.$__isSelected(path)) {
1483
+ // when a path is not selected in a query, its initial
1484
+ // value will be undefined.
1485
+ return true;
1486
+ }
1487
+
1488
+ if (val === void 0 && path in this.$__.activePaths.states.default) {
1489
+ // we're just unsetting the default value which was never saved
1490
+ return false;
1491
+ }
1492
+
1493
+ // gh-3992: if setting a populated field to a doc, don't mark modified
1494
+ // if they have the same _id
1495
+ if (this.populated(path) &&
1496
+ val instanceof Document &&
1497
+ deepEqual(val._id, priorVal)) {
1498
+ return false;
1499
+ }
1500
+
1501
+ if (!deepEqual(val, priorVal || utils.getValue(path, this))) {
1502
+ return true;
1503
+ }
1504
+
1505
+ if (!constructing &&
1506
+ val !== null &&
1507
+ val !== undefined &&
1508
+ path in this.$__.activePaths.states.default &&
1509
+ deepEqual(val, schema.getDefault(this, constructing))) {
1510
+ // a path with a default was $unset on the server
1511
+ // and the user is setting it to the same value again
1512
+ return true;
1513
+ }
1514
+ return false;
1515
+ };
1516
+
1517
+ /**
1518
+ * Handles the actual setting of the value and marking the path modified if appropriate.
1519
+ *
1520
+ * @api private
1521
+ * @method $__set
1522
+ * @memberOf Document
1523
+ * @instance
1524
+ */
1525
+
1526
+ Document.prototype.$__set = function(pathToMark, path, constructing, parts, schema, val, priorVal) {
1527
+ Embedded = Embedded || embedded;
1528
+
1529
+ const shouldModify = this.$__shouldModify(pathToMark, path, constructing, parts,
1530
+ schema, val, priorVal);
1531
+ const _this = this;
1532
+
1533
+ if (shouldModify) {
1534
+ this.markModified(pathToMark);
1535
+ if (val && val.isMongooseArray) {
1536
+ val._registerAtomic('$set', val);
1537
+
1538
+ // Update embedded document parent references (gh-5189)
1539
+ if (val.isMongooseDocumentArray) {
1540
+ val.forEach(function(item) {
1541
+ item && item.__parentArray && (item.__parentArray = val);
1542
+ });
1543
+ }
1544
+
1545
+ // Small hack for gh-1638: if we're overwriting the entire array, ignore
1546
+ // paths that were modified before the array overwrite
1547
+ this.$__.activePaths.forEach(function(modifiedPath) {
1548
+ if (modifiedPath.startsWith(path + '.')) {
1549
+ _this.$__.activePaths.ignore(modifiedPath);
1550
+ }
1551
+ });
1552
+ }
1553
+ }
1554
+
1555
+ let obj = this._doc;
1556
+ let i = 0;
1557
+ const l = parts.length;
1558
+ let cur = '';
1559
+
1560
+ for (; i < l; i++) {
1561
+ const next = i + 1;
1562
+ const last = next === l;
1563
+ cur += (cur ? '.' + parts[i] : parts[i]);
1564
+ if (specialProperties.has(parts[i])) {
1565
+ return;
1566
+ }
1567
+
1568
+ if (last) {
1569
+ if (obj instanceof Map) {
1570
+ obj.set(parts[i], val);
1571
+ } else {
1572
+ obj[parts[i]] = val;
1573
+ }
1574
+ } else {
1575
+ if (utils.isPOJO(obj[parts[i]])) {
1576
+ obj = obj[parts[i]];
1577
+ } else if (obj[parts[i]] && obj[parts[i]] instanceof Embedded) {
1578
+ obj = obj[parts[i]];
1579
+ } else if (obj[parts[i]] && obj[parts[i]].$isSingleNested) {
1580
+ obj = obj[parts[i]];
1581
+ } else if (obj[parts[i]] && Array.isArray(obj[parts[i]])) {
1582
+ obj = obj[parts[i]];
1583
+ } else {
1584
+ obj[parts[i]] = obj[parts[i]] || {};
1585
+ obj = obj[parts[i]];
1586
+ }
1587
+ }
1588
+ }
1589
+ };
1590
+
1591
+ /**
1592
+ * Gets a raw value from a path (no getters)
1593
+ *
1594
+ * @param {String} path
1595
+ * @api private
1596
+ */
1597
+
1598
+ Document.prototype.$__getValue = function(path) {
1599
+ return utils.getValue(path, this._doc);
1600
+ };
1601
+
1602
+ /**
1603
+ * Sets a raw value for a path (no casting, setters, transformations)
1604
+ *
1605
+ * @param {String} path
1606
+ * @param {Object} value
1607
+ * @api private
1608
+ */
1609
+
1610
+ Document.prototype.$__setValue = function(path, val) {
1611
+ utils.setValue(path, val, this._doc);
1612
+ return this;
1613
+ };
1614
+
1615
+ /**
1616
+ * Returns the value of a path.
1617
+ *
1618
+ * ####Example
1619
+ *
1620
+ * // path
1621
+ * doc.get('age') // 47
1622
+ *
1623
+ * // dynamic casting to a string
1624
+ * doc.get('age', String) // "47"
1625
+ *
1626
+ * @param {String} path
1627
+ * @param {Schema|String|Number|Buffer|*} [type] optionally specify a type for on-the-fly attributes
1628
+ * @param {Object} [options]
1629
+ * @param {Boolean} [options.virtuals=false] Apply virtuals before getting this path
1630
+ * @param {Boolean} [options.getters=true] If false, skip applying getters and just get the raw value
1631
+ * @api public
1632
+ */
1633
+
1634
+ Document.prototype.get = function(path, type, options) {
1635
+ let adhoc;
1636
+ options = options || {};
1637
+ if (type) {
1638
+ adhoc = this.$__schema.interpretAsType(path, type, this.$__schema.options);
1639
+ }
1640
+
1641
+ let schema = this.$__path(path);
1642
+ if (schema == null) {
1643
+ schema = this.$__schema.virtualpath(path);
1644
+ }
1645
+ if (schema instanceof mixed) {
1646
+ const virtual = this.$__schema.virtualpath(path);
1647
+ if (virtual != null) {
1648
+ schema = virtual;
1649
+ }
1650
+ }
1651
+ const pieces = path.indexOf('.') === -1 ? [path] : path.split('.');
1652
+ let obj = this._doc;
1653
+
1654
+ if (schema instanceof virtualtype) {
1655
+ return schema.applyGetters(void 0, this);
1656
+ }
1657
+
1658
+ // Might need to change path for top-level alias
1659
+ if (typeof this.$__schema.aliases[pieces[0]] == 'string') {
1660
+ pieces[0] = this.$__schema.aliases[pieces[0]];
1661
+ }
1662
+
1663
+ for (let i = 0, l = pieces.length; i < l; i++) {
1664
+ if (obj && obj._doc) {
1665
+ obj = obj._doc;
1666
+ }
1667
+
1668
+ if (obj == null) {
1669
+ obj = void 0;
1670
+ } else if (obj instanceof Map) {
1671
+ obj = obj.get(pieces[i], { getters: false });
1672
+ } else if (i === l - 1) {
1673
+ obj = utils.getValue(pieces[i], obj);
1674
+ } else {
1675
+ obj = obj[pieces[i]];
1676
+ }
1677
+ }
1678
+
1679
+ if (adhoc) {
1680
+ obj = adhoc.cast(obj);
1681
+ }
1682
+
1683
+ if (schema != null && options.getters !== false) {
1684
+ obj = schema.applyGetters(obj, this);
1685
+ } else if (this.$__schema.nested[path] && options.virtuals) {
1686
+ // Might need to apply virtuals if this is a nested path
1687
+ return applyVirtuals(this, utils.clone(obj) || {}, { path: path });
1688
+ }
1689
+
1690
+ return obj;
1691
+ };
1692
+
1693
+ /*!
1694
+ * ignore
1695
+ */
1696
+
1697
+ Document.prototype[getSymbol] = Document.prototype.get;
1698
+
1699
+ /**
1700
+ * Returns the schematype for the given `path`.
1701
+ *
1702
+ * @param {String} path
1703
+ * @api private
1704
+ * @method $__path
1705
+ * @memberOf Document
1706
+ * @instance
1707
+ */
1708
+
1709
+ Document.prototype.$__path = function(path) {
1710
+ const adhocs = this.$__.adhocPaths;
1711
+ const adhocType = adhocs && adhocs.hasOwnProperty(path) ? adhocs[path] : null;
1712
+
1713
+ if (adhocType) {
1714
+ return adhocType;
1715
+ }
1716
+ return this.$__schema.path(path);
1717
+ };
1718
+
1719
+ /**
1720
+ * Marks the path as having pending changes to write to the db.
1721
+ *
1722
+ * _Very helpful when using [Mixed](./schematypes.html#mixed) types._
1723
+ *
1724
+ * ####Example:
1725
+ *
1726
+ * doc.mixed.type = 'changed';
1727
+ * doc.markModified('mixed.type');
1728
+ * doc.save() // changes to mixed.type are now persisted
1729
+ *
1730
+ * @param {String} path the path to mark modified
1731
+ * @param {Document} [scope] the scope to run validators with
1732
+ * @api public
1733
+ */
1734
+
1735
+ Document.prototype.markModified = function(path, scope) {
1736
+ this.$__.activePaths.modify(path);
1737
+ if (scope != null && !this.ownerDocument) {
1738
+ this.$__.pathsToScopes[path] = scope;
1739
+ }
1740
+ };
1741
+
1742
+ /**
1743
+ * Clears the modified state on the specified path.
1744
+ *
1745
+ * ####Example:
1746
+ *
1747
+ * doc.foo = 'bar';
1748
+ * doc.unmarkModified('foo');
1749
+ * doc.save(); // changes to foo will not be persisted
1750
+ *
1751
+ * @param {String} path the path to unmark modified
1752
+ * @api public
1753
+ */
1754
+
1755
+ Document.prototype.unmarkModified = function(path) {
1756
+ this.$__.activePaths.init(path);
1757
+ delete this.$__.pathsToScopes[path];
1758
+ };
1759
+
1760
+ /**
1761
+ * Don't run validation on this path or persist changes to this path.
1762
+ *
1763
+ * ####Example:
1764
+ *
1765
+ * doc.foo = null;
1766
+ * doc.$ignore('foo');
1767
+ * doc.save(); // changes to foo will not be persisted and validators won't be run
1768
+ *
1769
+ * @memberOf Document
1770
+ * @instance
1771
+ * @method $ignore
1772
+ * @param {String} path the path to ignore
1773
+ * @api public
1774
+ */
1775
+
1776
+ Document.prototype.$ignore = function(path) {
1777
+ this.$__.activePaths.ignore(path);
1778
+ };
1779
+
1780
+ /**
1781
+ * Returns the list of paths that have been directly modified. A direct
1782
+ * modified path is a path that you explicitly set, whether via `doc.foo = 'bar'`,
1783
+ * `Object.assign(doc, { foo: 'bar' })`, or `doc.set('foo', 'bar')`.
1784
+ *
1785
+ * A path `a` may be in `modifiedPaths()` but not in `directModifiedPaths()`
1786
+ * because a child of `a` was directly modified.
1787
+ *
1788
+ * ####Example
1789
+ * const schema = new Schema({ foo: String, nested: { bar: String } });
1790
+ * const Model = mongoose.model('Test', schema);
1791
+ * await Model.create({ foo: 'original', nested: { bar: 'original' } });
1792
+ *
1793
+ * const doc = await Model.findOne();
1794
+ * doc.nested.bar = 'modified';
1795
+ * doc.directModifiedPaths(); // ['nested.bar']
1796
+ * doc.modifiedPaths(); // ['nested', 'nested.bar']
1797
+ *
1798
+ * @return {Array}
1799
+ * @api public
1800
+ */
1801
+
1802
+ Document.prototype.directModifiedPaths = function() {
1803
+ return Object.keys(this.$__.activePaths.states.modify);
1804
+ };
1805
+
1806
+ /**
1807
+ * Returns true if the given path is nullish or only contains empty objects.
1808
+ * Useful for determining whether this subdoc will get stripped out by the
1809
+ * [minimize option](/docs/guide.html#minimize).
1810
+ *
1811
+ * ####Example:
1812
+ * const schema = new Schema({ nested: { foo: String } });
1813
+ * const Model = mongoose.model('Test', schema);
1814
+ * const doc = new Model({});
1815
+ * doc.$isEmpty('nested'); // true
1816
+ * doc.nested.$isEmpty(); // true
1817
+ *
1818
+ * doc.nested.foo = 'bar';
1819
+ * doc.$isEmpty('nested'); // false
1820
+ * doc.nested.$isEmpty(); // false
1821
+ *
1822
+ * @memberOf Document
1823
+ * @instance
1824
+ * @api public
1825
+ * @method $isEmpty
1826
+ * @return {Boolean}
1827
+ */
1828
+
1829
+ Document.prototype.$isEmpty = function(path) {
1830
+ const isEmptyOptions = {
1831
+ minimize: true,
1832
+ virtuals: false,
1833
+ getters: false,
1834
+ transform: false
1835
+ };
1836
+
1837
+ if (arguments.length > 0) {
1838
+ const v = this.get(path);
1839
+ if (v == null) {
1840
+ return true;
1841
+ }
1842
+ if (typeof v !== 'object') {
1843
+ return false;
1844
+ }
1845
+ if (utils.isPOJO(v)) {
1846
+ return _isEmpty(v);
1847
+ }
1848
+ return Object.keys(v.toObject(isEmptyOptions)).length === 0;
1849
+ }
1850
+
1851
+ return Object.keys(this.toObject(isEmptyOptions)).length === 0;
1852
+ };
1853
+
1854
+ function _isEmpty(v) {
1855
+ if (v == null) {
1856
+ return true;
1857
+ }
1858
+ if (typeof v !== 'object' || Array.isArray(v)) {
1859
+ return false;
1860
+ }
1861
+ for (const key of Object.keys(v)) {
1862
+ if (!_isEmpty(v[key])) {
1863
+ return false;
1864
+ }
1865
+ }
1866
+ return true;
1867
+ }
1868
+
1869
+ /**
1870
+ * Returns the list of paths that have been modified.
1871
+ *
1872
+ * @param {Object} [options]
1873
+ * @param {Boolean} [options.includeChildren=false] if true, returns children of modified paths as well. For example, if false, the list of modified paths for `doc.colors = { primary: 'blue' };` will **not** contain `colors.primary`. If true, `modifiedPaths()` will return an array that contains `colors.primary`.
1874
+ * @return {Array}
1875
+ * @api public
1876
+ */
1877
+
1878
+ Document.prototype.modifiedPaths = function(options) {
1879
+ options = options || {};
1880
+ const directModifiedPaths = Object.keys(this.$__.activePaths.states.modify);
1881
+ const _this = this;
1882
+ return directModifiedPaths.reduce(function(list, path) {
1883
+ const parts = path.split('.');
1884
+ list = list.concat(parts.reduce(function(chains, part, i) {
1885
+ return chains.concat(parts.slice(0, i).concat(part).join('.'));
1886
+ }, []).filter(function(chain) {
1887
+ return (list.indexOf(chain) === -1);
1888
+ }));
1889
+
1890
+ if (!options.includeChildren) {
1891
+ return list;
1892
+ }
1893
+
1894
+ let cur = _this.get(path);
1895
+ if (cur != null && typeof cur === 'object') {
1896
+ if (cur._doc) {
1897
+ cur = cur._doc;
1898
+ }
1899
+ if (Array.isArray(cur)) {
1900
+ const len = cur.length;
1901
+ for (let i = 0; i < len; ++i) {
1902
+ if (list.indexOf(path + '.' + i) === -1) {
1903
+ list.push(path + '.' + i);
1904
+ if (cur[i] != null && cur[i].$__) {
1905
+ const modified = cur[i].modifiedPaths();
1906
+ for (const childPath of modified) {
1907
+ list.push(path + '.' + i + '.' + childPath);
1908
+ }
1909
+ }
1910
+ }
1911
+ }
1912
+ } else {
1913
+ Object.keys(cur).
1914
+ filter(function(key) {
1915
+ return list.indexOf(path + '.' + key) === -1;
1916
+ }).
1917
+ forEach(function(key) {
1918
+ list.push(path + '.' + key);
1919
+ });
1920
+ }
1921
+ }
1922
+
1923
+ return list;
1924
+ }, []);
1925
+ };
1926
+
1927
+ Document.prototype[documentModifiedPaths] = Document.prototype.modifiedPaths;
1928
+
1929
+ /**
1930
+ * Returns true if any of the given paths is modified, else false. If no arguments, returns `true` if any path
1931
+ * in this document is modified.
1932
+ *
1933
+ * If `path` is given, checks if a path or any full path containing `path` as part of its path chain has been modified.
1934
+ *
1935
+ * ####Example
1936
+ *
1937
+ * doc.set('documents.0.title', 'changed');
1938
+ * doc.isModified() // true
1939
+ * doc.isModified('documents') // true
1940
+ * doc.isModified('documents.0.title') // true
1941
+ * doc.isModified('documents otherProp') // true
1942
+ * doc.isDirectModified('documents') // false
1943
+ *
1944
+ * @param {String} [path] optional
1945
+ * @return {Boolean}
1946
+ * @api public
1947
+ */
1948
+
1949
+ Document.prototype.isModified = function(paths, modifiedPaths) {
1950
+ if (paths) {
1951
+ if (!Array.isArray(paths)) {
1952
+ paths = paths.split(' ');
1953
+ }
1954
+ const modified = modifiedPaths || this[documentModifiedPaths]();
1955
+ const directModifiedPaths = Object.keys(this.$__.activePaths.states.modify);
1956
+ const isModifiedChild = paths.some(function(path) {
1957
+ return !!~modified.indexOf(path);
1958
+ });
1959
+
1960
+ return isModifiedChild || paths.some(function(path) {
1961
+ return directModifiedPaths.some(function(mod) {
1962
+ return mod === path || path.startsWith(mod + '.');
1963
+ });
1964
+ });
1965
+ }
1966
+
1967
+ return this.$__.activePaths.some('modify');
1968
+ };
1969
+
1970
+ Document.prototype[documentIsModified] = Document.prototype.isModified;
1971
+
1972
+ /**
1973
+ * Checks if a path is set to its default.
1974
+ *
1975
+ * ####Example
1976
+ *
1977
+ * MyModel = mongoose.model('test', { name: { type: String, default: 'Val '} });
1978
+ * const m = new MyModel();
1979
+ * m.$isDefault('name'); // true
1980
+ *
1981
+ * @memberOf Document
1982
+ * @instance
1983
+ * @method $isDefault
1984
+ * @param {String} [path]
1985
+ * @return {Boolean}
1986
+ * @api public
1987
+ */
1988
+
1989
+ Document.prototype.$isDefault = function(path) {
1990
+ if (path == null) {
1991
+ return this.$__.activePaths.some('default');
1992
+ }
1993
+
1994
+ if (typeof path === 'string' && path.indexOf(' ') === -1) {
1995
+ return this.$__.activePaths.states.default.hasOwnProperty(path);
1996
+ }
1997
+
1998
+ let paths = path;
1999
+ if (!Array.isArray(paths)) {
2000
+ paths = paths.split(' ');
2001
+ }
2002
+
2003
+ return paths.some(path => this.$__.activePaths.states.default.hasOwnProperty(path));
2004
+ };
2005
+
2006
+ /**
2007
+ * Getter/setter, determines whether the document was removed or not.
2008
+ *
2009
+ * ####Example:
2010
+ * product.remove(function (err, product) {
2011
+ * product.$isDeleted(); // true
2012
+ * product.remove(); // no-op, doesn't send anything to the db
2013
+ *
2014
+ * product.$isDeleted(false);
2015
+ * product.$isDeleted(); // false
2016
+ * product.remove(); // will execute a remove against the db
2017
+ * })
2018
+ *
2019
+ * @param {Boolean} [val] optional, overrides whether mongoose thinks the doc is deleted
2020
+ * @return {Boolean} whether mongoose thinks this doc is deleted.
2021
+ * @method $isDeleted
2022
+ * @memberOf Document
2023
+ * @instance
2024
+ * @api public
2025
+ */
2026
+
2027
+ Document.prototype.$isDeleted = function(val) {
2028
+ if (arguments.length === 0) {
2029
+ return !!this.$__.isDeleted;
2030
+ }
2031
+
2032
+ this.$__.isDeleted = !!val;
2033
+ return this;
2034
+ };
2035
+
2036
+ /**
2037
+ * Returns true if `path` was directly set and modified, else false.
2038
+ *
2039
+ * ####Example
2040
+ *
2041
+ * doc.set('documents.0.title', 'changed');
2042
+ * doc.isDirectModified('documents.0.title') // true
2043
+ * doc.isDirectModified('documents') // false
2044
+ *
2045
+ * @param {String|Array<String>} path
2046
+ * @return {Boolean}
2047
+ * @api public
2048
+ */
2049
+
2050
+ Document.prototype.isDirectModified = function(path) {
2051
+ if (path == null) {
2052
+ return this.$__.activePaths.some('modify');
2053
+ }
2054
+
2055
+ if (typeof path === 'string' && path.indexOf(' ') === -1) {
2056
+ return this.$__.activePaths.states.modify.hasOwnProperty(path);
2057
+ }
2058
+
2059
+ let paths = path;
2060
+ if (!Array.isArray(paths)) {
2061
+ paths = paths.split(' ');
2062
+ }
2063
+
2064
+ return paths.some(path => this.$__.activePaths.states.modify.hasOwnProperty(path));
2065
+ };
2066
+
2067
+ /**
2068
+ * Checks if `path` is in the `init` state, that is, it was set by `Document#init()` and not modified since.
2069
+ *
2070
+ * @param {String} path
2071
+ * @return {Boolean}
2072
+ * @api public
2073
+ */
2074
+
2075
+ Document.prototype.isInit = function(path) {
2076
+ if (path == null) {
2077
+ return this.$__.activePaths.some('init');
2078
+ }
2079
+
2080
+ if (typeof path === 'string' && path.indexOf(' ') === -1) {
2081
+ return this.$__.activePaths.states.init.hasOwnProperty(path);
2082
+ }
2083
+
2084
+ let paths = path;
2085
+ if (!Array.isArray(paths)) {
2086
+ paths = paths.split(' ');
2087
+ }
2088
+
2089
+ return paths.some(path => this.$__.activePaths.states.init.hasOwnProperty(path));
2090
+ };
2091
+
2092
+ /**
2093
+ * Checks if `path` was selected in the source query which initialized this document.
2094
+ *
2095
+ * ####Example
2096
+ *
2097
+ * Thing.findOne().select('name').exec(function (err, doc) {
2098
+ * doc.isSelected('name') // true
2099
+ * doc.isSelected('age') // false
2100
+ * })
2101
+ *
2102
+ * @param {String|Array<String>} path
2103
+ * @return {Boolean}
2104
+ * @api public
2105
+ */
2106
+
2107
+ Document.prototype.isSelected = function isSelected(path) {
2108
+ if (this.$__.selected == null) {
2109
+ return true;
2110
+ }
2111
+
2112
+ if (path === '_id') {
2113
+ return this.$__.selected._id !== 0;
2114
+ }
2115
+
2116
+ if (path.indexOf(' ') !== -1) {
2117
+ path = path.split(' ');
2118
+ }
2119
+ if (Array.isArray(path)) {
2120
+ return path.some(p => this.$__isSelected(p));
2121
+ }
2122
+
2123
+ const paths = Object.keys(this.$__.selected);
2124
+ let inclusive = null;
2125
+
2126
+ if (paths.length === 1 && paths[0] === '_id') {
2127
+ // only _id was selected.
2128
+ return this.$__.selected._id === 0;
2129
+ }
2130
+
2131
+ for (const cur of paths) {
2132
+ if (cur === '_id') {
2133
+ continue;
2134
+ }
2135
+ if (!isDefiningProjection(this.$__.selected[cur])) {
2136
+ continue;
2137
+ }
2138
+ inclusive = !!this.$__.selected[cur];
2139
+ break;
2140
+ }
2141
+
2142
+ if (inclusive === null) {
2143
+ return true;
2144
+ }
2145
+
2146
+ if (path in this.$__.selected) {
2147
+ return inclusive;
2148
+ }
2149
+
2150
+ const pathDot = path + '.';
2151
+
2152
+ for (const cur of paths) {
2153
+ if (cur === '_id') {
2154
+ continue;
2155
+ }
2156
+
2157
+ if (cur.startsWith(pathDot)) {
2158
+ return inclusive || cur !== pathDot;
2159
+ }
2160
+
2161
+ if (pathDot.startsWith(cur + '.')) {
2162
+ return inclusive;
2163
+ }
2164
+ }
2165
+
2166
+ return !inclusive;
2167
+ };
2168
+
2169
+ Document.prototype.$__isSelected = Document.prototype.isSelected;
2170
+
2171
+ /**
2172
+ * Checks if `path` was explicitly selected. If no projection, always returns
2173
+ * true.
2174
+ *
2175
+ * ####Example
2176
+ *
2177
+ * Thing.findOne().select('nested.name').exec(function (err, doc) {
2178
+ * doc.isDirectSelected('nested.name') // true
2179
+ * doc.isDirectSelected('nested.otherName') // false
2180
+ * doc.isDirectSelected('nested') // false
2181
+ * })
2182
+ *
2183
+ * @param {String} path
2184
+ * @return {Boolean}
2185
+ * @api public
2186
+ */
2187
+
2188
+ Document.prototype.isDirectSelected = function isDirectSelected(path) {
2189
+ if (this.$__.selected == null) {
2190
+ return true;
2191
+ }
2192
+
2193
+ if (path === '_id') {
2194
+ return this.$__.selected._id !== 0;
2195
+ }
2196
+
2197
+ if (path.indexOf(' ') !== -1) {
2198
+ path = path.split(' ');
2199
+ }
2200
+ if (Array.isArray(path)) {
2201
+ return path.some(p => this.isDirectSelected(p));
2202
+ }
2203
+
2204
+ const paths = Object.keys(this.$__.selected);
2205
+ let inclusive = null;
2206
+
2207
+ if (paths.length === 1 && paths[0] === '_id') {
2208
+ // only _id was selected.
2209
+ return this.$__.selected._id === 0;
2210
+ }
2211
+
2212
+ for (const cur of paths) {
2213
+ if (cur === '_id') {
2214
+ continue;
2215
+ }
2216
+ if (!isDefiningProjection(this.$__.selected[cur])) {
2217
+ continue;
2218
+ }
2219
+ inclusive = !!this.$__.selected[cur];
2220
+ break;
2221
+ }
2222
+
2223
+ if (inclusive === null) {
2224
+ return true;
2225
+ }
2226
+
2227
+ if (this.$__.selected.hasOwnProperty(path)) {
2228
+ return inclusive;
2229
+ }
2230
+
2231
+ return !inclusive;
2232
+ };
2233
+
2234
+ /**
2235
+ * Executes registered validation rules for this document.
2236
+ *
2237
+ * ####Note:
2238
+ *
2239
+ * This method is called `pre` save and if a validation rule is violated, [save](#model_Model-save) is aborted and the error is returned to your `callback`.
2240
+ *
2241
+ * ####Example:
2242
+ *
2243
+ * doc.validate(function (err) {
2244
+ * if (err) handleError(err);
2245
+ * else // validation passed
2246
+ * });
2247
+ *
2248
+ * @param {Array|String} [pathsToValidate] list of paths to validate. If set, Mongoose will validate only the modified paths that are in the given list.
2249
+ * @param {Object} [options] internal options
2250
+ * @param {Boolean} [options.validateModifiedOnly=false] if `true` mongoose validates only modified paths.
2251
+ * @param {Array|string} [options.pathsToSkip] list of paths to skip. If set, Mongoose will validate every modified path that is not in this list.
2252
+ * @param {Function} [callback] optional callback called after validation completes, passing an error if one occurred
2253
+ * @return {Promise} Promise
2254
+ * @api public
2255
+ */
2256
+
2257
+ Document.prototype.validate = function(pathsToValidate, options, callback) {
2258
+ let parallelValidate$1;
2259
+ this.$op = 'validate';
2260
+
2261
+ if (this.ownerDocument != null) ; else if (this.$__.validating) {
2262
+ parallelValidate$1 = new parallelValidate(this, {
2263
+ parentStack: options && options.parentStack,
2264
+ conflictStack: this.$__.validating.stack
2265
+ });
2266
+ } else {
2267
+ this.$__.validating = new parallelValidate(this, { parentStack: options && options.parentStack });
2268
+ }
2269
+
2270
+ if (arguments.length === 1) {
2271
+ if (typeof arguments[0] === 'object' && !Array.isArray(arguments[0])) {
2272
+ options = arguments[0];
2273
+ callback = null;
2274
+ pathsToValidate = null;
2275
+ } else if (typeof arguments[0] === 'function') {
2276
+ callback = arguments[0];
2277
+ options = null;
2278
+ pathsToValidate = null;
2279
+ }
2280
+ } else if (typeof pathsToValidate === 'function') {
2281
+ callback = pathsToValidate;
2282
+ options = null;
2283
+ pathsToValidate = null;
2284
+ } else if (typeof options === 'function') {
2285
+ callback = options;
2286
+ options = pathsToValidate;
2287
+ pathsToValidate = null;
2288
+ }
2289
+ if (options && typeof options.pathsToSkip === 'string') {
2290
+ const isOnePathOnly = options.pathsToSkip.indexOf(' ') === -1;
2291
+ options.pathsToSkip = isOnePathOnly ? [options.pathsToSkip] : options.pathsToSkip.split(' ');
2292
+ }
2293
+
2294
+ return promiseOrCallback(callback, cb => {
2295
+ if (parallelValidate$1 != null) {
2296
+ return cb(parallelValidate$1);
2297
+ }
2298
+
2299
+ this.$__validate(pathsToValidate, options, (error) => {
2300
+ this.$op = null;
2301
+ cb(error);
2302
+ });
2303
+ }, this.constructor.events);
2304
+ };
2305
+
2306
+ /*!
2307
+ * ignore
2308
+ */
2309
+
2310
+ function _evaluateRequiredFunctions(doc) {
2311
+ Object.keys(doc.$__.activePaths.states.require).forEach(path => {
2312
+ const p = doc.$__schema.path(path);
2313
+
2314
+ if (p != null && typeof p.originalRequiredValue === 'function') {
2315
+ doc.$__.cachedRequired[path] = p.originalRequiredValue.call(doc, doc);
2316
+ }
2317
+ });
2318
+ }
2319
+
2320
+ /*!
2321
+ * ignore
2322
+ */
2323
+
2324
+ function _getPathsToValidate(doc) {
2325
+ const skipSchemaValidators = {};
2326
+
2327
+ _evaluateRequiredFunctions(doc);
2328
+ // only validate required fields when necessary
2329
+ let paths = new Set(Object.keys(doc.$__.activePaths.states.require).filter(function(path) {
2330
+ if (!doc.$__isSelected(path) && !doc.isModified(path)) {
2331
+ return false;
2332
+ }
2333
+ if (path in doc.$__.cachedRequired) {
2334
+ return doc.$__.cachedRequired[path];
2335
+ }
2336
+ return true;
2337
+ }));
2338
+
2339
+
2340
+ Object.keys(doc.$__.activePaths.states.init).forEach(addToPaths);
2341
+ Object.keys(doc.$__.activePaths.states.modify).forEach(addToPaths);
2342
+ Object.keys(doc.$__.activePaths.states.default).forEach(addToPaths);
2343
+ function addToPaths(p) { paths.add(p); }
2344
+
2345
+ const subdocs = doc.$getAllSubdocs();
2346
+ const modifiedPaths = doc.modifiedPaths();
2347
+ for (const subdoc of subdocs) {
2348
+ if (subdoc.$basePath) {
2349
+ // Remove child paths for now, because we'll be validating the whole
2350
+ // subdoc
2351
+ for (const p of paths) {
2352
+ if (p === null || p.startsWith(subdoc.$basePath + '.')) {
2353
+ paths.delete(p);
2354
+ }
2355
+ }
2356
+
2357
+ if (doc.isModified(subdoc.$basePath, modifiedPaths) &&
2358
+ !doc.isDirectModified(subdoc.$basePath) &&
2359
+ !doc.$isDefault(subdoc.$basePath)) {
2360
+ paths.add(subdoc.$basePath);
2361
+
2362
+ skipSchemaValidators[subdoc.$basePath] = true;
2363
+ }
2364
+ }
2365
+ }
2366
+
2367
+ // from here on we're not removing items from paths
2368
+
2369
+ // gh-661: if a whole array is modified, make sure to run validation on all
2370
+ // the children as well
2371
+ for (const path of paths) {
2372
+ const _pathType = doc.$__schema.path(path);
2373
+ if (!_pathType ||
2374
+ !_pathType.$isMongooseArray ||
2375
+ // To avoid potential performance issues, skip doc arrays whose children
2376
+ // are not required. `getPositionalPathType()` may be slow, so avoid
2377
+ // it unless we have a case of #6364
2378
+ (_pathType.$isMongooseDocumentArray && !get(_pathType, 'schemaOptions.required'))) {
2379
+ continue;
2380
+ }
2381
+
2382
+ const val = doc.$__getValue(path);
2383
+ _pushNestedArrayPaths(val, paths, path);
2384
+ }
2385
+
2386
+ function _pushNestedArrayPaths(val, paths, path) {
2387
+ if (val != null) {
2388
+ const numElements = val.length;
2389
+ for (let j = 0; j < numElements; ++j) {
2390
+ if (Array.isArray(val[j])) {
2391
+ _pushNestedArrayPaths(val[j], paths, path + '.' + j);
2392
+ } else {
2393
+ paths.add(path + '.' + j);
2394
+ }
2395
+ }
2396
+ }
2397
+ }
2398
+
2399
+ const flattenOptions = { skipArrays: true };
2400
+ for (const pathToCheck of paths) {
2401
+ if (doc.$__schema.nested[pathToCheck]) {
2402
+ let _v = doc.$__getValue(pathToCheck);
2403
+ if (isMongooseObject(_v)) {
2404
+ _v = _v.toObject({ transform: false });
2405
+ }
2406
+ const flat = flatten(_v, pathToCheck, flattenOptions, doc.$__schema);
2407
+ Object.keys(flat).forEach(addToPaths);
2408
+ }
2409
+ }
2410
+
2411
+ for (const path of paths) {
2412
+ // Single nested paths (paths embedded under single nested subdocs) will
2413
+ // be validated on their own when we call `validate()` on the subdoc itself.
2414
+ // Re: gh-8468
2415
+ if (doc.$__schema.singleNestedPaths.hasOwnProperty(path)) {
2416
+ paths.delete(path);
2417
+ continue;
2418
+ }
2419
+ const _pathType = doc.$__schema.path(path);
2420
+ if (!_pathType || !_pathType.$isSchemaMap) {
2421
+ continue;
2422
+ }
2423
+
2424
+ const val = doc.$__getValue(path);
2425
+ if (val == null) {
2426
+ continue;
2427
+ }
2428
+ for (const key of val.keys()) {
2429
+ paths.add(path + '.' + key);
2430
+ }
2431
+ }
2432
+
2433
+ paths = Array.from(paths);
2434
+ return [paths, skipSchemaValidators];
2435
+ }
2436
+
2437
+ /*!
2438
+ * ignore
2439
+ */
2440
+
2441
+ Document.prototype.$__validate = function(pathsToValidate, options, callback) {
2442
+ if (typeof pathsToValidate === 'function') {
2443
+ callback = pathsToValidate;
2444
+ options = null;
2445
+ pathsToValidate = null;
2446
+ } else if (typeof options === 'function') {
2447
+ callback = options;
2448
+ options = null;
2449
+ }
2450
+
2451
+ const hasValidateModifiedOnlyOption = options &&
2452
+ (typeof options === 'object') &&
2453
+ ('validateModifiedOnly' in options);
2454
+
2455
+ const pathsToSkip = get(options, 'pathsToSkip', null);
2456
+
2457
+ let shouldValidateModifiedOnly;
2458
+ if (hasValidateModifiedOnlyOption) {
2459
+ shouldValidateModifiedOnly = !!options.validateModifiedOnly;
2460
+ } else {
2461
+ shouldValidateModifiedOnly = this.$__schema.options.validateModifiedOnly;
2462
+ }
2463
+
2464
+ const _this = this;
2465
+ const _complete = () => {
2466
+ let validationError = this.$__.validationError;
2467
+ this.$__.validationError = undefined;
2468
+
2469
+ if (shouldValidateModifiedOnly && validationError != null) {
2470
+ // Remove any validation errors that aren't from modified paths
2471
+ const errors = Object.keys(validationError.errors);
2472
+ for (const errPath of errors) {
2473
+ if (!this.isModified(errPath)) {
2474
+ delete validationError.errors[errPath];
2475
+ }
2476
+ }
2477
+ if (Object.keys(validationError.errors).length === 0) {
2478
+ validationError = void 0;
2479
+ }
2480
+ }
2481
+
2482
+ this.$__.cachedRequired = {};
2483
+ this.emit('validate', _this);
2484
+ this.constructor.emit('validate', _this);
2485
+
2486
+ this.$__.validating = null;
2487
+ if (validationError) {
2488
+ for (const key in validationError.errors) {
2489
+ // Make sure cast errors persist
2490
+ if (!this[documentArrayParent] &&
2491
+ validationError.errors[key] instanceof index.CastError) {
2492
+ this.invalidate(key, validationError.errors[key]);
2493
+ }
2494
+ }
2495
+
2496
+ return validationError;
2497
+ }
2498
+ };
2499
+
2500
+ // only validate required fields when necessary
2501
+ const pathDetails = _getPathsToValidate(this);
2502
+ let paths = shouldValidateModifiedOnly ?
2503
+ pathDetails[0].filter((path) => this.isModified(path)) :
2504
+ pathDetails[0];
2505
+ const skipSchemaValidators = pathDetails[1];
2506
+ if (typeof pathsToValidate === 'string') {
2507
+ pathsToValidate = pathsToValidate.split(' ');
2508
+ }
2509
+ if (Array.isArray(pathsToValidate)) {
2510
+ paths = _handlePathsToValidate(paths, pathsToValidate);
2511
+ } else if (pathsToSkip) {
2512
+ paths = _handlePathsToSkip(paths, pathsToSkip);
2513
+ }
2514
+ if (paths.length === 0) {
2515
+ return immediate(function() {
2516
+ const error = _complete();
2517
+ if (error) {
2518
+ return _this.$__schema.s.hooks.execPost('validate:error', _this, [_this], { error: error }, function(error) {
2519
+ callback(error);
2520
+ });
2521
+ }
2522
+ callback(null, _this);
2523
+ });
2524
+ }
2525
+
2526
+ const validated = {};
2527
+ let total = 0;
2528
+
2529
+ for (const path of paths) {
2530
+ validatePath(path);
2531
+ }
2532
+
2533
+ function validatePath(path) {
2534
+ if (path == null || validated[path]) {
2535
+ return;
2536
+ }
2537
+
2538
+ validated[path] = true;
2539
+ total++;
2540
+
2541
+ immediate(function() {
2542
+ const schemaType = _this.$__schema.path(path);
2543
+
2544
+ if (!schemaType) {
2545
+ return --total || complete();
2546
+ }
2547
+
2548
+ // If user marked as invalid or there was a cast error, don't validate
2549
+ if (!_this.$isValid(path)) {
2550
+ --total || complete();
2551
+ return;
2552
+ }
2553
+
2554
+ // If setting a path under a mixed path, avoid using the mixed path validator (gh-10141)
2555
+ if (schemaType[schemaMixedSymbol] != null && path !== schemaType.path) {
2556
+ return --total || complete();
2557
+ }
2558
+
2559
+ let val = _this.$__getValue(path);
2560
+
2561
+ // If you `populate()` and get back a null value, required validators
2562
+ // shouldn't fail (gh-8018). We should always fall back to the populated
2563
+ // value.
2564
+ let pop;
2565
+ if (val == null && (pop = _this.populated(path))) {
2566
+ val = pop;
2567
+ }
2568
+ const scope = path in _this.$__.pathsToScopes ?
2569
+ _this.$__.pathsToScopes[path] :
2570
+ _this;
2571
+
2572
+ const doValidateOptions = {
2573
+ skipSchemaValidators: skipSchemaValidators[path],
2574
+ path: path,
2575
+ validateModifiedOnly: shouldValidateModifiedOnly
2576
+ };
2577
+ schemaType.doValidate(val, function(err) {
2578
+ if (err && (!schemaType.$isMongooseDocumentArray || err.$isArrayValidatorError)) {
2579
+ if (schemaType.$isSingleNested &&
2580
+ err instanceof validation &&
2581
+ schemaType.schema.options.storeSubdocValidationError === false) {
2582
+ return --total || complete();
2583
+ }
2584
+ _this.invalidate(path, err, undefined, true);
2585
+ }
2586
+ --total || complete();
2587
+ }, scope, doValidateOptions);
2588
+ });
2589
+ }
2590
+
2591
+ function complete() {
2592
+ const error = _complete();
2593
+ if (error) {
2594
+ return _this.$__schema.s.hooks.execPost('validate:error', _this, [_this], { error: error }, function(error) {
2595
+ callback(error);
2596
+ });
2597
+ }
2598
+ callback(null, _this);
2599
+ }
2600
+
2601
+ };
2602
+
2603
+ /*!
2604
+ * ignore
2605
+ */
2606
+
2607
+ function _handlePathsToValidate(paths, pathsToValidate) {
2608
+ const _pathsToValidate = new Set(pathsToValidate);
2609
+ const parentPaths = new Map([]);
2610
+ for (const path of pathsToValidate) {
2611
+ if (path.indexOf('.') === -1) {
2612
+ continue;
2613
+ }
2614
+ const pieces = path.split('.');
2615
+ let cur = pieces[0];
2616
+ for (let i = 1; i < pieces.length; ++i) {
2617
+ // Since we skip subpaths under single nested subdocs to
2618
+ // avoid double validation, we need to add back the
2619
+ // single nested subpath if the user asked for it (gh-8626)
2620
+ parentPaths.set(cur, path);
2621
+ cur = cur + '.' + pieces[i];
2622
+ }
2623
+ }
2624
+
2625
+ const ret = [];
2626
+ for (const path of paths) {
2627
+ if (_pathsToValidate.has(path)) {
2628
+ ret.push(path);
2629
+ } else if (parentPaths.has(path)) {
2630
+ ret.push(parentPaths.get(path));
2631
+ }
2632
+ }
2633
+ return ret;
2634
+ }
2635
+
2636
+ /*!
2637
+ * ignore
2638
+ */
2639
+ function _handlePathsToSkip(paths, pathsToSkip) {
2640
+ pathsToSkip = new Set(pathsToSkip);
2641
+ paths = paths.filter(p => !pathsToSkip.has(p));
2642
+ return paths;
2643
+ }
2644
+
2645
+ /**
2646
+ * Executes registered validation rules (skipping asynchronous validators) for this document.
2647
+ *
2648
+ * ####Note:
2649
+ *
2650
+ * This method is useful if you need synchronous validation.
2651
+ *
2652
+ * ####Example:
2653
+ *
2654
+ * const err = doc.validateSync();
2655
+ * if (err) {
2656
+ * handleError(err);
2657
+ * } else {
2658
+ * // validation passed
2659
+ * }
2660
+ *
2661
+ * @param {Array|string} pathsToValidate only validate the given paths
2662
+ * @param {Object} [options] options for validation
2663
+ * @param {Boolean} [options.validateModifiedOnly=false] If `true`, Mongoose will only validate modified paths, as opposed to modified paths and `required` paths.
2664
+ * @param {Array|string} [options.pathsToSkip] list of paths to skip. If set, Mongoose will validate every modified path that is not in this list.
2665
+ * @return {ValidationError|undefined} ValidationError if there are errors during validation, or undefined if there is no error.
2666
+ * @api public
2667
+ */
2668
+
2669
+ Document.prototype.validateSync = function(pathsToValidate, options) {
2670
+ const _this = this;
2671
+
2672
+ if (arguments.length === 1 && typeof arguments[0] === 'object' && !Array.isArray(arguments[0])) {
2673
+ options = arguments[0];
2674
+ pathsToValidate = null;
2675
+ }
2676
+
2677
+ const hasValidateModifiedOnlyOption = options &&
2678
+ (typeof options === 'object') &&
2679
+ ('validateModifiedOnly' in options);
2680
+
2681
+ let shouldValidateModifiedOnly;
2682
+ if (hasValidateModifiedOnlyOption) {
2683
+ shouldValidateModifiedOnly = !!options.validateModifiedOnly;
2684
+ } else {
2685
+ shouldValidateModifiedOnly = this.$__schema.options.validateModifiedOnly;
2686
+ }
2687
+
2688
+ let pathsToSkip = options && options.pathsToSkip;
2689
+
2690
+ if (typeof pathsToValidate === 'string') {
2691
+ const isOnePathOnly = pathsToValidate.indexOf(' ') === -1;
2692
+ pathsToValidate = isOnePathOnly ? [pathsToValidate] : pathsToValidate.split(' ');
2693
+ } else if (typeof pathsToSkip === 'string' && pathsToSkip.indexOf(' ') !== -1) {
2694
+ pathsToSkip = pathsToSkip.split(' ');
2695
+ }
2696
+
2697
+ // only validate required fields when necessary
2698
+ const pathDetails = _getPathsToValidate(this);
2699
+ let paths = shouldValidateModifiedOnly ?
2700
+ pathDetails[0].filter((path) => this.isModified(path)) :
2701
+ pathDetails[0];
2702
+ const skipSchemaValidators = pathDetails[1];
2703
+
2704
+ if (Array.isArray(pathsToValidate)) {
2705
+ paths = _handlePathsToValidate(paths, pathsToValidate);
2706
+ } else if (Array.isArray(pathsToSkip)) {
2707
+ paths = _handlePathsToSkip(paths, pathsToSkip);
2708
+ }
2709
+ const validating = {};
2710
+
2711
+ paths.forEach(function(path) {
2712
+ if (validating[path]) {
2713
+ return;
2714
+ }
2715
+
2716
+ validating[path] = true;
2717
+
2718
+ const p = _this.$__schema.path(path);
2719
+ if (!p) {
2720
+ return;
2721
+ }
2722
+ if (!_this.$isValid(path)) {
2723
+ return;
2724
+ }
2725
+
2726
+ const val = _this.$__getValue(path);
2727
+ const err = p.doValidateSync(val, _this, {
2728
+ skipSchemaValidators: skipSchemaValidators[path],
2729
+ path: path,
2730
+ validateModifiedOnly: shouldValidateModifiedOnly
2731
+ });
2732
+ if (err && (!p.$isMongooseDocumentArray || err.$isArrayValidatorError)) {
2733
+ if (p.$isSingleNested &&
2734
+ err instanceof validation &&
2735
+ p.schema.options.storeSubdocValidationError === false) {
2736
+ return;
2737
+ }
2738
+ _this.invalidate(path, err, undefined, true);
2739
+ }
2740
+ });
2741
+
2742
+ const err = _this.$__.validationError;
2743
+ _this.$__.validationError = undefined;
2744
+ _this.emit('validate', _this);
2745
+ _this.constructor.emit('validate', _this);
2746
+
2747
+ if (err) {
2748
+ for (const key in err.errors) {
2749
+ // Make sure cast errors persist
2750
+ if (err.errors[key] instanceof index.CastError) {
2751
+ _this.invalidate(key, err.errors[key]);
2752
+ }
2753
+ }
2754
+ }
2755
+
2756
+ return err;
2757
+ };
2758
+
2759
+ /**
2760
+ * Marks a path as invalid, causing validation to fail.
2761
+ *
2762
+ * The `errorMsg` argument will become the message of the `ValidationError`.
2763
+ *
2764
+ * The `value` argument (if passed) will be available through the `ValidationError.value` property.
2765
+ *
2766
+ * doc.invalidate('size', 'must be less than 20', 14);
2767
+
2768
+ * doc.validate(function (err) {
2769
+ * console.log(err)
2770
+ * // prints
2771
+ * { message: 'Validation failed',
2772
+ * name: 'ValidationError',
2773
+ * errors:
2774
+ * { size:
2775
+ * { message: 'must be less than 20',
2776
+ * name: 'ValidatorError',
2777
+ * path: 'size',
2778
+ * type: 'user defined',
2779
+ * value: 14 } } }
2780
+ * })
2781
+ *
2782
+ * @param {String} path the field to invalidate. For array elements, use the `array.i.field` syntax, where `i` is the 0-based index in the array.
2783
+ * @param {String|Error} errorMsg the error which states the reason `path` was invalid
2784
+ * @param {Object|String|Number|any} value optional invalid value
2785
+ * @param {String} [kind] optional `kind` property for the error
2786
+ * @return {ValidationError} the current ValidationError, with all currently invalidated paths
2787
+ * @api public
2788
+ */
2789
+
2790
+ Document.prototype.invalidate = function(path, err, val, kind) {
2791
+ if (!this.$__.validationError) {
2792
+ this.$__.validationError = new validation(this);
2793
+ }
2794
+
2795
+ if (this.$__.validationError.errors[path]) {
2796
+ return;
2797
+ }
2798
+
2799
+ if (!err || typeof err === 'string') {
2800
+ err = new validator({
2801
+ path: path,
2802
+ message: err,
2803
+ type: kind || 'user defined',
2804
+ value: val
2805
+ });
2806
+ }
2807
+
2808
+ if (this.$__.validationError === err) {
2809
+ return this.$__.validationError;
2810
+ }
2811
+
2812
+ this.$__.validationError.addError(path, err);
2813
+ return this.$__.validationError;
2814
+ };
2815
+
2816
+ /**
2817
+ * Marks a path as valid, removing existing validation errors.
2818
+ *
2819
+ * @param {String} path the field to mark as valid
2820
+ * @api public
2821
+ * @memberOf Document
2822
+ * @instance
2823
+ * @method $markValid
2824
+ */
2825
+
2826
+ Document.prototype.$markValid = function(path) {
2827
+ if (!this.$__.validationError || !this.$__.validationError.errors[path]) {
2828
+ return;
2829
+ }
2830
+
2831
+ delete this.$__.validationError.errors[path];
2832
+ if (Object.keys(this.$__.validationError.errors).length === 0) {
2833
+ this.$__.validationError = null;
2834
+ }
2835
+ };
2836
+
2837
+ /*!
2838
+ * ignore
2839
+ */
2840
+
2841
+ function _markValidSubpaths(doc, path) {
2842
+ if (!doc.$__.validationError) {
2843
+ return;
2844
+ }
2845
+
2846
+ const keys = Object.keys(doc.$__.validationError.errors);
2847
+ for (const key of keys) {
2848
+ if (key.startsWith(path + '.')) {
2849
+ delete doc.$__.validationError.errors[key];
2850
+ }
2851
+ }
2852
+ if (Object.keys(doc.$__.validationError.errors).length === 0) {
2853
+ doc.$__.validationError = null;
2854
+ }
2855
+ }
2856
+
2857
+ /*!
2858
+ * ignore
2859
+ */
2860
+
2861
+ function _checkImmutableSubpaths(subdoc, schematype, priorVal) {
2862
+ const schema = schematype.schema;
2863
+ if (schema == null) {
2864
+ return;
2865
+ }
2866
+
2867
+ for (const key of Object.keys(schema.paths)) {
2868
+ const path = schema.paths[key];
2869
+ if (path.$immutableSetter == null) {
2870
+ continue;
2871
+ }
2872
+ const oldVal = priorVal == null ? void 0 : priorVal.$__getValue(key);
2873
+ // Calling immutableSetter with `oldVal` even though it expects `newVal`
2874
+ // is intentional. That's because `$immutableSetter` compares its param
2875
+ // to the current value.
2876
+ path.$immutableSetter.call(subdoc, oldVal);
2877
+ }
2878
+ }
2879
+
2880
+ /**
2881
+ * Saves this document by inserting a new document into the database if [document.isNew](/docs/api.html#document_Document-isNew) is `true`,
2882
+ * or sends an [updateOne](/docs/api.html#document_Document-updateOne) operation **only** with the modifications to the database, it does not replace the whole document in the latter case.
2883
+ *
2884
+ * ####Example:
2885
+ *
2886
+ * product.sold = Date.now();
2887
+ * product = await product.save();
2888
+ *
2889
+ * If save is successful, the returned promise will fulfill with the document
2890
+ * saved.
2891
+ *
2892
+ * ####Example:
2893
+ *
2894
+ * const newProduct = await product.save();
2895
+ * newProduct === product; // true
2896
+ *
2897
+ * @param {Object} [options] options optional options
2898
+ * @param {Session} [options.session=null] the [session](https://docs.mongodb.com/manual/reference/server-sessions/) associated with this save operation. If not specified, defaults to the [document's associated session](api.html#document_Document-$session).
2899
+ * @param {Object} [options.safe] (DEPRECATED) overrides [schema's safe option](http://mongoosejs.com//docs/guide.html#safe). Use the `w` option instead.
2900
+ * @param {Boolean} [options.validateBeforeSave] set to false to save without validating.
2901
+ * @param {Boolean} [options.validateModifiedOnly=false] If `true`, Mongoose will only validate modified paths, as opposed to modified paths and `required` paths.
2902
+ * @param {Number|String} [options.w] set the [write concern](https://docs.mongodb.com/manual/reference/write-concern/#w-option). Overrides the [schema-level `writeConcern` option](/docs/guide.html#writeConcern)
2903
+ * @param {Boolean} [options.j] set to true for MongoDB to wait until this `save()` has been [journaled before resolving the returned promise](https://docs.mongodb.com/manual/reference/write-concern/#j-option). Overrides the [schema-level `writeConcern` option](/docs/guide.html#writeConcern)
2904
+ * @param {Number} [options.wtimeout] sets a [timeout for the write concern](https://docs.mongodb.com/manual/reference/write-concern/#wtimeout). Overrides the [schema-level `writeConcern` option](/docs/guide.html#writeConcern).
2905
+ * @param {Boolean} [options.checkKeys=true] the MongoDB driver prevents you from saving keys that start with '$' or contain '.' by default. Set this option to `false` to skip that check. See [restrictions on field names](https://docs.mongodb.com/manual/reference/limits/#Restrictions-on-Field-Names)
2906
+ * @param {Boolean} [options.timestamps=true] if `false` and [timestamps](./guide.html#timestamps) are enabled, skip timestamps for this `save()`.
2907
+ * @param {Function} [fn] optional callback
2908
+ * @method save
2909
+ * @memberOf Document
2910
+ * @instance
2911
+ * @throws {DocumentNotFoundError} if this [save updates an existing document](api.html#document_Document-isNew) but the document doesn't exist in the database. For example, you will get this error if the document is [deleted between when you retrieved the document and when you saved it](documents.html#updating).
2912
+ * @return {Promise|undefined} Returns undefined if used with callback or a Promise otherwise.
2913
+ * @api public
2914
+ * @see middleware http://mongoosejs.com/docs/middleware.html
2915
+ */
2916
+
2917
+ /**
2918
+ * Checks if a path is invalid
2919
+ *
2920
+ * @param {String|Array<String>} path the field to check
2921
+ * @method $isValid
2922
+ * @memberOf Document
2923
+ * @instance
2924
+ * @api private
2925
+ */
2926
+
2927
+ Document.prototype.$isValid = function(path) {
2928
+ if (this.$__.validationError == null || Object.keys(this.$__.validationError.errors).length === 0) {
2929
+ return true;
2930
+ }
2931
+ if (path == null) {
2932
+ return false;
2933
+ }
2934
+
2935
+ if (path.indexOf(' ') !== -1) {
2936
+ path = path.split(' ');
2937
+ }
2938
+ if (Array.isArray(path)) {
2939
+ return path.some(p => this.$__.validationError.errors[p] == null);
2940
+ }
2941
+
2942
+ return this.$__.validationError.errors[path] == null;
2943
+ };
2944
+
2945
+ /**
2946
+ * Resets the internal modified state of this document.
2947
+ *
2948
+ * @api private
2949
+ * @return {Document}
2950
+ * @method $__reset
2951
+ * @memberOf Document
2952
+ * @instance
2953
+ */
2954
+
2955
+ Document.prototype.$__reset = function reset() {
2956
+ let _this = this;
2957
+
2958
+ this.$__.activePaths
2959
+ .map('init', 'modify', function(i) {
2960
+ return _this.$__getValue(i);
2961
+ })
2962
+ .filter(function(val) {
2963
+ return val && val instanceof Array && val.isMongooseDocumentArray && val.length;
2964
+ })
2965
+ .forEach(function(array) {
2966
+ let i = array.length;
2967
+ while (i--) {
2968
+ const doc = array[i];
2969
+ if (!doc) {
2970
+ continue;
2971
+ }
2972
+ doc.$__reset();
2973
+ }
2974
+
2975
+ _this.$__.activePaths.init(array.$path());
2976
+
2977
+ array[arrayAtomicsBackupSymbol] = array[arrayAtomicsSymbol];
2978
+ array[arrayAtomicsSymbol] = {};
2979
+ });
2980
+
2981
+ this.$__.activePaths.
2982
+ map('init', 'modify', function(i) {
2983
+ return _this.$__getValue(i);
2984
+ }).
2985
+ filter(function(val) {
2986
+ return val && val.$isSingleNested;
2987
+ }).
2988
+ forEach(function(doc) {
2989
+ doc.$__reset();
2990
+ if (doc.$__parent === _this) {
2991
+ _this.$__.activePaths.init(doc.$basePath);
2992
+ } else if (doc.$__parent != null && doc.$__parent.ownerDocument) {
2993
+ // If map path underneath subdocument, may end up with a case where
2994
+ // map path is modified but parent still needs to be reset. See gh-10295
2995
+ doc.$__parent.$__reset();
2996
+ }
2997
+ });
2998
+
2999
+ // clear atomics
3000
+ this.$__dirty().forEach(function(dirt) {
3001
+ const type = dirt.value;
3002
+
3003
+ if (type && type[arrayAtomicsSymbol]) {
3004
+ type[arrayAtomicsBackupSymbol] = type[arrayAtomicsSymbol];
3005
+ type[arrayAtomicsSymbol] = {};
3006
+ }
3007
+ });
3008
+
3009
+ this.$__.backup = {};
3010
+ this.$__.backup.activePaths = {
3011
+ modify: Object.assign({}, this.$__.activePaths.states.modify),
3012
+ default: Object.assign({}, this.$__.activePaths.states.default)
3013
+ };
3014
+ this.$__.backup.validationError = this.$__.validationError;
3015
+ this.$__.backup.errors = this.errors;
3016
+
3017
+ // Clear 'dirty' cache
3018
+ this.$__.activePaths.clear('modify');
3019
+ this.$__.activePaths.clear('default');
3020
+ this.$__.validationError = undefined;
3021
+ this.errors = undefined;
3022
+ _this = this;
3023
+ this.$__schema.requiredPaths().forEach(function(path) {
3024
+ _this.$__.activePaths.require(path);
3025
+ });
3026
+
3027
+ return this;
3028
+ };
3029
+
3030
+ /*!
3031
+ * ignore
3032
+ */
3033
+
3034
+ Document.prototype.$__undoReset = function $__undoReset() {
3035
+ if (this.$__.backup == null || this.$__.backup.activePaths == null) {
3036
+ return;
3037
+ }
3038
+
3039
+ this.$__.activePaths.states.modify = this.$__.backup.activePaths.modify;
3040
+ this.$__.activePaths.states.default = this.$__.backup.activePaths.default;
3041
+
3042
+ this.$__.validationError = this.$__.backup.validationError;
3043
+ this.errors = this.$__.backup.errors;
3044
+
3045
+ for (const dirt of this.$__dirty()) {
3046
+ const type = dirt.value;
3047
+
3048
+ if (type && type[arrayAtomicsSymbol] && type[arrayAtomicsBackupSymbol]) {
3049
+ type[arrayAtomicsSymbol] = type[arrayAtomicsBackupSymbol];
3050
+ }
3051
+ }
3052
+
3053
+ for (const subdoc of this.$getAllSubdocs()) {
3054
+ subdoc.$__undoReset();
3055
+ }
3056
+ };
3057
+
3058
+ /**
3059
+ * Returns this documents dirty paths / vals.
3060
+ *
3061
+ * @api private
3062
+ * @method $__dirty
3063
+ * @memberOf Document
3064
+ * @instance
3065
+ */
3066
+
3067
+ Document.prototype.$__dirty = function() {
3068
+ const _this = this;
3069
+
3070
+ let all = this.$__.activePaths.map('modify', function(path) {
3071
+ return {
3072
+ path: path,
3073
+ value: _this.$__getValue(path),
3074
+ schema: _this.$__path(path)
3075
+ };
3076
+ });
3077
+ // gh-2558: if we had to set a default and the value is not undefined,
3078
+ // we have to save as well
3079
+ all = all.concat(this.$__.activePaths.map('default', function(path) {
3080
+ if (path === '_id' || _this.$__getValue(path) == null) {
3081
+ return;
3082
+ }
3083
+ return {
3084
+ path: path,
3085
+ value: _this.$__getValue(path),
3086
+ schema: _this.$__path(path)
3087
+ };
3088
+ }));
3089
+
3090
+ // Sort dirty paths in a flat hierarchy.
3091
+ all.sort(function(a, b) {
3092
+ return (a.path < b.path ? -1 : (a.path > b.path ? 1 : 0));
3093
+ });
3094
+
3095
+ // Ignore "foo.a" if "foo" is dirty already.
3096
+ const minimal = [];
3097
+ let lastPath;
3098
+ let top;
3099
+
3100
+ all.forEach(function(item) {
3101
+ if (!item) {
3102
+ return;
3103
+ }
3104
+ if (lastPath == null || item.path.indexOf(lastPath) !== 0) {
3105
+ lastPath = item.path + '.';
3106
+ minimal.push(item);
3107
+ top = item;
3108
+ } else if (top != null &&
3109
+ top.value != null &&
3110
+ top.value[arrayAtomicsSymbol] != null &&
3111
+ top.value.hasAtomics()) {
3112
+ // special case for top level MongooseArrays
3113
+ // the `top` array itself and a sub path of `top` are being modified.
3114
+ // the only way to honor all of both modifications is through a $set
3115
+ // of entire array.
3116
+ top.value[arrayAtomicsSymbol] = {};
3117
+ top.value[arrayAtomicsSymbol].$set = top.value;
3118
+ }
3119
+ });
3120
+ top = lastPath = null;
3121
+ return minimal;
3122
+ };
3123
+
3124
+ /**
3125
+ * Assigns/compiles `schema` into this documents prototype.
3126
+ *
3127
+ * @param {Schema} schema
3128
+ * @api private
3129
+ * @method $__setSchema
3130
+ * @memberOf Document
3131
+ * @instance
3132
+ */
3133
+
3134
+ Document.prototype.$__setSchema = function(schema) {
3135
+ schema.plugin(idGetter, { deduplicate: true });
3136
+ compile$1(schema.tree, this, undefined, schema.options);
3137
+
3138
+ // Apply default getters if virtual doesn't have any (gh-6262)
3139
+ for (const key of Object.keys(schema.virtuals)) {
3140
+ schema.virtuals[key]._applyDefaultGetters();
3141
+ }
3142
+ if (schema.path('schema') == null) {
3143
+ this.schema = schema;
3144
+ }
3145
+ this.$__schema = schema;
3146
+ this[documentSchemaSymbol] = schema;
3147
+ };
3148
+
3149
+
3150
+ /**
3151
+ * Get active path that were changed and are arrays
3152
+ *
3153
+ * @api private
3154
+ * @method $__getArrayPathsToValidate
3155
+ * @memberOf Document
3156
+ * @instance
3157
+ */
3158
+
3159
+ Document.prototype.$__getArrayPathsToValidate = function() {
3160
+
3161
+ // validate all document arrays.
3162
+ return this.$__.activePaths
3163
+ .map('init', 'modify', function(i) {
3164
+ return this.$__getValue(i);
3165
+ }.bind(this))
3166
+ .filter(function(val) {
3167
+ return val && val instanceof Array && val.isMongooseDocumentArray && val.length;
3168
+ }).reduce(function(seed, array) {
3169
+ return seed.concat(array);
3170
+ }, [])
3171
+ .filter(function(doc) {
3172
+ return doc;
3173
+ });
3174
+ };
3175
+
3176
+
3177
+ /**
3178
+ * Get all subdocs (by bfs)
3179
+ *
3180
+ * @api public
3181
+ * @method $getAllSubdocs
3182
+ * @memberOf Document
3183
+ * @instance
3184
+ */
3185
+
3186
+ Document.prototype.$getAllSubdocs = function $getAllSubdocs() {
3187
+ Embedded = Embedded || embedded;
3188
+
3189
+ function docReducer(doc, seed, path) {
3190
+ let val = doc;
3191
+ let isNested = false;
3192
+ if (path) {
3193
+ if (doc instanceof Document && doc[documentSchemaSymbol].paths[path]) {
3194
+ val = doc._doc[path];
3195
+ } else if (doc instanceof Document && doc[documentSchemaSymbol].nested[path]) {
3196
+ val = doc._doc[path];
3197
+ isNested = true;
3198
+ } else {
3199
+ val = doc[path];
3200
+ }
3201
+ }
3202
+ if (val instanceof Embedded) {
3203
+ seed.push(val);
3204
+ } else if (val instanceof Map) {
3205
+ seed = Array.from(val.keys()).reduce(function(seed, path) {
3206
+ return docReducer(val.get(path), seed, null);
3207
+ }, seed);
3208
+ } else if (val && val.$isSingleNested) {
3209
+ seed = Object.keys(val._doc).reduce(function(seed, path) {
3210
+ return docReducer(val._doc, seed, path);
3211
+ }, seed);
3212
+ seed.push(val);
3213
+ } else if (val && val.isMongooseDocumentArray) {
3214
+ val.forEach(function _docReduce(doc) {
3215
+ if (!doc || !doc._doc) {
3216
+ return;
3217
+ }
3218
+ seed = Object.keys(doc._doc).reduce(function(seed, path) {
3219
+ return docReducer(doc._doc, seed, path);
3220
+ }, seed);
3221
+ if (doc instanceof Embedded) {
3222
+ seed.push(doc);
3223
+ }
3224
+ });
3225
+ } else if (isNested && val != null) {
3226
+ for (const path of Object.keys(val)) {
3227
+ docReducer(val, seed, path);
3228
+ }
3229
+ }
3230
+ return seed;
3231
+ }
3232
+
3233
+ const subDocs = [];
3234
+ for (const path of Object.keys(this._doc)) {
3235
+ docReducer(this, subDocs, path);
3236
+ }
3237
+
3238
+ return subDocs;
3239
+ };
3240
+
3241
+ /*!
3242
+ * Runs queued functions
3243
+ */
3244
+
3245
+ function applyQueue(doc) {
3246
+ const q = doc.$__schema && doc.$__schema.callQueue;
3247
+ if (!q.length) {
3248
+ return;
3249
+ }
3250
+
3251
+ for (const pair of q) {
3252
+ if (pair[0] !== 'pre' && pair[0] !== 'post' && pair[0] !== 'on') {
3253
+ doc[pair[0]].apply(doc, pair[1]);
3254
+ }
3255
+ }
3256
+ }
3257
+
3258
+ /*!
3259
+ * ignore
3260
+ */
3261
+
3262
+ Document.prototype.$__handleReject = function handleReject(err) {
3263
+ // emit on the Model if listening
3264
+ if (this.listeners('error').length) {
3265
+ this.emit('error', err);
3266
+ } else if (this.constructor.listeners && this.constructor.listeners('error').length) {
3267
+ this.constructor.emit('error', err);
3268
+ }
3269
+ };
3270
+
3271
+ /**
3272
+ * Internal helper for toObject() and toJSON() that doesn't manipulate options
3273
+ *
3274
+ * @api private
3275
+ * @method $toObject
3276
+ * @memberOf Document
3277
+ * @instance
3278
+ */
3279
+
3280
+ Document.prototype.$toObject = function(options, json) {
3281
+ let defaultOptions = {
3282
+ transform: true,
3283
+ flattenDecimals: true
3284
+ };
3285
+
3286
+ const path = json ? 'toJSON' : 'toObject';
3287
+ const baseOptions = get(this, 'constructor.base.options.' + path, {});
3288
+ const schemaOptions = get(this, '$__schema.options', {});
3289
+ // merge base default options with Schema's set default options if available.
3290
+ // `clone` is necessary here because `utils.options` directly modifies the second input.
3291
+ defaultOptions = utils.options(defaultOptions, clone(baseOptions));
3292
+ defaultOptions = utils.options(defaultOptions, clone(schemaOptions[path] || {}));
3293
+
3294
+ // If options do not exist or is not an object, set it to empty object
3295
+ options = utils.isPOJO(options) ? clone(options) : {};
3296
+ options._calledWithOptions = options._calledWithOptions || clone(options);
3297
+
3298
+ let _minimize;
3299
+ if (options._calledWithOptions.minimize != null) {
3300
+ _minimize = options.minimize;
3301
+ } else if (defaultOptions.minimize != null) {
3302
+ _minimize = defaultOptions.minimize;
3303
+ } else {
3304
+ _minimize = schemaOptions.minimize;
3305
+ }
3306
+
3307
+ let flattenMaps;
3308
+ if (options._calledWithOptions.flattenMaps != null) {
3309
+ flattenMaps = options.flattenMaps;
3310
+ } else if (defaultOptions.flattenMaps != null) {
3311
+ flattenMaps = defaultOptions.flattenMaps;
3312
+ } else {
3313
+ flattenMaps = schemaOptions.flattenMaps;
3314
+ }
3315
+
3316
+ // The original options that will be passed to `clone()`. Important because
3317
+ // `clone()` will recursively call `$toObject()` on embedded docs, so we
3318
+ // need the original options the user passed in, plus `_isNested` and
3319
+ // `_parentOptions` for checking whether we need to depopulate.
3320
+ const cloneOptions = Object.assign(utils.clone(options), {
3321
+ _isNested: true,
3322
+ json: json,
3323
+ minimize: _minimize,
3324
+ flattenMaps: flattenMaps
3325
+ });
3326
+
3327
+ if (utils.hasUserDefinedProperty(options, 'getters')) {
3328
+ cloneOptions.getters = options.getters;
3329
+ }
3330
+ if (utils.hasUserDefinedProperty(options, 'virtuals')) {
3331
+ cloneOptions.virtuals = options.virtuals;
3332
+ }
3333
+
3334
+ const depopulate = options.depopulate ||
3335
+ get(options, '_parentOptions.depopulate', false);
3336
+ // _isNested will only be true if this is not the top level document, we
3337
+ // should never depopulate
3338
+ if (depopulate && options._isNested && this.$__.wasPopulated) {
3339
+ // populated paths that we set to a document
3340
+ return clone(this._id, cloneOptions);
3341
+ }
3342
+
3343
+ // merge default options with input options.
3344
+ options = utils.options(defaultOptions, options);
3345
+ options._isNested = true;
3346
+ options.json = json;
3347
+ options.minimize = _minimize;
3348
+
3349
+ cloneOptions._parentOptions = options;
3350
+ cloneOptions._skipSingleNestedGetters = true;
3351
+
3352
+ const gettersOptions = Object.assign({}, cloneOptions);
3353
+ gettersOptions._skipSingleNestedGetters = false;
3354
+
3355
+ // remember the root transform function
3356
+ // to save it from being overwritten by sub-transform functions
3357
+ const originalTransform = options.transform;
3358
+
3359
+ let ret = clone(this._doc, cloneOptions) || {};
3360
+
3361
+ if (options.getters) {
3362
+ applyGetters(this, ret, gettersOptions);
3363
+
3364
+ if (options.minimize) {
3365
+ ret = minimize(ret) || {};
3366
+ }
3367
+ }
3368
+
3369
+ if (options.virtuals || (options.getters && options.virtuals !== false)) {
3370
+ applyVirtuals(this, ret, gettersOptions, options);
3371
+ }
3372
+
3373
+ if (options.versionKey === false && this.$__schema.options.versionKey) {
3374
+ delete ret[this.$__schema.options.versionKey];
3375
+ }
3376
+
3377
+ let transform = options.transform;
3378
+
3379
+ // In the case where a subdocument has its own transform function, we need to
3380
+ // check and see if the parent has a transform (options.transform) and if the
3381
+ // child schema has a transform (this.schema.options.toObject) In this case,
3382
+ // we need to adjust options.transform to be the child schema's transform and
3383
+ // not the parent schema's
3384
+ if (transform) {
3385
+ applySchemaTypeTransforms(this, ret);
3386
+ }
3387
+
3388
+ if (options.useProjection) {
3389
+ omitDeselectedFields(this, ret);
3390
+ }
3391
+
3392
+ if (transform === true || (schemaOptions.toObject && transform)) {
3393
+ const opts = options.json ? schemaOptions.toJSON : schemaOptions.toObject;
3394
+
3395
+ if (opts) {
3396
+ transform = (typeof options.transform === 'function' ? options.transform : opts.transform);
3397
+ }
3398
+ } else {
3399
+ options.transform = originalTransform;
3400
+ }
3401
+
3402
+ if (typeof transform === 'function') {
3403
+ const xformed = transform(this, ret, options);
3404
+ if (typeof xformed !== 'undefined') {
3405
+ ret = xformed;
3406
+ }
3407
+ }
3408
+
3409
+ return ret;
3410
+ };
3411
+
3412
+ /**
3413
+ * Converts this document into a plain-old JavaScript object ([POJO](https://masteringjs.io/tutorials/fundamentals/pojo)).
3414
+ *
3415
+ * Buffers are converted to instances of [mongodb.Binary](http://mongodb.github.com/node-mongodb-native/api-bson-generated/binary.html) for proper storage.
3416
+ *
3417
+ * ####Options:
3418
+ *
3419
+ * - `getters` apply all getters (path and virtual getters), defaults to false
3420
+ * - `aliases` apply all aliases if `virtuals=true`, defaults to true
3421
+ * - `virtuals` apply virtual getters (can override `getters` option), defaults to false
3422
+ * - `minimize` remove empty objects, defaults to true
3423
+ * - `transform` a transform function to apply to the resulting document before returning
3424
+ * - `depopulate` depopulate any populated paths, replacing them with their original refs, defaults to false
3425
+ * - `versionKey` whether to include the version key, defaults to true
3426
+ * - `flattenMaps` convert Maps to POJOs. Useful if you want to JSON.stringify() the result of toObject(), defaults to false
3427
+ * - `useProjection` set to `true` to omit fields that are excluded in this document's projection. Unless you specified a projection, this will omit any field that has `select: false` in the schema.
3428
+ *
3429
+ * ####Getters/Virtuals
3430
+ *
3431
+ * Example of only applying path getters
3432
+ *
3433
+ * doc.toObject({ getters: true, virtuals: false })
3434
+ *
3435
+ * Example of only applying virtual getters
3436
+ *
3437
+ * doc.toObject({ virtuals: true })
3438
+ *
3439
+ * Example of applying both path and virtual getters
3440
+ *
3441
+ * doc.toObject({ getters: true })
3442
+ *
3443
+ * To apply these options to every document of your schema by default, set your [schemas](#schema_Schema) `toObject` option to the same argument.
3444
+ *
3445
+ * schema.set('toObject', { virtuals: true })
3446
+ *
3447
+ * ####Transform
3448
+ *
3449
+ * We may need to perform a transformation of the resulting object based on some criteria, say to remove some sensitive information or return a custom object. In this case we set the optional `transform` function.
3450
+ *
3451
+ * Transform functions receive three arguments
3452
+ *
3453
+ * function (doc, ret, options) {}
3454
+ *
3455
+ * - `doc` The mongoose document which is being converted
3456
+ * - `ret` The plain object representation which has been converted
3457
+ * - `options` The options in use (either schema options or the options passed inline)
3458
+ *
3459
+ * ####Example
3460
+ *
3461
+ * // specify the transform schema option
3462
+ * if (!schema.options.toObject) schema.options.toObject = {};
3463
+ * schema.options.toObject.transform = function (doc, ret, options) {
3464
+ * // remove the _id of every document before returning the result
3465
+ * delete ret._id;
3466
+ * return ret;
3467
+ * }
3468
+ *
3469
+ * // without the transformation in the schema
3470
+ * doc.toObject(); // { _id: 'anId', name: 'Wreck-it Ralph' }
3471
+ *
3472
+ * // with the transformation
3473
+ * doc.toObject(); // { name: 'Wreck-it Ralph' }
3474
+ *
3475
+ * With transformations we can do a lot more than remove properties. We can even return completely new customized objects:
3476
+ *
3477
+ * if (!schema.options.toObject) schema.options.toObject = {};
3478
+ * schema.options.toObject.transform = function (doc, ret, options) {
3479
+ * return { movie: ret.name }
3480
+ * }
3481
+ *
3482
+ * // without the transformation in the schema
3483
+ * doc.toObject(); // { _id: 'anId', name: 'Wreck-it Ralph' }
3484
+ *
3485
+ * // with the transformation
3486
+ * doc.toObject(); // { movie: 'Wreck-it Ralph' }
3487
+ *
3488
+ * _Note: if a transform function returns `undefined`, the return value will be ignored._
3489
+ *
3490
+ * Transformations may also be applied inline, overridding any transform set in the options:
3491
+ *
3492
+ * function xform (doc, ret, options) {
3493
+ * return { inline: ret.name, custom: true }
3494
+ * }
3495
+ *
3496
+ * // pass the transform as an inline option
3497
+ * doc.toObject({ transform: xform }); // { inline: 'Wreck-it Ralph', custom: true }
3498
+ *
3499
+ * If you want to skip transformations, use `transform: false`:
3500
+ *
3501
+ * schema.options.toObject.hide = '_id';
3502
+ * schema.options.toObject.transform = function (doc, ret, options) {
3503
+ * if (options.hide) {
3504
+ * options.hide.split(' ').forEach(function (prop) {
3505
+ * delete ret[prop];
3506
+ * });
3507
+ * }
3508
+ * return ret;
3509
+ * }
3510
+ *
3511
+ * const doc = new Doc({ _id: 'anId', secret: 47, name: 'Wreck-it Ralph' });
3512
+ * doc.toObject(); // { secret: 47, name: 'Wreck-it Ralph' }
3513
+ * doc.toObject({ hide: 'secret _id', transform: false });// { _id: 'anId', secret: 47, name: 'Wreck-it Ralph' }
3514
+ * doc.toObject({ hide: 'secret _id', transform: true }); // { name: 'Wreck-it Ralph' }
3515
+ *
3516
+ * If you pass a transform in `toObject()` options, Mongoose will apply the transform
3517
+ * to [subdocuments](/docs/subdocs.html) in addition to the top-level document.
3518
+ * Similarly, `transform: false` skips transforms for all subdocuments.
3519
+ * Note that this is behavior is different for transforms defined in the schema:
3520
+ * if you define a transform in `schema.options.toObject.transform`, that transform
3521
+ * will **not** apply to subdocuments.
3522
+ *
3523
+ * const memberSchema = new Schema({ name: String, email: String });
3524
+ * const groupSchema = new Schema({ members: [memberSchema], name: String, email });
3525
+ * const Group = mongoose.model('Group', groupSchema);
3526
+ *
3527
+ * const doc = new Group({
3528
+ * name: 'Engineering',
3529
+ * email: 'dev@mongoosejs.io',
3530
+ * members: [{ name: 'Val', email: 'val@mongoosejs.io' }]
3531
+ * });
3532
+ *
3533
+ * // Removes `email` from both top-level document **and** array elements
3534
+ * // { name: 'Engineering', members: [{ name: 'Val' }] }
3535
+ * doc.toObject({ transform: (doc, ret) => { delete ret.email; return ret; } });
3536
+ *
3537
+ * Transforms, like all of these options, are also available for `toJSON`. See [this guide to `JSON.stringify()`](https://thecodebarbarian.com/the-80-20-guide-to-json-stringify-in-javascript.html) to learn why `toJSON()` and `toObject()` are separate functions.
3538
+ *
3539
+ * See [schema options](/docs/guide.html#toObject) for some more details.
3540
+ *
3541
+ * _During save, no custom options are applied to the document before being sent to the database._
3542
+ *
3543
+ * @param {Object} [options]
3544
+ * @param {Boolean} [options.getters=false] if true, apply all getters, including virtuals
3545
+ * @param {Boolean} [options.virtuals=false] if true, apply virtuals, including aliases. Use `{ getters: true, virtuals: false }` to just apply getters, not virtuals
3546
+ * @param {Boolean} [options.aliases=true] if `options.virtuals = true`, you can set `options.aliases = false` to skip applying aliases. This option is a no-op if `options.virtuals = false`.
3547
+ * @param {Boolean} [options.minimize=true] if true, omit any empty objects from the output
3548
+ * @param {Function|null} [options.transform=null] if set, mongoose will call this function to allow you to transform the returned object
3549
+ * @param {Boolean} [options.depopulate=false] if true, replace any conventionally populated paths with the original id in the output. Has no affect on virtual populated paths.
3550
+ * @param {Boolean} [options.versionKey=true] if false, exclude the version key (`__v` by default) from the output
3551
+ * @param {Boolean} [options.flattenMaps=false] if true, convert Maps to POJOs. Useful if you want to `JSON.stringify()` the result of `toObject()`.
3552
+ * @param {Boolean} [options.useProjection=false] - If true, omits fields that are excluded in this document's projection. Unless you specified a projection, this will omit any field that has `select: false` in the schema.
3553
+ * @return {Object} js object
3554
+ * @see mongodb.Binary http://mongodb.github.com/node-mongodb-native/api-bson-generated/binary.html
3555
+ * @api public
3556
+ * @memberOf Document
3557
+ * @instance
3558
+ */
3559
+
3560
+ Document.prototype.toObject = function(options) {
3561
+ return this.$toObject(options);
3562
+ };
3563
+
3564
+ /*!
3565
+ * Minimizes an object, removing undefined values and empty objects
3566
+ *
3567
+ * @param {Object} object to minimize
3568
+ * @return {Object}
3569
+ */
3570
+
3571
+ function minimize(obj) {
3572
+ const keys = Object.keys(obj);
3573
+ let i = keys.length;
3574
+ let hasKeys;
3575
+ let key;
3576
+ let val;
3577
+
3578
+ while (i--) {
3579
+ key = keys[i];
3580
+ val = obj[key];
3581
+
3582
+ if (utils.isObject(val) && !Buffer.isBuffer(val)) {
3583
+ obj[key] = minimize(val);
3584
+ }
3585
+
3586
+ if (undefined === obj[key]) {
3587
+ delete obj[key];
3588
+ continue;
3589
+ }
3590
+
3591
+ hasKeys = true;
3592
+ }
3593
+
3594
+ return hasKeys
3595
+ ? obj
3596
+ : undefined;
3597
+ }
3598
+
3599
+ /*!
3600
+ * Applies virtuals properties to `json`.
3601
+ */
3602
+
3603
+ function applyVirtuals(self, json, options, toObjectOptions) {
3604
+ const schema = self.$__schema;
3605
+ const paths = Object.keys(schema.virtuals);
3606
+ let i = paths.length;
3607
+ const numPaths = i;
3608
+ let path;
3609
+ let assignPath;
3610
+ let cur = self._doc;
3611
+ let v;
3612
+ const aliases = get(toObjectOptions, 'aliases', true);
3613
+
3614
+ let virtualsToApply = null;
3615
+ if (Array.isArray(options.virtuals)) {
3616
+ virtualsToApply = new Set(options.virtuals);
3617
+ }
3618
+ else if (options.virtuals && options.virtuals.pathsToSkip) {
3619
+ virtualsToApply = new Set(paths);
3620
+ for (let i = 0; i < options.virtuals.pathsToSkip.length; i++) {
3621
+ if (virtualsToApply.has(options.virtuals.pathsToSkip[i])) {
3622
+ virtualsToApply.delete(options.virtuals.pathsToSkip[i]);
3623
+ }
3624
+ }
3625
+ }
3626
+
3627
+ if (!cur) {
3628
+ return json;
3629
+ }
3630
+
3631
+ options = options || {};
3632
+ for (i = 0; i < numPaths; ++i) {
3633
+ path = paths[i];
3634
+
3635
+ if (virtualsToApply != null && !virtualsToApply.has(path)) {
3636
+ continue;
3637
+ }
3638
+
3639
+ // Allow skipping aliases with `toObject({ virtuals: true, aliases: false })`
3640
+ if (!aliases && schema.aliases.hasOwnProperty(path)) {
3641
+ continue;
3642
+ }
3643
+
3644
+ // We may be applying virtuals to a nested object, for example if calling
3645
+ // `doc.nestedProp.toJSON()`. If so, the path we assign to, `assignPath`,
3646
+ // will be a trailing substring of the `path`.
3647
+ assignPath = path;
3648
+ if (options.path != null) {
3649
+ if (!path.startsWith(options.path + '.')) {
3650
+ continue;
3651
+ }
3652
+ assignPath = path.substr(options.path.length + 1);
3653
+ }
3654
+ const parts = assignPath.split('.');
3655
+ v = clone(self.get(path), options);
3656
+ if (v === void 0) {
3657
+ continue;
3658
+ }
3659
+ const plen = parts.length;
3660
+ cur = json;
3661
+ for (let j = 0; j < plen - 1; ++j) {
3662
+ cur[parts[j]] = cur[parts[j]] || {};
3663
+ cur = cur[parts[j]];
3664
+ }
3665
+ cur[parts[plen - 1]] = v;
3666
+ }
3667
+
3668
+ return json;
3669
+ }
3670
+
3671
+
3672
+ /*!
3673
+ * Applies virtuals properties to `json`.
3674
+ *
3675
+ * @param {Document} self
3676
+ * @param {Object} json
3677
+ * @return {Object} `json`
3678
+ */
3679
+
3680
+ function applyGetters(self, json, options) {
3681
+ const schema = self.$__schema;
3682
+ const paths = Object.keys(schema.paths);
3683
+ let i = paths.length;
3684
+ let path;
3685
+ let cur = self._doc;
3686
+ let v;
3687
+
3688
+ if (!cur) {
3689
+ return json;
3690
+ }
3691
+
3692
+ while (i--) {
3693
+ path = paths[i];
3694
+
3695
+ const parts = path.split('.');
3696
+ const plen = parts.length;
3697
+ const last = plen - 1;
3698
+ let branch = json;
3699
+ let part;
3700
+ cur = self._doc;
3701
+
3702
+ if (!self.$__isSelected(path)) {
3703
+ continue;
3704
+ }
3705
+
3706
+ for (let ii = 0; ii < plen; ++ii) {
3707
+ part = parts[ii];
3708
+ v = cur[part];
3709
+ if (ii === last) {
3710
+ const val = self.get(path);
3711
+ branch[part] = clone(val, options);
3712
+ } else if (v == null) {
3713
+ if (part in cur) {
3714
+ branch[part] = v;
3715
+ }
3716
+ break;
3717
+ } else {
3718
+ branch = branch[part] || (branch[part] = {});
3719
+ }
3720
+ cur = v;
3721
+ }
3722
+ }
3723
+
3724
+ return json;
3725
+ }
3726
+
3727
+ /*!
3728
+ * Applies schema type transforms to `json`.
3729
+ *
3730
+ * @param {Document} self
3731
+ * @param {Object} json
3732
+ * @return {Object} `json`
3733
+ */
3734
+
3735
+ function applySchemaTypeTransforms(self, json) {
3736
+ const schema = self.$__schema;
3737
+ const paths = Object.keys(schema.paths || {});
3738
+ const cur = self._doc;
3739
+
3740
+ if (!cur) {
3741
+ return json;
3742
+ }
3743
+
3744
+ for (const path of paths) {
3745
+ const schematype = schema.paths[path];
3746
+ if (typeof schematype.options.transform === 'function') {
3747
+ const val = self.get(path);
3748
+ const transformedValue = schematype.options.transform.call(self, val);
3749
+ throwErrorIfPromise(path, transformedValue);
3750
+ utils.setValue(path, transformedValue, json);
3751
+ } else if (schematype.$embeddedSchemaType != null &&
3752
+ typeof schematype.$embeddedSchemaType.options.transform === 'function') {
3753
+ const vals = [].concat(self.get(path));
3754
+ const transform = schematype.$embeddedSchemaType.options.transform;
3755
+ for (let i = 0; i < vals.length; ++i) {
3756
+ const transformedValue = transform.call(self, vals[i]);
3757
+ vals[i] = transformedValue;
3758
+ throwErrorIfPromise(path, transformedValue);
3759
+ }
3760
+
3761
+ json[path] = vals;
3762
+ }
3763
+ }
3764
+
3765
+ return json;
3766
+ }
3767
+
3768
+ function throwErrorIfPromise(path, transformedValue) {
3769
+ if (isPromise(transformedValue)) {
3770
+ throw new Error('`transform` function must be synchronous, but the transform on path `' + path + '` returned a promise.');
3771
+ }
3772
+ }
3773
+
3774
+ /*!
3775
+ * ignore
3776
+ */
3777
+
3778
+ function omitDeselectedFields(self, json) {
3779
+ const schema = self.$__schema;
3780
+ const paths = Object.keys(schema.paths || {});
3781
+ const cur = self._doc;
3782
+
3783
+ if (!cur) {
3784
+ return json;
3785
+ }
3786
+
3787
+ let selected = self.$__.selected;
3788
+ if (selected === void 0) {
3789
+ selected = {};
3790
+ queryhelpers.applyPaths(selected, schema);
3791
+ }
3792
+ if (selected == null || Object.keys(selected).length === 0) {
3793
+ return json;
3794
+ }
3795
+
3796
+ for (const path of paths) {
3797
+ if (selected[path] != null && !selected[path]) {
3798
+ delete json[path];
3799
+ }
3800
+ }
3801
+
3802
+ return json;
3803
+ }
3804
+
3805
+ /**
3806
+ * The return value of this method is used in calls to JSON.stringify(doc).
3807
+ *
3808
+ * This method accepts the same options as [Document#toObject](#document_Document-toObject). To apply the options to every document of your schema by default, set your [schemas](#schema_Schema) `toJSON` option to the same argument.
3809
+ *
3810
+ * schema.set('toJSON', { virtuals: true })
3811
+ *
3812
+ * See [schema options](/docs/guide.html#toJSON) for details.
3813
+ *
3814
+ * @param {Object} options
3815
+ * @return {Object}
3816
+ * @see Document#toObject #document_Document-toObject
3817
+ * @see JSON.stringify() in JavaScript https://thecodebarbarian.com/the-80-20-guide-to-json-stringify-in-javascript.html
3818
+ * @api public
3819
+ * @memberOf Document
3820
+ * @instance
3821
+ */
3822
+
3823
+ Document.prototype.toJSON = function(options) {
3824
+ return this.$toObject(options, true);
3825
+ };
3826
+
3827
+ /**
3828
+ * If this document is a subdocument or populated document, returns the document's
3829
+ * parent. Returns `undefined` otherwise.
3830
+ *
3831
+ * @api public
3832
+ * @method parent
3833
+ * @memberOf Document
3834
+ * @instance
3835
+ */
3836
+
3837
+ Document.prototype.parent = function() {
3838
+ return this.$__.parent;
3839
+ };
3840
+
3841
+ /**
3842
+ * Alias for `parent()`. If this document is a subdocument or populated
3843
+ * document, returns the document's parent. Returns `undefined` otherwise.
3844
+ *
3845
+ * @api public
3846
+ * @method $parent
3847
+ * @memberOf Document
3848
+ * @instance
3849
+ */
3850
+
3851
+ Document.prototype.$parent = Document.prototype.parent;
3852
+
3853
+ /**
3854
+ * Helper for console.log
3855
+ *
3856
+ * @api public
3857
+ * @method inspect
3858
+ * @memberOf Document
3859
+ * @instance
3860
+ */
3861
+
3862
+ Document.prototype.inspect = function(options) {
3863
+ const isPOJO = utils.isPOJO(options);
3864
+ let opts;
3865
+ if (isPOJO) {
3866
+ opts = options;
3867
+ opts.minimize = false;
3868
+ }
3869
+ const ret = this.toObject(opts);
3870
+
3871
+ if (ret == null) {
3872
+ // If `toObject()` returns null, `this` is still an object, so if `inspect()`
3873
+ // prints out null this can cause some serious confusion. See gh-7942.
3874
+ return 'MongooseDocument { ' + ret + ' }';
3875
+ }
3876
+
3877
+ return ret;
3878
+ };
3879
+
3880
+ if (inspect.custom) {
3881
+ /*!
3882
+ * Avoid Node deprecation warning DEP0079
3883
+ */
3884
+
3885
+ Document.prototype[inspect.custom] = Document.prototype.inspect;
3886
+ }
3887
+
3888
+ /**
3889
+ * Helper for console.log
3890
+ *
3891
+ * @api public
3892
+ * @method toString
3893
+ * @memberOf Document
3894
+ * @instance
3895
+ */
3896
+
3897
+ Document.prototype.toString = function() {
3898
+ const ret = this.inspect();
3899
+ if (typeof ret === 'string') {
3900
+ return ret;
3901
+ }
3902
+ return inspect(ret);
3903
+ };
3904
+
3905
+ /**
3906
+ * Returns true if this document is equal to another document.
3907
+ *
3908
+ * Documents are considered equal when they have matching `_id`s, unless neither
3909
+ * document has an `_id`, in which case this function falls back to using
3910
+ * `deepEqual()`.
3911
+ *
3912
+ * @param {Document} doc a document to compare
3913
+ * @return {Boolean}
3914
+ * @api public
3915
+ * @memberOf Document
3916
+ * @instance
3917
+ */
3918
+
3919
+ Document.prototype.equals = function(doc) {
3920
+ if (!doc) {
3921
+ return false;
3922
+ }
3923
+
3924
+ const tid = this.$__getValue('_id');
3925
+ const docid = doc.$__ != null ? doc.$__getValue('_id') : doc;
3926
+ if (!tid && !docid) {
3927
+ return deepEqual(this, doc);
3928
+ }
3929
+ return tid && tid.equals
3930
+ ? tid.equals(docid)
3931
+ : tid === docid;
3932
+ };
3933
+
3934
+ /**
3935
+ * Populates document references, executing the `callback` when complete.
3936
+ * If you want to use promises instead, use this function with
3937
+ * [`execPopulate()`](#document_Document-execPopulate)
3938
+ *
3939
+ * ####Example:
3940
+ *
3941
+ * doc
3942
+ * .populate('company')
3943
+ * .populate({
3944
+ * path: 'notes',
3945
+ * match: /airline/,
3946
+ * select: 'text',
3947
+ * model: 'modelName'
3948
+ * options: opts
3949
+ * }, function (err, user) {
3950
+ * assert(doc._id === user._id) // the document itself is passed
3951
+ * })
3952
+ *
3953
+ * // summary
3954
+ * doc.populate(path) // not executed
3955
+ * doc.populate(options); // not executed
3956
+ * doc.populate(path, callback) // executed
3957
+ * doc.populate(options, callback); // executed
3958
+ * doc.populate(callback); // executed
3959
+ * doc.populate(options).execPopulate() // executed, returns promise
3960
+ *
3961
+ *
3962
+ * ####NOTE:
3963
+ *
3964
+ * Population does not occur unless a `callback` is passed *or* you explicitly
3965
+ * call `execPopulate()`.
3966
+ * Passing the same path a second time will overwrite the previous path options.
3967
+ * See [Model.populate()](#model_Model.populate) for explaination of options.
3968
+ *
3969
+ * @see Model.populate #model_Model.populate
3970
+ * @see Document.execPopulate #document_Document-execPopulate
3971
+ * @param {String|Object} [path] The path to populate or an options object
3972
+ * @param {Function} [callback] When passed, population is invoked
3973
+ * @api public
3974
+ * @return {Document} this
3975
+ * @memberOf Document
3976
+ * @instance
3977
+ */
3978
+
3979
+ Document.prototype.populate = function populate() {
3980
+ if (arguments.length === 0) {
3981
+ return this;
3982
+ }
3983
+
3984
+ const pop = this.$__.populate || (this.$__.populate = {});
3985
+ const args = utils.args(arguments);
3986
+ let fn;
3987
+
3988
+ if (typeof args[args.length - 1] === 'function') {
3989
+ fn = args.pop();
3990
+ }
3991
+
3992
+ // allow `doc.populate(callback)`
3993
+ if (args.length) {
3994
+ // use hash to remove duplicate paths
3995
+ const res = utils.populate.apply(null, args);
3996
+ for (const populateOptions of res) {
3997
+ pop[populateOptions.path] = populateOptions;
3998
+ }
3999
+ }
4000
+
4001
+ if (fn) {
4002
+ const paths = utils.object.vals(pop);
4003
+ this.$__.populate = undefined;
4004
+ let topLevelModel = this.constructor;
4005
+ if (this.$__isNested) {
4006
+ topLevelModel = this.$__[scopeSymbol].constructor;
4007
+ const nestedPath = this.$__.nestedPath;
4008
+ paths.forEach(function(populateOptions) {
4009
+ populateOptions.path = nestedPath + '.' + populateOptions.path;
4010
+ });
4011
+ }
4012
+
4013
+ // Use `$session()` by default if the document has an associated session
4014
+ // See gh-6754
4015
+ if (this.$session() != null) {
4016
+ const session = this.$session();
4017
+ paths.forEach(path => {
4018
+ if (path.options == null) {
4019
+ path.options = { session: session };
4020
+ return;
4021
+ }
4022
+ if (!('session' in path.options)) {
4023
+ path.options.session = session;
4024
+ }
4025
+ });
4026
+ }
4027
+
4028
+ topLevelModel.populate(this, paths, fn);
4029
+ }
4030
+
4031
+ return this;
4032
+ };
4033
+
4034
+ /**
4035
+ * Gets all populated documents associated with this document.
4036
+ *
4037
+ * @api public
4038
+ * @return {Array<Document>} array of populated documents. Empty array if there are no populated documents associated with this document.
4039
+ * @memberOf Document
4040
+ * @instance
4041
+ */
4042
+ Document.prototype.$getPopulatedDocs = function $getPopulatedDocs() {
4043
+ let keys = [];
4044
+ if (this.$__.populated != null) {
4045
+ keys = keys.concat(Object.keys(this.$__.populated));
4046
+ }
4047
+ if (this.$$populatedVirtuals != null) {
4048
+ keys = keys.concat(Object.keys(this.$$populatedVirtuals));
4049
+ }
4050
+ let result = [];
4051
+ for (const key of keys) {
4052
+ const value = this.get(key);
4053
+ if (Array.isArray(value)) {
4054
+ result = result.concat(value);
4055
+ } else if (value instanceof Document) {
4056
+ result.push(value);
4057
+ }
4058
+ }
4059
+ return result;
4060
+ };
4061
+
4062
+ /**
4063
+ * Explicitly executes population and returns a promise. Useful for promises integration.
4064
+ *
4065
+ * ####Example:
4066
+ *
4067
+ * const promise = doc.
4068
+ * populate('company').
4069
+ * populate({
4070
+ * path: 'notes',
4071
+ * match: /airline/,
4072
+ * select: 'text',
4073
+ * model: 'modelName'
4074
+ * options: opts
4075
+ * }).
4076
+ * execPopulate();
4077
+ *
4078
+ * // summary
4079
+ * doc.execPopulate().then(resolve, reject);
4080
+ *
4081
+ * // you can also use doc.execPopulate(options) as a shorthand for
4082
+ * // doc.populate(options).execPopulate()
4083
+ *
4084
+ *
4085
+ * ####Example:
4086
+ * const promise = doc.execPopulate({ path: 'company', select: 'employees' });
4087
+ *
4088
+ * // summary
4089
+ * promise.then(resolve,reject);
4090
+ *
4091
+ * @see Document.populate #document_Document-populate
4092
+ * @api public
4093
+ * @param {Function} [callback] optional callback. If specified, a promise will **not** be returned
4094
+ * @return {Promise} promise that resolves to the document when population is done
4095
+ * @memberOf Document
4096
+ * @instance
4097
+ */
4098
+
4099
+ Document.prototype.execPopulate = function(callback) {
4100
+ const isUsingShorthand = callback != null && typeof callback !== 'function';
4101
+ if (isUsingShorthand) {
4102
+ return this.populate.apply(this, arguments).execPopulate();
4103
+ }
4104
+
4105
+ return promiseOrCallback(callback, cb => {
4106
+ this.populate(cb);
4107
+ }, this.constructor.events);
4108
+ };
4109
+
4110
+ /**
4111
+ * Gets _id(s) used during population of the given `path`.
4112
+ *
4113
+ * ####Example:
4114
+ *
4115
+ * Model.findOne().populate('author').exec(function (err, doc) {
4116
+ * console.log(doc.author.name) // Dr.Seuss
4117
+ * console.log(doc.populated('author')) // '5144cf8050f071d979c118a7'
4118
+ * })
4119
+ *
4120
+ * If the path was not populated, returns `undefined`.
4121
+ *
4122
+ * @param {String} path
4123
+ * @return {Array|ObjectId|Number|Buffer|String|undefined}
4124
+ * @memberOf Document
4125
+ * @instance
4126
+ * @api public
4127
+ */
4128
+
4129
+ Document.prototype.populated = function(path, val, options) {
4130
+ // val and options are internal
4131
+ if (val == null || val === true) {
4132
+ if (!this.$__.populated) {
4133
+ return undefined;
4134
+ }
4135
+
4136
+ // Map paths can be populated with either `path.$*` or just `path`
4137
+ const _path = path.endsWith('.$*') ? path.replace(/\.\$\*$/, '') : path;
4138
+
4139
+ const v = this.$__.populated[_path];
4140
+ if (v) {
4141
+ return val === true ? v : v.value;
4142
+ }
4143
+ return undefined;
4144
+ }
4145
+
4146
+ this.$__.populated || (this.$__.populated = {});
4147
+ this.$__.populated[path] = { value: val, options: options };
4148
+
4149
+ // If this was a nested populate, make sure each populated doc knows
4150
+ // about its populated children (gh-7685)
4151
+ const pieces = path.split('.');
4152
+ for (let i = 0; i < pieces.length - 1; ++i) {
4153
+ const subpath = pieces.slice(0, i + 1).join('.');
4154
+ const subdoc = this.get(subpath);
4155
+ if (subdoc != null && subdoc.$__ != null && this.populated(subpath)) {
4156
+ const rest = pieces.slice(i + 1).join('.');
4157
+ subdoc.populated(rest, val, options);
4158
+ // No need to continue because the above recursion should take care of
4159
+ // marking the rest of the docs as populated
4160
+ break;
4161
+ }
4162
+ }
4163
+
4164
+ return val;
4165
+ };
4166
+
4167
+ /**
4168
+ * Takes a populated field and returns it to its unpopulated state.
4169
+ *
4170
+ * ####Example:
4171
+ *
4172
+ * Model.findOne().populate('author').exec(function (err, doc) {
4173
+ * console.log(doc.author.name); // Dr.Seuss
4174
+ * console.log(doc.depopulate('author'));
4175
+ * console.log(doc.author); // '5144cf8050f071d979c118a7'
4176
+ * })
4177
+ *
4178
+ * If the path was not populated, this is a no-op.
4179
+ *
4180
+ * @param {String} path
4181
+ * @return {Document} this
4182
+ * @see Document.populate #document_Document-populate
4183
+ * @api public
4184
+ * @memberOf Document
4185
+ * @instance
4186
+ */
4187
+
4188
+ Document.prototype.depopulate = function(path) {
4189
+ if (typeof path === 'string') {
4190
+ path = path.split(' ');
4191
+ }
4192
+
4193
+ let populatedIds;
4194
+ const virtualKeys = this.$$populatedVirtuals ? Object.keys(this.$$populatedVirtuals) : [];
4195
+ const populated = get(this, '$__.populated', {});
4196
+
4197
+ if (arguments.length === 0) {
4198
+ // Depopulate all
4199
+ for (const virtualKey of virtualKeys) {
4200
+ delete this.$$populatedVirtuals[virtualKey];
4201
+ delete this._doc[virtualKey];
4202
+ delete populated[virtualKey];
4203
+ }
4204
+
4205
+ const keys = Object.keys(populated);
4206
+
4207
+ for (const key of keys) {
4208
+ populatedIds = this.populated(key);
4209
+ if (!populatedIds) {
4210
+ continue;
4211
+ }
4212
+ delete populated[key];
4213
+ this.$set(key, populatedIds);
4214
+ }
4215
+ return this;
4216
+ }
4217
+
4218
+ for (const singlePath of path) {
4219
+ populatedIds = this.populated(singlePath);
4220
+ delete populated[singlePath];
4221
+
4222
+ if (virtualKeys.indexOf(singlePath) !== -1) {
4223
+ delete this.$$populatedVirtuals[singlePath];
4224
+ delete this._doc[singlePath];
4225
+ } else if (populatedIds) {
4226
+ this.$set(singlePath, populatedIds);
4227
+ }
4228
+ }
4229
+ return this;
4230
+ };
4231
+
4232
+
4233
+ /**
4234
+ * Returns the full path to this document.
4235
+ *
4236
+ * @param {String} [path]
4237
+ * @return {String}
4238
+ * @api private
4239
+ * @method $__fullPath
4240
+ * @memberOf Document
4241
+ * @instance
4242
+ */
4243
+
4244
+ Document.prototype.$__fullPath = function(path) {
4245
+ // overridden in SubDocuments
4246
+ return path || '';
4247
+ };
4248
+
4249
+ /**
4250
+ * Returns the changes that happened to the document
4251
+ * in the format that will be sent to MongoDB.
4252
+ *
4253
+ * #### Example:
4254
+ *
4255
+ * const userSchema = new Schema({
4256
+ * name: String,
4257
+ * age: Number,
4258
+ * country: String
4259
+ * });
4260
+ * const User = mongoose.model('User', userSchema);
4261
+ * const user = await User.create({
4262
+ * name: 'Hafez',
4263
+ * age: 25,
4264
+ * country: 'Egypt'
4265
+ * });
4266
+ *
4267
+ * // returns an empty object, no changes happened yet
4268
+ * user.getChanges(); // { }
4269
+ *
4270
+ * user.country = undefined;
4271
+ * user.age = 26;
4272
+ *
4273
+ * user.getChanges(); // { $set: { age: 26 }, { $unset: { country: 1 } } }
4274
+ *
4275
+ * await user.save();
4276
+ *
4277
+ * user.getChanges(); // { }
4278
+ *
4279
+ * Modifying the object that `getChanges()` returns does not affect the document's
4280
+ * change tracking state. Even if you `delete user.getChanges().$set`, Mongoose
4281
+ * will still send a `$set` to the server.
4282
+ *
4283
+ * @return {Object}
4284
+ * @api public
4285
+ * @method getChanges
4286
+ * @memberOf Document
4287
+ * @instance
4288
+ */
4289
+
4290
+ Document.prototype.getChanges = function() {
4291
+ const delta = this.$__delta();
4292
+ const changes = delta ? delta[1] : {};
4293
+ return changes;
4294
+ };
4295
+
4296
+ /*!
4297
+ * Module exports.
4298
+ */
4299
+
4300
+ Document.ValidationError = validation;
4301
+ module.exports = Document;
4302
+ });
4303
+
4304
+ module.exports = document;
4305
+ //# sourceMappingURL=document.js.map