@nullix/zod-mongoose-studio 1.0.12 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (314) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/_nuxt/{Db4IAypj.js → 0J_bLG6U.js} +1 -1
  3. package/.output/public/_nuxt/{Y39o1QEi.js → 5KLjKHc1.js} +1 -1
  4. package/.output/public/_nuxt/{B4zoPYF-.js → B2UrsJHg.js} +1 -1
  5. package/.output/public/_nuxt/{BSqjh6Vk.js → BC5hGokz.js} +1 -1
  6. package/.output/public/_nuxt/{BS4yU4O0.js → BJwN20Xm.js} +1 -1
  7. package/.output/public/_nuxt/{D8_n84hl.js → BMgDPqps.js} +1 -1
  8. package/.output/public/_nuxt/{CqNsQbt9.js → B_sGF2qN.js} +1 -1
  9. package/.output/public/_nuxt/{NAqlztEN.js → BeaJ7I-K.js} +10 -10
  10. package/.output/public/_nuxt/{WZ0WK9cR.js → BkE1sm_1.js} +1 -1
  11. package/.output/public/_nuxt/{kBtP64Rx.js → CADbZwE5.js} +1 -1
  12. package/.output/public/_nuxt/{B8qGaxNm.js → CB0WRoVi.js} +1 -1
  13. package/.output/public/_nuxt/{BV6uALfO.js → CCh0PVV0.js} +1 -1
  14. package/.output/public/_nuxt/{CP9Z7-_9.js → Cr0GW7rA.js} +1 -1
  15. package/.output/public/_nuxt/{DeCqoVOS.js → DJe7Wxdv.js} +1 -1
  16. package/.output/public/_nuxt/{dBZQW7JD.js → DRBrUaE5.js} +1 -1
  17. package/.output/public/_nuxt/{Db19R32y.js → DV2n9B6m.js} +1 -1
  18. package/.output/public/_nuxt/{CvnpbYw0.js → DVD-jGiv.js} +1 -1
  19. package/.output/public/_nuxt/{BWajNATZ.js → Dk9qGA5X.js} +3 -3
  20. package/.output/public/_nuxt/builds/latest.json +1 -1
  21. package/.output/public/_nuxt/builds/meta/dc761332-547d-4953-b51d-b2d453009b48.json +1 -0
  22. package/.output/public/_nuxt/error-404.64pZEiDn.css +1 -0
  23. package/.output/public/_nuxt/error-500.DHOpI0Ir.css +1 -0
  24. package/.output/public/_nuxt/{BoHhCIKW.js → koEZfutw.js} +3 -3
  25. package/.output/public/_nuxt/{B_782F4p.js → r6LdR7DN.js} +1 -1
  26. package/.output/public/_nuxt/{BEI71c6K.js → rEfOp38p.js} +1 -1
  27. package/.output/server/chunks/_/error-500.mjs.map +1 -1
  28. package/.output/server/chunks/build/client.precomputed.mjs +1 -1
  29. package/.output/server/chunks/build/{error-404-8tbBXju4.mjs → error-404-BN-7rNE4.mjs} +4 -4
  30. package/.output/server/chunks/build/error-404-BN-7rNE4.mjs.map +1 -0
  31. package/.output/server/chunks/build/error-404-styles.Byx46oLR.mjs +8 -0
  32. package/.output/server/chunks/build/error-404-styles.Byx46oLR.mjs.map +1 -0
  33. package/.output/server/chunks/build/{error-500-DxFsom1i.mjs → error-500-DhIQ-2yt.mjs} +4 -4
  34. package/.output/server/chunks/build/error-500-DhIQ-2yt.mjs.map +1 -0
  35. package/.output/server/chunks/build/error-500-styles.BL3UT0Wa.mjs +8 -0
  36. package/.output/server/chunks/build/error-500-styles.BL3UT0Wa.mjs.map +1 -0
  37. package/.output/server/chunks/build/{index-BB-Clavm.mjs → index-Dnrh1ePF.mjs} +1 -1
  38. package/.output/server/chunks/build/index-Dnrh1ePF.mjs.map +1 -0
  39. package/.output/server/chunks/build/server.mjs +9 -9
  40. package/.output/server/chunks/build/styles.mjs +4 -4
  41. package/.output/server/chunks/nitro/nitro.mjs +342 -342
  42. package/.output/server/chunks/nitro/nitro.mjs.map +1 -1
  43. package/.output/server/chunks/routes/renderer.mjs.map +1 -1
  44. package/.output/server/node_modules/bson/lib/bson.cjs +157 -48
  45. package/.output/server/node_modules/bson/package.json +9 -11
  46. package/.output/server/node_modules/kareem/index.js +228 -343
  47. package/.output/server/node_modules/kareem/package.json +3 -3
  48. package/.output/server/node_modules/mongodb/lib/bson.js +27 -5
  49. package/.output/server/node_modules/mongodb/lib/bulk/common.js +7 -9
  50. package/.output/server/node_modules/mongodb/lib/change_stream.js +91 -39
  51. package/.output/server/node_modules/mongodb/lib/client-side-encryption/auto_encrypter.js +21 -14
  52. package/.output/server/node_modules/mongodb/lib/client-side-encryption/client_encryption.js +2 -5
  53. package/.output/server/node_modules/mongodb/lib/client-side-encryption/errors.js +3 -1
  54. package/.output/server/node_modules/mongodb/lib/client-side-encryption/mongocryptd_manager.js +1 -1
  55. package/.output/server/node_modules/mongodb/lib/client-side-encryption/state_machine.js +1 -0
  56. package/.output/server/node_modules/mongodb/lib/cmap/auth/aws4.js +161 -0
  57. package/.output/server/node_modules/mongodb/lib/cmap/auth/aws_temporary_credentials.js +11 -58
  58. package/.output/server/node_modules/mongodb/lib/cmap/auth/gssapi.js +4 -6
  59. package/.output/server/node_modules/mongodb/lib/cmap/auth/mongo_credentials.js +2 -16
  60. package/.output/server/node_modules/mongodb/lib/cmap/auth/mongodb_aws.js +14 -23
  61. package/.output/server/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/azure_machine_workflow.js +3 -3
  62. package/.output/server/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/gcp_machine_workflow.js +3 -3
  63. package/.output/server/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/k8s_machine_workflow.js +4 -3
  64. package/.output/server/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/token_machine_workflow.js +4 -3
  65. package/.output/server/node_modules/mongodb/lib/cmap/auth/mongodb_oidc.js +4 -4
  66. package/.output/server/node_modules/mongodb/lib/cmap/auth/plain.js +1 -1
  67. package/.output/server/node_modules/mongodb/lib/cmap/auth/providers.js +0 -1
  68. package/.output/server/node_modules/mongodb/lib/cmap/auth/scram.js +53 -40
  69. package/.output/server/node_modules/mongodb/lib/cmap/commands.js +46 -39
  70. package/.output/server/node_modules/mongodb/lib/cmap/connect.js +35 -3
  71. package/.output/server/node_modules/mongodb/lib/cmap/connection.js +36 -32
  72. package/.output/server/node_modules/mongodb/lib/cmap/connection_pool.js +67 -67
  73. package/.output/server/node_modules/mongodb/lib/cmap/connection_pool_events.js +3 -3
  74. package/.output/server/node_modules/mongodb/lib/cmap/errors.js +1 -1
  75. package/.output/server/node_modules/mongodb/lib/cmap/handshake/client_metadata.js +15 -13
  76. package/.output/server/node_modules/mongodb/lib/cmap/metrics.js +3 -3
  77. package/.output/server/node_modules/mongodb/lib/cmap/wire_protocol/compression.js +26 -10
  78. package/.output/server/node_modules/mongodb/lib/cmap/wire_protocol/constants.js +3 -1
  79. package/.output/server/node_modules/mongodb/lib/cmap/wire_protocol/on_data.js +0 -1
  80. package/.output/server/node_modules/mongodb/lib/cmap/wire_protocol/on_demand/document.js +9 -9
  81. package/.output/server/node_modules/mongodb/lib/cmap/wire_protocol/responses.js +2 -2
  82. package/.output/server/node_modules/mongodb/lib/collection.js +1 -1
  83. package/.output/server/node_modules/mongodb/lib/connection_string.js +30 -15
  84. package/.output/server/node_modules/mongodb/lib/cursor/abstract_cursor.js +17 -34
  85. package/.output/server/node_modules/mongodb/lib/cursor/change_stream_cursor.js +2 -2
  86. package/.output/server/node_modules/mongodb/lib/cursor/find_cursor.js +37 -26
  87. package/.output/server/node_modules/mongodb/lib/cursor/run_command_cursor.js +1 -1
  88. package/.output/server/node_modules/mongodb/lib/db.js +6 -7
  89. package/.output/server/node_modules/mongodb/lib/deps.js +0 -13
  90. package/.output/server/node_modules/mongodb/lib/error.js +7 -10
  91. package/.output/server/node_modules/mongodb/lib/gridfs/download.js +7 -6
  92. package/.output/server/node_modules/mongodb/lib/gridfs/index.js +9 -9
  93. package/.output/server/node_modules/mongodb/lib/gridfs/upload.js +17 -23
  94. package/.output/server/node_modules/mongodb/lib/index.js +2 -4
  95. package/.output/server/node_modules/mongodb/lib/mongo_client.js +58 -67
  96. package/.output/server/node_modules/mongodb/lib/mongo_client_auth_providers.js +0 -6
  97. package/.output/server/node_modules/mongodb/lib/mongo_logger.js +11 -5
  98. package/.output/server/node_modules/mongodb/lib/mongo_types.js +1 -2
  99. package/.output/server/node_modules/mongodb/lib/operations/aggregate.js +0 -3
  100. package/.output/server/node_modules/mongodb/lib/operations/create_collection.js +0 -1
  101. package/.output/server/node_modules/mongodb/lib/operations/drop.js +8 -9
  102. package/.output/server/node_modules/mongodb/lib/operations/end_sessions.js +34 -0
  103. package/.output/server/node_modules/mongodb/lib/operations/execute_operation.js +121 -45
  104. package/.output/server/node_modules/mongodb/lib/operations/operation.js +1 -0
  105. package/.output/server/node_modules/mongodb/lib/read_preference.js +10 -14
  106. package/.output/server/node_modules/mongodb/lib/runtime_adapters.js +32 -0
  107. package/.output/server/node_modules/mongodb/lib/sdam/monitor.js +8 -8
  108. package/.output/server/node_modules/mongodb/lib/sdam/server.js +55 -43
  109. package/.output/server/node_modules/mongodb/lib/sdam/server_description.js +1 -1
  110. package/.output/server/node_modules/mongodb/lib/sdam/server_selection.js +135 -72
  111. package/.output/server/node_modules/mongodb/lib/sdam/srv_polling.js +3 -3
  112. package/.output/server/node_modules/mongodb/lib/sdam/topology.js +37 -77
  113. package/.output/server/node_modules/mongodb/lib/sdam/topology_description.js +1 -1
  114. package/.output/server/node_modules/mongodb/lib/sessions.js +150 -40
  115. package/.output/server/node_modules/mongodb/lib/transactions.js +2 -13
  116. package/.output/server/node_modules/mongodb/lib/utils.js +42 -90
  117. package/.output/server/node_modules/mongodb/package.json +49 -45
  118. package/.output/server/node_modules/mongodb-connection-string-url/lib/index.js +45 -19
  119. package/.output/server/node_modules/mongodb-connection-string-url/lib/redact.js +30 -19
  120. package/.output/server/node_modules/mongodb-connection-string-url/package.json +25 -16
  121. package/.output/server/node_modules/mongoose/lib/aggregate.js +108 -127
  122. package/.output/server/node_modules/mongoose/lib/cast/bigint.js +3 -3
  123. package/.output/server/node_modules/mongoose/lib/cast/boolean.js +3 -3
  124. package/.output/server/node_modules/mongoose/lib/cast/double.js +4 -4
  125. package/.output/server/node_modules/mongoose/lib/cast/int32.js +2 -2
  126. package/.output/server/node_modules/mongoose/lib/cast/number.js +6 -6
  127. package/.output/server/node_modules/mongoose/lib/cast/string.js +3 -3
  128. package/.output/server/node_modules/mongoose/lib/cast/uuid.js +5 -48
  129. package/.output/server/node_modules/mongoose/lib/cast.js +16 -24
  130. package/.output/server/node_modules/mongoose/lib/collection.js +6 -6
  131. package/.output/server/node_modules/mongoose/lib/connection.js +108 -105
  132. package/.output/server/node_modules/mongoose/lib/cursor/aggregationCursor.js +23 -33
  133. package/.output/server/node_modules/mongoose/lib/cursor/changeStream.js +60 -40
  134. package/.output/server/node_modules/mongoose/lib/cursor/queryCursor.js +21 -25
  135. package/.output/server/node_modules/mongoose/lib/document.js +712 -531
  136. package/.output/server/node_modules/mongoose/lib/drivers/node-mongodb-native/collection.js +85 -130
  137. package/.output/server/node_modules/mongoose/lib/drivers/node-mongodb-native/connection.js +32 -41
  138. package/.output/server/node_modules/mongoose/lib/error/cast.js +21 -12
  139. package/.output/server/node_modules/mongoose/lib/error/createCollectionsError.js +2 -2
  140. package/.output/server/node_modules/mongoose/lib/error/divergentArray.js +1 -1
  141. package/.output/server/node_modules/mongoose/lib/error/eachAsyncMultiError.js +1 -1
  142. package/.output/server/node_modules/mongoose/lib/error/index.js +3 -3
  143. package/.output/server/node_modules/mongoose/lib/error/invalidSchemaOption.js +1 -1
  144. package/.output/server/node_modules/mongoose/lib/error/messages.js +1 -0
  145. package/.output/server/node_modules/mongoose/lib/error/missingSchema.js +1 -1
  146. package/.output/server/node_modules/mongoose/lib/error/objectParameter.js +4 -5
  147. package/.output/server/node_modules/mongoose/lib/error/overwriteModel.js +1 -1
  148. package/.output/server/node_modules/mongoose/lib/error/setOptionError.js +3 -3
  149. package/.output/server/node_modules/mongoose/lib/error/strict.js +3 -3
  150. package/.output/server/node_modules/mongoose/lib/error/strictPopulate.js +2 -2
  151. package/.output/server/node_modules/mongoose/lib/error/syncIndexes.js +2 -2
  152. package/.output/server/node_modules/mongoose/lib/error/validation.js +2 -10
  153. package/.output/server/node_modules/mongoose/lib/error/validator.js +1 -1
  154. package/.output/server/node_modules/mongoose/lib/error/version.js +2 -2
  155. package/.output/server/node_modules/mongoose/lib/helpers/aggregate/prepareDiscriminatorPipeline.js +4 -4
  156. package/.output/server/node_modules/mongoose/lib/helpers/buildMiddlewareFilter.js +24 -0
  157. package/.output/server/node_modules/mongoose/lib/helpers/clone.js +35 -18
  158. package/.output/server/node_modules/mongoose/lib/helpers/common.js +5 -5
  159. package/.output/server/node_modules/mongoose/lib/helpers/cursor/eachAsync.js +4 -4
  160. package/.output/server/node_modules/mongoose/lib/helpers/discriminator/getConstructor.js +1 -1
  161. package/.output/server/node_modules/mongoose/lib/helpers/discriminator/getDiscriminatorByValue.js +1 -1
  162. package/.output/server/node_modules/mongoose/lib/helpers/discriminator/getSchemaDiscriminatorByValue.js +1 -1
  163. package/.output/server/node_modules/mongoose/lib/helpers/discriminator/mergeDiscriminatorSchema.js +10 -5
  164. package/.output/server/node_modules/mongoose/lib/helpers/document/applyDefaults.js +1 -1
  165. package/.output/server/node_modules/mongoose/lib/helpers/document/applyTimestamps.js +11 -10
  166. package/.output/server/node_modules/mongoose/lib/helpers/document/applyVirtuals.js +10 -9
  167. package/.output/server/node_modules/mongoose/lib/helpers/document/cleanModifiedSubpaths.js +1 -1
  168. package/.output/server/node_modules/mongoose/lib/helpers/document/compile.js +17 -14
  169. package/.output/server/node_modules/mongoose/lib/helpers/document/getDeepestSubdocumentForPath.js +3 -3
  170. package/.output/server/node_modules/mongoose/lib/helpers/document/getEmbeddedDiscriminatorPath.js +2 -2
  171. package/.output/server/node_modules/mongoose/lib/helpers/document/isInPathsToSave.js +24 -0
  172. package/.output/server/node_modules/mongoose/lib/helpers/get.js +1 -1
  173. package/.output/server/node_modules/mongoose/lib/helpers/indexes/decorateDiscriminatorIndexOptions.js +1 -1
  174. package/.output/server/node_modules/mongoose/lib/helpers/indexes/getRelatedIndexes.js +3 -3
  175. package/.output/server/node_modules/mongoose/lib/helpers/indexes/isIndexEqual.js +3 -4
  176. package/.output/server/node_modules/mongoose/lib/helpers/indexes/isIndexSpecEqual.js +3 -3
  177. package/.output/server/node_modules/mongoose/lib/helpers/isBsonType.js +1 -1
  178. package/.output/server/node_modules/mongoose/lib/helpers/isMongooseObject.js +1 -1
  179. package/.output/server/node_modules/mongoose/lib/helpers/isObject.js +2 -2
  180. package/.output/server/node_modules/mongoose/lib/helpers/isSimpleValidator.js +2 -2
  181. package/.output/server/node_modules/mongoose/lib/helpers/minimize.js +2 -2
  182. package/.output/server/node_modules/mongoose/lib/helpers/model/applyDefaultsToPOJO.js +2 -2
  183. package/.output/server/node_modules/mongoose/lib/helpers/model/applyHooks.js +55 -54
  184. package/.output/server/node_modules/mongoose/lib/helpers/model/applyMethods.js +2 -2
  185. package/.output/server/node_modules/mongoose/lib/helpers/model/applyStaticHooks.js +1 -48
  186. package/.output/server/node_modules/mongoose/lib/helpers/model/castBulkWrite.js +8 -12
  187. package/.output/server/node_modules/mongoose/lib/helpers/model/discriminator.js +1 -1
  188. package/.output/server/node_modules/mongoose/lib/helpers/parallelLimit.js +18 -36
  189. package/.output/server/node_modules/mongoose/lib/helpers/pluralize.js +4 -4
  190. package/.output/server/node_modules/mongoose/lib/helpers/populate/assignRawDocsToIdStructure.js +4 -11
  191. package/.output/server/node_modules/mongoose/lib/helpers/populate/assignVals.js +10 -10
  192. package/.output/server/node_modules/mongoose/lib/helpers/populate/createPopulateQueryFilter.js +3 -3
  193. package/.output/server/node_modules/mongoose/lib/helpers/populate/getModelsMapForPopulate.js +197 -69
  194. package/.output/server/node_modules/mongoose/lib/helpers/populate/getSchemaTypes.js +15 -15
  195. package/.output/server/node_modules/mongoose/lib/helpers/populate/markArraySubdocsPopulated.js +1 -1
  196. package/.output/server/node_modules/mongoose/lib/helpers/populate/modelNamesFromRefPath.js +10 -2
  197. package/.output/server/node_modules/mongoose/lib/helpers/populate/setPopulatedVirtualValue.js +5 -5
  198. package/.output/server/node_modules/mongoose/lib/helpers/printJestWarning.js +1 -1
  199. package/.output/server/node_modules/mongoose/lib/helpers/processConnectionOptions.js +1 -1
  200. package/.output/server/node_modules/mongoose/lib/helpers/projection/hasIncludedChildren.js +1 -1
  201. package/.output/server/node_modules/mongoose/lib/helpers/projection/isPathExcluded.js +3 -3
  202. package/.output/server/node_modules/mongoose/lib/helpers/projection/isSubpath.js +1 -1
  203. package/.output/server/node_modules/mongoose/lib/helpers/projection/parseProjection.js +9 -4
  204. package/.output/server/node_modules/mongoose/lib/helpers/query/cast$expr.js +8 -10
  205. package/.output/server/node_modules/mongoose/lib/helpers/query/castFilterPath.js +1 -1
  206. package/.output/server/node_modules/mongoose/lib/helpers/query/castUpdate.js +44 -38
  207. package/.output/server/node_modules/mongoose/lib/helpers/query/getEmbeddedDiscriminatorPath.js +8 -8
  208. package/.output/server/node_modules/mongoose/lib/helpers/query/handleImmutable.js +8 -8
  209. package/.output/server/node_modules/mongoose/lib/helpers/schema/applyPlugins.js +2 -2
  210. package/.output/server/node_modules/mongoose/lib/helpers/schema/applyReadConcern.js +1 -1
  211. package/.output/server/node_modules/mongoose/lib/helpers/schema/applyWriteConcern.js +4 -2
  212. package/.output/server/node_modules/mongoose/lib/helpers/schema/getIndexes.js +5 -11
  213. package/.output/server/node_modules/mongoose/lib/helpers/schema/getSubdocumentStrictValue.js +2 -2
  214. package/.output/server/node_modules/mongoose/lib/helpers/schema/handleIdOption.js +1 -1
  215. package/.output/server/node_modules/mongoose/lib/helpers/schema/idGetter.js +1 -1
  216. package/.output/server/node_modules/mongoose/lib/helpers/schematype/handleImmutable.js +1 -1
  217. package/.output/server/node_modules/mongoose/lib/helpers/setDefaultsOnInsert.js +26 -13
  218. package/.output/server/node_modules/mongoose/lib/helpers/timestamps/setDocumentTimestamps.js +2 -2
  219. package/.output/server/node_modules/mongoose/lib/helpers/timestamps/setupTimestamps.js +60 -38
  220. package/.output/server/node_modules/mongoose/lib/helpers/update/applyTimestampsToUpdate.js +13 -10
  221. package/.output/server/node_modules/mongoose/lib/helpers/update/castArrayFilters.js +4 -4
  222. package/.output/server/node_modules/mongoose/lib/helpers/update/decorateUpdateWithVersionKey.js +1 -1
  223. package/.output/server/node_modules/mongoose/lib/helpers/update/modifiedPaths.js +2 -2
  224. package/.output/server/node_modules/mongoose/lib/helpers/update/removeUnusedArrayFilters.js +7 -2
  225. package/.output/server/node_modules/mongoose/lib/helpers/updateValidators.js +58 -119
  226. package/.output/server/node_modules/mongoose/lib/model.js +940 -946
  227. package/.output/server/node_modules/mongoose/lib/mongoose.js +131 -79
  228. package/.output/server/node_modules/mongoose/lib/options/schemaArrayOptions.js +2 -2
  229. package/.output/server/node_modules/mongoose/lib/options/schemaBufferOptions.js +1 -1
  230. package/.output/server/node_modules/mongoose/lib/options/schemaDocumentArrayOptions.js +23 -0
  231. package/.output/server/node_modules/mongoose/lib/options/schemaNumberOptions.js +3 -3
  232. package/.output/server/node_modules/mongoose/lib/options/schemaObjectIdOptions.js +2 -2
  233. package/.output/server/node_modules/mongoose/lib/options/schemaStringOptions.js +6 -6
  234. package/.output/server/node_modules/mongoose/lib/options/schemaSubdocumentOptions.js +23 -0
  235. package/.output/server/node_modules/mongoose/lib/options/schemaTypeOptions.js +27 -13
  236. package/.output/server/node_modules/mongoose/lib/options/virtualOptions.js +12 -12
  237. package/.output/server/node_modules/mongoose/lib/plugins/index.js +0 -1
  238. package/.output/server/node_modules/mongoose/lib/plugins/saveSubdocs.js +84 -92
  239. package/.output/server/node_modules/mongoose/lib/plugins/sharding.js +33 -15
  240. package/.output/server/node_modules/mongoose/lib/plugins/trackTransaction.js +29 -25
  241. package/.output/server/node_modules/mongoose/lib/query.js +700 -548
  242. package/.output/server/node_modules/mongoose/lib/queryHelpers.js +34 -32
  243. package/.output/server/node_modules/mongoose/lib/schema/array.js +69 -113
  244. package/.output/server/node_modules/mongoose/lib/schema/bigint.js +18 -20
  245. package/.output/server/node_modules/mongoose/lib/schema/boolean.js +20 -22
  246. package/.output/server/node_modules/mongoose/lib/schema/buffer.js +23 -25
  247. package/.output/server/node_modules/mongoose/lib/schema/date.js +19 -21
  248. package/.output/server/node_modules/mongoose/lib/schema/decimal128.js +16 -18
  249. package/.output/server/node_modules/mongoose/lib/schema/documentArray.js +94 -131
  250. package/.output/server/node_modules/mongoose/lib/schema/documentArrayElement.js +50 -16
  251. package/.output/server/node_modules/mongoose/lib/schema/double.js +16 -18
  252. package/.output/server/node_modules/mongoose/lib/schema/index.js +1 -0
  253. package/.output/server/node_modules/mongoose/lib/schema/int32.js +17 -19
  254. package/.output/server/node_modules/mongoose/lib/schema/map.js +17 -24
  255. package/.output/server/node_modules/mongoose/lib/schema/mixed.js +14 -14
  256. package/.output/server/node_modules/mongoose/lib/schema/number.js +38 -28
  257. package/.output/server/node_modules/mongoose/lib/schema/objectId.js +18 -20
  258. package/.output/server/node_modules/mongoose/lib/schema/operators/exists.js +1 -1
  259. package/.output/server/node_modules/mongoose/lib/schema/operators/geospatial.js +1 -1
  260. package/.output/server/node_modules/mongoose/lib/schema/operators/text.js +4 -4
  261. package/.output/server/node_modules/mongoose/lib/schema/string.js +42 -27
  262. package/.output/server/node_modules/mongoose/lib/schema/subdocument.js +47 -58
  263. package/.output/server/node_modules/mongoose/lib/schema/union.js +54 -4
  264. package/.output/server/node_modules/mongoose/lib/schema/uuid.js +17 -40
  265. package/.output/server/node_modules/mongoose/lib/schema.js +235 -176
  266. package/.output/server/node_modules/mongoose/lib/schemaType.js +227 -158
  267. package/.output/server/node_modules/mongoose/lib/stateMachine.js +5 -8
  268. package/.output/server/node_modules/mongoose/lib/types/array/index.js +5 -5
  269. package/.output/server/node_modules/mongoose/lib/types/array/methods/index.js +27 -28
  270. package/.output/server/node_modules/mongoose/lib/types/arraySubdocument.js +11 -11
  271. package/.output/server/node_modules/mongoose/lib/types/buffer.js +15 -15
  272. package/.output/server/node_modules/mongoose/lib/types/decimal128.js +1 -1
  273. package/.output/server/node_modules/mongoose/lib/types/documentArray/index.js +4 -4
  274. package/.output/server/node_modules/mongoose/lib/types/documentArray/methods/index.js +15 -13
  275. package/.output/server/node_modules/mongoose/lib/types/double.js +1 -1
  276. package/.output/server/node_modules/mongoose/lib/types/map.js +20 -71
  277. package/.output/server/node_modules/mongoose/lib/types/objectid.js +1 -1
  278. package/.output/server/node_modules/mongoose/lib/types/subdocument.js +32 -81
  279. package/.output/server/node_modules/mongoose/lib/types/uuid.js +1 -1
  280. package/.output/server/node_modules/mongoose/lib/utils.js +91 -70
  281. package/.output/server/node_modules/mongoose/lib/validOptions.js +4 -3
  282. package/.output/server/node_modules/mongoose/lib/virtualType.js +18 -18
  283. package/.output/server/node_modules/mongoose/package.json +46 -63
  284. package/.output/server/node_modules/mquery/lib/collection/collection.js +3 -1
  285. package/.output/server/node_modules/mquery/lib/collection/node.js +17 -3
  286. package/.output/server/node_modules/mquery/lib/mquery.js +136 -93
  287. package/.output/server/node_modules/mquery/lib/permissions.js +21 -6
  288. package/.output/server/node_modules/mquery/package.json +4 -7
  289. package/.output/server/package.json +7 -9
  290. package/package.json +3 -3
  291. package/.output/public/_nuxt/builds/meta/b59771ef-8e58-4078-9d18-ccc01cba96e9.json +0 -1
  292. package/.output/public/_nuxt/error-404.CTWLHxjC.css +0 -1
  293. package/.output/public/_nuxt/error-500.UBfk8-QP.css +0 -1
  294. package/.output/server/chunks/build/error-404-8tbBXju4.mjs.map +0 -1
  295. package/.output/server/chunks/build/error-404-styles.BeWfK6Py.mjs +0 -8
  296. package/.output/server/chunks/build/error-404-styles.BeWfK6Py.mjs.map +0 -1
  297. package/.output/server/chunks/build/error-500-DxFsom1i.mjs.map +0 -1
  298. package/.output/server/chunks/build/error-500-styles.CPUUvoY-.mjs +0 -8
  299. package/.output/server/chunks/build/error-500-styles.CPUUvoY-.mjs.map +0 -1
  300. package/.output/server/chunks/build/index-BB-Clavm.mjs.map +0 -1
  301. package/.output/server/node_modules/debug/package.json +0 -64
  302. package/.output/server/node_modules/debug/src/browser.js +0 -272
  303. package/.output/server/node_modules/debug/src/common.js +0 -292
  304. package/.output/server/node_modules/debug/src/index.js +0 -10
  305. package/.output/server/node_modules/debug/src/node.js +0 -263
  306. package/.output/server/node_modules/mongodb/lib/client-side-encryption/crypto_callbacks.js +0 -81
  307. package/.output/server/node_modules/mongodb/lib/resource_management.js +0 -58
  308. package/.output/server/node_modules/mongoose/lib/browserDocument.js +0 -101
  309. package/.output/server/node_modules/mongoose/lib/documentProvider.js +0 -30
  310. package/.output/server/node_modules/mongoose/lib/helpers/createJSONSchemaTypeDefinition.js +0 -24
  311. package/.output/server/node_modules/mongoose/lib/helpers/promiseOrCallback.js +0 -54
  312. package/.output/server/node_modules/mongoose/lib/plugins/validateBeforeSave.js +0 -51
  313. package/.output/server/node_modules/supports-color/index.js +0 -202
  314. package/.output/server/node_modules/supports-color/package.json +0 -64
@@ -10,9 +10,11 @@ const methods = [
10
10
  'updateMany',
11
11
  'updateOne',
12
12
  'replaceOne',
13
- 'count',
13
+ 'countDocuments',
14
+ 'estimatedDocumentCount',
14
15
  'distinct',
15
16
  'findOneAndDelete',
17
+ 'findOneAndReplace',
16
18
  'findOneAndUpdate',
17
19
  'aggregate',
18
20
  'findCursor',
@@ -31,10 +31,17 @@ class NodeCollection extends Collection {
31
31
  }
32
32
 
33
33
  /**
34
- * count(match, options)
34
+ * countDocuments(match, options)
35
35
  */
36
- async count(match, options) {
37
- return this.collection.count(match, options);
36
+ async countDocuments(match, options) {
37
+ return this.collection.countDocuments(match, options);
38
+ }
39
+
40
+ /**
41
+ * estimatedDocumentCount(match, options)
42
+ */
43
+ async estimatedDocumentCount(match, options) {
44
+ return this.collection.estimatedDocumentCount(match, options);
38
45
  }
39
46
 
40
47
  /**
@@ -93,6 +100,13 @@ class NodeCollection extends Collection {
93
100
  return this.collection.findOneAndUpdate(match, update, options);
94
101
  }
95
102
 
103
+ /**
104
+ * findOneAndReplace(match, update, options)
105
+ */
106
+ async findOneAndReplace(match, update, options) {
107
+ return this.collection.findOneAndReplace(match, update, options);
108
+ }
109
+
96
110
  /**
97
111
  * var cursor = findCursor(match, options)
98
112
  */
@@ -7,7 +7,8 @@
7
7
  const assert = require('assert');
8
8
  const util = require('util');
9
9
  const utils = require('./utils');
10
- const debug = require('debug')('mquery');
10
+
11
+ const debug = util.debuglog('mquery');
11
12
 
12
13
  /**
13
14
  * Query constructor used for building queries.
@@ -59,29 +60,6 @@ function Query(criteria, options) {
59
60
  }
60
61
  }
61
62
 
62
- /**
63
- * This is a parameter that the user can set which determines if mquery
64
- * uses $within or $geoWithin for queries. It defaults to true which
65
- * means $geoWithin will be used. If using MongoDB < 2.4 you should
66
- * set this to false.
67
- *
68
- * @api public
69
- * @property use$geoWithin
70
- */
71
-
72
- let $withinCmd = '$geoWithin';
73
- Object.defineProperty(Query, 'use$geoWithin', {
74
- get: function() { return $withinCmd == '$geoWithin'; },
75
- set: function(v) {
76
- if (true === v) {
77
- // mongodb >= 2.4
78
- $withinCmd = '$geoWithin';
79
- } else {
80
- $withinCmd = '$within';
81
- }
82
- }
83
- });
84
-
85
63
  /**
86
64
  * Converts this query to a constructor function with all arguments and options retained.
87
65
  *
@@ -733,7 +711,7 @@ Query.prototype.elemMatch = function() {
733
711
  Query.prototype.within = function within() {
734
712
  // opinionated, must be used after where
735
713
  this._ensurePath('within');
736
- this._geoComparison = $withinCmd;
714
+ this._geoComparison = '$geoWithin';
737
715
 
738
716
  if (0 === arguments.length) {
739
717
  return this;
@@ -801,7 +779,7 @@ Query.prototype.box = function() {
801
779
  }
802
780
 
803
781
  const conds = this._conditions[path] || (this._conditions[path] = {});
804
- conds[this._geoComparison || $withinCmd] = { $box: box };
782
+ conds[this._geoComparison || '$geoWithin'] = { $box: box };
805
783
  return this;
806
784
  };
807
785
 
@@ -835,7 +813,7 @@ Query.prototype.polygon = function() {
835
813
  }
836
814
 
837
815
  const conds = this._conditions[path] || (this._conditions[path] = {});
838
- conds[this._geoComparison || $withinCmd] = { $polygon: val };
816
+ conds[this._geoComparison || '$geoWithin'] = { $polygon: val };
839
817
  return this;
840
818
  };
841
819
 
@@ -883,7 +861,7 @@ Query.prototype.circle = function() {
883
861
  ? '$centerSphere'
884
862
  : '$center';
885
863
 
886
- const wKey = this._geoComparison || $withinCmd;
864
+ const wKey = this._geoComparison || '$geoWithin';
887
865
  conds[wKey] = {};
888
866
  conds[wKey][type] = [val.center, val.radius];
889
867
 
@@ -1857,7 +1835,7 @@ Query.prototype._find = async function _find() {
1857
1835
  options.fields = this._fieldsForExec();
1858
1836
  }
1859
1837
 
1860
- debug('_find', this._collection.collectionName, conds, options);
1838
+ debug('find', this._collection.collectionName, conds, options);
1861
1839
 
1862
1840
  return this._collection.find(conds, options);
1863
1841
  };
@@ -1894,6 +1872,7 @@ Query.prototype.cursor = function cursor(criteria) {
1894
1872
  }
1895
1873
 
1896
1874
  debug('findCursor', this._collection.collectionName, conds, options);
1875
+
1897
1876
  return this._collection.findCursor(conds, options);
1898
1877
  };
1899
1878
 
@@ -1943,47 +1922,78 @@ Query.prototype._findOne = async function _findOne() {
1943
1922
  };
1944
1923
 
1945
1924
  /**
1946
- * Exectues the query as a count() operation.
1925
+ * Executes the query as a countDocuments() operation.
1947
1926
  *
1948
1927
  * #### Example:
1949
1928
  *
1950
- * query.count().where('color', 'black').exec();
1929
+ * query.countDocuments().where('color', 'black').exec();
1951
1930
  *
1952
- * query.count({ color: 'black' })
1931
+ * query.countDocuments({ color: 'black' })
1953
1932
  *
1954
- * await query.count({ color: 'black' });
1933
+ * await query.countDocuments({ color: 'black' });
1955
1934
  *
1956
- * const doc = await query.where('color', 'black').count();
1935
+ * const count = await query.where('color', 'black').countDocuments();
1957
1936
  * console.log('there are %d kittens', count);
1958
1937
  *
1959
- * @param {Object} [criteria] mongodb selector
1938
+ * @param {Object} [filter] mongodb selector
1960
1939
  * @return {Query} this
1961
- * @see mongodb http://www.mongodb.org/display/DOCS/Aggregation#Aggregation-Count
1962
1940
  * @api public
1963
1941
  */
1964
1942
 
1965
- Query.prototype.count = function(criteria) {
1966
- this.op = 'count';
1943
+ Query.prototype.countDocuments = function(filter) {
1944
+ this.op = 'countDocuments';
1967
1945
  this._validate();
1968
1946
 
1969
- if (Query.canMerge(criteria)) {
1970
- this.merge(criteria);
1947
+ if (Query.canMerge(filter)) {
1948
+ this.merge(filter);
1971
1949
  }
1972
1950
 
1973
1951
  return this;
1974
1952
  };
1975
1953
 
1976
1954
  /**
1977
- * Executes a `count` Query
1955
+ * Executes a `countDocuments` Query
1978
1956
  * @returns the results
1979
1957
  */
1980
- Query.prototype._count = async function _count() {
1981
- const conds = this._conditions,
1982
- options = this._optionsForExec();
1958
+ Query.prototype._countDocuments = async function _countDocuments() {
1959
+ const conds = this._conditions;
1960
+ const options = this._optionsForExec();
1961
+
1962
+ debug('countDocuments', this._collection.collectionName, conds, options);
1963
+
1964
+ return this._collection.countDocuments(conds, options);
1965
+ };
1966
+
1967
+ /**
1968
+ * Executes the query as a estimatedDocumentCount() operation.
1969
+ *
1970
+ * #### Example:
1971
+ *
1972
+ * query.estimatedDocumentCount();
1973
+ *
1974
+ * const count = await query.estimatedDocumentCount();
1975
+ * console.log('there are %d kittens', count);
1976
+ *
1977
+ * @return {Query} this
1978
+ * @api public
1979
+ */
1983
1980
 
1984
- debug('count', this._collection.collectionName, conds, options);
1981
+ Query.prototype.estimatedDocumentCount = function() {
1982
+ this.op = 'estimatedDocumentCount';
1983
+ this._validate();
1985
1984
 
1986
- return this._collection.count(conds, options);
1985
+ return this;
1986
+ };
1987
+
1988
+ /**
1989
+ * Executes a `count` Query
1990
+ * @returns the results
1991
+ */
1992
+ Query.prototype._estimatedDocumentCount = async function _estimatedDocumentCount() {
1993
+ const conds = this._conditions;
1994
+ const options = this._optionsForExec();
1995
+ debug('estimatedDocumentCount', this._collection.collectionName, conds, options);
1996
+ return this._collection.estimatedDocumentCount(conds, options);
1987
1997
  };
1988
1998
 
1989
1999
  /**
@@ -2037,8 +2047,6 @@ Query.prototype._distinct = async function _distinct() {
2037
2047
  const conds = this._conditions,
2038
2048
  options = this._optionsForExec();
2039
2049
 
2040
- debug('distinct', this._collection.collectionName, conds, options);
2041
-
2042
2050
  return this._collection.distinct(this._distinctDoc, conds, options);
2043
2051
  };
2044
2052
 
@@ -2061,11 +2069,6 @@ Query.prototype._distinct = async function _distinct() {
2061
2069
  */
2062
2070
 
2063
2071
  Query.prototype.updateMany = function updateMany(criteria, doc, options) {
2064
- if (arguments.length === 1) {
2065
- doc = criteria;
2066
- criteria = options = undefined;
2067
- }
2068
-
2069
2072
  return _update(this, 'updateMany', criteria, doc, options);
2070
2073
  };
2071
2074
 
@@ -2096,11 +2099,6 @@ Query.prototype._updateMany = async function() {
2096
2099
  */
2097
2100
 
2098
2101
  Query.prototype.updateOne = function updateOne(criteria, doc, options) {
2099
- if (arguments.length === 1) {
2100
- doc = criteria;
2101
- criteria = options = undefined;
2102
- }
2103
-
2104
2102
  return _update(this, 'updateOne', criteria, doc, options);
2105
2103
  };
2106
2104
 
@@ -2131,11 +2129,6 @@ Query.prototype._updateOne = async function() {
2131
2129
  */
2132
2130
 
2133
2131
  Query.prototype.replaceOne = function replaceOne(criteria, doc, options) {
2134
- if (arguments.length === 1) {
2135
- doc = criteria;
2136
- criteria = options = undefined;
2137
- }
2138
-
2139
2132
  this.setOptions({ overwrite: true });
2140
2133
  return _update(this, 'replaceOne', criteria, doc, options);
2141
2134
  };
@@ -2183,8 +2176,7 @@ async function _updateExec(query, op) {
2183
2176
  const criteria = query._conditions;
2184
2177
  const doc = query._updateForExec();
2185
2178
 
2186
- debug('update', query._collection.collectionName, criteria, doc, options);
2187
-
2179
+ debug(op, query._collection.collectionName, criteria, doc, options);
2188
2180
  return query._collection[op](criteria, doc, options);
2189
2181
  }
2190
2182
 
@@ -2221,7 +2213,6 @@ Query.prototype._deleteOne = async function() {
2221
2213
  const conds = this._conditions;
2222
2214
 
2223
2215
  debug('deleteOne', this._collection.collectionName, conds, options);
2224
-
2225
2216
  return this._collection.deleteOne(conds, options);
2226
2217
  };
2227
2218
 
@@ -2258,13 +2249,11 @@ Query.prototype._deleteMany = async function() {
2258
2249
 
2259
2250
  const conds = this._conditions;
2260
2251
 
2261
- debug('deleteOne', this._collection.collectionName, conds, options);
2262
-
2263
2252
  return this._collection.deleteMany(conds, options);
2264
2253
  };
2265
2254
 
2266
2255
  /**
2267
- * Issues a mongodb [findAndModify](http://www.mongodb.org/display/DOCS/findAndModify+Command) update command.
2256
+ * Issues a mongodb findOneAndUpdate command.
2268
2257
  *
2269
2258
  * Finds a matching document, updates it according to the `update` arg, passing any `options`, and returns the found document (if any).
2270
2259
  *
@@ -2297,11 +2286,6 @@ Query.prototype.findOneAndUpdate = function(criteria, doc, options) {
2297
2286
  this.op = 'findOneAndUpdate';
2298
2287
  this._validate();
2299
2288
 
2300
- if (arguments.length === 1) {
2301
- doc = criteria;
2302
- criteria = options = undefined;
2303
- }
2304
-
2305
2289
  if (Query.canMerge(criteria)) {
2306
2290
  this.merge(criteria);
2307
2291
  }
@@ -2329,7 +2313,70 @@ Query.prototype._findOneAndUpdate = async function() {
2329
2313
  };
2330
2314
 
2331
2315
  /**
2332
- * Issues a mongodb [findAndModify](http://www.mongodb.org/display/DOCS/findAndModify+Command) remove command.
2316
+ * Issues a mongodb findOneAndReplace command.
2317
+ *
2318
+ * Finds a matching document, replaces it according to the `replacement` arg, passing any `options`, and returns the found document (if any).
2319
+ *
2320
+ * #### Available options
2321
+ *
2322
+ * - `new`: bool - true to return the modified document rather than the original. defaults to true
2323
+ * - `upsert`: bool - creates the object if it doesn't exist. defaults to false.
2324
+ * - `sort`: if multiple docs are found by the conditions, sets the sort order to choose which doc to update
2325
+ *
2326
+ * #### Examples:
2327
+ *
2328
+ * await query.findOneAndReplace(conditions, replacement, options) // executes
2329
+ * query.findOneAndReplace(conditions, replacement, options) // returns Query
2330
+ * await query.findOneAndReplace(conditions, replacement) // executes
2331
+ * query.findOneAndReplace(conditions, replacement) // returns Query
2332
+ * await query.findOneAndReplace(replacement) // returns Query
2333
+ * query.findOneAndReplace(replacement) // returns Query
2334
+ * await query.findOneAndReplace() // executes
2335
+ * query.findOneAndReplace() // returns Query
2336
+ *
2337
+ * @param {Object|Query} [query]
2338
+ * @param {Object} [replacement]
2339
+ * @param {Object} [options]
2340
+ * @see mongodb http://www.mongodb.org/display/DOCS/findAndModify+Command
2341
+ * @return {Query} this
2342
+ * @api public
2343
+ */
2344
+
2345
+ Query.prototype.findOneAndReplace = function(criteria, replacement, options) {
2346
+ this.op = 'findOneAndReplace';
2347
+ this._validate();
2348
+
2349
+ if (Query.canMerge(criteria)) {
2350
+ this.merge(criteria);
2351
+ }
2352
+
2353
+ // apply replacement
2354
+ if (replacement) {
2355
+ this._updateDoc = replacement;
2356
+ this.options = this.options || {};
2357
+ this.options.overwrite = true;
2358
+ }
2359
+
2360
+ options && this.setOptions(options);
2361
+
2362
+ return this;
2363
+ };
2364
+
2365
+ /**
2366
+ * Executes a `findOneAndReplace` Query
2367
+ * @returns the results
2368
+ */
2369
+ Query.prototype._findOneAndReplace = async function() {
2370
+ const conds = this._conditions;
2371
+ const replacement = this._updateForExec();
2372
+ const options = this._optionsForExec();
2373
+
2374
+ debug('findOneAndReplace', this._collection.collectionName, conds, replacement, options);
2375
+ return this._collection.findOneAndReplace(conds, replacement, options);
2376
+ };
2377
+
2378
+ /**
2379
+ * Issues a mongodb findOneAndDelete.
2333
2380
  *
2334
2381
  * Finds a matching document, removes it, returning the found document (if any).
2335
2382
  *
@@ -2339,28 +2386,25 @@ Query.prototype._findOneAndUpdate = async function() {
2339
2386
  *
2340
2387
  * #### Examples:
2341
2388
  *
2342
- * await A.where().findOneAndRemove(conditions, options) // executes
2343
- * A.where().findOneAndRemove(conditions, options) // return Query
2344
- * await A.where().findOneAndRemove(conditions) // executes
2345
- * A.where().findOneAndRemove(conditions) // returns Query
2346
- * await A.where().findOneAndRemove() // executes
2347
- * A.where().findOneAndRemove() // returns Query
2348
- * A.where().findOneAndDelete() // alias of .findOneAndRemove()
2389
+ * await A.where().findOneAndDelete(conditions, options) // executes
2390
+ * A.where().findOneAndDelete(conditions, options) // return Query
2391
+ * await A.where().findOneAndDelete(conditions) // executes
2392
+ * A.where().findOneAndDelete(conditions) // returns Query
2393
+ * await A.where().findOneAndDelete() // executes
2394
+ * A.where().findOneAndDelete() // returns Query
2349
2395
  *
2350
- * @param {Object} [conditions]
2396
+ * @param {Object} [filter]
2351
2397
  * @param {Object} [options]
2352
2398
  * @return {Query} this
2353
- * @see mongodb http://www.mongodb.org/display/DOCS/findAndModify+Command
2354
2399
  * @api public
2355
2400
  */
2356
2401
 
2357
- Query.prototype.findOneAndRemove = Query.prototype.findOneAndDelete = function(conditions, options) {
2358
- this.op = 'findOneAndRemove';
2402
+ Query.prototype.findOneAndDelete = function(filter, options) {
2403
+ this.op = 'findOneAndDelete';
2359
2404
  this._validate();
2360
2405
 
2361
- // apply conditions
2362
- if (Query.canMerge(conditions)) {
2363
- this.merge(conditions);
2406
+ if (Query.canMerge(filter)) {
2407
+ this.merge(filter);
2364
2408
  }
2365
2409
 
2366
2410
  // apply options
@@ -2373,10 +2417,11 @@ Query.prototype.findOneAndRemove = Query.prototype.findOneAndDelete = function(c
2373
2417
  * Executes a `findOneAndRemove` Query
2374
2418
  * @returns the results
2375
2419
  */
2376
- Query.prototype._findOneAndRemove = async function() {
2420
+ Query.prototype._findOneAndDelete = async function() {
2377
2421
  const options = this._optionsForExec();
2378
2422
  const conds = this._conditions;
2379
2423
 
2424
+ debug('findOneAndDelete', this._collection.collectionName, conds, options);
2380
2425
  return this._collection.findOneAndDelete(conds, options);
2381
2426
  };
2382
2427
 
@@ -2469,8 +2514,6 @@ Query.prototype.cursor = function() {
2469
2514
  options.fields = this._fieldsForExec();
2470
2515
  }
2471
2516
 
2472
- debug('cursor', this._collection.collectionName, conds, options);
2473
-
2474
2517
  return this._collection.findCursor(conds, options);
2475
2518
  };
2476
2519
 
@@ -2587,7 +2630,7 @@ Query.prototype._fieldsForExec = function() {
2587
2630
  */
2588
2631
 
2589
2632
  Query.prototype._updateForExec = function() {
2590
- const update = utils.clone(this._updateDoc);
2633
+ const update = this._updateDoc == null ? {} : utils.clone(this._updateDoc);
2591
2634
  const ops = utils.keys(update);
2592
2635
  const ret = {};
2593
2636
 
@@ -34,7 +34,7 @@ denied.distinct.tailable = true;
34
34
 
35
35
 
36
36
  denied.findOneAndUpdate =
37
- denied.findOneAndRemove = function(self) {
37
+ denied.findOneAndDelete = function(self) {
38
38
  const keys = Object.keys(denied.findOneAndUpdate);
39
39
  let err;
40
40
 
@@ -53,13 +53,28 @@ denied.findOneAndUpdate.skip =
53
53
  denied.findOneAndUpdate.batchSize =
54
54
  denied.findOneAndUpdate.tailable = true;
55
55
 
56
+ denied.findOneAndReplace = function(self) {
57
+ const keys = Object.keys(denied.findOneAndUpdate);
58
+ let err;
59
+
60
+ keys.every(function(option) {
61
+ if (self.options[option]) {
62
+ err = option;
63
+ return false;
64
+ }
65
+ return true;
66
+ });
67
+
68
+ return err;
69
+ };
70
+
56
71
 
57
- denied.count = function(self) {
72
+ denied.countDocuments = function(self) {
58
73
  if (self._fields && Object.keys(self._fields).length > 0) {
59
74
  return 'field selection and slice';
60
75
  }
61
76
 
62
- const keys = Object.keys(denied.count);
77
+ const keys = Object.keys(denied.countDocuments);
63
78
  let err;
64
79
 
65
80
  keys.every(function(option) {
@@ -73,6 +88,6 @@ denied.count = function(self) {
73
88
  return err;
74
89
  };
75
90
 
76
- denied.count.slice =
77
- denied.count.batchSize =
78
- denied.count.tailable = true;
91
+ denied.countDocuments.slice =
92
+ denied.countDocuments.batchSize =
93
+ denied.countDocuments.tailable = true;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mquery",
3
- "version": "5.0.0",
3
+ "version": "6.0.0",
4
4
  "description": "Expressive query building for MongoDB",
5
5
  "main": "lib/mquery.js",
6
6
  "scripts": {
@@ -13,16 +13,13 @@
13
13
  "url": "git://github.com/aheckmann/mquery.git"
14
14
  },
15
15
  "engines": {
16
- "node": ">=14.0.0"
17
- },
18
- "dependencies": {
19
- "debug": "4.x"
16
+ "node": ">=20.19.0"
20
17
  },
21
18
  "devDependencies": {
22
19
  "eslint": "8.x",
23
20
  "eslint-plugin-mocha-no-only": "1.1.1",
24
- "mocha": "9.x",
25
- "mongodb": "5.x"
21
+ "mocha": "11.x",
22
+ "mongodb": "6.x"
26
23
  },
27
24
  "bugs": {
28
25
  "url": "https://github.com/aheckmann/mquery/issues/new"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nullix/zod-mongoose-studio-prod",
3
- "version": "1.0.12",
3
+ "version": "2.0.0",
4
4
  "type": "module",
5
5
  "private": true,
6
6
  "dependencies": {
@@ -16,22 +16,21 @@
16
16
  "@vue/runtime-dom": "3.5.32",
17
17
  "@vue/server-renderer": "3.5.32",
18
18
  "@vue/shared": "3.5.32",
19
- "bson": "6.10.4",
19
+ "bson": "7.2.0",
20
20
  "consola": "3.4.2",
21
- "debug": "4.4.3",
22
21
  "devalue": "5.6.4",
23
22
  "entities": "7.0.1",
24
23
  "esbuild": "0.28.0",
25
24
  "estree-walker": "2.0.2",
26
25
  "hookable": "6.1.0",
27
26
  "ip-address": "10.1.0",
28
- "kareem": "2.6.3",
27
+ "kareem": "3.3.0",
29
28
  "memory-pager": "1.5.0",
30
- "mongodb": "6.20.0",
31
- "mongodb-connection-string-url": "3.0.2",
32
- "mongoose": "8.23.0",
29
+ "mongodb": "7.2.0",
30
+ "mongodb-connection-string-url": "7.0.1",
31
+ "mongoose": "9.6.3",
33
32
  "mpath": "0.9.0",
34
- "mquery": "5.0.0",
33
+ "mquery": "6.0.0",
35
34
  "ms": "2.1.3",
36
35
  "perfect-debounce": "2.1.0",
37
36
  "punycode": "2.3.1",
@@ -40,7 +39,6 @@
40
39
  "socks": "2.8.7",
41
40
  "source-map-js": "1.2.1",
42
41
  "sparse-bitfield": "3.0.3",
43
- "supports-color": "10.2.2",
44
42
  "tailwindcss": "4.2.2",
45
43
  "tr46": "5.1.1",
46
44
  "ufo": "1.6.3",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nullix/zod-mongoose-studio",
3
- "version": "1.0.12",
3
+ "version": "2.0.0",
4
4
  "description": "Monaco-powered TypeScript playground for @nullix/zod-mongoose",
5
5
  "main": "./nuxt.config.ts",
6
6
  "bin": {
@@ -41,10 +41,10 @@
41
41
  "dependencies": {
42
42
  "esbuild": "0.28.0",
43
43
  "get-port-please": "3.2.0",
44
- "mongoose": "8.23.0",
44
+ "mongoose": "9.6.3",
45
45
  "open": "11.0.0",
46
46
  "zod": "4.3.6",
47
- "@nullix/zod-mongoose": "1.0.12"
47
+ "@nullix/zod-mongoose": "2.0.0"
48
48
  },
49
49
  "devDependencies": {
50
50
  "@nuxt/ui": "4.6.0",
@@ -1 +0,0 @@
1
- {"id":"b59771ef-8e58-4078-9d18-ccc01cba96e9","timestamp":1775658174215,"prerendered":[]}
@@ -1 +0,0 @@
1
- .grid[data-v-4f14356a]{display:grid}.mb-2[data-v-4f14356a]{margin-bottom:.5rem}.mb-4[data-v-4f14356a]{margin-bottom:1rem}.max-w-520px[data-v-4f14356a]{max-width:520px}.min-h-screen[data-v-4f14356a]{min-height:100vh}.w-full[data-v-4f14356a]{width:100%}.flex[data-v-4f14356a]{display:flex}.place-content-center[data-v-4f14356a]{place-content:center}.items-center[data-v-4f14356a]{align-items:center}.justify-center[data-v-4f14356a]{justify-content:center}.overflow-hidden[data-v-4f14356a]{overflow:hidden}.bg-white[data-v-4f14356a]{--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity))}.px-2[data-v-4f14356a]{padding-left:.5rem;padding-right:.5rem}.text-center[data-v-4f14356a]{text-align:center}.text-\[80px\][data-v-4f14356a]{font-size:80px}.text-2xl[data-v-4f14356a]{font-size:1.5rem;line-height:2rem}.text-sm[data-v-4f14356a]{font-size:.875rem;line-height:1.25rem}.text-\[\#020420\][data-v-4f14356a]{--un-text-opacity:1;color:rgb(2 4 32/var(--un-text-opacity))}.text-\[\#64748B\][data-v-4f14356a]{--un-text-opacity:1;color:rgb(100 116 139/var(--un-text-opacity))}.hover\:text-\[\#00DC82\][data-v-4f14356a]:hover{--un-text-opacity:1;color:rgb(0 220 130/var(--un-text-opacity))}.font-medium[data-v-4f14356a]{font-weight:500}.font-semibold[data-v-4f14356a]{font-weight:600}.leading-none[data-v-4f14356a]{line-height:1}.tracking-wide[data-v-4f14356a]{letter-spacing:.025em}.font-sans[data-v-4f14356a]{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.tabular-nums[data-v-4f14356a]{--un-numeric-spacing:tabular-nums;font-variant-numeric:var(--un-ordinal) var(--un-slashed-zero) var(--un-numeric-figure) var(--un-numeric-spacing) var(--un-numeric-fraction)}.underline[data-v-4f14356a]{text-decoration-line:underline}.underline-offset-3[data-v-4f14356a]{text-underline-offset:3px}.antialiased[data-v-4f14356a]{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media(prefers-color-scheme:dark){.dark\:bg-\[\#020420\][data-v-4f14356a]{--un-bg-opacity:1;background-color:rgb(2 4 32/var(--un-bg-opacity))}.dark\:text-white[data-v-4f14356a]{--un-text-opacity:1;color:rgb(255 255 255/var(--un-text-opacity))}}@media(min-width:640px){.sm\:text-\[110px\][data-v-4f14356a]{font-size:110px}.sm\:text-3xl[data-v-4f14356a]{font-size:1.875rem;line-height:2.25rem}}
@@ -1 +0,0 @@
1
- .grid[data-v-de15ff3a]{display:grid}.mb-2[data-v-de15ff3a]{margin-bottom:.5rem}.mb-4[data-v-de15ff3a]{margin-bottom:1rem}.max-w-520px[data-v-de15ff3a]{max-width:520px}.min-h-screen[data-v-de15ff3a]{min-height:100vh}.place-content-center[data-v-de15ff3a]{place-content:center}.overflow-hidden[data-v-de15ff3a]{overflow:hidden}.bg-white[data-v-de15ff3a]{--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity))}.px-2[data-v-de15ff3a]{padding-left:.5rem;padding-right:.5rem}.text-center[data-v-de15ff3a]{text-align:center}.text-\[80px\][data-v-de15ff3a]{font-size:80px}.text-2xl[data-v-de15ff3a]{font-size:1.5rem;line-height:2rem}.text-\[\#020420\][data-v-de15ff3a]{--un-text-opacity:1;color:rgb(2 4 32/var(--un-text-opacity))}.text-\[\#64748B\][data-v-de15ff3a]{--un-text-opacity:1;color:rgb(100 116 139/var(--un-text-opacity))}.font-semibold[data-v-de15ff3a]{font-weight:600}.leading-none[data-v-de15ff3a]{line-height:1}.tracking-wide[data-v-de15ff3a]{letter-spacing:.025em}.font-sans[data-v-de15ff3a]{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.tabular-nums[data-v-de15ff3a]{--un-numeric-spacing:tabular-nums;font-variant-numeric:var(--un-ordinal) var(--un-slashed-zero) var(--un-numeric-figure) var(--un-numeric-spacing) var(--un-numeric-fraction)}.antialiased[data-v-de15ff3a]{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media(prefers-color-scheme:dark){.dark\:bg-\[\#020420\][data-v-de15ff3a]{--un-bg-opacity:1;background-color:rgb(2 4 32/var(--un-bg-opacity))}.dark\:text-white[data-v-de15ff3a]{--un-text-opacity:1;color:rgb(255 255 255/var(--un-text-opacity))}}@media(min-width:640px){.sm\:text-\[110px\][data-v-de15ff3a]{font-size:110px}.sm\:text-3xl[data-v-de15ff3a]{font-size:1.875rem;line-height:2.25rem}}
@@ -1 +0,0 @@
1
- {"version":3,"file":"error-404-8tbBXju4.mjs","sources":["../../../../node_modules/.cache/nuxt/.nuxt/dist/server/_nuxt/error-404-8tbBXju4.js"],"names":["__nuxt_component_0"],"mappings":"","x_google_ignoreList":[0]}
@@ -1,8 +0,0 @@
1
- const error404_vue_vue_type_style_index_0_scoped_4f14356a_lang = ".grid[data-v-4f14356a]{display:grid}.mb-2[data-v-4f14356a]{margin-bottom:.5rem}.mb-4[data-v-4f14356a]{margin-bottom:1rem}.max-w-520px[data-v-4f14356a]{max-width:520px}.min-h-screen[data-v-4f14356a]{min-height:100vh}.w-full[data-v-4f14356a]{width:100%}.flex[data-v-4f14356a]{display:flex}.place-content-center[data-v-4f14356a]{place-content:center}.items-center[data-v-4f14356a]{align-items:center}.justify-center[data-v-4f14356a]{justify-content:center}.overflow-hidden[data-v-4f14356a]{overflow:hidden}.bg-white[data-v-4f14356a]{--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity))}.px-2[data-v-4f14356a]{padding-left:.5rem;padding-right:.5rem}.text-center[data-v-4f14356a]{text-align:center}.text-\\[80px\\][data-v-4f14356a]{font-size:80px}.text-2xl[data-v-4f14356a]{font-size:1.5rem;line-height:2rem}.text-sm[data-v-4f14356a]{font-size:.875rem;line-height:1.25rem}.text-\\[\\#020420\\][data-v-4f14356a]{--un-text-opacity:1;color:rgb(2 4 32/var(--un-text-opacity))}.text-\\[\\#64748B\\][data-v-4f14356a]{--un-text-opacity:1;color:rgb(100 116 139/var(--un-text-opacity))}.hover\\:text-\\[\\#00DC82\\][data-v-4f14356a]:hover{--un-text-opacity:1;color:rgb(0 220 130/var(--un-text-opacity))}.font-medium[data-v-4f14356a]{font-weight:500}.font-semibold[data-v-4f14356a]{font-weight:600}.leading-none[data-v-4f14356a]{line-height:1}.tracking-wide[data-v-4f14356a]{letter-spacing:.025em}.font-sans[data-v-4f14356a]{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.tabular-nums[data-v-4f14356a]{--un-numeric-spacing:tabular-nums;font-variant-numeric:var(--un-ordinal) var(--un-slashed-zero) var(--un-numeric-figure) var(--un-numeric-spacing) var(--un-numeric-fraction)}.underline[data-v-4f14356a]{text-decoration-line:underline}.underline-offset-3[data-v-4f14356a]{text-underline-offset:3px}.antialiased[data-v-4f14356a]{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media(prefers-color-scheme:dark){.dark\\:bg-\\[\\#020420\\][data-v-4f14356a]{--un-bg-opacity:1;background-color:rgb(2 4 32/var(--un-bg-opacity))}.dark\\:text-white[data-v-4f14356a]{--un-text-opacity:1;color:rgb(255 255 255/var(--un-text-opacity))}}@media(min-width:640px){.sm\\:text-\\[110px\\][data-v-4f14356a]{font-size:110px}.sm\\:text-3xl[data-v-4f14356a]{font-size:1.875rem;line-height:2.25rem}}";
2
-
3
- const error404Styles_BeWfK6Py = [
4
- error404_vue_vue_type_style_index_0_scoped_4f14356a_lang
5
- ];
6
-
7
- export { error404Styles_BeWfK6Py as default };
8
- //# sourceMappingURL=error-404-styles.BeWfK6Py.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"error-404-styles.BeWfK6Py.mjs","sources":["../../../../node_modules/.cache/nuxt/.nuxt/dist/server/_nuxt/error-404-styles-1.mjs-CXU68iwa.js","../../../../node_modules/.cache/nuxt/.nuxt/dist/server/_nuxt/error-404-styles.BeWfK6Py.mjs"],"names":["style_0"],"mappings":"","x_google_ignoreList":[0,1]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"error-500-DxFsom1i.mjs","sources":["../../../../node_modules/.cache/nuxt/.nuxt/dist/server/_nuxt/error-500-DxFsom1i.js"],"names":[],"mappings":"","x_google_ignoreList":[0]}
@@ -1,8 +0,0 @@
1
- const error500_vue_vue_type_style_index_0_scoped_de15ff3a_lang = ".grid[data-v-de15ff3a]{display:grid}.mb-2[data-v-de15ff3a]{margin-bottom:.5rem}.mb-4[data-v-de15ff3a]{margin-bottom:1rem}.max-w-520px[data-v-de15ff3a]{max-width:520px}.min-h-screen[data-v-de15ff3a]{min-height:100vh}.place-content-center[data-v-de15ff3a]{place-content:center}.overflow-hidden[data-v-de15ff3a]{overflow:hidden}.bg-white[data-v-de15ff3a]{--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity))}.px-2[data-v-de15ff3a]{padding-left:.5rem;padding-right:.5rem}.text-center[data-v-de15ff3a]{text-align:center}.text-\\[80px\\][data-v-de15ff3a]{font-size:80px}.text-2xl[data-v-de15ff3a]{font-size:1.5rem;line-height:2rem}.text-\\[\\#020420\\][data-v-de15ff3a]{--un-text-opacity:1;color:rgb(2 4 32/var(--un-text-opacity))}.text-\\[\\#64748B\\][data-v-de15ff3a]{--un-text-opacity:1;color:rgb(100 116 139/var(--un-text-opacity))}.font-semibold[data-v-de15ff3a]{font-weight:600}.leading-none[data-v-de15ff3a]{line-height:1}.tracking-wide[data-v-de15ff3a]{letter-spacing:.025em}.font-sans[data-v-de15ff3a]{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.tabular-nums[data-v-de15ff3a]{--un-numeric-spacing:tabular-nums;font-variant-numeric:var(--un-ordinal) var(--un-slashed-zero) var(--un-numeric-figure) var(--un-numeric-spacing) var(--un-numeric-fraction)}.antialiased[data-v-de15ff3a]{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media(prefers-color-scheme:dark){.dark\\:bg-\\[\\#020420\\][data-v-de15ff3a]{--un-bg-opacity:1;background-color:rgb(2 4 32/var(--un-bg-opacity))}.dark\\:text-white[data-v-de15ff3a]{--un-text-opacity:1;color:rgb(255 255 255/var(--un-text-opacity))}}@media(min-width:640px){.sm\\:text-\\[110px\\][data-v-de15ff3a]{font-size:110px}.sm\\:text-3xl[data-v-de15ff3a]{font-size:1.875rem;line-height:2.25rem}}";
2
-
3
- const error500Styles_CPUUvoY_ = [
4
- error500_vue_vue_type_style_index_0_scoped_de15ff3a_lang
5
- ];
6
-
7
- export { error500Styles_CPUUvoY_ as default };
8
- //# sourceMappingURL=error-500-styles.CPUUvoY-.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"error-500-styles.CPUUvoY-.mjs","sources":["../../../../node_modules/.cache/nuxt/.nuxt/dist/server/_nuxt/error-500-styles-1.mjs-BZOi8gGN.js","../../../../node_modules/.cache/nuxt/.nuxt/dist/server/_nuxt/error-500-styles.CPUUvoY-.mjs"],"names":["style_0"],"mappings":"","x_google_ignoreList":[0,1]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-BB-Clavm.mjs","sources":["../../../../node_modules/.cache/nuxt/.nuxt/dist/server/_nuxt/index-BB-Clavm.js"],"names":["_sfc_main$3","_sfc_main$4","_sfc_main$5","__nuxt_component_2"],"mappings":"","x_google_ignoreList":[0]}