webdriver-manager
Advanced tools
Comparing version 12.0.6 to 12.1.0
@@ -8,3 +8,3 @@ { | ||
"androidsdk": "24.4.1", | ||
"appium": "1.6.0" | ||
"appium": "1.6.5" | ||
}, | ||
@@ -11,0 +11,0 @@ "cdnUrls": { |
@@ -6,5 +6,8 @@ "use strict"; | ||
const request = require("request"); | ||
const url = require("url"); | ||
const xml2js = require("xml2js"); | ||
const logger_1 = require("../cli/logger"); | ||
const config_1 = require("../config"); | ||
const http_utils_1 = require("../http_utils"); | ||
let logger = new logger_1.Logger('config_source'); | ||
class ConfigSource { | ||
@@ -71,6 +74,16 @@ constructor() { | ||
let options = http_utils_1.HttpUtils.initOptions(this.xmlUrl); | ||
let curl = this.getFileName() + ' ' + options.url; | ||
if (http_utils_1.HttpUtils.requestOpts.proxy) { | ||
let pathUrl = url.parse(options.url.toString()).path; | ||
let host = url.parse(options.url.toString()).host; | ||
let newFileUrl = url.resolve(http_utils_1.HttpUtils.requestOpts.proxy, pathUrl); | ||
curl = this.getFileName() + ' \'' + newFileUrl + '\' -H \'host:' + host + '\''; | ||
} | ||
if (http_utils_1.HttpUtils.requestOpts.ignoreSSL) { | ||
curl = 'k ' + curl; | ||
} | ||
logger.info('curl -o' + curl); | ||
let req = request(options); | ||
req.on('response', response => { | ||
if (response.statusCode === 200) { | ||
// logger.info('curl -v ' + options.url); | ||
let output = ''; | ||
@@ -144,6 +157,16 @@ response.on('data', (data) => { | ||
options = http_utils_1.HttpUtils.optionsHeader(options, 'User-Agent', 'request'); | ||
let curl = this.getFileName() + ' ' + options.url; | ||
if (http_utils_1.HttpUtils.requestOpts.proxy) { | ||
let pathUrl = url.parse(options.url.toString()).path; | ||
let host = url.parse(options.url.toString()).host; | ||
let newFileUrl = url.resolve(http_utils_1.HttpUtils.requestOpts.proxy, pathUrl); | ||
curl = this.getFileName() + ' \'' + newFileUrl + '\' -H \'host:' + host + '\''; | ||
} | ||
if (http_utils_1.HttpUtils.requestOpts.ignoreSSL) { | ||
curl = 'k ' + curl; | ||
} | ||
logger.info('curl -o' + curl); | ||
let req = request(options); | ||
req.on('response', response => { | ||
if (response.statusCode === 200) { | ||
// logger.info('curl -v ' + options.url); | ||
let output = ''; | ||
@@ -157,3 +180,3 @@ response.on('data', (data) => { | ||
} | ||
else if (response.statusCode == 403 && response.headers['x-ratelimit-remaining'] == 0) { | ||
else if (response.statusCode == 403 && response.headers['x-ratelimit-remaining'] == '0') { | ||
reject(new Error('Failed to make Github request, rate limit reached.')); | ||
@@ -160,0 +183,0 @@ } |
@@ -382,3 +382,3 @@ "use strict"; | ||
let pending = [waitFor(() => { | ||
return utils_1.request('GET', appiumPort, '/wd/hub/status', maxWait); | ||
return utils_1.request('GET', seleniumPort, '/wd/hub/status', maxWait); | ||
}, (status) => { | ||
@@ -385,0 +385,0 @@ return JSON.parse(status).status == 0; |
@@ -6,2 +6,3 @@ "use strict"; | ||
const request = require("request"); | ||
const url = require("url"); | ||
const cli_1 = require("../cli"); | ||
@@ -44,2 +45,14 @@ const http_utils_1 = require("../http_utils"); | ||
else { | ||
let curl = outputDir + '/' + fileName + ' ' + options.url; | ||
if (http_utils_1.HttpUtils.requestOpts.proxy) { | ||
let pathUrl = url.parse(options.url.toString()).path; | ||
let host = url.parse(options.url.toString()).host; | ||
let newFileUrl = url.resolve(http_utils_1.HttpUtils.requestOpts.proxy, pathUrl); | ||
curl = outputDir + '/' + fileName + ' \'' + newFileUrl + | ||
'\' -H \'host:' + host + '\''; | ||
} | ||
if (http_utils_1.HttpUtils.requestOpts.ignoreSSL) { | ||
curl = 'k ' + curl; | ||
} | ||
logger.info('curl -o' + curl); | ||
// only pipe if the headers are different length | ||
@@ -46,0 +59,0 @@ file = fs.createWriteStream(filePath); |
@@ -222,3 +222,3 @@ "use strict"; | ||
let metaFiles = [ | ||
'chromedriver-response.xml', 'gecko-response.json', 'iedriver-response.xml', | ||
'chrome-response.xml', 'gecko-response.json', 'iedriver-response.xml', | ||
'standalone-response.xml', 'update-config.json' | ||
@@ -225,0 +225,0 @@ ]; |
@@ -8,2 +8,3 @@ /// <reference types="request" /> | ||
export declare class HttpUtils { | ||
static requestOpts: RequestOptionsValue; | ||
static assignOptions(options: RequestOptionsValue): void; | ||
@@ -10,0 +11,0 @@ static initOptions(url: string, timeout?: number): OptionsWithUrl; |
@@ -7,6 +7,5 @@ "use strict"; | ||
let logger = new logger_1.Logger('http_utils'); | ||
let requestOpts = {}; | ||
class HttpUtils { | ||
static assignOptions(options) { | ||
Object.assign(requestOpts, options); | ||
Object.assign(HttpUtils.requestOpts, options); | ||
} | ||
@@ -20,4 +19,4 @@ static initOptions(url, timeout) { | ||
}; | ||
HttpUtils.optionsSSL(options, requestOpts.ignoreSSL); | ||
HttpUtils.optionsProxy(options, url, requestOpts.proxy); | ||
HttpUtils.optionsSSL(options, HttpUtils.requestOpts.ignoreSSL); | ||
HttpUtils.optionsProxy(options, url, HttpUtils.requestOpts.proxy); | ||
return options; | ||
@@ -88,3 +87,4 @@ } | ||
} | ||
HttpUtils.requestOpts = {}; | ||
exports.HttpUtils = HttpUtils; | ||
//# sourceMappingURL=http_utils.js.map |
{ | ||
"name": "webdriver-manager", | ||
"version": "12.0.6", | ||
"version": "12.1.0", | ||
"description": "A selenium server and browser driver manager for your end to end tests.", | ||
"scripts": { | ||
"check_format": "gulp format:enforce", | ||
"format": "gulp format", | ||
"prepublish": "gulp prepublish", | ||
"test": "gulp test", | ||
"test_unit": "gulp test:unit", | ||
"test_circle_e2e": "gulp test:e2e:no_kvm" | ||
"format-enforce": "gulp format:enforce", | ||
"gulp": "gulp", | ||
"jasmine": "jasmine", | ||
"prepublish": "npm run format-enforce && tsc && gulp copy", | ||
"tsc": "tsc", | ||
"pretest": "tsc && gulp copy", | ||
"test": "npm run test-unit && npm run test-e2e", | ||
"test-unit": "jasmine", | ||
"pretest-e2e:update": "webdriver-manager update --android --android-accept-licenses --avds none", | ||
"pretest-e2e:start": "webdriver-manager start --detach --seleniumPort 4444 --android --appium-port 4723 --quiet", | ||
"pretest-e2e": "npm run pretest && npm run pretest-e2e:update && npm run pretest-e2e:start", | ||
"test-e2e": "jasmine JASMINE_CONFIG_PATH=e2e_spec/support/headless.json", | ||
"posttest-e2e": "webdriver-manager shutdown" | ||
}, | ||
@@ -34,3 +42,3 @@ "keywords": [ | ||
"dependencies": { | ||
"adm-zip": "^0.4.7", | ||
"adm-zip": "^0.4.9", | ||
"chalk": "^1.1.1", | ||
@@ -42,3 +50,3 @@ "del": "^2.2.0", | ||
"q": "^1.4.1", | ||
"request": "^2.78.0", | ||
"request": "^2.87.0", | ||
"rimraf": "^2.5.2", | ||
@@ -65,3 +73,3 @@ "semver": "^5.3.0", | ||
"clang-format": "^1.0.35", | ||
"gulp": "^3.9.1", | ||
"gulp": "^4.0.0", | ||
"gulp-clang-format": "^1.0.23", | ||
@@ -68,0 +76,0 @@ "jasmine": "^2.4.1", |
@@ -0,1 +1,32 @@ | ||
# 12.1.0 | ||
## Bug Fix | ||
- ([f17b226](https://github.com/angular/webdriver-manager/commit/f17b226342173e59b4d2fac54632185c26ca7086)) | ||
Fix(types): Operator '==' cannot be applied to types 'string | string[]' and 'number' (#297) | ||
- build-enforced style changes | ||
- add package-lock.json | ||
- ([7dbc1df](https://github.com/angular/webdriver-manager/commit/7dbc1dfbccc60c8836e7c1d390fd5562e0af5b9d)) | ||
fix(clean): remove existing chrome meta files from update on clean command (#279) | ||
- change file name from chromedriver-response.xml to chrome-response.xml | ||
- ([0a4c065](https://github.com/angular/webdriver-manager/commit/0a4c0658b0725154cba07ad6e7125c1dd504fa3d)) | ||
fix(appium): change appiumPort to seleniumPort for selenium server request (#228) | ||
## Dependencies | ||
- ([6775421](https://github.com/angular/webdriver-manager/commit/6775421ea9e40db1bf547bcedcb716ba35106a80)) | ||
deps(package): update npm audit. | ||
- Updates to vulnerable to zipslip. | ||
- Update all dependencies with `npm audit fix --force`. | ||
closes #314 | ||
- ([a80ccd2](https://github.com/angular/webdriver-manager/commit/a80ccd22d494e10e8c3c6ef9af22abf38496cb14)) | ||
deps(appium): bump up the appium version (#258) | ||
# 12.0.6 | ||
@@ -2,0 +33,0 @@ |
@@ -8,3 +8,3 @@ { | ||
"androidsdk": "24.4.1", | ||
"appium": "1.6.0" | ||
"appium": "1.6.5" | ||
}, | ||
@@ -11,0 +11,0 @@ "cdnUrls": { |
'use strict'; | ||
const path = require('path'); | ||
const gulp = require('gulp'); | ||
const tsGlobs = ['lib/**/*.ts', '*spec/**/*.ts']; | ||
var path = require('path'); | ||
var gulp = require('gulp'); | ||
var runSequence = require('run-sequence'); | ||
var spawn = require('child_process').spawn; | ||
var runSpawn = function(task, args, done) { | ||
let runSpawn = (task, args, done) => { | ||
done = done || function() {}; | ||
var child = spawn(task, args, {stdio: 'inherit'}); | ||
var running = false; | ||
child.on('close', function(code) { | ||
const spawn = require('child_process').spawn; | ||
let child = spawn(task, args, {stdio: 'inherit'}); | ||
let running = false; | ||
child.on('close', (code) => { | ||
if (!running) { | ||
@@ -18,3 +17,3 @@ running = true; | ||
}); | ||
child.on('error', function(err) { | ||
child.on('error', (err) => { | ||
if (!running) { | ||
@@ -29,3 +28,2 @@ console.error('gulp encountered a child error'); | ||
// Build | ||
gulp.task('copy', function() { | ||
@@ -36,4 +34,2 @@ return gulp.src(['config.json', 'package.json']) | ||
var tsGlobs = ['lib/**/*.ts', '*spec/**/*.ts']; | ||
gulp.task('format:enforce', () => { | ||
@@ -51,55 +47,2 @@ const format = require('gulp-clang-format'); | ||
format.format('file', clangFormat)).pipe(gulp.dest('.')); | ||
}); | ||
gulp.task('tsc', function(done) { | ||
runSpawn(process.execPath, ['node_modules/typescript/bin/tsc'], done); | ||
}); | ||
gulp.task('prepublish', function(done) { | ||
runSequence('tsc', 'copy', done); | ||
}); | ||
gulp.task('default', ['prepublish']); | ||
gulp.task('build', ['prepublish']); | ||
// Unit Test Commands | ||
gulp.task('test:unit', ['format', 'build'], function(done) { | ||
runSpawn(process.execPath, ['node_modules/jasmine/bin/jasmine.js'], done); | ||
}); | ||
// e2e test helper commands | ||
var e2e_env = {headless: false, kvm: true}; | ||
gulp.task('update', ['build'], function(done) { | ||
runSpawn(process.execPath, ['bin/webdriver-manager', 'update', '--android', | ||
'--android-accept-licenses'], done) | ||
}); | ||
gulp.task('start', ['build', 'shutdown'], function(done) { | ||
runSpawn(process.execPath, ['bin/webdriver-manager', 'start', '--detach', '--seleniumPort', | ||
'4444', '--android', '--appium-port', '4723', | ||
'--quiet'].concat(e2e_env.headless || | ||
!e2e_env.kvm ? ['--avds', 'none'] : []), done); | ||
}); | ||
gulp.task('shutdown', ['build'], function(done) { | ||
runSpawn(process.execPath, ['bin/webdriver-manager', 'shutdown'], done); | ||
}); | ||
gulp.task('test:e2e:inner', ['build'], function(done) { | ||
var config = e2e_env.headless ? 'headless.json' : e2e_env.kvm ? 'full.json' : 'no_android.json'; | ||
runSpawn(process.execPath, ['node_modules/jasmine/bin/jasmine.js', 'JASMINE_CONFIG_PATH=' + | ||
path.join('e2e_spec', 'support', config)], done); | ||
}); | ||
gulp.task('test:e2e:no_update', function(done) { | ||
runSequence('start', 'test:e2e:inner', 'shutdown', done); | ||
}); | ||
gulp.task('test:e2e', function(done) { | ||
runSequence('update', 'test:e2e:no_update', done); | ||
}); | ||
// Final command | ||
gulp.task('test', ['test:unit', 'test:e2e']); | ||
gulp.task('test:no_update', ['test:unit', 'test:e2e:no_update']); | ||
gulp.task('test:e2e:no_kvm', [], function(done) { | ||
e2e_env.kvm = false; | ||
runSequence('test:e2e', done); | ||
}); | ||
}); |
{ | ||
"name": "webdriver-manager", | ||
"version": "12.0.6", | ||
"version": "12.1.0", | ||
"description": "A selenium server and browser driver manager for your end to end tests.", | ||
"scripts": { | ||
"check_format": "gulp format:enforce", | ||
"format": "gulp format", | ||
"prepublish": "gulp prepublish", | ||
"test": "gulp test", | ||
"test_unit": "gulp test:unit", | ||
"test_circle_e2e": "gulp test:e2e:no_kvm" | ||
"format-enforce": "gulp format:enforce", | ||
"gulp": "gulp", | ||
"jasmine": "jasmine", | ||
"prepublish": "npm run format-enforce && tsc && gulp copy", | ||
"tsc": "tsc", | ||
"pretest": "tsc && gulp copy", | ||
"test": "npm run test-unit && npm run test-e2e", | ||
"test-unit": "jasmine", | ||
"pretest-e2e:update": "webdriver-manager update --android --android-accept-licenses --avds none", | ||
"pretest-e2e:start": "webdriver-manager start --detach --seleniumPort 4444 --android --appium-port 4723 --quiet", | ||
"pretest-e2e": "npm run pretest && npm run pretest-e2e:update && npm run pretest-e2e:start", | ||
"test-e2e": "jasmine JASMINE_CONFIG_PATH=e2e_spec/support/headless.json", | ||
"posttest-e2e": "webdriver-manager shutdown" | ||
}, | ||
@@ -34,3 +42,3 @@ "keywords": [ | ||
"dependencies": { | ||
"adm-zip": "^0.4.7", | ||
"adm-zip": "^0.4.9", | ||
"chalk": "^1.1.1", | ||
@@ -42,3 +50,3 @@ "del": "^2.2.0", | ||
"q": "^1.4.1", | ||
"request": "^2.78.0", | ||
"request": "^2.87.0", | ||
"rimraf": "^2.5.2", | ||
@@ -65,3 +73,3 @@ "semver": "^5.3.0", | ||
"clang-format": "^1.0.35", | ||
"gulp": "^3.9.1", | ||
"gulp": "^4.0.0", | ||
"gulp-clang-format": "^1.0.23", | ||
@@ -68,0 +76,0 @@ "jasmine": "^2.4.1", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
343909
4552
Updatedadm-zip@^0.4.9
Updatedrequest@^2.87.0