Deployed the page to Github Pages.
This commit is contained in:
parent
1d79754e93
commit
2c89899458
62797 changed files with 6551425 additions and 15279 deletions
217
node_modules/karma-chrome-launcher/CHANGELOG.md
generated
vendored
Normal file
217
node_modules/karma-chrome-launcher/CHANGELOG.md
generated
vendored
Normal file
|
@ -0,0 +1,217 @@
|
|||
# [3.2.0](https://github.com/karma-runner/karma-chrome-launcher/compare/v3.1.1...v3.2.0) (2023-04-20)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* add process.env.ProgramW6432 as root location for binaries ([12a73db](https://github.com/karma-runner/karma-chrome-launcher/commit/12a73dba261c78fdba4aff4dbb741ac87adfed01))
|
||||
|
||||
## [3.1.1](https://github.com/karma-runner/karma-chrome-launcher/compare/v3.1.0...v3.1.1) (2022-03-09)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* artificially trigger a release ([83fdc3c](https://github.com/karma-runner/karma-chrome-launcher/commit/83fdc3ca5666374c677408ed0589e66b1124bec4))
|
||||
|
||||
<a name="3.1.0"></a>
|
||||
# [3.1.0](https://github.com/karma-runner/karma-chrome-launcher/compare/v3.0.0...v3.1.0) (2019-08-13)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* add --disable-dev-shm-usage flag to headless ([137005d](https://github.com/karma-runner/karma-chrome-launcher/commit/137005d))
|
||||
|
||||
|
||||
|
||||
<a name="3.0.0"></a>
|
||||
# [3.0.0](https://github.com/karma-runner/karma-chrome-launcher/compare/v2.2.0...v3.0.0) (2019-07-12)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* allow overriding of the default debug port ([26ae9f4](https://github.com/karma-runner/karma-chrome-launcher/commit/26ae9f4)), closes [#187](https://github.com/karma-runner/karma-chrome-launcher/issues/187)
|
||||
|
||||
|
||||
|
||||
<a name="2.2.0"></a>
|
||||
# [2.2.0](https://github.com/karma-runner/karma-chrome-launcher/compare/v2.1.1...v2.2.0) (2017-06-23)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* add ChromiumHeadless ([7a12021](https://github.com/karma-runner/karma-chrome-launcher/commit/7a12021))
|
||||
|
||||
|
||||
|
||||
<a name="2.1.1"></a>
|
||||
## [2.1.1](https://github.com/karma-runner/karma-chrome-launcher/compare/v2.1.0...v2.1.1) (2017-05-05)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* add disable-renderer-backgrounding flag ([6bfc170](https://github.com/karma-runner/karma-chrome-launcher/commit/6bfc170)), closes [#123](https://github.com/karma-runner/karma-chrome-launcher/issues/123)
|
||||
|
||||
|
||||
|
||||
<a name="2.1.0"></a>
|
||||
# [2.1.0](https://github.com/karma-runner/karma-chrome-launcher/compare/v2.0.0...v2.1.0) (2017-05-02)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* add support for custom user-data-dir in Chromium ([579fcfc](https://github.com/karma-runner/karma-chrome-launcher/commit/579fcfc)), closes [#89](https://github.com/karma-runner/karma-chrome-launcher/issues/89)
|
||||
* add support for headless Chrome/ChromeCanary ([7446181](https://github.com/karma-runner/karma-chrome-launcher/commit/7446181))
|
||||
|
||||
|
||||
|
||||
<a name="2.0.0"></a>
|
||||
# [2.0.0](https://github.com/karma-runner/karma-chrome-launcher/compare/v1.0.1...v2.0.0) (2016-08-18)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* Chromium support for Linux, Darwin and Windows ([33e8d82](https://github.com/karma-runner/karma-chrome-launcher/commit/33e8d82))
|
||||
|
||||
|
||||
|
||||
<a name="1.0.1"></a>
|
||||
## [1.0.1](https://github.com/karma-runner/karma-chrome-launcher/compare/v0.2.3...v1.0.1) (2016-05-02)
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="0.2.3"></a>
|
||||
## [0.2.3](https://github.com/karma-runner/karma-chrome-launcher/compare/v0.2.1...v0.2.3) (2016-03-22)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **config:** Allow --user-data-dir to be set in launcher properties ([2c0b7f4](https://github.com/karma-runner/karma-chrome-launcher/commit/2c0b7f4))
|
||||
|
||||
|
||||
|
||||
<a name="0.2.2"></a>
|
||||
## [0.2.2](https://github.com/karma-runner/karma-chrome-launcher/compare/v0.2.1...v0.2.2) (2015-12-01)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* chrome will ignore command line flags it does not yet know about ([426e7c3](https://github.com/karma-runner/karma-chrome-launcher/commit/426e7c3))
|
||||
|
||||
|
||||
|
||||
<a name="0.2.1"></a>
|
||||
## [0.2.1](https://github.com/karma-runner/karma-chrome-launcher/compare/v0.2.0...v0.2.1) (2015-10-07)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **ChromeCanary:** on Linux (archlinux), it can be named google-chrome-unstable ([28cb5b0](https://github.com/karma-runner/karma-chrome-launcher/commit/28cb5b0))
|
||||
|
||||
|
||||
|
||||
<a name"0.2.0"></a>
|
||||
## 0.2.0 (2015-06-23)
|
||||
|
||||
|
||||
#### Bug Fixes
|
||||
|
||||
* Use fs-access shim for file detection. ([6355ca88](https://github.com/karma-runner/karma-chrome-launcher/commit/6355ca88), closes [#53](https://github.com/karma-runner/karma-chrome-launcher/issues/53))
|
||||
|
||||
|
||||
<a name"0.1.9"></a>
|
||||
### 0.1.9 (2015-06-23)
|
||||
|
||||
|
||||
<a name"0.1.8"></a>
|
||||
### 0.1.8 (2015-06-23)
|
||||
|
||||
|
||||
<a name"0.1.7"></a>
|
||||
### 0.1.7 (2015-06-23)
|
||||
|
||||
|
||||
<a name"0.1.6"></a>
|
||||
### 0.1.6 (2015-06-23)
|
||||
|
||||
|
||||
#### Bug Fixes
|
||||
|
||||
* **jsFlags:** un-quote --js-flags flag and automatically merge with presets ([4509c277](https://github.com/karma-runner/karma-chrome-launcher/commit/4509c277))
|
||||
|
||||
|
||||
<a name"0.1.5"></a>
|
||||
### 0.1.5 (2015-06-23)
|
||||
|
||||
|
||||
#### Bug Fixes
|
||||
|
||||
* better error when DARTIUM_BIN not set ([27462e86](https://github.com/karma-runner/karma-chrome-launcher/commit/27462e86))
|
||||
|
||||
|
||||
<a name"0.1.4"></a>
|
||||
### 0.1.4 (2015-06-23)
|
||||
|
||||
|
||||
#### Bug Fixes
|
||||
|
||||
* the translation is now disabled on launch ([b2f389ba](https://github.com/karma-runner/karma-chrome-launcher/commit/b2f389ba))
|
||||
|
||||
|
||||
<a name"0.1.3"></a>
|
||||
### 0.1.3 (2015-06-23)
|
||||
|
||||
|
||||
#### Features
|
||||
|
||||
* **Launcher:** Add Dartium launcher. ([ae81c0c1](https://github.com/karma-runner/karma-chrome-launcher/commit/ae81c0c1))
|
||||
|
||||
|
||||
<a name"0.1.2"></a>
|
||||
### 0.1.2 (2015-06-23)
|
||||
|
||||
|
||||
<a name"0.1.12"></a>
|
||||
### 0.1.12 (2015-06-23)
|
||||
|
||||
|
||||
<a name"0.1.11"></a>
|
||||
### 0.1.11 (2015-06-23)
|
||||
|
||||
|
||||
<a name"0.1.10"></a>
|
||||
### 0.1.10 (2015-06-23)
|
||||
|
||||
|
||||
#### Bug Fixes
|
||||
|
||||
* better error when DARTIUM_BIN not set ([27462e86](https://github.com/karma-runner/karma-chrome-launcher/commit/27462e86))
|
||||
* the translation is now disabled on launch ([b2f389ba](https://github.com/karma-runner/karma-chrome-launcher/commit/b2f389ba))
|
||||
* **jsFlags:** un-quote --js-flags flag and automatically merge with presets ([4509c277](https://github.com/karma-runner/karma-chrome-launcher/commit/4509c277))
|
||||
|
||||
|
||||
#### Features
|
||||
|
||||
* disable popup blocking by default ([2cdace9e](https://github.com/karma-runner/karma-chrome-launcher/commit/2cdace9e))
|
||||
* **Launcher:** Add Dartium launcher. ([ae81c0c1](https://github.com/karma-runner/karma-chrome-launcher/commit/ae81c0c1))
|
||||
|
||||
|
||||
<a name"0.1.1"></a>
|
||||
### 0.1.1 (2015-06-23)
|
||||
|
||||
|
||||
#### Bug Fixes
|
||||
|
||||
* handle Chrome location on Windows ([62df3014](https://github.com/karma-runner/karma-chrome-launcher/commit/62df3014))
|
||||
* correct Chrome path on Windows ([9ebd9974](https://github.com/karma-runner/karma-chrome-launcher/commit/9ebd9974), closes [#2](https://github.com/karma-runner/karma-chrome-launcher/issues/2))
|
||||
|
||||
|
||||
<a name"0.1.0"></a>
|
||||
## 0.1.0 (2015-06-23)
|
||||
|
||||
|
||||
<a name"0.0.2"></a>
|
||||
### 0.0.2 (2015-06-23)
|
||||
|
||||
|
||||
#### Features
|
||||
|
||||
* allow passing custom flags ([4ebc7694](https://github.com/karma-runner/karma-chrome-launcher/commit/4ebc7694))
|
20
node_modules/karma-chrome-launcher/LICENSE
generated
vendored
Normal file
20
node_modules/karma-chrome-launcher/LICENSE
generated
vendored
Normal file
|
@ -0,0 +1,20 @@
|
|||
The MIT License
|
||||
|
||||
Copyright (C) 2011-2013 Google, Inc.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||
of the Software, and to permit persons to whom the Software is furnished to do
|
||||
so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
93
node_modules/karma-chrome-launcher/README.md
generated
vendored
Normal file
93
node_modules/karma-chrome-launcher/README.md
generated
vendored
Normal file
|
@ -0,0 +1,93 @@
|
|||
# karma-chrome-launcher
|
||||
|
||||
[](https://github.com/karma-runner/karma-chrome-launcher)
|
||||
[](https://www.npmjs.com/package/karma-chrome-launcher) [](https://www.npmjs.com/package/karma-chrome-launcher)
|
||||
|
||||
[](https://travis-ci.org/karma-runner/karma-chrome-launcher) [](https://david-dm.org/karma-runner/karma-chrome-launcher) [](https://david-dm.org/karma-runner/karma-chrome-launcher#info=devDependencies)
|
||||
|
||||
> Launcher for Google Chrome, Google Chrome Canary and Google Chromium.
|
||||
|
||||
## Installation
|
||||
|
||||
The easiest way is to keep `karma-chrome-launcher` as a devDependency in your `package.json`,
|
||||
by running
|
||||
|
||||
```bash
|
||||
$ npm i -D karma-chrome-launcher
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
```js
|
||||
// karma.conf.js
|
||||
module.exports = function(config) {
|
||||
config.set({
|
||||
browsers: ['Chrome', 'Chrome_without_security'], // You may use 'ChromeCanary', 'Chromium' or any other supported browser
|
||||
|
||||
// you can define custom flags
|
||||
customLaunchers: {
|
||||
Chrome_without_security: {
|
||||
base: 'Chrome',
|
||||
flags: ['--disable-web-security', '--disable-site-isolation-trials']
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
```
|
||||
|
||||
The `--user-data-dir` is set to a temporary directory but can be overridden on a custom launcher as shown below.
|
||||
One reason to do this is to have a permanent Chrome user data directory inside the project directory to be able to
|
||||
install plugins there (e.g. JetBrains IDE Support plugin).
|
||||
|
||||
```js
|
||||
customLaunchers: {
|
||||
Chrome_with_debugging: {
|
||||
base: 'Chrome',
|
||||
chromeDataDir: path.resolve(__dirname, '.chrome')
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
You can pass list of browsers as a CLI argument too:
|
||||
|
||||
```bash
|
||||
$ karma start --browsers Chrome,Chrome_without_security
|
||||
```
|
||||
|
||||
## Headless Chromium with Puppeteer
|
||||
|
||||
The Chrome DevTools team created [Puppeteer](https://github.com/GoogleChrome/puppeteer) - it will automatically install Chromium for all
|
||||
platforms and contains everything you need to run it from within your CI.
|
||||
|
||||
### Available Browsers
|
||||
*Note: Headless mode requires a browser version >= 59*
|
||||
|
||||
- Chrome (CHROME_BIN)
|
||||
- ChromeHeadless (CHROME_BIN)
|
||||
- Chromium (CHROMIUM_BIN)
|
||||
- ChromiumHeadless (CHROMIUM_BIN)
|
||||
- ChromeCanary (CHROME_CANARY_BIN)
|
||||
- ChromeCanaryHeadless (CHROME_CANARY_BIN)
|
||||
- Dartium (DARTIUM_BIN)
|
||||
|
||||
#### Usage
|
||||
```bash
|
||||
$ npm i -D puppeteer karma-chrome-launcher
|
||||
```
|
||||
|
||||
```js
|
||||
// karma.conf.js
|
||||
process.env.CHROME_BIN = require('puppeteer').executablePath()
|
||||
|
||||
module.exports = function(config) {
|
||||
config.set({
|
||||
browsers: ['ChromeHeadless']
|
||||
})
|
||||
}
|
||||
```
|
||||
|
||||
----
|
||||
|
||||
For more information on Karma see the [homepage].
|
||||
|
||||
[homepage]: https://karma-runner.github.io
|
1
node_modules/karma-chrome-launcher/commitlint.config.js
generated
vendored
Normal file
1
node_modules/karma-chrome-launcher/commitlint.config.js
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
module.exports = { extends: ['@commitlint/config-angular'] }
|
7
node_modules/karma-chrome-launcher/examples/simple/index.spec.js
generated
vendored
Normal file
7
node_modules/karma-chrome-launcher/examples/simple/index.spec.js
generated
vendored
Normal file
|
@ -0,0 +1,7 @@
|
|||
/* eslint-env mocha */
|
||||
|
||||
describe('ChromeLauncher', function () {
|
||||
it('works', function () {
|
||||
return 1 + 1 === 2
|
||||
})
|
||||
})
|
32
node_modules/karma-chrome-launcher/examples/simple/karma.conf.js
generated
vendored
Normal file
32
node_modules/karma-chrome-launcher/examples/simple/karma.conf.js
generated
vendored
Normal file
|
@ -0,0 +1,32 @@
|
|||
module.exports = function (config) {
|
||||
config.set({
|
||||
basePath: '',
|
||||
|
||||
frameworks: ['mocha'],
|
||||
|
||||
files: [
|
||||
'*.js'
|
||||
],
|
||||
|
||||
exclude: [],
|
||||
|
||||
reporters: ['progress'],
|
||||
|
||||
port: 9876,
|
||||
|
||||
colors: true,
|
||||
|
||||
logLevel: config.LOG_INFO,
|
||||
|
||||
autoWatch: false,
|
||||
|
||||
browsers: ['Chrome'],
|
||||
|
||||
singleRun: false,
|
||||
|
||||
plugins: [
|
||||
require('../../'),
|
||||
'karma-mocha'
|
||||
]
|
||||
})
|
||||
}
|
339
node_modules/karma-chrome-launcher/index.js
generated
vendored
Normal file
339
node_modules/karma-chrome-launcher/index.js
generated
vendored
Normal file
|
@ -0,0 +1,339 @@
|
|||
var fs = require('fs')
|
||||
var path = require('path')
|
||||
var which = require('which')
|
||||
|
||||
function isJSFlags (flag) {
|
||||
return flag.indexOf('--js-flags=') === 0
|
||||
}
|
||||
|
||||
function sanitizeJSFlags (flag) {
|
||||
var test = /--js-flags=(['"])/.exec(flag)
|
||||
if (!test) {
|
||||
return flag
|
||||
}
|
||||
var escapeChar = test[1]
|
||||
var endExp = new RegExp(escapeChar + '$')
|
||||
var startExp = new RegExp('--js-flags=' + escapeChar)
|
||||
return flag.replace(startExp, '--js-flags=').replace(endExp, '')
|
||||
}
|
||||
|
||||
var ChromeBrowser = function (baseBrowserDecorator, args) {
|
||||
baseBrowserDecorator(this)
|
||||
|
||||
var flags = args.flags || []
|
||||
var userDataDir = args.chromeDataDir || this._tempDir
|
||||
|
||||
this._getOptions = function (url) {
|
||||
// Chrome CLI options
|
||||
// http://peter.sh/experiments/chromium-command-line-switches/
|
||||
flags.forEach(function (flag, i) {
|
||||
if (isJSFlags(flag)) {
|
||||
flags[i] = sanitizeJSFlags(flag)
|
||||
}
|
||||
})
|
||||
|
||||
return [
|
||||
'--user-data-dir=' + userDataDir,
|
||||
// https://github.com/GoogleChrome/chrome-launcher/blob/master/docs/chrome-flags-for-tools.md#--enable-automation
|
||||
'--enable-automation',
|
||||
'--no-default-browser-check',
|
||||
'--no-first-run',
|
||||
'--disable-default-apps',
|
||||
'--disable-popup-blocking',
|
||||
'--disable-translate',
|
||||
'--disable-background-timer-throttling',
|
||||
// on macOS, disable-background-timer-throttling is not enough
|
||||
// and we need disable-renderer-backgrounding too
|
||||
// see https://github.com/karma-runner/karma-chrome-launcher/issues/123
|
||||
'--disable-renderer-backgrounding',
|
||||
'--disable-device-discovery-notifications'
|
||||
].concat(flags, [url])
|
||||
}
|
||||
}
|
||||
|
||||
// Return location of chrome.exe file for a given Chrome directory (available: "Chrome", "Chrome SxS").
|
||||
function getChromeExe (chromeDirName) {
|
||||
// Only run these checks on win32
|
||||
if (process.platform !== 'win32') {
|
||||
return null
|
||||
}
|
||||
var windowsChromeDirectory, i, prefix
|
||||
var suffix = '\\Google\\' + chromeDirName + '\\Application\\chrome.exe'
|
||||
var prefixes = [process.env.LOCALAPPDATA, process.env.PROGRAMFILES, process.env['PROGRAMFILES(X86)'], process.env.ProgramW6432]
|
||||
|
||||
for (i = 0; i < prefixes.length; i++) {
|
||||
prefix = prefixes[i]
|
||||
try {
|
||||
windowsChromeDirectory = path.join(prefix, suffix)
|
||||
fs.accessSync(windowsChromeDirectory)
|
||||
return windowsChromeDirectory
|
||||
} catch (e) {}
|
||||
}
|
||||
|
||||
return windowsChromeDirectory
|
||||
}
|
||||
|
||||
var ChromiumBrowser = function (baseBrowserDecorator, args) {
|
||||
baseBrowserDecorator(this)
|
||||
|
||||
var flags = args.flags || []
|
||||
var userDataDir = args.chromeDataDir || this._tempDir
|
||||
|
||||
this._getOptions = function (url) {
|
||||
// Chromium CLI options
|
||||
// http://peter.sh/experiments/chromium-command-line-switches/
|
||||
flags.forEach(function (flag, i) {
|
||||
if (isJSFlags(flag)) {
|
||||
flags[i] = sanitizeJSFlags(flag)
|
||||
}
|
||||
})
|
||||
|
||||
return [
|
||||
'--user-data-dir=' + userDataDir,
|
||||
'--no-default-browser-check',
|
||||
'--no-first-run',
|
||||
'--disable-default-apps',
|
||||
'--disable-popup-blocking',
|
||||
'--disable-translate',
|
||||
'--disable-background-timer-throttling'
|
||||
].concat(flags, [url])
|
||||
}
|
||||
}
|
||||
|
||||
// Return location of Chromium's chrome.exe file.
|
||||
function getChromiumExe (chromeDirName) {
|
||||
// Only run these checks on win32
|
||||
if (process.platform !== 'win32') {
|
||||
return null
|
||||
}
|
||||
var windowsChromiumDirectory, i, prefix
|
||||
var suffix = '\\Chromium\\Application\\chrome.exe'
|
||||
var prefixes = [process.env.LOCALAPPDATA, process.env.PROGRAMFILES, process.env['PROGRAMFILES(X86)'], process.env.ProgramW6432]
|
||||
|
||||
for (i = 0; i < prefixes.length; i++) {
|
||||
prefix = prefixes[i]
|
||||
try {
|
||||
windowsChromiumDirectory = path.join(prefix, suffix)
|
||||
fs.accessSync(windowsChromiumDirectory)
|
||||
return windowsChromiumDirectory
|
||||
} catch (e) {}
|
||||
}
|
||||
|
||||
return windowsChromiumDirectory
|
||||
}
|
||||
|
||||
function getBin (commands) {
|
||||
// Don't run these checks on win32
|
||||
if (process.platform !== 'linux') {
|
||||
return null
|
||||
}
|
||||
var bin, i
|
||||
for (i = 0; i < commands.length; i++) {
|
||||
try {
|
||||
if (which.sync(commands[i])) {
|
||||
bin = commands[i]
|
||||
break
|
||||
}
|
||||
} catch (e) {}
|
||||
}
|
||||
return bin
|
||||
}
|
||||
|
||||
function getChromeDarwin (defaultPath) {
|
||||
if (process.platform !== 'darwin') {
|
||||
return null
|
||||
}
|
||||
|
||||
try {
|
||||
var homePath = path.join(process.env.HOME, defaultPath)
|
||||
fs.accessSync(homePath)
|
||||
return homePath
|
||||
} catch (e) {
|
||||
return defaultPath
|
||||
}
|
||||
}
|
||||
|
||||
ChromeBrowser.prototype = {
|
||||
name: 'Chrome',
|
||||
|
||||
DEFAULT_CMD: {
|
||||
linux: getBin(['google-chrome', 'google-chrome-stable']),
|
||||
darwin: getChromeDarwin('/Applications/Google Chrome.app/Contents/MacOS/Google Chrome'),
|
||||
win32: getChromeExe('Chrome')
|
||||
},
|
||||
ENV_CMD: 'CHROME_BIN'
|
||||
}
|
||||
|
||||
ChromeBrowser.$inject = ['baseBrowserDecorator', 'args']
|
||||
|
||||
function headlessGetOptions (url, args, parent) {
|
||||
var mergedArgs = parent.call(this, url, args).concat([
|
||||
'--headless',
|
||||
'--disable-gpu',
|
||||
'--disable-dev-shm-usage'
|
||||
])
|
||||
|
||||
var isRemoteDebuggingFlag = function (flag) {
|
||||
return flag.indexOf('--remote-debugging-port=') !== -1
|
||||
}
|
||||
|
||||
return mergedArgs.some(isRemoteDebuggingFlag)
|
||||
? mergedArgs
|
||||
: mergedArgs.concat(['--remote-debugging-port=9222'])
|
||||
}
|
||||
|
||||
var ChromeHeadlessBrowser = function (baseBrowserDecorator, args) {
|
||||
ChromeBrowser.apply(this, arguments)
|
||||
|
||||
var parentOptions = this._getOptions
|
||||
this._getOptions = function (url) {
|
||||
return headlessGetOptions.call(this, url, args, parentOptions)
|
||||
}
|
||||
}
|
||||
|
||||
ChromeHeadlessBrowser.prototype = {
|
||||
name: 'ChromeHeadless',
|
||||
|
||||
DEFAULT_CMD: {
|
||||
linux: getBin(['google-chrome', 'google-chrome-stable']),
|
||||
darwin: getChromeDarwin('/Applications/Google Chrome.app/Contents/MacOS/Google Chrome'),
|
||||
win32: getChromeExe('Chrome')
|
||||
},
|
||||
ENV_CMD: 'CHROME_BIN'
|
||||
}
|
||||
|
||||
ChromeHeadlessBrowser.$inject = ['baseBrowserDecorator', 'args']
|
||||
|
||||
function canaryGetOptions (url, args, parent) {
|
||||
// disable crankshaft optimizations, as it causes lot of memory leaks (as of Chrome 23.0)
|
||||
var flags = args.flags || []
|
||||
var augmentedFlags
|
||||
var customFlags = '--nocrankshaft --noopt'
|
||||
|
||||
flags.forEach(function (flag) {
|
||||
if (isJSFlags(flag)) {
|
||||
augmentedFlags = sanitizeJSFlags(flag) + ' ' + customFlags
|
||||
}
|
||||
})
|
||||
|
||||
return parent.call(this, url).concat([augmentedFlags || '--js-flags=' + customFlags])
|
||||
}
|
||||
|
||||
var ChromeCanaryBrowser = function (baseBrowserDecorator, args) {
|
||||
ChromeBrowser.apply(this, arguments)
|
||||
|
||||
var parentOptions = this._getOptions
|
||||
this._getOptions = function (url) {
|
||||
return canaryGetOptions.call(this, url, args, parentOptions)
|
||||
}
|
||||
}
|
||||
|
||||
ChromeCanaryBrowser.prototype = {
|
||||
name: 'ChromeCanary',
|
||||
|
||||
DEFAULT_CMD: {
|
||||
linux: getBin(['google-chrome-canary', 'google-chrome-unstable']),
|
||||
darwin: getChromeDarwin('/Applications/Google Chrome Canary.app/Contents/MacOS/Google Chrome Canary'),
|
||||
win32: getChromeExe('Chrome SxS')
|
||||
},
|
||||
ENV_CMD: 'CHROME_CANARY_BIN'
|
||||
}
|
||||
|
||||
ChromeCanaryBrowser.$inject = ['baseBrowserDecorator', 'args']
|
||||
|
||||
var ChromeCanaryHeadlessBrowser = function (baseBrowserDecorator, args) {
|
||||
ChromeCanaryBrowser.apply(this, arguments)
|
||||
|
||||
var parentOptions = this._getOptions
|
||||
this._getOptions = function (url) {
|
||||
return headlessGetOptions.call(this, url, args, parentOptions)
|
||||
}
|
||||
}
|
||||
|
||||
ChromeCanaryHeadlessBrowser.prototype = {
|
||||
name: 'ChromeCanaryHeadless',
|
||||
|
||||
DEFAULT_CMD: {
|
||||
linux: getBin(['google-chrome-canary', 'google-chrome-unstable']),
|
||||
darwin: getChromeDarwin('/Applications/Google Chrome Canary.app/Contents/MacOS/Google Chrome Canary'),
|
||||
win32: getChromeExe('Chrome SxS')
|
||||
},
|
||||
ENV_CMD: 'CHROME_CANARY_BIN'
|
||||
}
|
||||
|
||||
ChromeCanaryHeadlessBrowser.$inject = ['baseBrowserDecorator', 'args']
|
||||
|
||||
ChromiumBrowser.prototype = {
|
||||
name: 'Chromium',
|
||||
|
||||
DEFAULT_CMD: {
|
||||
// Try chromium-browser before chromium to avoid conflict with the legacy
|
||||
// chromium-bsu package previously known as 'chromium' in Debian and Ubuntu.
|
||||
linux: getBin(['chromium-browser', 'chromium']),
|
||||
darwin: '/Applications/Chromium.app/Contents/MacOS/Chromium',
|
||||
win32: getChromiumExe()
|
||||
},
|
||||
ENV_CMD: 'CHROMIUM_BIN'
|
||||
}
|
||||
|
||||
ChromiumBrowser.$inject = ['baseBrowserDecorator', 'args']
|
||||
|
||||
var ChromiumHeadlessBrowser = function (baseBrowserDecorator, args) {
|
||||
ChromiumBrowser.apply(this, arguments)
|
||||
|
||||
var parentOptions = this._getOptions
|
||||
this._getOptions = function (url) {
|
||||
return headlessGetOptions.call(this, url, args, parentOptions)
|
||||
}
|
||||
}
|
||||
|
||||
ChromiumHeadlessBrowser.prototype = {
|
||||
name: 'ChromiumHeadless',
|
||||
|
||||
DEFAULT_CMD: {
|
||||
// Try chromium-browser before chromium to avoid conflict with the legacy
|
||||
// chromium-bsu package previously known as 'chromium' in Debian and Ubuntu.
|
||||
linux: getBin(['chromium-browser', 'chromium']),
|
||||
darwin: '/Applications/Chromium.app/Contents/MacOS/Chromium',
|
||||
win32: getChromiumExe()
|
||||
},
|
||||
ENV_CMD: 'CHROMIUM_BIN'
|
||||
}
|
||||
|
||||
var DartiumBrowser = function () {
|
||||
ChromeBrowser.apply(this, arguments)
|
||||
|
||||
var checkedFlag = '--checked'
|
||||
var dartFlags = process.env.DART_FLAGS || ''
|
||||
var flags = dartFlags.split(' ')
|
||||
if (flags.indexOf(checkedFlag) === -1) {
|
||||
flags.push(checkedFlag)
|
||||
process.env.DART_FLAGS = flags.join(' ')
|
||||
}
|
||||
}
|
||||
|
||||
DartiumBrowser.prototype = {
|
||||
name: 'Dartium',
|
||||
DEFAULT_CMD: {},
|
||||
ENV_CMD: 'DARTIUM_BIN'
|
||||
}
|
||||
|
||||
DartiumBrowser.$inject = ['baseBrowserDecorator', 'args']
|
||||
|
||||
// PUBLISH DI MODULE
|
||||
module.exports = {
|
||||
'launcher:Chrome': ['type', ChromeBrowser],
|
||||
'launcher:ChromeHeadless': ['type', ChromeHeadlessBrowser],
|
||||
'launcher:ChromeCanary': ['type', ChromeCanaryBrowser],
|
||||
'launcher:ChromeCanaryHeadless': ['type', ChromeCanaryHeadlessBrowser],
|
||||
'launcher:Chromium': ['type', ChromiumBrowser],
|
||||
'launcher:ChromiumHeadless': ['type', ChromiumHeadlessBrowser],
|
||||
'launcher:Dartium': ['type', DartiumBrowser]
|
||||
}
|
||||
|
||||
module.exports.test = {
|
||||
isJSFlags: isJSFlags,
|
||||
sanitizeJSFlags: sanitizeJSFlags,
|
||||
headlessGetOptions: headlessGetOptions,
|
||||
canaryGetOptions: canaryGetOptions
|
||||
}
|
1
node_modules/karma-chrome-launcher/node_modules/.bin/which
generated
vendored
Symbolic link
1
node_modules/karma-chrome-launcher/node_modules/.bin/which
generated
vendored
Symbolic link
|
@ -0,0 +1 @@
|
|||
../which/bin/which
|
152
node_modules/karma-chrome-launcher/node_modules/which/CHANGELOG.md
generated
vendored
Normal file
152
node_modules/karma-chrome-launcher/node_modules/which/CHANGELOG.md
generated
vendored
Normal file
|
@ -0,0 +1,152 @@
|
|||
# Changes
|
||||
|
||||
|
||||
## 1.3.1
|
||||
|
||||
* update deps
|
||||
* update travis
|
||||
|
||||
## v1.3.0
|
||||
|
||||
* Add nothrow option to which.sync
|
||||
* update tap
|
||||
|
||||
## v1.2.14
|
||||
|
||||
* appveyor: drop node 5 and 0.x
|
||||
* travis-ci: add node 6, drop 0.x
|
||||
|
||||
## v1.2.13
|
||||
|
||||
* test: Pass missing option to pass on windows
|
||||
* update tap
|
||||
* update isexe to 2.0.0
|
||||
* neveragain.tech pledge request
|
||||
|
||||
## v1.2.12
|
||||
|
||||
* Removed unused require
|
||||
|
||||
## v1.2.11
|
||||
|
||||
* Prevent changelog script from being included in package
|
||||
|
||||
## v1.2.10
|
||||
|
||||
* Use env.PATH only, not env.Path
|
||||
|
||||
## v1.2.9
|
||||
|
||||
* fix for paths starting with ../
|
||||
* Remove unused `is-absolute` module
|
||||
|
||||
## v1.2.8
|
||||
|
||||
* bullet items in changelog that contain (but don't start with) #
|
||||
|
||||
## v1.2.7
|
||||
|
||||
* strip 'update changelog' changelog entries out of changelog
|
||||
|
||||
## v1.2.6
|
||||
|
||||
* make the changelog bulleted
|
||||
|
||||
## v1.2.5
|
||||
|
||||
* make a changelog, and keep it up to date
|
||||
* don't include tests in package
|
||||
* Properly handle relative-path executables
|
||||
* appveyor
|
||||
* Attach error code to Not Found error
|
||||
* Make tests pass on Windows
|
||||
|
||||
## v1.2.4
|
||||
|
||||
* Fix typo
|
||||
|
||||
## v1.2.3
|
||||
|
||||
* update isexe, fix regression in pathExt handling
|
||||
|
||||
## v1.2.2
|
||||
|
||||
* update deps, use isexe module, test windows
|
||||
|
||||
## v1.2.1
|
||||
|
||||
* Sometimes windows PATH entries are quoted
|
||||
* Fixed a bug in the check for group and user mode bits. This bug was introduced during refactoring for supporting strict mode.
|
||||
* doc cli
|
||||
|
||||
## v1.2.0
|
||||
|
||||
* Add support for opt.all and -as cli flags
|
||||
* test the bin
|
||||
* update travis
|
||||
* Allow checking for multiple programs in bin/which
|
||||
* tap 2
|
||||
|
||||
## v1.1.2
|
||||
|
||||
* travis
|
||||
* Refactored and fixed undefined error on Windows
|
||||
* Support strict mode
|
||||
|
||||
## v1.1.1
|
||||
|
||||
* test +g exes against secondary groups, if available
|
||||
* Use windows exe semantics on cygwin & msys
|
||||
* cwd should be first in path on win32, not last
|
||||
* Handle lower-case 'env.Path' on Windows
|
||||
* Update docs
|
||||
* use single-quotes
|
||||
|
||||
## v1.1.0
|
||||
|
||||
* Add tests, depend on is-absolute
|
||||
|
||||
## v1.0.9
|
||||
|
||||
* which.js: root is allowed to execute files owned by anyone
|
||||
|
||||
## v1.0.8
|
||||
|
||||
* don't use graceful-fs
|
||||
|
||||
## v1.0.7
|
||||
|
||||
* add license to package.json
|
||||
|
||||
## v1.0.6
|
||||
|
||||
* isc license
|
||||
|
||||
## 1.0.5
|
||||
|
||||
* Awful typo
|
||||
|
||||
## 1.0.4
|
||||
|
||||
* Test for path absoluteness properly
|
||||
* win: Allow '' as a pathext if cmd has a . in it
|
||||
|
||||
## 1.0.3
|
||||
|
||||
* Remove references to execPath
|
||||
* Make `which.sync()` work on Windows by honoring the PATHEXT variable.
|
||||
* Make `isExe()` always return true on Windows.
|
||||
* MIT
|
||||
|
||||
## 1.0.2
|
||||
|
||||
* Only files can be exes
|
||||
|
||||
## 1.0.1
|
||||
|
||||
* Respect the PATHEXT env for win32 support
|
||||
* should 0755 the bin
|
||||
* binary
|
||||
* guts
|
||||
* package
|
||||
* 1st
|
15
node_modules/karma-chrome-launcher/node_modules/which/LICENSE
generated
vendored
Normal file
15
node_modules/karma-chrome-launcher/node_modules/which/LICENSE
generated
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
The ISC License
|
||||
|
||||
Copyright (c) Isaac Z. Schlueter and Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
||||
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
51
node_modules/karma-chrome-launcher/node_modules/which/README.md
generated
vendored
Normal file
51
node_modules/karma-chrome-launcher/node_modules/which/README.md
generated
vendored
Normal file
|
@ -0,0 +1,51 @@
|
|||
# which
|
||||
|
||||
Like the unix `which` utility.
|
||||
|
||||
Finds the first instance of a specified executable in the PATH
|
||||
environment variable. Does not cache the results, so `hash -r` is not
|
||||
needed when the PATH changes.
|
||||
|
||||
## USAGE
|
||||
|
||||
```javascript
|
||||
var which = require('which')
|
||||
|
||||
// async usage
|
||||
which('node', function (er, resolvedPath) {
|
||||
// er is returned if no "node" is found on the PATH
|
||||
// if it is found, then the absolute path to the exec is returned
|
||||
})
|
||||
|
||||
// sync usage
|
||||
// throws if not found
|
||||
var resolved = which.sync('node')
|
||||
|
||||
// if nothrow option is used, returns null if not found
|
||||
resolved = which.sync('node', {nothrow: true})
|
||||
|
||||
// Pass options to override the PATH and PATHEXT environment vars.
|
||||
which('node', { path: someOtherPath }, function (er, resolved) {
|
||||
if (er)
|
||||
throw er
|
||||
console.log('found at %j', resolved)
|
||||
})
|
||||
```
|
||||
|
||||
## CLI USAGE
|
||||
|
||||
Same as the BSD `which(1)` binary.
|
||||
|
||||
```
|
||||
usage: which [-as] program ...
|
||||
```
|
||||
|
||||
## OPTIONS
|
||||
|
||||
You may pass an options object as the second argument.
|
||||
|
||||
- `path`: Use instead of the `PATH` environment variable.
|
||||
- `pathExt`: Use instead of the `PATHEXT` environment variable.
|
||||
- `all`: Return all matches, instead of just the first one. Note that
|
||||
this means the function returns an array of strings instead of a
|
||||
single string.
|
52
node_modules/karma-chrome-launcher/node_modules/which/bin/which
generated
vendored
Executable file
52
node_modules/karma-chrome-launcher/node_modules/which/bin/which
generated
vendored
Executable file
|
@ -0,0 +1,52 @@
|
|||
#!/usr/bin/env node
|
||||
var which = require("../")
|
||||
if (process.argv.length < 3)
|
||||
usage()
|
||||
|
||||
function usage () {
|
||||
console.error('usage: which [-as] program ...')
|
||||
process.exit(1)
|
||||
}
|
||||
|
||||
var all = false
|
||||
var silent = false
|
||||
var dashdash = false
|
||||
var args = process.argv.slice(2).filter(function (arg) {
|
||||
if (dashdash || !/^-/.test(arg))
|
||||
return true
|
||||
|
||||
if (arg === '--') {
|
||||
dashdash = true
|
||||
return false
|
||||
}
|
||||
|
||||
var flags = arg.substr(1).split('')
|
||||
for (var f = 0; f < flags.length; f++) {
|
||||
var flag = flags[f]
|
||||
switch (flag) {
|
||||
case 's':
|
||||
silent = true
|
||||
break
|
||||
case 'a':
|
||||
all = true
|
||||
break
|
||||
default:
|
||||
console.error('which: illegal option -- ' + flag)
|
||||
usage()
|
||||
}
|
||||
}
|
||||
return false
|
||||
})
|
||||
|
||||
process.exit(args.reduce(function (pv, current) {
|
||||
try {
|
||||
var f = which.sync(current, { all: all })
|
||||
if (all)
|
||||
f = f.join('\n')
|
||||
if (!silent)
|
||||
console.log(f)
|
||||
return pv;
|
||||
} catch (e) {
|
||||
return 1;
|
||||
}
|
||||
}, 0))
|
30
node_modules/karma-chrome-launcher/node_modules/which/package.json
generated
vendored
Normal file
30
node_modules/karma-chrome-launcher/node_modules/which/package.json
generated
vendored
Normal file
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
"author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me)",
|
||||
"name": "which",
|
||||
"description": "Like which(1) unix command. Find the first instance of an executable in the PATH.",
|
||||
"version": "1.3.1",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/isaacs/node-which.git"
|
||||
},
|
||||
"main": "which.js",
|
||||
"bin": "./bin/which",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"isexe": "^2.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"mkdirp": "^0.5.0",
|
||||
"rimraf": "^2.6.2",
|
||||
"tap": "^12.0.1"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "tap test/*.js --cov",
|
||||
"changelog": "bash gen-changelog.sh",
|
||||
"postversion": "npm run changelog && git add CHANGELOG.md && git commit -m 'update changelog - '${npm_package_version}"
|
||||
},
|
||||
"files": [
|
||||
"which.js",
|
||||
"bin/which"
|
||||
]
|
||||
}
|
135
node_modules/karma-chrome-launcher/node_modules/which/which.js
generated
vendored
Normal file
135
node_modules/karma-chrome-launcher/node_modules/which/which.js
generated
vendored
Normal file
|
@ -0,0 +1,135 @@
|
|||
module.exports = which
|
||||
which.sync = whichSync
|
||||
|
||||
var isWindows = process.platform === 'win32' ||
|
||||
process.env.OSTYPE === 'cygwin' ||
|
||||
process.env.OSTYPE === 'msys'
|
||||
|
||||
var path = require('path')
|
||||
var COLON = isWindows ? ';' : ':'
|
||||
var isexe = require('isexe')
|
||||
|
||||
function getNotFoundError (cmd) {
|
||||
var er = new Error('not found: ' + cmd)
|
||||
er.code = 'ENOENT'
|
||||
|
||||
return er
|
||||
}
|
||||
|
||||
function getPathInfo (cmd, opt) {
|
||||
var colon = opt.colon || COLON
|
||||
var pathEnv = opt.path || process.env.PATH || ''
|
||||
var pathExt = ['']
|
||||
|
||||
pathEnv = pathEnv.split(colon)
|
||||
|
||||
var pathExtExe = ''
|
||||
if (isWindows) {
|
||||
pathEnv.unshift(process.cwd())
|
||||
pathExtExe = (opt.pathExt || process.env.PATHEXT || '.EXE;.CMD;.BAT;.COM')
|
||||
pathExt = pathExtExe.split(colon)
|
||||
|
||||
|
||||
// Always test the cmd itself first. isexe will check to make sure
|
||||
// it's found in the pathExt set.
|
||||
if (cmd.indexOf('.') !== -1 && pathExt[0] !== '')
|
||||
pathExt.unshift('')
|
||||
}
|
||||
|
||||
// If it has a slash, then we don't bother searching the pathenv.
|
||||
// just check the file itself, and that's it.
|
||||
if (cmd.match(/\//) || isWindows && cmd.match(/\\/))
|
||||
pathEnv = ['']
|
||||
|
||||
return {
|
||||
env: pathEnv,
|
||||
ext: pathExt,
|
||||
extExe: pathExtExe
|
||||
}
|
||||
}
|
||||
|
||||
function which (cmd, opt, cb) {
|
||||
if (typeof opt === 'function') {
|
||||
cb = opt
|
||||
opt = {}
|
||||
}
|
||||
|
||||
var info = getPathInfo(cmd, opt)
|
||||
var pathEnv = info.env
|
||||
var pathExt = info.ext
|
||||
var pathExtExe = info.extExe
|
||||
var found = []
|
||||
|
||||
;(function F (i, l) {
|
||||
if (i === l) {
|
||||
if (opt.all && found.length)
|
||||
return cb(null, found)
|
||||
else
|
||||
return cb(getNotFoundError(cmd))
|
||||
}
|
||||
|
||||
var pathPart = pathEnv[i]
|
||||
if (pathPart.charAt(0) === '"' && pathPart.slice(-1) === '"')
|
||||
pathPart = pathPart.slice(1, -1)
|
||||
|
||||
var p = path.join(pathPart, cmd)
|
||||
if (!pathPart && (/^\.[\\\/]/).test(cmd)) {
|
||||
p = cmd.slice(0, 2) + p
|
||||
}
|
||||
;(function E (ii, ll) {
|
||||
if (ii === ll) return F(i + 1, l)
|
||||
var ext = pathExt[ii]
|
||||
isexe(p + ext, { pathExt: pathExtExe }, function (er, is) {
|
||||
if (!er && is) {
|
||||
if (opt.all)
|
||||
found.push(p + ext)
|
||||
else
|
||||
return cb(null, p + ext)
|
||||
}
|
||||
return E(ii + 1, ll)
|
||||
})
|
||||
})(0, pathExt.length)
|
||||
})(0, pathEnv.length)
|
||||
}
|
||||
|
||||
function whichSync (cmd, opt) {
|
||||
opt = opt || {}
|
||||
|
||||
var info = getPathInfo(cmd, opt)
|
||||
var pathEnv = info.env
|
||||
var pathExt = info.ext
|
||||
var pathExtExe = info.extExe
|
||||
var found = []
|
||||
|
||||
for (var i = 0, l = pathEnv.length; i < l; i ++) {
|
||||
var pathPart = pathEnv[i]
|
||||
if (pathPart.charAt(0) === '"' && pathPart.slice(-1) === '"')
|
||||
pathPart = pathPart.slice(1, -1)
|
||||
|
||||
var p = path.join(pathPart, cmd)
|
||||
if (!pathPart && /^\.[\\\/]/.test(cmd)) {
|
||||
p = cmd.slice(0, 2) + p
|
||||
}
|
||||
for (var j = 0, ll = pathExt.length; j < ll; j ++) {
|
||||
var cur = p + pathExt[j]
|
||||
var is
|
||||
try {
|
||||
is = isexe.sync(cur, { pathExt: pathExtExe })
|
||||
if (is) {
|
||||
if (opt.all)
|
||||
found.push(cur)
|
||||
else
|
||||
return cur
|
||||
}
|
||||
} catch (ex) {}
|
||||
}
|
||||
}
|
||||
|
||||
if (opt.all && found.length)
|
||||
return found
|
||||
|
||||
if (opt.nothrow)
|
||||
return null
|
||||
|
||||
throw getNotFoundError(cmd)
|
||||
}
|
83
node_modules/karma-chrome-launcher/package.json
generated
vendored
Normal file
83
node_modules/karma-chrome-launcher/package.json
generated
vendored
Normal file
|
@ -0,0 +1,83 @@
|
|||
{
|
||||
"name": "karma-chrome-launcher",
|
||||
"version": "3.2.0",
|
||||
"description": "A Karma plugin. Launcher for Chrome and Chrome Canary.",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"lint": "standard",
|
||||
"integration-test": "npx karma start examples/simple/karma.conf.js --single-run --browsers ChromeHeadless",
|
||||
"unit-test": "npx mocha test/*",
|
||||
"test": "npm run unit-test && npm run integration-test",
|
||||
"release": "semantic-release",
|
||||
"commitlint": "commitlint"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/karma-runner/karma-chrome-launcher.git"
|
||||
},
|
||||
"keywords": [
|
||||
"karma-plugin",
|
||||
"karma-launcher",
|
||||
"chrome"
|
||||
],
|
||||
"author": "Vojta Jina <vojta.jina@gmail.com>",
|
||||
"dependencies": {
|
||||
"which": "^1.2.1"
|
||||
},
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@commitlint/cli": "^12.1.4",
|
||||
"@commitlint/config-angular": "^12.1.4",
|
||||
"@semantic-release/changelog": "^5.0.1",
|
||||
"@semantic-release/git": "^9.0.1",
|
||||
"chai": "^4.2.0",
|
||||
"karma": "^6.4.1",
|
||||
"karma-mocha": "1.x || ^0.2.0",
|
||||
"mocha": "^5.2.0",
|
||||
"semantic-release": "^17.0.1",
|
||||
"sinon": "^7.1.1",
|
||||
"standard": "^12.0.0"
|
||||
},
|
||||
"contributors": [
|
||||
"Mark Ethan Trostler <mark@zzo.com>",
|
||||
"Rogério Vicente <rogeriopvl@gmail.com>",
|
||||
"dignifiedquire <dignifiedquire@gmail.com>",
|
||||
"Jonathan Ginsburg <jon@than.ml>",
|
||||
"rogeriopvl <rogeriopvl@gmail.com>",
|
||||
"Friedel Ziegelmayer <dignifiedquire@gmail.com>",
|
||||
"greenkeeperio-bot <support@greenkeeper.io>",
|
||||
"johnjbarton <johnjbarton@johnjbarton.com>",
|
||||
"Mark Trostler <mark@zzo.com>",
|
||||
"Michał Gołębiowski-Owczarek <m.goleb@gmail.com>",
|
||||
"Friedel Ziegelmayer <friedel.ziegelmayer@gmail.com>",
|
||||
"dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>",
|
||||
"Andrey Taranov <andrey.taranov@nordea.com>",
|
||||
"Aymeric Beaumet <aymeric@beaumet.me>",
|
||||
"Filipe Guerra <alias.mac@gmail.com>",
|
||||
"Alexander Fedyashov <af@e42.guru>",
|
||||
"Darryl Pogue <dvpdiner2@gmail.com>",
|
||||
"David <davidsu@wix.com>",
|
||||
"Florian Richter <florian@lkr24.de>",
|
||||
"Florian-R <florian.r.dev@gmail.com>",
|
||||
"François SIMOND <frsimond@users.noreply.github.com>",
|
||||
"Hai Feng Kao <haifeng@cocoaspice.in>",
|
||||
"J Rob Gant <rgant@alum.wpi.edu>",
|
||||
"J. Abbott <abbotto@users.noreply.github.com>",
|
||||
"Jeff Cross <middlefloor@gmail.com>",
|
||||
"Joe Doyle <valdain@gmail.com>",
|
||||
"Julien Sanchez <julien.sanchez@lim.eu>",
|
||||
"Marko Vuksanovic <markovuksanovic@gmail.com>",
|
||||
"Nicholas Mitchell <mitchellnicholasl@gmail.com>",
|
||||
"Parashuram N <code@r.nparashuram.com>",
|
||||
"Stefan Bley <stefan.bley@zeiss.com>",
|
||||
"Tatsuyuki Ishi <ishitatsuyuki@gmail.com>",
|
||||
"Timo Tijhof <krinklemail@gmail.com>",
|
||||
"Vincent Voyer <vincent.voyer@algolia.com>",
|
||||
"aSemy <897017+aSemy@users.noreply.github.com>",
|
||||
"brutalcrozt <goendoell49@gmail.com>",
|
||||
"cexbrayat <cedric@ninja-squad.com>",
|
||||
"daniel rodriguez <maieutiquer@users.noreply.github.com>",
|
||||
"gkostov <p_e_a@gbg.bg>",
|
||||
"semantic-release-bot <semantic-release-bot@martynus.net>"
|
||||
]
|
||||
}
|
44
node_modules/karma-chrome-launcher/release.config.js
generated
vendored
Normal file
44
node_modules/karma-chrome-launcher/release.config.js
generated
vendored
Normal file
|
@ -0,0 +1,44 @@
|
|||
module.exports = {
|
||||
branches: 'master',
|
||||
verifyConditions: [
|
||||
'@semantic-release/changelog',
|
||||
'@semantic-release/github',
|
||||
'@semantic-release/npm'
|
||||
],
|
||||
prepare: [
|
||||
'./tools/update-contributors',
|
||||
'@semantic-release/changelog',
|
||||
'@semantic-release/git',
|
||||
'@semantic-release/npm'
|
||||
],
|
||||
publish: [
|
||||
'@semantic-release/github',
|
||||
'@semantic-release/npm'
|
||||
],
|
||||
success: [
|
||||
'@semantic-release/github'
|
||||
],
|
||||
fail: [
|
||||
'@semantic-release/github'
|
||||
],
|
||||
|
||||
// The release rules determine what kind of release should be triggered
|
||||
// based on the information included in the commit message. The default
|
||||
// rules used by semantic-release are the same, but they are set explicitly
|
||||
// for better visibility.
|
||||
// See https://github.com/semantic-release/commit-analyzer/blob/master/lib/default-release-rules.js
|
||||
releaseRules: [
|
||||
{ breaking: true, release: 'major' },
|
||||
{ revert: true, release: 'patch' },
|
||||
{ type: 'feat', release: 'minor' },
|
||||
{ type: 'fix', release: 'patch' },
|
||||
{ type: 'perf', release: 'patch' }
|
||||
],
|
||||
|
||||
// The preset determines which commits are included in the changelog and how
|
||||
// the changelog is formatted. The default value used by semantic-release is
|
||||
// the same, but it is set explicitly for visibility.
|
||||
// See https://semantic-release.gitbook.io/semantic-release/#commit-message-format
|
||||
// See https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular
|
||||
preset: 'angular'
|
||||
}
|
89
node_modules/karma-chrome-launcher/test/jsflags.spec.js
generated
vendored
Normal file
89
node_modules/karma-chrome-launcher/test/jsflags.spec.js
generated
vendored
Normal file
|
@ -0,0 +1,89 @@
|
|||
/* eslint-env mocha */
|
||||
|
||||
var expect = require('chai').expect
|
||||
var sinon = require('sinon')
|
||||
|
||||
var launcher = require('../index')
|
||||
|
||||
describe('isJSFlags()', function () {
|
||||
var isJSFlags = launcher.test.isJSFlags
|
||||
|
||||
it('should return true if flag begins with --js-flags=', function () {
|
||||
expect(isJSFlags('--js-flags=--expose-gc')).to.be.eql(true)
|
||||
expect(isJSFlags('--js-flags="--expose-gc"')).to.be.eql(true)
|
||||
expect(isJSFlags("--js-flags='--expose-gc'")).to.be.eql(true)
|
||||
})
|
||||
|
||||
it('should return false if flag does not begin with --js-flags=', function () {
|
||||
expect(isJSFlags(' --js-flags=--expose-gc')).to.be.eql(false)
|
||||
expect(isJSFlags('--js-flags"--expose-gc"')).to.be.eql(false)
|
||||
expect(isJSFlags('--jsflags="--expose-gc"')).to.be.eql(false)
|
||||
})
|
||||
})
|
||||
|
||||
describe('sanitizeJSFlags()', function () {
|
||||
var sanitizeJSFlags = launcher.test.sanitizeJSFlags
|
||||
|
||||
it('should do nothing if flags are not contained in quotes', function () {
|
||||
expect(sanitizeJSFlags('--js-flags=--expose-gc')).to.be.eql('--js-flags=--expose-gc')
|
||||
})
|
||||
|
||||
it('should symmetrically remove single or double quote if wraps all flags', function () {
|
||||
expect(sanitizeJSFlags("--js-flags='--expose-gc'")).to.be.eql('--js-flags=--expose-gc')
|
||||
expect(sanitizeJSFlags('--js-flags="--expose-gc"')).to.be.eql('--js-flags=--expose-gc')
|
||||
})
|
||||
|
||||
it('should NOT remove anything if the flags are not contained within quote', function () {
|
||||
expect(sanitizeJSFlags('--js-flags=--expose-gc="true"')).to.be.eql('--js-flags=--expose-gc="true"')
|
||||
expect(sanitizeJSFlags("--js-flags=--expose-gc='true'")).to.be.eql("--js-flags=--expose-gc='true'")
|
||||
})
|
||||
})
|
||||
|
||||
describe('canaryGetOptions', function () {
|
||||
var canaryGetOptions = launcher.test.canaryGetOptions
|
||||
|
||||
it('should return a merged version of --js-flags', function () {
|
||||
var parent = sinon.stub().returns(['-incognito'])
|
||||
var context = {}
|
||||
var url = 'http://localhost:9876'
|
||||
var args = { flags: ['--js-flags="--expose-gc"'] }
|
||||
expect(canaryGetOptions.call(context, url, args, parent)).to.be.eql([
|
||||
'-incognito',
|
||||
'--js-flags=--expose-gc --nocrankshaft --noopt'
|
||||
])
|
||||
})
|
||||
})
|
||||
|
||||
describe('headlessGetOptions', function () {
|
||||
var headlessGetOptions = launcher.test.headlessGetOptions
|
||||
|
||||
it('should return the headless flags', function () {
|
||||
var parent = sinon.stub().returns(['-incognito'])
|
||||
var context = {}
|
||||
var url = 'http://localhost:9876'
|
||||
var args = {}
|
||||
expect(headlessGetOptions.call(context, url, args, parent)).to.be.eql([
|
||||
'-incognito',
|
||||
'--headless',
|
||||
'--disable-gpu',
|
||||
'--disable-dev-shm-usage',
|
||||
'--remote-debugging-port=9222'
|
||||
])
|
||||
})
|
||||
|
||||
it('should not overwrite custom remote-debugging-port', function () {
|
||||
var parent = sinon.stub().returns(
|
||||
['-incognito', '--remote-debugging-port=9333']
|
||||
)
|
||||
var context = {}
|
||||
var url = 'http://localhost:9876'
|
||||
var args = {}
|
||||
expect(headlessGetOptions.call(context, url, args, parent)).to.be.eql([
|
||||
'-incognito',
|
||||
'--remote-debugging-port=9333',
|
||||
'--headless',
|
||||
'--disable-gpu',
|
||||
'--disable-dev-shm-usage'
|
||||
])
|
||||
})
|
||||
})
|
25
node_modules/karma-chrome-launcher/tools/update-contributors.js
generated
vendored
Normal file
25
node_modules/karma-chrome-launcher/tools/update-contributors.js
generated
vendored
Normal file
|
@ -0,0 +1,25 @@
|
|||
// From https://github.com/karma-runner/karma/blob/master/tools/update-contributors.js
|
||||
// When modifying this file also modify upstream.
|
||||
const { execSync } = require('child_process')
|
||||
const { readFileSync, writeFileSync } = require('fs')
|
||||
const { resolve } = require('path')
|
||||
|
||||
const prepare = async (pluginConfig, { logger }) => {
|
||||
// Example output:
|
||||
// 1042 Vojta Jina <vojta.jina@gmail.com>
|
||||
// 412 Friedel Ziegelmayer <friedel.ziegelmayer@gmail.com>
|
||||
// 206 dignifiedquire <friedel.ziegelmayer@gmail.com>
|
||||
// 139 johnjbarton <johnjbarton@johnjbarton.com>
|
||||
const stdout = execSync('git log --pretty=short | git shortlog -nse', { encoding: 'utf8' })
|
||||
|
||||
const pkgPath = resolve(__dirname, '..', 'package.json')
|
||||
const pkg = JSON.parse(readFileSync(pkgPath, 'utf8'))
|
||||
|
||||
// First line is already included as author field. Last line is dropped as it is an empty line.
|
||||
pkg.contributors = stdout.split('\n').slice(1, -1).map((line) => line.replace(/^[\W\d]+/, ''))
|
||||
writeFileSync(pkgPath, JSON.stringify(pkg, undefined, ' ') + '\n', 'utf8')
|
||||
|
||||
logger.info('Updated contributors list.')
|
||||
}
|
||||
|
||||
module.exports = { prepare }
|
Loading…
Add table
Add a link
Reference in a new issue