Comparing version 0.20.2-dev.20170919.120653 to 0.20.3
@@ -30,2 +30,10 @@ 'use strict'; | ||
var isString = function isString(s) { | ||
return typeof s === 'string'; | ||
}; | ||
var isUrl = function isUrl(s) { | ||
return isString(s) && /^https:/.test(s); | ||
}; | ||
var getOs = function getOs() { | ||
@@ -52,2 +60,6 @@ var platform = os.platform(); | ||
var getUrl = function getUrl(version) { | ||
if (isUrl(version)) { | ||
debug('version is already an url', version); | ||
return version; | ||
} | ||
return version ? prepend('desktop/' + version) : prepend('desktop'); | ||
@@ -54,0 +66,0 @@ }; |
@@ -17,2 +17,4 @@ 'use strict'; | ||
return 'Cypress/Cypress'; | ||
case 'win32': | ||
return 'Cypress/Cypress.exe'; | ||
// TODO handle this error using our standard | ||
@@ -19,0 +21,0 @@ default: |
@@ -129,2 +129,3 @@ 'use strict'; | ||
case 'linux': | ||
case 'win32': | ||
return unzipWithNode(); | ||
@@ -154,2 +155,11 @@ default: | ||
start: start | ||
}; | ||
// demo / test | ||
};if (!module.parent && process.env.ZIP) { | ||
/* eslint-disable no-console */ | ||
console.log('unzipping file', process.env.ZIP); | ||
start({ | ||
downloadDestination: process.env.ZIP | ||
}).catch(console.error); | ||
/* eslint-enable no-console */ | ||
} |
@@ -98,3 +98,4 @@ 'use strict'; | ||
debug('smoke test output "%s"', smokeTestReturned); | ||
if (smokeTestReturned !== String(random)) { | ||
if (!util.stdoutLineMatches(String(random), smokeTestReturned)) { | ||
return reject(new Error(stripIndent(_templateObject2, smokeTestCommand, smokeTestReturned))); | ||
@@ -227,4 +228,3 @@ } | ||
start: start, | ||
maybeVerify: maybeVerify | ||
}; |
@@ -37,2 +37,8 @@ 'use strict'; | ||
function stdoutLineMatches(expectedLine, stdout) { | ||
var lines = stdout.split('\n').map(R.trim); | ||
var lineMatches = R.equals(expectedLine); | ||
return lines.some(lineMatches); | ||
} | ||
var util = { | ||
@@ -97,5 +103,8 @@ normalizeModuleOptions: normalizeModuleOptions, | ||
return _isInstalledGlobally; | ||
} | ||
}, | ||
stdoutLineMatches: stdoutLineMatches | ||
}; | ||
module.exports = util; |
{ | ||
"name": "cypress", | ||
"version": "0.20.2-dev.20170919.120653", | ||
"version": "0.20.3", | ||
"main": "index.js", | ||
@@ -5,0 +5,0 @@ "bin": { |
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
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
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
54545
1277
10