Comparing version 0.5.3 to 1.0.0-beta1
{ | ||
"name": "dynatrace", | ||
"version": "0.5.3", | ||
"version": "1.0.0-beta1", | ||
"description": "Dynatrace API client library for Node.js", | ||
"main": "dynatrace.js", | ||
"main": "./lib/dynatrace.js", | ||
"scripts": {}, | ||
@@ -25,3 +25,5 @@ "repository": { | ||
"async": "^0.9.0", | ||
"q": "^1.4.1", | ||
"request": "~2.51.0", | ||
"string-template": "^0.2.1", | ||
"underscore": "^1.7.0", | ||
@@ -28,0 +30,0 @@ "xml2js": "^0.4.4" |
var assert = require('assert'); | ||
var Dynatrace = require('../dynatrace'); | ||
var dynatrace = require('../lib/dynatrace'); | ||
describe('Synthetic', function() { | ||
var synthetic = new Dynatrace.Synthetic({ | ||
username: process.env.DYNATRACE_USERNAME, | ||
password: process.env.DYNATRACE_PASSWORD | ||
}); | ||
/* | ||
describe('account', function() { | ||
@@ -51,16 +47,28 @@ | ||
}); | ||
*/ | ||
describe('tests', function() { | ||
describe('tests', function(done) { | ||
this.timeout(8000); | ||
it('should return an array of tests', function(done) { | ||
synthetic.testsList({}, function(err, tests, res) { | ||
if (err) throw err; | ||
var synthetic = dynatrace.synthetic({ | ||
username: 'stefan.karytko', | ||
password: 'G@mezps1' | ||
}); | ||
synthetic.authenticate().then(function() { | ||
assert.equal(typeof tests, 'object'); | ||
done(); | ||
}); | ||
return synthetic.monitors.list({ status: 'active' }); | ||
}).then(function(result) { | ||
console.log(result); | ||
assert.equal(typeof result, 'object'); | ||
done(); | ||
}).fail(function(err) { | ||
console.log(err); | ||
throw err; | ||
}); | ||
@@ -70,2 +78,3 @@ | ||
/* | ||
describe('scripts', function() { | ||
@@ -130,3 +139,3 @@ | ||
}); | ||
*/ | ||
describe('data', function() { | ||
@@ -137,14 +146,28 @@ | ||
var params = { iMonitorIdSet: [ '18408588', '18530476' ], | ||
sMonitorClassDesignator: 'BROWSERTX', | ||
sDataDesignator: 'SUMMARY', | ||
sOrderDesignator: 'TIME', | ||
sStartTime: '2015-02-03T00:26:49.909Z', | ||
sEndTime: '2015-02-03T00:31:49.910Z' }; | ||
var params = { | ||
monitorIds: [ '18530476', '23359852', '23451778', '23451780', '23413603', '23413604', '23413605' ], | ||
detailLevel: 'test,w3c', | ||
start: 1440083778819, | ||
end: 1440083825452 | ||
}; | ||
synthetic.data(params, function(err, body, res) { | ||
if (err) throw err; | ||
var synthetic = dynatrace.synthetic({ | ||
username: 'stefan.karytko', | ||
password: 'G@mezps1' | ||
}); | ||
synthetic.authenticate().then(function() { | ||
return synthetic.tests.list(params); | ||
}).then(function(result) { | ||
console.log(result); | ||
assert.equal(typeof result, 'object'); | ||
done(); | ||
}).fail(function(err) { | ||
console.log(err); | ||
throw err; | ||
assert.equal(typeof body, 'object'); | ||
done(); | ||
}); | ||
@@ -151,0 +174,0 @@ |
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
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
108548
24
1279
0
0
6
+ Addedq@^1.4.1
+ Addedstring-template@^0.2.1
+ Addedq@1.5.1(transitive)
+ Addedstring-template@0.2.1(transitive)