Socket
Socket
Sign inDemoInstall

@oridune/epic-odm

Package Overview
Dependencies
Maintainers
2
Versions
81
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@oridune/epic-odm - npm Package Compare versions

Comparing version 1.0.62 to 1.0.63

2

package.json
{
"name": "@oridune/epic-odm",
"version": "1.0.62",
"version": "1.0.63",
"description": "Install 1 ODM and code once with any database driver.",

@@ -5,0 +5,0 @@ "main": "./src/index.js",

@@ -263,9 +263,19 @@ "use strict";

if (IndexNames.length)
await collection.createIndexes(IndexNames.map((name) => (Object.assign({ name: `${prefix ? prefix + "." : ""}${name}`, key: Indexes[name].columns.reduce((fields, field) => (Object.assign(Object.assign({}, fields), { [`${prefix ? prefix + "." : ""}${field.replace(/^-/, "")}`]: Indexes[name].type === "text"
? "text"
: /^-/.test(field)
? -1
: 1 })), {}), unique: Indexes[name].type === "unique", background: true }, (typeof Indexes[name].ttl === "number"
? { expireAfterSeconds: Indexes[name].ttl }
: {})))));
await collection.createIndexes(IndexNames.map((name) => {
var _a;
const PartialFilters = (_a = Indexes[name].options) === null || _a === void 0 ? void 0 : _a.partialFilterExpression;
return Object.assign(Object.assign({ name: `${prefix ? prefix + "." : ""}${name}`, key: Indexes[name].columns.reduce((fields, field) => (Object.assign(Object.assign({}, fields), { [`${prefix ? prefix + "." : ""}${field.replace(/^-/, "")}`]: Indexes[name].type === "text"
? "text"
: /^-/.test(field)
? -1
: 1 })), {}), unique: Indexes[name].type === "unique", background: true }, (typeof Indexes[name].ttl === "number"
? { expireAfterSeconds: Indexes[name].ttl }
: {})), (typeof PartialFilters === "object"
? {
partialFilterExpression: TransposeToNative([
PartialFilters,
])[0],
}
: {}));
}));
};

@@ -272,0 +282,0 @@ // Syncronization

@@ -6,2 +6,3 @@ import { BaseModel } from "../model/base";

import { RelationInterface } from "./relation";
import { Conditions } from "../model/utils";
export declare type Indexes = "index" | "unique" | "text";

@@ -12,2 +13,5 @@ export interface IndexInterface<M extends BaseModel = BaseModel> {

ttl?: number;
options?: {
partialFilterExpression: Conditions<M>;
};
}

@@ -14,0 +18,0 @@ export interface ModelOptions<M extends BaseModel = BaseModel> {

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc