@nullix/zod-mongoose-studio 1.0.13 → 2.1.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.
- package/.output/nitro.json +1 -1
- package/.output/public/_nuxt/builds/latest.json +1 -1
- package/.output/public/_nuxt/builds/meta/8b851c04-1848-472a-b5cd-0727aaaf90f4.json +1 -0
- package/.output/server/chunks/nitro/nitro.mjs +232 -232
- package/.output/server/chunks/routes/api/parse.post.mjs +54 -11
- package/.output/server/chunks/routes/api/parse.post.mjs.map +1 -1
- package/.output/server/node_modules/bson/lib/bson.cjs +157 -48
- package/.output/server/node_modules/bson/package.json +9 -11
- package/.output/server/node_modules/kareem/index.js +228 -343
- package/.output/server/node_modules/kareem/package.json +3 -3
- package/.output/server/node_modules/mongodb/lib/bson.js +27 -5
- package/.output/server/node_modules/mongodb/lib/bulk/common.js +7 -9
- package/.output/server/node_modules/mongodb/lib/change_stream.js +91 -39
- package/.output/server/node_modules/mongodb/lib/client-side-encryption/auto_encrypter.js +21 -14
- package/.output/server/node_modules/mongodb/lib/client-side-encryption/client_encryption.js +2 -5
- package/.output/server/node_modules/mongodb/lib/client-side-encryption/errors.js +3 -1
- package/.output/server/node_modules/mongodb/lib/client-side-encryption/mongocryptd_manager.js +1 -1
- package/.output/server/node_modules/mongodb/lib/client-side-encryption/state_machine.js +1 -0
- package/.output/server/node_modules/mongodb/lib/cmap/auth/aws4.js +161 -0
- package/.output/server/node_modules/mongodb/lib/cmap/auth/aws_temporary_credentials.js +11 -58
- package/.output/server/node_modules/mongodb/lib/cmap/auth/gssapi.js +4 -6
- package/.output/server/node_modules/mongodb/lib/cmap/auth/mongo_credentials.js +2 -16
- package/.output/server/node_modules/mongodb/lib/cmap/auth/mongodb_aws.js +14 -23
- package/.output/server/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/azure_machine_workflow.js +3 -3
- package/.output/server/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/gcp_machine_workflow.js +3 -3
- package/.output/server/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/k8s_machine_workflow.js +4 -3
- package/.output/server/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/token_machine_workflow.js +4 -3
- package/.output/server/node_modules/mongodb/lib/cmap/auth/mongodb_oidc.js +4 -4
- package/.output/server/node_modules/mongodb/lib/cmap/auth/plain.js +1 -1
- package/.output/server/node_modules/mongodb/lib/cmap/auth/providers.js +0 -1
- package/.output/server/node_modules/mongodb/lib/cmap/auth/scram.js +53 -40
- package/.output/server/node_modules/mongodb/lib/cmap/commands.js +46 -39
- package/.output/server/node_modules/mongodb/lib/cmap/connect.js +35 -3
- package/.output/server/node_modules/mongodb/lib/cmap/connection.js +36 -32
- package/.output/server/node_modules/mongodb/lib/cmap/connection_pool.js +67 -67
- package/.output/server/node_modules/mongodb/lib/cmap/connection_pool_events.js +3 -3
- package/.output/server/node_modules/mongodb/lib/cmap/errors.js +1 -1
- package/.output/server/node_modules/mongodb/lib/cmap/handshake/client_metadata.js +15 -13
- package/.output/server/node_modules/mongodb/lib/cmap/metrics.js +3 -3
- package/.output/server/node_modules/mongodb/lib/cmap/wire_protocol/compression.js +26 -10
- package/.output/server/node_modules/mongodb/lib/cmap/wire_protocol/constants.js +3 -1
- package/.output/server/node_modules/mongodb/lib/cmap/wire_protocol/on_data.js +0 -1
- package/.output/server/node_modules/mongodb/lib/cmap/wire_protocol/on_demand/document.js +9 -9
- package/.output/server/node_modules/mongodb/lib/cmap/wire_protocol/responses.js +2 -2
- package/.output/server/node_modules/mongodb/lib/collection.js +1 -1
- package/.output/server/node_modules/mongodb/lib/connection_string.js +30 -15
- package/.output/server/node_modules/mongodb/lib/cursor/abstract_cursor.js +17 -34
- package/.output/server/node_modules/mongodb/lib/cursor/change_stream_cursor.js +2 -2
- package/.output/server/node_modules/mongodb/lib/cursor/find_cursor.js +37 -26
- package/.output/server/node_modules/mongodb/lib/cursor/run_command_cursor.js +1 -1
- package/.output/server/node_modules/mongodb/lib/db.js +6 -7
- package/.output/server/node_modules/mongodb/lib/deps.js +0 -13
- package/.output/server/node_modules/mongodb/lib/error.js +7 -10
- package/.output/server/node_modules/mongodb/lib/gridfs/download.js +7 -6
- package/.output/server/node_modules/mongodb/lib/gridfs/index.js +9 -9
- package/.output/server/node_modules/mongodb/lib/gridfs/upload.js +17 -23
- package/.output/server/node_modules/mongodb/lib/index.js +2 -4
- package/.output/server/node_modules/mongodb/lib/mongo_client.js +58 -67
- package/.output/server/node_modules/mongodb/lib/mongo_client_auth_providers.js +0 -6
- package/.output/server/node_modules/mongodb/lib/mongo_logger.js +11 -5
- package/.output/server/node_modules/mongodb/lib/mongo_types.js +1 -2
- package/.output/server/node_modules/mongodb/lib/operations/aggregate.js +0 -3
- package/.output/server/node_modules/mongodb/lib/operations/create_collection.js +0 -1
- package/.output/server/node_modules/mongodb/lib/operations/drop.js +8 -9
- package/.output/server/node_modules/mongodb/lib/operations/end_sessions.js +34 -0
- package/.output/server/node_modules/mongodb/lib/operations/execute_operation.js +121 -45
- package/.output/server/node_modules/mongodb/lib/operations/operation.js +1 -0
- package/.output/server/node_modules/mongodb/lib/read_preference.js +10 -14
- package/.output/server/node_modules/mongodb/lib/runtime_adapters.js +32 -0
- package/.output/server/node_modules/mongodb/lib/sdam/monitor.js +8 -8
- package/.output/server/node_modules/mongodb/lib/sdam/server.js +55 -43
- package/.output/server/node_modules/mongodb/lib/sdam/server_description.js +1 -1
- package/.output/server/node_modules/mongodb/lib/sdam/server_selection.js +135 -72
- package/.output/server/node_modules/mongodb/lib/sdam/srv_polling.js +3 -3
- package/.output/server/node_modules/mongodb/lib/sdam/topology.js +37 -77
- package/.output/server/node_modules/mongodb/lib/sdam/topology_description.js +1 -1
- package/.output/server/node_modules/mongodb/lib/sessions.js +150 -40
- package/.output/server/node_modules/mongodb/lib/transactions.js +2 -13
- package/.output/server/node_modules/mongodb/lib/utils.js +42 -90
- package/.output/server/node_modules/mongodb/package.json +49 -45
- package/.output/server/node_modules/mongodb-connection-string-url/lib/index.js +45 -19
- package/.output/server/node_modules/mongodb-connection-string-url/lib/redact.js +30 -19
- package/.output/server/node_modules/mongodb-connection-string-url/package.json +25 -16
- package/.output/server/node_modules/mongoose/lib/aggregate.js +108 -127
- package/.output/server/node_modules/mongoose/lib/cast/bigint.js +3 -3
- package/.output/server/node_modules/mongoose/lib/cast/boolean.js +3 -3
- package/.output/server/node_modules/mongoose/lib/cast/double.js +4 -4
- package/.output/server/node_modules/mongoose/lib/cast/int32.js +2 -2
- package/.output/server/node_modules/mongoose/lib/cast/number.js +6 -6
- package/.output/server/node_modules/mongoose/lib/cast/string.js +3 -3
- package/.output/server/node_modules/mongoose/lib/cast/uuid.js +5 -48
- package/.output/server/node_modules/mongoose/lib/cast.js +16 -24
- package/.output/server/node_modules/mongoose/lib/collection.js +6 -6
- package/.output/server/node_modules/mongoose/lib/connection.js +108 -105
- package/.output/server/node_modules/mongoose/lib/cursor/aggregationCursor.js +23 -33
- package/.output/server/node_modules/mongoose/lib/cursor/changeStream.js +60 -40
- package/.output/server/node_modules/mongoose/lib/cursor/queryCursor.js +21 -25
- package/.output/server/node_modules/mongoose/lib/document.js +712 -531
- package/.output/server/node_modules/mongoose/lib/drivers/node-mongodb-native/collection.js +85 -130
- package/.output/server/node_modules/mongoose/lib/drivers/node-mongodb-native/connection.js +32 -41
- package/.output/server/node_modules/mongoose/lib/error/cast.js +21 -12
- package/.output/server/node_modules/mongoose/lib/error/createCollectionsError.js +2 -2
- package/.output/server/node_modules/mongoose/lib/error/divergentArray.js +1 -1
- package/.output/server/node_modules/mongoose/lib/error/eachAsyncMultiError.js +1 -1
- package/.output/server/node_modules/mongoose/lib/error/index.js +3 -3
- package/.output/server/node_modules/mongoose/lib/error/invalidSchemaOption.js +1 -1
- package/.output/server/node_modules/mongoose/lib/error/messages.js +1 -0
- package/.output/server/node_modules/mongoose/lib/error/missingSchema.js +1 -1
- package/.output/server/node_modules/mongoose/lib/error/objectParameter.js +4 -5
- package/.output/server/node_modules/mongoose/lib/error/overwriteModel.js +1 -1
- package/.output/server/node_modules/mongoose/lib/error/setOptionError.js +3 -3
- package/.output/server/node_modules/mongoose/lib/error/strict.js +3 -3
- package/.output/server/node_modules/mongoose/lib/error/strictPopulate.js +2 -2
- package/.output/server/node_modules/mongoose/lib/error/syncIndexes.js +2 -2
- package/.output/server/node_modules/mongoose/lib/error/validation.js +2 -10
- package/.output/server/node_modules/mongoose/lib/error/validator.js +1 -1
- package/.output/server/node_modules/mongoose/lib/error/version.js +2 -2
- package/.output/server/node_modules/mongoose/lib/helpers/aggregate/prepareDiscriminatorPipeline.js +4 -4
- package/.output/server/node_modules/mongoose/lib/helpers/buildMiddlewareFilter.js +24 -0
- package/.output/server/node_modules/mongoose/lib/helpers/clone.js +35 -18
- package/.output/server/node_modules/mongoose/lib/helpers/common.js +5 -5
- package/.output/server/node_modules/mongoose/lib/helpers/cursor/eachAsync.js +4 -4
- package/.output/server/node_modules/mongoose/lib/helpers/discriminator/getConstructor.js +1 -1
- package/.output/server/node_modules/mongoose/lib/helpers/discriminator/getDiscriminatorByValue.js +1 -1
- package/.output/server/node_modules/mongoose/lib/helpers/discriminator/getSchemaDiscriminatorByValue.js +1 -1
- package/.output/server/node_modules/mongoose/lib/helpers/discriminator/mergeDiscriminatorSchema.js +10 -5
- package/.output/server/node_modules/mongoose/lib/helpers/document/applyDefaults.js +1 -1
- package/.output/server/node_modules/mongoose/lib/helpers/document/applyTimestamps.js +11 -10
- package/.output/server/node_modules/mongoose/lib/helpers/document/applyVirtuals.js +10 -9
- package/.output/server/node_modules/mongoose/lib/helpers/document/cleanModifiedSubpaths.js +1 -1
- package/.output/server/node_modules/mongoose/lib/helpers/document/compile.js +17 -14
- package/.output/server/node_modules/mongoose/lib/helpers/document/getDeepestSubdocumentForPath.js +3 -3
- package/.output/server/node_modules/mongoose/lib/helpers/document/getEmbeddedDiscriminatorPath.js +2 -2
- package/.output/server/node_modules/mongoose/lib/helpers/document/isInPathsToSave.js +24 -0
- package/.output/server/node_modules/mongoose/lib/helpers/get.js +1 -1
- package/.output/server/node_modules/mongoose/lib/helpers/indexes/decorateDiscriminatorIndexOptions.js +1 -1
- package/.output/server/node_modules/mongoose/lib/helpers/indexes/getRelatedIndexes.js +3 -3
- package/.output/server/node_modules/mongoose/lib/helpers/indexes/isIndexEqual.js +3 -4
- package/.output/server/node_modules/mongoose/lib/helpers/indexes/isIndexSpecEqual.js +3 -3
- package/.output/server/node_modules/mongoose/lib/helpers/isBsonType.js +1 -1
- package/.output/server/node_modules/mongoose/lib/helpers/isMongooseObject.js +1 -1
- package/.output/server/node_modules/mongoose/lib/helpers/isObject.js +2 -2
- package/.output/server/node_modules/mongoose/lib/helpers/isSimpleValidator.js +2 -2
- package/.output/server/node_modules/mongoose/lib/helpers/minimize.js +2 -2
- package/.output/server/node_modules/mongoose/lib/helpers/model/applyDefaultsToPOJO.js +2 -2
- package/.output/server/node_modules/mongoose/lib/helpers/model/applyHooks.js +55 -54
- package/.output/server/node_modules/mongoose/lib/helpers/model/applyMethods.js +2 -2
- package/.output/server/node_modules/mongoose/lib/helpers/model/applyStaticHooks.js +1 -48
- package/.output/server/node_modules/mongoose/lib/helpers/model/castBulkWrite.js +8 -12
- package/.output/server/node_modules/mongoose/lib/helpers/model/discriminator.js +1 -1
- package/.output/server/node_modules/mongoose/lib/helpers/parallelLimit.js +18 -36
- package/.output/server/node_modules/mongoose/lib/helpers/pluralize.js +4 -4
- package/.output/server/node_modules/mongoose/lib/helpers/populate/assignRawDocsToIdStructure.js +4 -11
- package/.output/server/node_modules/mongoose/lib/helpers/populate/assignVals.js +10 -10
- package/.output/server/node_modules/mongoose/lib/helpers/populate/createPopulateQueryFilter.js +3 -3
- package/.output/server/node_modules/mongoose/lib/helpers/populate/getModelsMapForPopulate.js +197 -69
- package/.output/server/node_modules/mongoose/lib/helpers/populate/getSchemaTypes.js +15 -15
- package/.output/server/node_modules/mongoose/lib/helpers/populate/markArraySubdocsPopulated.js +1 -1
- package/.output/server/node_modules/mongoose/lib/helpers/populate/modelNamesFromRefPath.js +10 -2
- package/.output/server/node_modules/mongoose/lib/helpers/populate/setPopulatedVirtualValue.js +5 -5
- package/.output/server/node_modules/mongoose/lib/helpers/printJestWarning.js +1 -1
- package/.output/server/node_modules/mongoose/lib/helpers/processConnectionOptions.js +1 -1
- package/.output/server/node_modules/mongoose/lib/helpers/projection/hasIncludedChildren.js +1 -1
- package/.output/server/node_modules/mongoose/lib/helpers/projection/isPathExcluded.js +3 -3
- package/.output/server/node_modules/mongoose/lib/helpers/projection/isSubpath.js +1 -1
- package/.output/server/node_modules/mongoose/lib/helpers/projection/parseProjection.js +9 -4
- package/.output/server/node_modules/mongoose/lib/helpers/query/cast$expr.js +8 -10
- package/.output/server/node_modules/mongoose/lib/helpers/query/castFilterPath.js +1 -1
- package/.output/server/node_modules/mongoose/lib/helpers/query/castUpdate.js +44 -38
- package/.output/server/node_modules/mongoose/lib/helpers/query/getEmbeddedDiscriminatorPath.js +8 -8
- package/.output/server/node_modules/mongoose/lib/helpers/query/handleImmutable.js +8 -8
- package/.output/server/node_modules/mongoose/lib/helpers/schema/applyPlugins.js +2 -2
- package/.output/server/node_modules/mongoose/lib/helpers/schema/applyReadConcern.js +1 -1
- package/.output/server/node_modules/mongoose/lib/helpers/schema/applyWriteConcern.js +4 -2
- package/.output/server/node_modules/mongoose/lib/helpers/schema/getIndexes.js +5 -11
- package/.output/server/node_modules/mongoose/lib/helpers/schema/getSubdocumentStrictValue.js +2 -2
- package/.output/server/node_modules/mongoose/lib/helpers/schema/handleIdOption.js +1 -1
- package/.output/server/node_modules/mongoose/lib/helpers/schema/idGetter.js +1 -1
- package/.output/server/node_modules/mongoose/lib/helpers/schematype/handleImmutable.js +1 -1
- package/.output/server/node_modules/mongoose/lib/helpers/setDefaultsOnInsert.js +26 -13
- package/.output/server/node_modules/mongoose/lib/helpers/timestamps/setDocumentTimestamps.js +2 -2
- package/.output/server/node_modules/mongoose/lib/helpers/timestamps/setupTimestamps.js +60 -38
- package/.output/server/node_modules/mongoose/lib/helpers/update/applyTimestampsToUpdate.js +13 -10
- package/.output/server/node_modules/mongoose/lib/helpers/update/castArrayFilters.js +4 -4
- package/.output/server/node_modules/mongoose/lib/helpers/update/decorateUpdateWithVersionKey.js +1 -1
- package/.output/server/node_modules/mongoose/lib/helpers/update/modifiedPaths.js +2 -2
- package/.output/server/node_modules/mongoose/lib/helpers/update/removeUnusedArrayFilters.js +7 -2
- package/.output/server/node_modules/mongoose/lib/helpers/updateValidators.js +58 -119
- package/.output/server/node_modules/mongoose/lib/model.js +940 -946
- package/.output/server/node_modules/mongoose/lib/mongoose.js +131 -79
- package/.output/server/node_modules/mongoose/lib/options/schemaArrayOptions.js +2 -2
- package/.output/server/node_modules/mongoose/lib/options/schemaBufferOptions.js +1 -1
- package/.output/server/node_modules/mongoose/lib/options/schemaDocumentArrayOptions.js +23 -0
- package/.output/server/node_modules/mongoose/lib/options/schemaNumberOptions.js +3 -3
- package/.output/server/node_modules/mongoose/lib/options/schemaObjectIdOptions.js +2 -2
- package/.output/server/node_modules/mongoose/lib/options/schemaStringOptions.js +6 -6
- package/.output/server/node_modules/mongoose/lib/options/schemaSubdocumentOptions.js +23 -0
- package/.output/server/node_modules/mongoose/lib/options/schemaTypeOptions.js +27 -13
- package/.output/server/node_modules/mongoose/lib/options/virtualOptions.js +12 -12
- package/.output/server/node_modules/mongoose/lib/plugins/index.js +0 -1
- package/.output/server/node_modules/mongoose/lib/plugins/saveSubdocs.js +84 -92
- package/.output/server/node_modules/mongoose/lib/plugins/sharding.js +33 -15
- package/.output/server/node_modules/mongoose/lib/plugins/trackTransaction.js +29 -25
- package/.output/server/node_modules/mongoose/lib/query.js +700 -548
- package/.output/server/node_modules/mongoose/lib/queryHelpers.js +34 -32
- package/.output/server/node_modules/mongoose/lib/schema/array.js +69 -113
- package/.output/server/node_modules/mongoose/lib/schema/bigint.js +18 -20
- package/.output/server/node_modules/mongoose/lib/schema/boolean.js +20 -22
- package/.output/server/node_modules/mongoose/lib/schema/buffer.js +23 -25
- package/.output/server/node_modules/mongoose/lib/schema/date.js +19 -21
- package/.output/server/node_modules/mongoose/lib/schema/decimal128.js +16 -18
- package/.output/server/node_modules/mongoose/lib/schema/documentArray.js +94 -131
- package/.output/server/node_modules/mongoose/lib/schema/documentArrayElement.js +50 -16
- package/.output/server/node_modules/mongoose/lib/schema/double.js +16 -18
- package/.output/server/node_modules/mongoose/lib/schema/index.js +1 -0
- package/.output/server/node_modules/mongoose/lib/schema/int32.js +17 -19
- package/.output/server/node_modules/mongoose/lib/schema/map.js +17 -24
- package/.output/server/node_modules/mongoose/lib/schema/mixed.js +14 -14
- package/.output/server/node_modules/mongoose/lib/schema/number.js +38 -28
- package/.output/server/node_modules/mongoose/lib/schema/objectId.js +18 -20
- package/.output/server/node_modules/mongoose/lib/schema/operators/exists.js +1 -1
- package/.output/server/node_modules/mongoose/lib/schema/operators/geospatial.js +1 -1
- package/.output/server/node_modules/mongoose/lib/schema/operators/text.js +4 -4
- package/.output/server/node_modules/mongoose/lib/schema/string.js +42 -27
- package/.output/server/node_modules/mongoose/lib/schema/subdocument.js +47 -58
- package/.output/server/node_modules/mongoose/lib/schema/union.js +54 -4
- package/.output/server/node_modules/mongoose/lib/schema/uuid.js +17 -40
- package/.output/server/node_modules/mongoose/lib/schema.js +235 -176
- package/.output/server/node_modules/mongoose/lib/schemaType.js +227 -158
- package/.output/server/node_modules/mongoose/lib/stateMachine.js +5 -8
- package/.output/server/node_modules/mongoose/lib/types/array/index.js +5 -5
- package/.output/server/node_modules/mongoose/lib/types/array/methods/index.js +27 -28
- package/.output/server/node_modules/mongoose/lib/types/arraySubdocument.js +11 -11
- package/.output/server/node_modules/mongoose/lib/types/buffer.js +15 -15
- package/.output/server/node_modules/mongoose/lib/types/decimal128.js +1 -1
- package/.output/server/node_modules/mongoose/lib/types/documentArray/index.js +4 -4
- package/.output/server/node_modules/mongoose/lib/types/documentArray/methods/index.js +15 -13
- package/.output/server/node_modules/mongoose/lib/types/double.js +1 -1
- package/.output/server/node_modules/mongoose/lib/types/map.js +20 -71
- package/.output/server/node_modules/mongoose/lib/types/objectid.js +1 -1
- package/.output/server/node_modules/mongoose/lib/types/subdocument.js +32 -81
- package/.output/server/node_modules/mongoose/lib/types/uuid.js +1 -1
- package/.output/server/node_modules/mongoose/lib/utils.js +91 -70
- package/.output/server/node_modules/mongoose/lib/validOptions.js +4 -3
- package/.output/server/node_modules/mongoose/lib/virtualType.js +18 -18
- package/.output/server/node_modules/mongoose/package.json +46 -63
- package/.output/server/node_modules/mquery/lib/collection/collection.js +3 -1
- package/.output/server/node_modules/mquery/lib/collection/node.js +17 -3
- package/.output/server/node_modules/mquery/lib/mquery.js +136 -93
- package/.output/server/node_modules/mquery/lib/permissions.js +21 -6
- package/.output/server/node_modules/mquery/package.json +4 -7
- package/.output/server/package.json +7 -9
- package/package.json +3 -3
- package/.output/public/_nuxt/builds/meta/0d6006db-fbb0-4297-85cf-bf92ceafcb79.json +0 -1
- package/.output/server/node_modules/debug/package.json +0 -64
- package/.output/server/node_modules/debug/src/browser.js +0 -272
- package/.output/server/node_modules/debug/src/common.js +0 -292
- package/.output/server/node_modules/debug/src/index.js +0 -10
- package/.output/server/node_modules/debug/src/node.js +0 -263
- package/.output/server/node_modules/mongodb/lib/client-side-encryption/crypto_callbacks.js +0 -81
- package/.output/server/node_modules/mongodb/lib/resource_management.js +0 -58
- package/.output/server/node_modules/mongoose/lib/browserDocument.js +0 -101
- package/.output/server/node_modules/mongoose/lib/documentProvider.js +0 -30
- package/.output/server/node_modules/mongoose/lib/helpers/createJSONSchemaTypeDefinition.js +0 -24
- package/.output/server/node_modules/mongoose/lib/helpers/promiseOrCallback.js +0 -54
- package/.output/server/node_modules/mongoose/lib/plugins/validateBeforeSave.js +0 -51
- package/.output/server/node_modules/supports-color/index.js +0 -202
- package/.output/server/node_modules/supports-color/package.json +0 -64
|
@@ -31,10 +31,17 @@ class NodeCollection extends Collection {
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
|
-
*
|
|
34
|
+
* countDocuments(match, options)
|
|
35
35
|
*/
|
|
36
|
-
async
|
|
37
|
-
return this.collection.
|
|
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
|
-
|
|
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 = $
|
|
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 || $
|
|
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 || $
|
|
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 || $
|
|
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('
|
|
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
|
-
*
|
|
1925
|
+
* Executes the query as a countDocuments() operation.
|
|
1947
1926
|
*
|
|
1948
1927
|
* #### Example:
|
|
1949
1928
|
*
|
|
1950
|
-
* query.
|
|
1929
|
+
* query.countDocuments().where('color', 'black').exec();
|
|
1951
1930
|
*
|
|
1952
|
-
* query.
|
|
1931
|
+
* query.countDocuments({ color: 'black' })
|
|
1953
1932
|
*
|
|
1954
|
-
* await query.
|
|
1933
|
+
* await query.countDocuments({ color: 'black' });
|
|
1955
1934
|
*
|
|
1956
|
-
* const
|
|
1935
|
+
* const count = await query.where('color', 'black').countDocuments();
|
|
1957
1936
|
* console.log('there are %d kittens', count);
|
|
1958
1937
|
*
|
|
1959
|
-
* @param {Object} [
|
|
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.
|
|
1966
|
-
this.op = '
|
|
1943
|
+
Query.prototype.countDocuments = function(filter) {
|
|
1944
|
+
this.op = 'countDocuments';
|
|
1967
1945
|
this._validate();
|
|
1968
1946
|
|
|
1969
|
-
if (Query.canMerge(
|
|
1970
|
-
this.merge(
|
|
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 `
|
|
1955
|
+
* Executes a `countDocuments` Query
|
|
1978
1956
|
* @returns the results
|
|
1979
1957
|
*/
|
|
1980
|
-
Query.prototype.
|
|
1981
|
-
const conds = this._conditions
|
|
1982
|
-
|
|
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
|
-
|
|
1981
|
+
Query.prototype.estimatedDocumentCount = function() {
|
|
1982
|
+
this.op = 'estimatedDocumentCount';
|
|
1983
|
+
this._validate();
|
|
1985
1984
|
|
|
1986
|
-
return this
|
|
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(
|
|
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
|
|
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
|
|
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().
|
|
2343
|
-
* A.where().
|
|
2344
|
-
* await A.where().
|
|
2345
|
-
* A.where().
|
|
2346
|
-
* await A.where().
|
|
2347
|
-
* A.where().
|
|
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} [
|
|
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.
|
|
2358
|
-
this.op = '
|
|
2402
|
+
Query.prototype.findOneAndDelete = function(filter, options) {
|
|
2403
|
+
this.op = 'findOneAndDelete';
|
|
2359
2404
|
this._validate();
|
|
2360
2405
|
|
|
2361
|
-
|
|
2362
|
-
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
77
|
-
denied.
|
|
78
|
-
denied.
|
|
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": "
|
|
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": ">=
|
|
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": "
|
|
25
|
-
"mongodb": "
|
|
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
|
|
3
|
+
"version": "2.1.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": "
|
|
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": "
|
|
27
|
+
"kareem": "3.3.0",
|
|
29
28
|
"memory-pager": "1.5.0",
|
|
30
|
-
"mongodb": "
|
|
31
|
-
"mongodb-connection-string-url": "
|
|
32
|
-
"mongoose": "
|
|
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": "
|
|
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
|
|
3
|
+
"version": "2.1.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": "
|
|
44
|
+
"mongoose": "9.6.3",
|
|
45
45
|
"open": "11.0.0",
|
|
46
46
|
"zod": "4.3.6",
|
|
47
|
-
"@nullix/zod-mongoose": "1.0
|
|
47
|
+
"@nullix/zod-mongoose": "2.1.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@nuxt/ui": "4.6.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"id":"0d6006db-fbb0-4297-85cf-bf92ceafcb79","timestamp":1775658856302,"prerendered":[]}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "debug",
|
|
3
|
-
"version": "4.4.3",
|
|
4
|
-
"repository": {
|
|
5
|
-
"type": "git",
|
|
6
|
-
"url": "git://github.com/debug-js/debug.git"
|
|
7
|
-
},
|
|
8
|
-
"description": "Lightweight debugging utility for Node.js and the browser",
|
|
9
|
-
"keywords": [
|
|
10
|
-
"debug",
|
|
11
|
-
"log",
|
|
12
|
-
"debugger"
|
|
13
|
-
],
|
|
14
|
-
"files": [
|
|
15
|
-
"src",
|
|
16
|
-
"LICENSE",
|
|
17
|
-
"README.md"
|
|
18
|
-
],
|
|
19
|
-
"author": "Josh Junon (https://github.com/qix-)",
|
|
20
|
-
"contributors": [
|
|
21
|
-
"TJ Holowaychuk <tj@vision-media.ca>",
|
|
22
|
-
"Nathan Rajlich <nathan@tootallnate.net> (http://n8.io)",
|
|
23
|
-
"Andrew Rhyne <rhyneandrew@gmail.com>"
|
|
24
|
-
],
|
|
25
|
-
"license": "MIT",
|
|
26
|
-
"scripts": {
|
|
27
|
-
"lint": "xo",
|
|
28
|
-
"test": "npm run test:node && npm run test:browser && npm run lint",
|
|
29
|
-
"test:node": "mocha test.js test.node.js",
|
|
30
|
-
"test:browser": "karma start --single-run",
|
|
31
|
-
"test:coverage": "cat ./coverage/lcov.info | coveralls"
|
|
32
|
-
},
|
|
33
|
-
"dependencies": {
|
|
34
|
-
"ms": "^2.1.3"
|
|
35
|
-
},
|
|
36
|
-
"devDependencies": {
|
|
37
|
-
"brfs": "^2.0.1",
|
|
38
|
-
"browserify": "^16.2.3",
|
|
39
|
-
"coveralls": "^3.0.2",
|
|
40
|
-
"karma": "^3.1.4",
|
|
41
|
-
"karma-browserify": "^6.0.0",
|
|
42
|
-
"karma-chrome-launcher": "^2.2.0",
|
|
43
|
-
"karma-mocha": "^1.3.0",
|
|
44
|
-
"mocha": "^5.2.0",
|
|
45
|
-
"mocha-lcov-reporter": "^1.2.0",
|
|
46
|
-
"sinon": "^14.0.0",
|
|
47
|
-
"xo": "^0.23.0"
|
|
48
|
-
},
|
|
49
|
-
"peerDependenciesMeta": {
|
|
50
|
-
"supports-color": {
|
|
51
|
-
"optional": true
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
"main": "./src/index.js",
|
|
55
|
-
"browser": "./src/browser.js",
|
|
56
|
-
"engines": {
|
|
57
|
-
"node": ">=6.0"
|
|
58
|
-
},
|
|
59
|
-
"xo": {
|
|
60
|
-
"rules": {
|
|
61
|
-
"import/extensions": "off"
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|