Join our webinar on Wednesday, June 26, at 1pm EDTHow Chia Mitigates Risk in the Crypto Industry.Register
Socket
Socket
Sign inDemoInstall

@andrewscwei/mongodb-odm

Package Overview
Dependencies
246
Maintainers
1
Versions
82
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.90.1 to 0.91.0

6

build/__mocks__/models.d.ts

@@ -19,3 +19,3 @@ import { ObjectId } from 'mongodb';

};
declare const Foo_base: import("../core/Model").Model<FooProps>;
declare const Foo_base: import("../core/Model.js").Model<FooProps>;
export declare class Foo extends Foo_base {

@@ -49,3 +49,3 @@ static randomProps: {

};
declare const Bar_base: import("../core/Model").Model<BarProps>;
declare const Bar_base: import("../core/Model.js").Model<BarProps>;
export declare class Bar extends Bar_base {

@@ -80,3 +80,3 @@ static randomProps: {

};
declare const Baz_base: import("../core/Model").Model<BazProps>;
declare const Baz_base: import("../core/Model.js").Model<BazProps>;
export declare class Baz extends Baz_base {

@@ -83,0 +83,0 @@ static randomProps: {

/* eslint-disable max-classes-per-file */
import Chance from 'chance';
import { ObjectId } from 'mongodb';
import { Model } from '../';
import { Model } from '../index.js';
const chance = new Chance();

@@ -6,0 +6,0 @@ const FooSchema = {

@@ -1,3 +0,3 @@

import { type AnyProps } from '../../types';
import { type Schema } from '../Schema';
import { type AnyProps } from '../../types/index.js';
import { type Schema } from '../Schema.js';
export type GroupStage = {

@@ -4,0 +4,0 @@ $group: Record<string, any>;

@@ -1,7 +0,7 @@

export * from './group';
export * from './lookup';
export * from './match';
export * from './project';
export * from './sort';
export * from './group.js';
export * from './lookup.js';
export * from './match.js';
export * from './project.js';
export * from './sort.js';
export type PipelineStage = Record<string, Record<string, any>>;
export type Pipeline = PipelineStage[];

@@ -1,6 +0,6 @@

export * from './group';
export * from './lookup';
export * from './match';
export * from './project';
export * from './sort';
export * from './group.js';
export * from './lookup.js';
export * from './match.js';
export * from './project.js';
export * from './sort.js';
//# sourceMappingURL=index.js.map

@@ -1,3 +0,3 @@

import { type AnyProps } from '../../types';
import { type Schema } from '../Schema';
import { type AnyProps } from '../../types/index.js';
import { type Schema } from '../Schema.js';
export type UnwindStage = {

@@ -4,0 +4,0 @@ $unwind: Record<string, any>;

@@ -1,3 +0,3 @@

import * as db from '../..';
import { fieldPath, prefixed } from '../../utils';
import * as db from '../../index.js';
import { fieldPath, prefixed } from '../../utils/index.js';
/**

@@ -4,0 +4,0 @@ * Generates a series of `$lookup` and (if needed) `$unwind` stages for a

@@ -1,3 +0,3 @@

import { type AnyFilter, type AnyProps } from '../../types';
import { type Schema } from '../Schema';
import { type AnyFilter, type AnyProps } from '../../types/index.js';
import { type Schema } from '../Schema.js';
export type MatchStage = {

@@ -4,0 +4,0 @@ $match: Record<string, any>;

@@ -1,2 +0,2 @@

import { prefixed, sanitizeFilter } from '../../utils';
import { prefixed, sanitizeFilter } from '../../utils/index.js';
/**

@@ -3,0 +3,0 @@ * Generates a `$match` stage for a collection to be used in an aggregation

@@ -1,3 +0,3 @@

import { type AnyProps } from '../../types';
import { type Schema } from '../Schema';
import { type AnyProps } from '../../types/index.js';
import { type Schema } from '../Schema.js';
export type ProjectStageFactorySpecs = Record<string, any>;

@@ -4,0 +4,0 @@ export type ProjectStage = {

@@ -1,3 +0,3 @@

import * as db from '../..';
import { fieldPath, prefixed } from '../../utils';
import * as db from '../../index.js';
import { fieldPath, prefixed } from '../../utils/index.js';
/**

@@ -4,0 +4,0 @@ * Generates a `$project` stage for a collection to be used in an aggregation

import { type SortDirection } from 'mongodb';
import { type AnyProps } from '../../types';
import { type Schema } from '../Schema';
import { type AnyProps } from '../../types/index.js';
import { type Schema } from '../Schema.js';
export type SortStage = {

@@ -5,0 +5,0 @@ $sort: Record<string, any>;

import { MongoClient, type Collection, type Db } from 'mongodb';
import { type AnyDocument } from '../types';
import { type modelFactory } from './modelFactory';
import { type AnyDocument } from '../types/index.js';
import { type modelFactory } from './modelFactory.js';
export type ConnectionConfiguration = {

@@ -5,0 +5,0 @@ host: string;

import { type DeleteOptions, type Filter, type FindOneAndDeleteOptions } from 'mongodb';
import { type AnyProps, type Document } from '../../types';
import { type Schema } from '../Schema';
import { type AnyProps, type Document } from '../../types/index.js';
import { type Schema } from '../Schema.js';
export declare function deleteOne<P extends AnyProps = AnyProps>(schema: Schema<P>, filter: Filter<Document<P>>, options?: DeleteOptions): Promise<boolean>;

@@ -5,0 +5,0 @@ export declare function findAndDeleteOne<P extends AnyProps = AnyProps>(schema: Schema<P>, filter: Filter<Document<P>>, options?: FindOneAndDeleteOptions): Promise<Document<P>>;

@@ -1,3 +0,3 @@

import * as db from '../..';
import { findMany } from './find';
import * as db from '../../index.js';
import { findMany } from './find.js';
export async function deleteOne(schema, filter, options = {}) {

@@ -4,0 +4,0 @@ if (schema.noDeletes === true)

import { type AggregateOptions } from 'mongodb';
import { type AnyFilter, type AnyProps, type Document } from '../../types';
import { type Schema } from '../Schema';
import * as Aggregation from '../aggregation';
import { type AnyFilter, type AnyProps, type Document } from '../../types/index.js';
import { type Schema } from '../Schema.js';
import * as Aggregation from '../aggregation/index.js';
export declare function findOne<P extends AnyProps = AnyProps, R extends AnyProps = P>(schema: Schema<P>, filter: AnyFilter<P> | Aggregation.Pipeline, options?: AggregateOptions): Promise<Document<R>>;

@@ -6,0 +6,0 @@ export declare function findOneRandom<P extends AnyProps = AnyProps, R extends AnyProps = P>(schema: Schema<P>): Promise<Document<R>>;

@@ -1,3 +0,3 @@

import * as db from '../..';
import * as Aggregation from '../aggregation';
import * as db from '../../index.js';
import * as Aggregation from '../aggregation/index.js';
export async function findOne(schema, filter, options = {}) {

@@ -4,0 +4,0 @@ const docs = await findMany(schema, filter, options);

import { ObjectId } from 'mongodb';
import { type AnyFilter, type AnyProps } from '../../types';
import { type Schema } from '../Schema';
import { type AnyFilter, type AnyProps } from '../../types/index.js';
import { type Schema } from '../Schema.js';
export declare function identifyOne<P extends AnyProps = AnyProps>(schema: Schema<P>, filter: AnyFilter<P>): Promise<ObjectId>;
export declare function identifyMany<P extends AnyProps = AnyProps>(schema: Schema<P>, filter: AnyFilter<P>): Promise<ObjectId[]>;
export declare function identifyAll<P extends AnyProps = AnyProps>(schema: Schema<P>): Promise<ObjectId[]>;
import { ObjectId } from 'mongodb';
import * as db from '../..';
import * as Aggregation from '../aggregation';
import { findOne } from './find';
import * as db from '../../index.js';
import * as Aggregation from '../aggregation/index.js';
import { findOne } from './find.js';
export async function identifyOne(schema, filter) {

@@ -6,0 +6,0 @@ const doc = await findOne(schema, filter).catch(err => { throw new Error(`[${schema.model}] No results found while identifying this ${schema.model} using the filter ${filter}`); });

@@ -1,6 +0,6 @@

export * from './delete';
export * from './find';
export * from './identify';
export * from './insert';
export * from './replace';
export * from './update';
export * from './delete.js';
export * from './find.js';
export * from './identify.js';
export * from './insert.js';
export * from './replace.js';
export * from './update.js';

@@ -1,7 +0,7 @@

export * from './delete';
export * from './find';
export * from './identify';
export * from './insert';
export * from './replace';
export * from './update';
export * from './delete.js';
export * from './find.js';
export * from './identify.js';
export * from './insert.js';
export * from './replace.js';
export * from './update.js';
//# sourceMappingURL=index.js.map
import { type BulkWriteOptions, type InsertOneOptions } from 'mongodb';
import { type AnyProps, type Document, type InsertableDocument } from '../../types';
import { type Schema } from '../Schema';
import { type AnyProps, type Document, type InsertableDocument } from '../../types/index.js';
import { type Schema } from '../Schema.js';
export declare function insertOne<P extends AnyProps = AnyProps>(schema: Schema<P>, doc: InsertableDocument<P>, options?: InsertOneOptions): Promise<Document<P>>;
export declare function insertMany<P extends AnyProps = AnyProps>(schema: Schema<P>, docs: InsertableDocument<P>[], options?: BulkWriteOptions): Promise<Document<P>[]>;

@@ -1,4 +0,4 @@

import * as db from '../..';
import { matchStageFactory } from '../aggregation';
import { findMany, findOne } from './find';
import * as db from '../../index.js';
import { matchStageFactory } from '../aggregation/index.js';
import { findMany, findOne } from './find.js';
export async function insertOne(schema, doc, options = {}) {

@@ -5,0 +5,0 @@ if (schema.noInserts === true)

import { type Filter, type FindOneAndReplaceOptions, type ReplaceOptions } from 'mongodb';
import { type AnyProps, type Document, type InsertableDocument } from '../../types';
import { type Schema } from '../Schema';
import { type AnyProps, type Document, type InsertableDocument } from '../../types/index.js';
import { type Schema } from '../Schema.js';
export declare function replaceOne<P extends AnyProps = AnyProps>(schema: Schema<P>, filter: Filter<Document<P>>, replacement: InsertableDocument<P>, options?: ReplaceOptions): Promise<boolean>;
export declare function findOneAndReplace<P extends AnyProps = AnyProps>(schema: Schema<P>, filter: Filter<Document<P>>, replacement: InsertableDocument<P>, options?: FindOneAndReplaceOptions): Promise<[Document<P>, Document<P>]>;

@@ -1,3 +0,3 @@

import * as db from '../..';
import { findOne } from './find';
import * as db from '../../index.js';
import { findOne } from './find.js';
export async function replaceOne(schema, filter, replacement, options = {}) {

@@ -4,0 +4,0 @@ const collection = await db.getCollection(schema.collection);

import { type Filter, type FindOneAndUpdateOptions, type UpdateFilter, type UpdateOptions } from 'mongodb';
import { type AnyProps, type Document } from '../../types';
import { type Schema } from '../Schema';
import { type AnyProps, type Document } from '../../types/index.js';
import { type Schema } from '../Schema.js';
export declare function updateOne<P extends AnyProps = AnyProps>(schema: Schema<P>, filter: Filter<Document<P>>, update: UpdateFilter<Document<P>>, options?: UpdateOptions): Promise<boolean>;

@@ -5,0 +5,0 @@ export declare function findOneAndUpdate<P extends AnyProps = AnyProps>(schema: Schema<P>, filter: Filter<Document<P>>, update: UpdateFilter<Document<P>>, options?: FindOneAndUpdateOptions): Promise<[Document<P> | undefined, Document<P>]>;

@@ -1,3 +0,3 @@

import * as db from '../..';
import { findMany, findOne } from './find';
import * as db from '../../index.js';
import { findMany, findOne } from './find.js';
export async function updateOne(schema, filter, update, options = {}) {

@@ -4,0 +4,0 @@ if (schema.noUpdates === true)

@@ -1,7 +0,7 @@

import * as Aggregation from './aggregation';
import * as CRUD from './crud';
export * from './Connection';
export * from './Model';
export * from './Schema';
export { modelFactory as Model } from './modelFactory';
import * as Aggregation from './aggregation/index.js';
import * as CRUD from './crud/index.js';
export * from './Connection.js';
export * from './Model.js';
export * from './Schema.js';
export { modelFactory as Model } from './modelFactory.js';
export { Aggregation, CRUD };

@@ -1,8 +0,8 @@

import * as Aggregation from './aggregation';
import * as CRUD from './crud';
export * from './Connection';
export * from './Model';
export * from './Schema';
export { modelFactory as Model } from './modelFactory';
import * as Aggregation from './aggregation/index.js';
import * as CRUD from './crud/index.js';
export * from './Connection.js';
export * from './Model.js';
export * from './Schema.js';
export { modelFactory as Model } from './modelFactory.js';
export { Aggregation, CRUD };
//# sourceMappingURL=index.js.map
import { type AggregateOptions, type BulkWriteOptions, type Collection, type DeleteOptions, type FindOneAndDeleteOptions, type FindOneAndReplaceOptions, type FindOneAndUpdateOptions, type InsertOneOptions, type ObjectId, type ReplaceOptions, type UpdateOptions } from 'mongodb';
import { type AnyFilter, type AnyProps, type AnyUpdate, type Document, type DocumentFragment } from '../types';
import { type SanitizeUpdateOptions } from '../utils';
import { type FieldValue, type Schema } from './Schema';
import type * as Aggregation from './aggregation';
import { type AnyFilter, type AnyProps, type AnyUpdate, type Document, type DocumentFragment } from '../types/index.js';
import { type SanitizeUpdateOptions } from '../utils/index.js';
import { type FieldValue, type Schema } from './Schema.js';
import type * as Aggregation from './aggregation/index.js';
type LocalModel = any;

@@ -7,0 +7,0 @@ export type ModelRandomPropertyProvider<P extends AnyProps = AnyProps> = {

@@ -11,5 +11,5 @@ /**

*/
import { type AnyProps } from '../types';
import { type Model } from './Model';
import { type Schema } from './Schema';
import { type AnyProps } from '../types/index.js';
import { type Model } from './Model.js';
import { type Schema } from './Schema.js';
/**

@@ -16,0 +16,0 @@ * Generates an abstract, static model class with the provided schema.

@@ -13,7 +13,7 @@ /**

import useDebug from 'debug';
import * as db from '..';
import { cloneDeep, get, isEmpty, omit, pick } from '../helpers';
import { getFieldSpecByKey, sanitizeDocument, sanitizeFilter, sanitizeUpdate, typeIsAnyDocument, typeIsValidObjectId, validateFieldValue } from '../utils';
import { typeIsFieldDescriptor } from './Schema';
import * as CRUD from './crud';
import { cloneDeep, get, isEmpty, omit, pick } from '../helpers/index.js';
import * as db from '../index.js';
import { getFieldSpecByKey, sanitizeDocument, sanitizeFilter, sanitizeUpdate, typeIsAnyDocument, typeIsValidObjectId, validateFieldValue } from '../utils/index.js';
import { typeIsFieldDescriptor } from './Schema.js';
import * as CRUD from './crud/index.js';
/**

@@ -20,0 +20,0 @@ * Generates an abstract, static model class with the provided schema.

import { type CreateIndexesOptions, type IndexSpecification, type ObjectId } from 'mongodb';
import { type AnyProps } from '../types';
import { type AnyProps } from '../types/index.js';
/**

@@ -4,0 +4,0 @@ * Data type for describing multiple (can be nested) fields in the

@@ -1,2 +0,2 @@

import { isPlainObject } from '../helpers';
import { isPlainObject } from '../helpers/index.js';
/**

@@ -3,0 +3,0 @@ * Checks if a value is a {@link MultiFieldDescriptor} object.

@@ -1,1 +0,1 @@

export * from './utility';
export * from './utility.js';

@@ -1,2 +0,2 @@

export * from './utility';
export * from './utility.js';
//# sourceMappingURL=index.js.map

@@ -1,7 +0,7 @@

export { default as cloneDeep } from 'lodash/cloneDeep';
export { default as compact } from 'lodash/compact';
export { default as get } from 'lodash/get';
export { default as isEmpty } from 'lodash/isEmpty';
export { default as isPlainObject } from 'lodash/isPlainObject';
export { default as omit } from 'lodash/omit';
export { default as pick } from 'lodash/pick';
export { default as cloneDeep } from 'lodash/cloneDeep.js';
export { default as compact } from 'lodash/compact.js';
export { default as get } from 'lodash/get.js';
export { default as isEmpty } from 'lodash/isEmpty.js';
export { default as isPlainObject } from 'lodash/isPlainObject.js';
export { default as omit } from 'lodash/omit.js';
export { default as pick } from 'lodash/pick.js';

@@ -1,8 +0,8 @@

export { default as cloneDeep } from 'lodash/cloneDeep';
export { default as compact } from 'lodash/compact';
export { default as get } from 'lodash/get';
export { default as isEmpty } from 'lodash/isEmpty';
export { default as isPlainObject } from 'lodash/isPlainObject';
export { default as omit } from 'lodash/omit';
export { default as pick } from 'lodash/pick';
export { default as cloneDeep } from 'lodash/cloneDeep.js';
export { default as compact } from 'lodash/compact.js';
export { default as get } from 'lodash/get.js';
export { default as isEmpty } from 'lodash/isEmpty.js';
export { default as isPlainObject } from 'lodash/isPlainObject.js';
export { default as omit } from 'lodash/omit.js';
export { default as pick } from 'lodash/pick.js';
//# sourceMappingURL=utility.js.map

@@ -7,4 +7,4 @@ /** @license node-mongodb-odm

import { type Collection } from 'mongodb';
import { Connection, type ConnectionConfiguration, type Model } from './core';
import { type AnyDocument } from './types';
import { Connection, type ConnectionConfiguration, type Model } from './core/index.js';
import { type AnyDocument } from './types/index.js';
/**

@@ -47,4 +47,4 @@ * Configures the ODM.

export { ObjectId } from 'mongodb';
export * from './core';
export * from './types';
export * from './utils';
export * from './core/index.js';
export * from './types/index.js';
export * from './utils/index.js';

@@ -11,3 +11,3 @@ /** @license node-mongodb-odm

import useDebug from 'debug';
import { Connection } from './core';
import { Connection } from './core/index.js';
const debug = useDebug('mongodb-odm');

@@ -79,5 +79,5 @@ /**

export { ObjectId } from 'mongodb';
export * from './core';
export * from './types';
export * from './utils';
export * from './core/index.js';
export * from './types/index.js';
export * from './utils/index.js';
//# sourceMappingURL=index.js.map

@@ -1,2 +0,2 @@

import { prefixed } from './prefixed';
import { prefixed } from './prefixed.js';
/**

@@ -3,0 +3,0 @@ * Returns the field path of a schema field with an option to prepend a prefix.

@@ -1,2 +0,2 @@

import { type FieldDescriptor } from '../core/Schema';
import { type FieldDescriptor } from '../core/Schema.js';
/**

@@ -3,0 +3,0 @@ * Finds and returns the spec of a field in the provided schema by its key. This

@@ -1,2 +0,2 @@

import { typeIsFieldDescriptor } from '../core/Schema';
import { typeIsFieldDescriptor } from '../core/Schema.js';
/**

@@ -3,0 +3,0 @@ * Finds and returns the spec of a field in the provided schema by its key. This

@@ -1,16 +0,16 @@

export * from './ObjectIdEqual';
export * from './ObjectIdGet';
export * from './ObjectIdMake';
export * from './fieldPath';
export * from './getFieldSpecByKey';
export * from './mapValuesToObjectIds';
export * from './prefixed';
export * from './sanitizeDocument';
export * from './sanitizeFilter';
export * from './sanitizeUpdate';
export * from './typeIsAnyDocument';
export * from './typeIsIdentifiableDocument';
export * from './typeIsUpdateFilter';
export * from './typeIsValidObjectId';
export * from './validateFieldValue';
export * from './valueIsObjectIdConvertible';
export * from './ObjectIdEqual.js';
export * from './ObjectIdGet.js';
export * from './ObjectIdMake.js';
export * from './fieldPath.js';
export * from './getFieldSpecByKey.js';
export * from './mapValuesToObjectIds.js';
export * from './prefixed.js';
export * from './sanitizeDocument.js';
export * from './sanitizeFilter.js';
export * from './sanitizeUpdate.js';
export * from './typeIsAnyDocument.js';
export * from './typeIsIdentifiableDocument.js';
export * from './typeIsUpdateFilter.js';
export * from './typeIsValidObjectId.js';
export * from './validateFieldValue.js';
export * from './valueIsObjectIdConvertible.js';

@@ -1,17 +0,17 @@

export * from './ObjectIdEqual';
export * from './ObjectIdGet';
export * from './ObjectIdMake';
export * from './fieldPath';
export * from './getFieldSpecByKey';
export * from './mapValuesToObjectIds';
export * from './prefixed';
export * from './sanitizeDocument';
export * from './sanitizeFilter';
export * from './sanitizeUpdate';
export * from './typeIsAnyDocument';
export * from './typeIsIdentifiableDocument';
export * from './typeIsUpdateFilter';
export * from './typeIsValidObjectId';
export * from './validateFieldValue';
export * from './valueIsObjectIdConvertible';
export * from './ObjectIdEqual.js';
export * from './ObjectIdGet.js';
export * from './ObjectIdMake.js';
export * from './fieldPath.js';
export * from './getFieldSpecByKey.js';
export * from './mapValuesToObjectIds.js';
export * from './prefixed.js';
export * from './sanitizeDocument.js';
export * from './sanitizeFilter.js';
export * from './sanitizeUpdate.js';
export * from './typeIsAnyDocument.js';
export * from './typeIsIdentifiableDocument.js';
export * from './typeIsUpdateFilter.js';
export * from './typeIsValidObjectId.js';
export * from './validateFieldValue.js';
export * from './valueIsObjectIdConvertible.js';
//# sourceMappingURL=index.js.map
import { ObjectId } from 'mongodb';
import { isPlainObject } from '../helpers';
import { valueIsObjectIdConvertible } from './valueIsObjectIdConvertible';
import { isPlainObject } from '../helpers/index.js';
import { valueIsObjectIdConvertible } from './valueIsObjectIdConvertible.js';
/**

@@ -5,0 +5,0 @@ * Maps a single value or a collection of values to Object IDs. If a value

@@ -1,2 +0,2 @@

import { ObjectIdGet } from './ObjectIdGet';
import { ObjectIdGet } from './ObjectIdGet.js';
/**

@@ -3,0 +3,0 @@ * Checks to see if 2 values are equal `ObjectId`s.

@@ -1,3 +0,3 @@

import { typeIsIdentifiableDocument } from './typeIsIdentifiableDocument';
import { valueIsObjectIdConvertible } from './valueIsObjectIdConvertible';
import { typeIsIdentifiableDocument } from './typeIsIdentifiableDocument.js';
import { valueIsObjectIdConvertible } from './valueIsObjectIdConvertible.js';
/**

@@ -4,0 +4,0 @@ * Checks to see if a value is a valid `ObjectId` and returns it if it is. If

import { ObjectId } from 'mongodb';
import { valueIsObjectIdConvertible } from './valueIsObjectIdConvertible';
import { valueIsObjectIdConvertible } from './valueIsObjectIdConvertible.js';
/**

@@ -4,0 +4,0 @@ * Makes an `ObjectId` from a value.

@@ -1,2 +0,2 @@

import { compact } from '../helpers';
import { compact } from '../helpers/index.js';
/**

@@ -3,0 +3,0 @@ * Prepends a prefix to a schema field.

@@ -1,3 +0,3 @@

import { type Schema } from '../core';
import { type AnyDocumentFragment, type AnyProps, type DocumentFragment } from '../types';
import { type Schema } from '../core/index.js';
import { type AnyDocumentFragment, type AnyProps, type DocumentFragment } from '../types/index.js';
export type SanitizeDocumentOptions = {

@@ -4,0 +4,0 @@ /**

@@ -1,2 +0,2 @@

import { getFieldSpecByKey } from './getFieldSpecByKey';
import { getFieldSpecByKey } from './getFieldSpecByKey.js';
/**

@@ -3,0 +3,0 @@ * Removes all extraneous fields from a document fragment according to the

import { type Filter } from 'mongodb';
import { type Schema } from '../core';
import { type AnyFilter, type AnyProps, type Document } from '../types';
import { type Schema } from '../core/index.js';
import { type AnyFilter, type AnyProps, type Document } from '../types/index.js';
export type SanitizeFilterOptions = {

@@ -5,0 +5,0 @@ /**

import { ObjectId } from 'mongodb';
import { sanitizeDocument } from './sanitizeDocument';
import { typeIsValidObjectId } from './typeIsValidObjectId';
import { sanitizeDocument } from './sanitizeDocument.js';
import { typeIsValidObjectId } from './typeIsValidObjectId.js';
/**

@@ -5,0 +5,0 @@ * Magically transforms any supported value into a valid input for filtering db

import { type UpdateFilter } from 'mongodb';
import { type Schema } from '../core';
import { type AnyProps, type AnyUpdate, type Document } from '../types';
import { type Schema } from '../core/index.js';
import { type AnyProps, type AnyUpdate, type Document } from '../types/index.js';
export type SanitizeUpdateOptions = {

@@ -5,0 +5,0 @@ ignoreTimestamps?: boolean;

@@ -1,4 +0,4 @@

import { cloneDeep, isEmpty } from '../helpers';
import { sanitizeDocument } from './sanitizeDocument';
import { typeIsUpdateFilter } from './typeIsUpdateFilter';
import { cloneDeep, isEmpty } from '../helpers/index.js';
import { sanitizeDocument } from './sanitizeDocument.js';
import { typeIsUpdateFilter } from './typeIsUpdateFilter.js';
/**

@@ -5,0 +5,0 @@ * Transforms the generic update descriptor specific to this library to an

@@ -1,2 +0,2 @@

import { type AnyDocument } from '../types';
import { type AnyDocument } from '../types/index.js';
/**

@@ -3,0 +3,0 @@ * Checks if a value is a document of any kind.

@@ -1,2 +0,2 @@

import { isPlainObject } from '../helpers';
import { isPlainObject } from '../helpers/index.js';
/**

@@ -3,0 +3,0 @@ * Checks if a value is a document of any kind.

import { type ObjectId } from 'mongodb';
import { type AnyProps } from '../types';
import { type AnyProps } from '../types/index.js';
/**

@@ -4,0 +4,0 @@ * Checks if a value is an identifiable document.

@@ -1,3 +0,3 @@

import { isPlainObject } from '../helpers';
import { typeIsValidObjectId } from './typeIsValidObjectId';
import { isPlainObject } from '../helpers/index.js';
import { typeIsValidObjectId } from './typeIsValidObjectId.js';
/**

@@ -4,0 +4,0 @@ * Checks if a value is an identifiable document.

import { type UpdateFilter } from 'mongodb';
import { type AnyProps, type Document } from '../types';
import { type AnyProps, type Document } from '../types/index.js';
/**

@@ -4,0 +4,0 @@ * Checks if a value is an {@link UpdateFilter}.

@@ -1,2 +0,2 @@

import { isPlainObject } from '../helpers';
import { isPlainObject } from '../helpers/index.js';
/**

@@ -3,0 +3,0 @@ * Checks if a value is an {@link UpdateFilter}.

@@ -1,2 +0,2 @@

import { type FieldDescriptor, type FieldValidationStrategy, type FieldValue } from '../core';
import { type FieldDescriptor, type FieldValidationStrategy, type FieldValue } from '../core/index.js';
/**

@@ -3,0 +3,0 @@ * Checks a value against field properties definied in a schema.

import { ObjectId } from 'mongodb';
import { isPlainObject } from '../helpers';
import { typeIsValidObjectId } from './typeIsValidObjectId';
import { isPlainObject } from '../helpers/index.js';
import { typeIsValidObjectId } from './typeIsValidObjectId.js';
/**

@@ -5,0 +5,0 @@ * Checks a value against field properties definied in a schema.

{
"name": "@andrewscwei/mongodb-odm",
"version": "0.90.1",
"version": "0.91.0",
"description": "ODM for MongoDB",

@@ -11,5 +11,5 @@ "main": "build/index.js",

"build": "npm run clean && tsc",
"test": "npm run build && mocha --config .mocharc \"tests/$npm_config_files\"",
"test": "mocha --config .mocharc \"tests/$npm_config_files\"",
"test:unit": "cross-env DEBUG=mongodb-odm* mocha --config .mocharc \"src/$npm_config_files\"",
"svc:db": "docker run --rm -p 27017:27017 mongo:7.0",
"svc": "docker run --rm -p 27017:27017 mongo:7.0",
"lint": "eslint --ext .ts src",

@@ -16,0 +16,0 @@ "lint:fix": "npm run lint -- --fix"

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc