sequelastic
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -55,3 +55,3 @@ import "colors"; | ||
customSearch(params: elasticSearch.RequestParams.Search): Promise<elasticSearch.ApiResponse<Record<string, any>, Record<string, unknown>>>; | ||
searchInIndices(query: string, options?: SequelasticMultipleSearchOptions): Promise<elasticSearch.ApiResponse<Record<string, any>, Record<string, unknown>>>; | ||
searchInIndices(query: string, options?: SequelasticMultipleSearchOptions): Promise<elasticSearch.ApiResponse<Record<string, any>, unknown>>; | ||
allIndices(): Promise<any>; | ||
@@ -58,0 +58,0 @@ private handleErrors; |
"use strict"; | ||
var _fieldsToExclude; | ||
var _Sequelastic_fieldsToExclude; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -15,11 +15,11 @@ exports.checkIndex = void 0; | ||
constructor(options) { | ||
_fieldsToExclude.set(this, void 0); | ||
_Sequelastic_fieldsToExclude.set(this, void 0); | ||
const { models, exclude: fieldsToExclude } = options, cliOpt = tslib_1.__rest(options, ["models", "exclude"]); | ||
this.models = models; | ||
this.elastic = new elasticsearch_1.default.Client(Object.assign({ node: "http://localhost.mabiloft.com:9200" }, cliOpt)); | ||
tslib_1.__classPrivateFieldSet(this, _fieldsToExclude, fieldsToExclude); | ||
tslib_1.__classPrivateFieldSet(this, _Sequelastic_fieldsToExclude, fieldsToExclude, "f"); | ||
} | ||
sync(options) { | ||
return tslib_1.__awaiter(this, void 0, void 0, function* () { | ||
const toExclude = tslib_1.__classPrivateFieldGet(this, _fieldsToExclude); | ||
const toExclude = tslib_1.__classPrivateFieldGet(this, _Sequelastic_fieldsToExclude, "f"); | ||
const allDbPromises = []; | ||
@@ -249,3 +249,3 @@ const allIndiciesCreationPromises = []; | ||
exports.default = Sequelastic; | ||
_fieldsToExclude = new WeakMap(); | ||
_Sequelastic_fieldsToExclude = new WeakMap(); | ||
const elasticClient = new elasticsearch_1.default.Client({ | ||
@@ -252,0 +252,0 @@ node: process.env.SEARCH_SERVICE_URL || "http://localhost.mabiloft.com:9200", |
{ | ||
"name": "sequelastic", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "bridge utility between sequelize-typescript and ElasticSearch", | ||
@@ -30,6 +30,9 @@ "main": "dist/index.js", | ||
"@elastic/elasticsearch": "^7.12.0", | ||
"@types/bluebird": "^3.5.35", | ||
"@types/pluralize": "^0.0.29", | ||
"bluebird": "^3.7.2", | ||
"colors": "^1.4.0", | ||
"exit": "^0.1.2", | ||
"pluralize": "^8.0.0", | ||
"sequelize": "^6.6.2", | ||
"sequelize-typescript": "^2.1.0", | ||
@@ -39,4 +42,5 @@ "tslib": "^2.2.0" | ||
"devDependencies": { | ||
"@types/validator": "^13.1.3", | ||
"typescript": "^4.2.4" | ||
} | ||
} |
# Sequelastic | ||
:warning: This only works with sequelize-typescript@2, in order to use it with sequelize-typescript@1 use: | ||
:warning: **This version only works with sequelize-typescript 1.1.x** | ||
``` | ||
npm install sequelastic@0.0.5 | ||
``` | ||
## The first sequelize-typescript and ElasticSearch bridge tool | ||
@@ -10,0 +6,0 @@ |
@@ -253,3 +253,3 @@ import "colors"; | ||
if (options.wholeResponse) return result; | ||
if (options.wholeResponse) return result as any; | ||
return result.body.hits.hits; | ||
@@ -268,3 +268,3 @@ } catch (err) { | ||
const result = await this.elastic.search(params); | ||
return result; | ||
return result as any; | ||
} catch (err) { | ||
@@ -271,0 +271,0 @@ this.handleErrors(err); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
54857
19
770
10
2
239
+ Added@types/bluebird@^3.5.35
+ Addedbluebird@^3.7.2
+ Addedsequelize@^6.6.2
+ Added@types/bluebird@3.5.42(transitive)
+ Addedbluebird@3.7.2(transitive)