fix(core): update

This commit is contained in:
Philipp Kunz 2019-11-02 01:42:03 +01:00
parent 20a41d3381
commit 2d1a5cdc50
4 changed files with 1154 additions and 648 deletions

1759
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -13,22 +13,22 @@
"build": "(tsbuild)" "build": "(tsbuild)"
}, },
"devDependencies": { "devDependencies": {
"@gitzone/tsbuild": "^2.0.22", "@gitzone/tsbuild": "^2.1.17",
"@gitzone/tsrun": "^1.1.13", "@gitzone/tsrun": "^1.2.8",
"@gitzone/tstest": "^1.0.15", "@gitzone/tstest": "^1.0.28",
"@pushrocks/qenv": "^2.0.2", "@pushrocks/qenv": "^4.0.6",
"@pushrocks/tapbundle": "^3.0.7", "@pushrocks/tapbundle": "^3.0.13",
"@types/node": "^10.12.2", "@types/node": "^12.12.5",
"tslint": "^5.11.0", "tslint": "^5.20.0",
"tslint-config-prettier": "^1.15.0" "tslint-config-prettier": "^1.18.0"
}, },
"dependencies": { "dependencies": {
"@pushrocks/lik": "^3.0.2", "@pushrocks/lik": "^3.0.11",
"@pushrocks/smartdelay": "^2.0.2", "@pushrocks/smartdelay": "^2.0.3",
"@pushrocks/smartlog-interfaces": "^2.0.2", "@pushrocks/smartlog-interfaces": "^2.0.9",
"@pushrocks/smartpromise": "^2.0.5", "@pushrocks/smartpromise": "^3.0.6",
"@pushrocks/smarttime": "^3.0.2", "@pushrocks/smarttime": "^3.0.12",
"@types/elasticsearch": "^5.0.28", "@types/elasticsearch": "^5.0.35",
"elasticsearch": "^15.2.0" "elasticsearch": "^16.5.0"
} }
} }

View File

@ -10,11 +10,9 @@ tap.test('first test', async () => {
testElasticLog = new elasticsearch.ElasticSearch({ testElasticLog = new elasticsearch.ElasticSearch({
indexPrefix: 'smartlog', indexPrefix: 'smartlog',
indexRetention: 7, indexRetention: 7,
domain: process.env.ELK_DOMAIN, domain: testQenv.getEnvVarOnDemand('ELK_DOMAIN'),
port: parseInt(process.env.ELK_PORT, 10), port: parseInt(testQenv.getEnvVarOnDemand('ELK_PORT'), 10),
ssl: true, ssl: true
user: process.env.ELK_USER,
pass: process.env.ELK_PASS
}); });
expect(testElasticLog).to.be.instanceOf(elasticsearch.ElasticSearch); expect(testElasticLog).to.be.instanceOf(elasticsearch.ElasticSearch);
}); });

View File

@ -35,7 +35,7 @@ export class ElasticSearch<T> {
*/ */
constructor(optionsArg: IElasticSearchConstructorOptions) { constructor(optionsArg: IElasticSearchConstructorOptions) {
this.client = new ElasticClient({ this.client = new ElasticClient({
host: this.computeHostString(optionsArg) host: this.computeHostString(optionsArg),
// log: 'trace' // log: 'trace'
}); });
this.indexPrefix = optionsArg.indexPrefix; this.indexPrefix = optionsArg.indexPrefix;
@ -56,6 +56,7 @@ export class ElasticSearch<T> {
} else { } else {
hostString = `http://${hostString}`; hostString = `http://${hostString}`;
} }
console.log(hostString);
return hostString; return hostString;
} }