swagger-stats
Advanced tools
Comparing version 0.99.5 to 0.99.6
# Changelog | ||
All notable changes to this project will be documented in this file. | ||
## v0.99.6 | ||
Dependencies updated | ||
* [bug] Unit tests failing [#245](https://github.com/slanatech/swagger-stats/issues/245) | ||
## v0.99.5 | ||
@@ -5,0 +12,0 @@ |
@@ -62,3 +62,3 @@ 'use strict'; | ||
name: 'swagger-stats-authtest', | ||
version: '0.99.5', | ||
version: '0.99.6', | ||
hostname: "hostname", | ||
@@ -65,0 +65,0 @@ ip: "127.0.0.1", |
@@ -50,3 +50,3 @@ 'use strict'; | ||
name: 'swagger-stats-fastify', | ||
version: '0.99.5', | ||
version: '0.99.6', | ||
timelineBucketDuration: 1000, | ||
@@ -53,0 +53,0 @@ swaggerSpec:swaggerSpec, |
@@ -70,3 +70,3 @@ 'use strict'; | ||
name: 'swagger-stats-hapitest', | ||
version: '0.99.5', | ||
version: '0.99.6', | ||
hostname: "hostname", | ||
@@ -73,0 +73,0 @@ ip: "127.0.0.1", |
@@ -18,3 +18,3 @@ const path = require('path'); | ||
name: 'restifytest', | ||
version: '0.99.5', | ||
version: '0.99.6', | ||
hostname: "hostname", | ||
@@ -21,0 +21,0 @@ ip: "127.0.0.1", |
@@ -79,3 +79,3 @@ 'use strict'; | ||
name: 'swagger-stats-spectest', | ||
version: '0.99.5', | ||
version: '0.99.6', | ||
hostname: "hostname", | ||
@@ -82,0 +82,0 @@ ip: "127.0.0.1", |
@@ -56,3 +56,3 @@ var http = require('http'); | ||
name: 'swagger-stats-testapp', | ||
version: '0.99.5', | ||
version: '0.99.6', | ||
timelineBucketDuration: tlBucket, | ||
@@ -59,0 +59,0 @@ uriPath: '/swagger-stats', |
@@ -6,2 +6,3 @@ /** | ||
'use strict'; | ||
process.env.DEBUG='*'; | ||
@@ -12,5 +13,14 @@ const os = require('os'); | ||
const url = require('url'); | ||
//var request = require('request'); | ||
const https = require('https'); | ||
const axios = require('axios'); | ||
//const axios = require('axios'); | ||
let axios = null; | ||
let axiosPromise = new Promise(async (resolve) => { | ||
axios = (await import('axios')).default; | ||
resolve(axios); | ||
}); | ||
/* | ||
(async () => { | ||
axios = (await import('axios')).default; | ||
})(); | ||
*/ | ||
@@ -33,3 +43,4 @@ const debug = require('debug')('sws:elastic'); | ||
this.es7 = true; | ||
this.es7 = false; | ||
this.es8 = true; | ||
@@ -109,6 +120,5 @@ this.indexBuffer = ''; | ||
// Check / Initialize schema | ||
this.initTemplate(); | ||
this.enabled = true; | ||
Promise.resolve(axiosPromise).then( () => { | ||
this.initTemplate(); | ||
}); | ||
}; | ||
@@ -143,5 +153,6 @@ | ||
that.es7 = body.version.number.startsWith('7'); | ||
that.es8 = body.version.number.startsWith('8'); | ||
} | ||
if( !that.es7 ){ | ||
if( !that.es7 && !that.es8){ | ||
putOptions.json = indexTemplate; | ||
@@ -170,2 +181,3 @@ } | ||
debug("Elasticsearch template updated"); | ||
that.enabled = true; | ||
}).catch((error)=>{ | ||
@@ -175,2 +187,4 @@ debug(`Failed to update template: ${error.message}`); | ||
}); | ||
}else{ | ||
that.enabled = true; | ||
} | ||
@@ -232,3 +246,3 @@ }); | ||
let meta = {index:{_index:indexName,_id:rrr.id}}; | ||
if(!this.es7){ | ||
if(!this.es7 && !this.es8){ | ||
meta = {index:{_index:indexName,_type:'api',_id:rrr.id}}; | ||
@@ -235,0 +249,0 @@ } |
{ | ||
"name": "swagger-stats", | ||
"version": "0.99.5", | ||
"version": "0.99.6", | ||
"description": "API Telemetry and APM. Trace API calls and Monitor API performance, health and usage statistics in Node.js Microservices, based on express routes and Swagger (Open API) specification", | ||
@@ -102,6 +102,6 @@ "main": "lib/index.js", | ||
"path-to-regexp": "^6.2.1", | ||
"qs": "^6.11.0", | ||
"qs": "^6.11.2", | ||
"send": "^0.18.0", | ||
"uuid": "^9.0.0", | ||
"axios": "^1.2.2" | ||
"axios": "^1.4.0" | ||
}, | ||
@@ -112,25 +112,25 @@ "peerDependencies": { | ||
"devDependencies": { | ||
"@hapi/hapi": "^21.1.0", | ||
"@hapi/inert": "^7.0.0", | ||
"body-parser": "^1.20.1", | ||
"@hapi/hapi": "^21.3.2", | ||
"@hapi/inert": "^7.1.0", | ||
"body-parser": "^1.20.2", | ||
"chai": "^4.3.7", | ||
"chokidar": "^3.5.3", | ||
"concurrently": "^7.6.0", | ||
"concurrently": "^8.0.1", | ||
"coveralls": "^3.1.1", | ||
"cross-env": "^7.0.3", | ||
"cuid": "^2.1.8", | ||
"cuid": "^3.0.0", | ||
"express": "^4.18.2", | ||
"fastify": "^4.10.2", | ||
"fastify": "^4.17.0", | ||
"fastify-express": "^0.4.0", | ||
"istanbul": "^0.4.5", | ||
"mocha": "^10.1.0", | ||
"mocha": "^10.2.0", | ||
"ncp": "^2.0.0", | ||
"nyc": "^15.1.0", | ||
"prom-client": "^14.1.0", | ||
"prom-client": "^14.2.0", | ||
"q": "^1.5.1", | ||
"restify": "^10.0.0", | ||
"restify": "^11.1.0", | ||
"serve-favicon": "^2.5.0", | ||
"serve-static": "^1.15.0", | ||
"should": "^13.2.3", | ||
"supertest": "^6.3.2", | ||
"supertest": "^6.3.3", | ||
"swagger-parser": "^10.0.3", | ||
@@ -137,0 +137,0 @@ "swagger-stats-ux": "^0.95.29", |
Sorry, the diff of this file is not supported yet
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
5264796
44285
26
Updatedaxios@^1.4.0
Updatedqs@^6.11.2