aboutsummaryrefslogtreecommitdiff
path: root/node_modules/ci-info
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2018-09-20 02:56:13 +0200
committerFlorian Dold <florian.dold@gmail.com>2018-09-20 02:56:13 +0200
commitbbff7403fbf46f9ad92240ac213df8d30ef31b64 (patch)
treec58400ec5124da1c7d56b01aea83309f80a56c3b /node_modules/ci-info
parent003fb34971cf63466184351b4db5f7c67df4f444 (diff)
downloadwallet-core-bbff7403fbf46f9ad92240ac213df8d30ef31b64.tar.xz
update packages
Diffstat (limited to 'node_modules/ci-info')
-rw-r--r--node_modules/ci-info/LICENSE2
-rw-r--r--node_modules/ci-info/README.md90
-rw-r--r--node_modules/ci-info/index.js66
-rw-r--r--node_modules/ci-info/package.json9
4 files changed, 90 insertions, 77 deletions
diff --git a/node_modules/ci-info/LICENSE b/node_modules/ci-info/LICENSE
index 4a59c9417..67846832e 100644
--- a/node_modules/ci-info/LICENSE
+++ b/node_modules/ci-info/LICENSE
@@ -1,6 +1,6 @@
The MIT License (MIT)
-Copyright (c) 2016-2017 Thomas Watson Steen
+Copyright (c) 2016-2018 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
diff --git a/node_modules/ci-info/README.md b/node_modules/ci-info/README.md
index 2c6cccf2b..b3f677ddc 100644
--- a/node_modules/ci-info/README.md
+++ b/node_modules/ci-info/README.md
@@ -2,15 +2,17 @@
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 :)
+Please [open an
+issue](https://github.com/watson/ci-info/issues/new?template=ci-server-not-detected.md)
+if your CI server isn't properly detected :)
+[![npm](https://img.shields.io/npm/v/ci-info.svg)](https://www.npmjs.com/package/ci-info)
[![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
-```
+```bash
npm install ci-info --save
```
@@ -30,24 +32,31 @@ if (ci.isCI) {
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)
+| Name | Constant |
+|------|----------|
+| [AWS CodeBuild](https://aws.amazon.com/codebuild/) | `ci.CODEBUILD` |
+| [AppVeyor](http://www.appveyor.com) | `ci.APPVEYOR` |
+| [Bamboo](https://www.atlassian.com/software/bamboo) by Atlassian | `ci.BAMBOO` |
+| [Bitbucket Pipelines](https://bitbucket.org/product/features/pipelines) | `ci.BITBUCKET` |
+| [Buildkite](https://buildkite.com) | `ci.BUILDKITE` |
+| [CircleCI](http://circleci.com) | `ci.CIRCLE` |
+| [Cirrus CI](https://cirrus-ci.org) | `ci.CIRRUS` |
+| [Codeship](https://codeship.com) | `ci.CODESHIP` |
+| [Drone](https://drone.io) | `ci.DRONE` |
+| [dsari](https://github.com/rfinnie/dsari) | `ci.DSARI` |
+| [GitLab CI](https://about.gitlab.com/gitlab-ci/) | `ci.GITLAB` |
+| [GoCD](https://www.go.cd/) | `ci.GOCD` |
+| [Hudson](http://hudson-ci.org) | `ci.HUDSON` |
+| [Jenkins CI](https://jenkins-ci.org) | `ci.JENKINS` |
+| [Magnum CI](https://magnum-ci.com) | `ci.MAGNUM` |
+| [Semaphore](https://semaphoreci.com) | `ci.SEMAPHORE` |
+| [Shippable](https://www.shippable.com/) | `ci.SHIPPABLE` |
+| [Solano CI](https://www.solanolabs.com/) | `ci.SOLANO` |
+| [Strider CD](https://strider-cd.github.io/) | `ci.STRIDER` |
+| [TaskCluster](http://docs.taskcluster.net) | `ci.TASKCLUSTER` |
+| [Team Foundation Server](https://www.visualstudio.com/en-us/products/tfs-overview-vs.aspx) by Microsoft | `ci.TFS` |
+| [TeamCity](https://www.jetbrains.com/teamcity/) by JetBrains | `ci.TEAMCITY` |
+| [Travis CI](http://travis-ci.org) | `ci.TRAVIS` |
## API
@@ -70,31 +79,26 @@ 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.isPR`
+
+A boolean if PR detection is supported for the current CI server. Will
+be `true` if a PR is being tested. Otherwise `false`. If PR detection is
+not supported for the current CI server, the value will be `null`.
+
### `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`.
+A vendor specific boolean constants is exposed for each support CI
+vendor. A constant will be `true` if the code is determined to run on
+the given CI server. Otherwise `false`.
+
+Examples of vendor constants are `ci.TRAVIS` or `ci.APPVEYOR`. For a
+complete list, see the support table above.
+
+Deprecated vendor constants that will be removed in the next major
+release:
-- `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`
+- `ci.TDDIUM` (Solano CI) This have been renamed `ci.SOLANO`
## License
-MIT
+[MIT](LICENSE)
diff --git a/node_modules/ci-info/index.js b/node_modules/ci-info/index.js
index 347dd5661..7f742f4ed 100644
--- a/node_modules/ci-info/index.js
+++ b/node_modules/ci-info/index.js
@@ -1,48 +1,56 @@
'use strict'
+var vendors = require('./vendors.json')
+
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', 'Hudsun', 'HUDSON_URL'],
- ['TASKCLUSTER', 'TaskCluster', 'TASK_ID', 'RUN_ID'],
- ['GOCD', 'GoCD', 'GO_PIPELINE_LABEL'],
- ['BITBUCKET', 'Bitbucket Pipelines', 'BITBUCKET_COMMIT'],
- ['CODEBUILD', 'AWS CodeBuild', 'CODEBUILD_BUILD_ARN']
-]
+// Used for testinging only
+Object.defineProperty(exports, '_vendors', {
+ value: vendors.map(function (v) { return v.constant })
+})
exports.name = null
+exports.isPR = null
vendors.forEach(function (vendor) {
- var constant = vendor.shift()
- var name = vendor.shift()
- var isCI = vendor.every(function (obj) {
+ var envs = Array.isArray(vendor.env) ? vendor.env : [vendor.env]
+ var isCI = envs.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[vendor.constant] = isCI
+
+ if (isCI) {
+ exports.name = vendor.name
+
+ if (vendor.pr) {
+ var val = env[vendor.pr.env]
+ if (val) {
+ switch (vendor.pr.type) {
+ case 'not-false':
+ exports.isPR = val !== 'false'
+ break
+ case 'boolean':
+ exports.isPR = val === 'true'
+ break
+ default:
+ exports.isPR = true
+ }
+ } else {
+ exports.isPR = false
+ }
+ }
+ }
})
exports.isCI = !!(
- env.CI || // Travis CI, CircleCI, Gitlab CI, Appveyor, CodeShip
- env.CONTINUOUS_INTEGRATION || // Travis CI
- env.BUILD_NUMBER || // Jenkins, TeamCity
+ env.CI || // Travis CI, CircleCI, Cirrus CI, Gitlab CI, Appveyor, CodeShip, dsari
+ env.CONTINUOUS_INTEGRATION || // Travis CI, Cirrus CI
+ env.BUILD_NUMBER || // Jenkins, TeamCity
+ env.RUN_ID || // TaskCluster, dsari
exports.name ||
false
)
diff --git a/node_modules/ci-info/package.json b/node_modules/ci-info/package.json
index a9a693b1a..6a45f9414 100644
--- a/node_modules/ci-info/package.json
+++ b/node_modules/ci-info/package.json
@@ -1,12 +1,13 @@
{
"name": "ci-info",
- "version": "1.1.2",
+ "version": "1.5.1",
"description": "Get details about the current Continuous Integration environment",
"main": "index.js",
"dependencies": {},
"devDependencies": {
"clear-require": "^1.0.1",
- "standard": "^10.0.3"
+ "standard": "^12.0.1",
+ "tape": "^4.9.1"
},
"scripts": {
"test": "standard && node test.js"
@@ -29,7 +30,7 @@
},
"homepage": "https://github.com/watson/ci-info",
"coordinates": [
- 55.777569,
- 12.589702
+ 55.778273,
+ 12.593054
]
}