diff options
Diffstat (limited to 'deps/npm/node_modules/ci-info')
-rw-r--r-- | deps/npm/node_modules/ci-info/LICENSE | 21 | ||||
-rw-r--r-- | deps/npm/node_modules/ci-info/README.md | 100 | ||||
-rw-r--r-- | deps/npm/node_modules/ci-info/index.js | 48 | ||||
-rw-r--r-- | deps/npm/node_modules/ci-info/package.json | 64 |
4 files changed, 233 insertions, 0 deletions
diff --git a/deps/npm/node_modules/ci-info/LICENSE b/deps/npm/node_modules/ci-info/LICENSE new file mode 100644 index 0000000000..4a59c94175 --- /dev/null +++ b/deps/npm/node_modules/ci-info/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016-2017 Thomas Watson Steen + +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. diff --git a/deps/npm/node_modules/ci-info/README.md b/deps/npm/node_modules/ci-info/README.md new file mode 100644 index 0000000000..2c6cccf2be --- /dev/null +++ b/deps/npm/node_modules/ci-info/README.md @@ -0,0 +1,100 @@ +# ci-info + +Get details about the current Continuous Integration environment. + +Please [open an issue](https://github.com/watson/ci-info/issues) if your +CI server isn't properly detected :) + +[![Build status](https://travis-ci.org/watson/ci-info.svg?branch=master)](https://travis-ci.org/watson/ci-info) +[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://github.com/feross/standard) + +## Installation + +``` +npm install ci-info --save +``` + +## Usage + +```js +var ci = require('ci-info') + +if (ci.isCI) { + console.log('The name of the CI server is:', ci.name) +} else { + console.log('This program is not running on a CI server') +} +``` + +## Supported CI tools + +Officially supported CI servers: + +- [AWS CodeBuild](https://aws.amazon.com/codebuild/) +- [AppVeyor](http://www.appveyor.com) +- [Bamboo](https://www.atlassian.com/software/bamboo) by Atlassian +- [Bitbucket Pipelines](https://bitbucket.org/product/features/pipelines) +- [Buildkite](https://buildkite.com) +- [CircleCI](http://circleci.com) +- [Codeship](https://codeship.com) +- [Drone](https://drone.io) +- [GitLab CI](https://about.gitlab.com/gitlab-ci/) +- [GoCD](https://www.go.cd/) +- [Hudson](http://hudson-ci.org) +- [Jenkins CI](https://jenkins-ci.org) +- [Magnum CI](https://magnum-ci.com) +- [Semaphore](https://semaphoreci.com) +- [TaskCluster](http://docs.taskcluster.net) +- [Team Foundation Server](https://www.visualstudio.com/en-us/products/tfs-overview-vs.aspx) by Microsoft +- [TeamCity](https://www.jetbrains.com/teamcity/) by JetBrains +- [Travis CI](http://travis-ci.org) + +## API + +### `ci.name` + +A string. Will contain the name of the CI server the code is running on. +If not CI server is detected, it will be `null`. + +Don't depend on the value of this string not to change for a specific +vendor. If you find your self writing `ci.name === 'Travis CI'`, you +most likely want to use `ci.TRAVIS` instead. + +### `ci.isCI` + +A boolean. Will be `true` if the code is running on a CI server. +Otherwise `false`. + +Some CI servers not listed here might still trigger the `ci.isCI` +boolean to be set to `true` if they use certain vendor neutral +environment variables. In those cases `ci.name` will be `null` and no +vendor specific boolean will be set to `true`. + +### `ci.<VENDOR-CONSTANT>` + +The following vendor specific boolean constants are exposed. A constant +will be `true` if the code is determined to run on the given CI server. +Otherwise `false`. + +- `ci.APPVEYOR` +- `ci.BAMBOO` +- `ci.BITBUCKET` +- `ci.BUILDKITE` +- `ci.CIRCLE` +- `ci.CODEBUILD` +- `ci.CODESHIP` +- `ci.DRONE` +- `ci.GITLAB` +- `ci.GOCD` +- `ci.HUDSON` +- `ci.JENKINS` +- `ci.MAGNUM` +- `ci.SEMAPHORE` +- `ci.TASKCLUSTER` +- `ci.TEAMCITY` +- `ci.TFS` (Team Foundation Server) +- `ci.TRAVIS` + +## License + +MIT diff --git a/deps/npm/node_modules/ci-info/index.js b/deps/npm/node_modules/ci-info/index.js new file mode 100644 index 0000000000..e716e34b31 --- /dev/null +++ b/deps/npm/node_modules/ci-info/index.js @@ -0,0 +1,48 @@ +'use strict' + +var env = process.env + +var vendors = [ + // Constant, Name, Envs + ['TRAVIS', 'Travis CI', 'TRAVIS'], + ['CIRCLE', 'CircleCI', 'CIRCLECI'], + ['GITLAB', 'GitLab CI', 'GITLAB_CI'], + ['APPVEYOR', 'AppVeyor', 'APPVEYOR'], + ['CODESHIP', 'Codeship', {CI_NAME: 'codeship'}], + ['DRONE', 'Drone', 'DRONE'], + ['MAGNUM', 'Magnum CI', 'MAGNUM'], + ['SEMAPHORE', 'Semaphore', 'SEMAPHORE'], + ['JENKINS', 'Jenkins', 'JENKINS_URL', 'BUILD_ID'], + ['BAMBOO', 'Bamboo', 'bamboo_planKey'], + ['TFS', 'Team Foundation Server', 'TF_BUILD'], + ['TEAMCITY', 'TeamCity', 'TEAMCITY_VERSION'], + ['BUILDKITE', 'Buildkite', 'BUILDKITE'], + ['HUDSON', 'Hudson', 'HUDSON_URL'], + ['TASKCLUSTER', 'TaskCluster', 'TASK_ID', 'RUN_ID'], + ['GOCD', 'GoCD', 'GO_PIPELINE_LABEL'], + ['BITBUCKET', 'Bitbucket Pipelines', 'BITBUCKET_COMMIT'], + ['CODEBUILD', 'AWS CodeBuild', 'CODEBUILD_BUILD_ARN'] +] + +exports.name = null + +vendors.forEach(function (vendor) { + var constant = vendor.shift() + var name = vendor.shift() + var isCI = vendor.every(function (obj) { + if (typeof obj === 'string') return !!env[obj] + return Object.keys(obj).every(function (k) { + return env[k] === obj[k] + }) + }) + exports[constant] = isCI + if (isCI) exports.name = name +}) + +exports.isCI = !!( + env.CI || // Travis CI, CircleCI, Gitlab CI, Appveyor, CodeShip + env.CONTINUOUS_INTEGRATION || // Travis CI + env.BUILD_NUMBER || // Jenkins, TeamCity + exports.name || + false +) diff --git a/deps/npm/node_modules/ci-info/package.json b/deps/npm/node_modules/ci-info/package.json new file mode 100644 index 0000000000..51a3ed5d22 --- /dev/null +++ b/deps/npm/node_modules/ci-info/package.json @@ -0,0 +1,64 @@ +{ + "_from": "ci-info@^1.0.0", + "_id": "ci-info@1.1.3", + "_inBundle": false, + "_integrity": "sha512-SK/846h/Rcy8q9Z9CAwGBLfCJ6EkjJWdpelWDufQpqVDYq2Wnnv8zlSO6AMQap02jvhVruKKpEtQOufo3pFhLg==", + "_location": "/ci-info", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "ci-info@^1.0.0", + "name": "ci-info", + "escapedName": "ci-info", + "rawSpec": "^1.0.0", + "saveSpec": null, + "fetchSpec": "^1.0.0" + }, + "_requiredBy": [ + "/is-ci" + ], + "_resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.1.3.tgz", + "_shasum": "710193264bb05c77b8c90d02f5aaf22216a667b2", + "_spec": "ci-info@^1.0.0", + "_where": "/Users/rebecca/code/npm/node_modules/is-ci", + "author": { + "name": "Thomas Watson Steen", + "email": "w@tson.dk", + "url": "https://twitter.com/wa7son" + }, + "bugs": { + "url": "https://github.com/watson/ci-info/issues" + }, + "bundleDependencies": false, + "coordinates": [ + 55.777613, + 12.589943 + ], + "dependencies": {}, + "deprecated": false, + "description": "Get details about the current Continuous Integration environment", + "devDependencies": { + "clear-require": "^1.0.1", + "standard": "^10.0.3" + }, + "homepage": "https://github.com/watson/ci-info", + "keywords": [ + "ci", + "continuous", + "integration", + "test", + "detect" + ], + "license": "MIT", + "main": "index.js", + "name": "ci-info", + "repository": { + "type": "git", + "url": "git+https://github.com/watson/ci-info.git" + }, + "scripts": { + "test": "standard && node test.js" + }, + "version": "1.1.3" +} |