Codebase list node-ci-info / 11e2710
New upstream version 3.2.0+~cs5.1.0 Pirate Praveen 2 years ago
21 changed file(s) with 795 addition(s) and 261 deletion(s). Raw diff Collapse all Expand all
00 # Changelog
1
2 ## v3.2.0
3
4 - support LayerCI ([#68](https://github.com/watson/ci-info/pull/68))
5 - support Appcircle ([#69](https://github.com/watson/ci-info/pull/69))
6 - support Codefresh CI ([#65](https://github.com/watson/ci-info/pull/65))
7 - Add support for nodejs v16
8
9 ## v3.1.1
10
11 Bug Fixes:
12
13 - remove duplicate declaration in typings
14
15 ## v3.1.0
16
17 Features:
18
19 - add typings
20
21 ## v3.0.0
22
23 Features:
24
25 - Add support nodejs versions: 14, 15
26 - support Nevercode ([#30](https://github.com/watson/ci-info/pull/30))
27 - support Render CI ([#36](https://github.com/watson/ci-info/pull/36))
28 - support Now CI ([#37](https://github.com/watson/ci-info/pull/37))
29 - support GitLab PR ([#59](https://github.com/watson/ci-info/pull/59))
30 - support Screwdriver CD ([#60](https://github.com/watson/ci-info/pull/60))
31 - support Visual Studio App Center ([#61](https://github.com/watson/ci-info/pull/61))
32
33 Bug Fixes:
34
35 - update Netlify env constant ([#47](https://github.com/watson/ci-info/pull/47))
36
37 Breaking changes:
38
39 - Drop support for Node.js end-of-life versions: 6, 13
40 - replace `Zeit Now` with `Vercel` ([#55](https://github.com/watson/ci-info/pull/55))
141
242 ## v2.0.0
343
444 Breaking changes:
545
6 * Drop support for Node.js end-of-life versions: 0.10, 0.12, 4, 5, 7,
46 - Drop support for Node.js end-of-life versions: 0.10, 0.12, 4, 5, 7,
747 and 9
8 * Team Foundation Server will now be detected as Azure Pipelines. The
48 - Team Foundation Server will now be detected as Azure Pipelines. The
949 constant `ci.TFS` no longer exists - use `ci.AZURE_PIPELINES` instead
10 * Remove deprecated `ci.TDDIUM` constant - use `ci.SOLANDO` instead
50 - Remove deprecated `ci.TDDIUM` constant - use `ci.SOLANDO` instead
1151
1252 New features:
1353
14 * feat: support Azure Pipelines ([#23](https://github.com/watson/ci-info/pull/23))
15 * feat: support Netlify CI ([#26](https://github.com/watson/ci-info/pull/26))
16 * feat: support Bitbucket pipelines PR detection ([#27](https://github.com/watson/ci-info/pull/27))
54 - feat: support Azure Pipelines ([#23](https://github.com/watson/ci-info/pull/23))
55 - feat: support Netlify CI ([#26](https://github.com/watson/ci-info/pull/26))
56 - feat: support Bitbucket pipelines PR detection ([#27](https://github.com/watson/ci-info/pull/27))
1757
1858 ## v1.6.0
1959
20 * feat: add Sail CI support
21 * feat: add Buddy support
22 * feat: add Bitrise support
23 * feat: detect Jenkins PRs
24 * feat: detect Drone PRs
60 - feat: add Sail CI support
61 - feat: add Buddy support
62 - feat: add Bitrise support
63 - feat: detect Jenkins PRs
64 - feat: detect Drone PRs
2565
2666 ## v1.5.1
2767
28 * fix: use full path to vendors.json
68 - fix: use full path to vendors.json
2969
3070 ## v1.5.0
3171
32 * feat: add dsari detection ([#15](https://github.com/watson/ci-info/pull/15))
33 * feat: add ci.isPR ([#16](https://github.com/watson/ci-info/pull/16))
72 - feat: add dsari detection ([#15](https://github.com/watson/ci-info/pull/15))
73 - feat: add ci.isPR ([#16](https://github.com/watson/ci-info/pull/16))
3474
3575 ## v1.4.0
3676
37 * feat: add Cirrus CI detection ([#13](https://github.com/watson/ci-info/pull/13))
38 * feat: add Shippable CI detection ([#14](https://github.com/watson/ci-info/pull/14))
77 - feat: add Cirrus CI detection ([#13](https://github.com/watson/ci-info/pull/13))
78 - feat: add Shippable CI detection ([#14](https://github.com/watson/ci-info/pull/14))
3979
4080 ## v1.3.1
4181
42 * chore: reduce npm package size by not including `.github` folder content ([#11](https://github.com/watson/ci-info/pull/11))
82 - chore: reduce npm package size by not including `.github` folder content ([#11](https://github.com/watson/ci-info/pull/11))
4383
4484 ## v1.3.0
4585
46 * feat: add support for Strider CD
47 * chore: deprecate vendor constant `TDDIUM` in favor of `SOLANO`
48 * docs: add missing vendor constant to docs
86 - feat: add support for Strider CD
87 - chore: deprecate vendor constant `TDDIUM` in favor of `SOLANO`
88 - docs: add missing vendor constant to docs
4989
5090 ## v1.2.0
5191
52 * feat: detect solano-ci ([#9](https://github.com/watson/ci-info/pull/9))
92 - feat: detect solano-ci ([#9](https://github.com/watson/ci-info/pull/9))
5393
5494 ## v1.1.3
5595
56 * fix: fix spelling of Hunson in `ci.name`
96 - fix: fix spelling of Hunson in `ci.name`
5797
5898 ## v1.1.2
5999
60 * fix: no more false positive matches for Jenkins
100 - fix: no more false positive matches for Jenkins
61101
62102 ## v1.1.1
63103
64 * docs: sort lists of CI servers in README.md
65 * docs: add missing AWS CodeBuild to the docs
104 - docs: sort lists of CI servers in README.md
105 - docs: add missing AWS CodeBuild to the docs
66106
67107 ## v1.1.0
68108
69 * feat: add AWS CodeBuild to CI detection ([#2](https://github.com/watson/ci-info/pull/2))
109 - feat: add AWS CodeBuild to CI detection ([#2](https://github.com/watson/ci-info/pull/2))
70110
71111 ## v1.0.1
72112
73 * chore: reduce npm package size by using an `.npmignore` file ([#3](https://github.com/watson/ci-info/pull/3))
113 - chore: reduce npm package size by using an `.npmignore` file ([#3](https://github.com/watson/ci-info/pull/3))
74114
75115 ## v1.0.0
76116
77 * Initial release
117 - Initial release
00 The MIT License (MIT)
11
2 Copyright (c) 2016-2018 Thomas Watson Steen
2 Copyright (c) 2016-2021 Thomas Watson Steen
33
44 Permission is hereby granted, free of charge, to any person obtaining a copy
55 of this software and associated documentation files (the "Software"), to deal
66 if your CI server isn't properly detected :)
77
88 [![npm](https://img.shields.io/npm/v/ci-info.svg)](https://www.npmjs.com/package/ci-info)
9 [![Build status](https://travis-ci.org/watson/ci-info.svg?branch=master)](https://travis-ci.org/watson/ci-info)
9 [![Tests](https://github.com/watson/ci-info/workflows/Tests/badge.svg)](https://github.com/watson/ci-info/actions)
1010 [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://github.com/feross/standard)
1111
1212 ## Installation
3131
3232 Officially supported CI servers:
3333
34 | Name | Constant | isPR |
35 |------|----------|------|
36 | [AWS CodeBuild](https://aws.amazon.com/codebuild/) | `ci.CODEBUILD` | 🚫 |
37 | [AppVeyor](http://www.appveyor.com) | `ci.APPVEYOR` | ✅ |
38 | [Azure Pipelines](https://azure.microsoft.com/en-us/services/devops/pipelines/) | `ci.AZURE_PIPELINES` | ✅ |
39 | [Bamboo](https://www.atlassian.com/software/bamboo) by Atlassian | `ci.BAMBOO` | 🚫 |
40 | [Bitbucket Pipelines](https://bitbucket.org/product/features/pipelines) | `ci.BITBUCKET` | ✅ |
41 | [Bitrise](https://www.bitrise.io/) | `ci.BITRISE` | ✅ |
42 | [Buddy](https://buddy.works/) | `ci.BUDDY` | ✅ |
43 | [Buildkite](https://buildkite.com) | `ci.BUILDKITE` | ✅ |
44 | [CircleCI](http://circleci.com) | `ci.CIRCLE` | ✅ |
45 | [Cirrus CI](https://cirrus-ci.org) | `ci.CIRRUS` | ✅ |
46 | [Codeship](https://codeship.com) | `ci.CODESHIP` | 🚫 |
47 | [Drone](https://drone.io) | `ci.DRONE` | ✅ |
48 | [dsari](https://github.com/rfinnie/dsari) | `ci.DSARI` | 🚫 |
49 | [GitLab CI](https://about.gitlab.com/gitlab-ci/) | `ci.GITLAB` | 🚫 |
50 | [GoCD](https://www.go.cd/) | `ci.GOCD` | 🚫 |
51 | [Hudson](http://hudson-ci.org) | `ci.HUDSON` | 🚫 |
52 | [Jenkins CI](https://jenkins-ci.org) | `ci.JENKINS` | ✅ |
53 | [Magnum CI](https://magnum-ci.com) | `ci.MAGNUM` | 🚫 |
54 | [Netlify CI](https://www.netlify.com/) | `ci.NETLIFY` | ✅ |
55 | [Sail CI](https://sail.ci/) | `ci.SAIL` | ✅ |
56 | [Semaphore](https://semaphoreci.com) | `ci.SEMAPHORE` | ✅ |
57 | [Shippable](https://www.shippable.com/) | `ci.SHIPPABLE` | ✅ |
58 | [Solano CI](https://www.solanolabs.com/) | `ci.SOLANO` | ✅ |
59 | [Strider CD](https://strider-cd.github.io/) | `ci.STRIDER` | 🚫 |
60 | [TaskCluster](http://docs.taskcluster.net) | `ci.TASKCLUSTER` | 🚫 |
61 | [TeamCity](https://www.jetbrains.com/teamcity/) by JetBrains | `ci.TEAMCITY` | 🚫 |
62 | [Travis CI](http://travis-ci.org) | `ci.TRAVIS` | ✅ |
34 | Name | Constant | isPR |
35 | ------------------------------------------------------------------------------- | -------------------- | ---- |
36 | [AWS CodeBuild](https://aws.amazon.com/codebuild/) | `ci.CODEBUILD` | 🚫 |
37 | [AppVeyor](http://www.appveyor.com) | `ci.APPVEYOR` | ✅ |
38 | [Azure Pipelines](https://azure.microsoft.com/en-us/services/devops/pipelines/) | `ci.AZURE_PIPELINES` | ✅ |
39 | [Appcircle](https://appcircle.io/) | `ci.APPCIRCLE` | 🚫 |
40 | [Bamboo](https://www.atlassian.com/software/bamboo) by Atlassian | `ci.BAMBOO` | 🚫 |
41 | [Bitbucket Pipelines](https://bitbucket.org/product/features/pipelines) | `ci.BITBUCKET` | ✅ |
42 | [Bitrise](https://www.bitrise.io/) | `ci.BITRISE` | ✅ |
43 | [Buddy](https://buddy.works/) | `ci.BUDDY` | ✅ |
44 | [Buildkite](https://buildkite.com) | `ci.BUILDKITE` | ✅ |
45 | [CircleCI](http://circleci.com) | `ci.CIRCLE` | ✅ |
46 | [Cirrus CI](https://cirrus-ci.org) | `ci.CIRRUS` | ✅ |
47 | [Codefresh](https://codefresh.io/) | `ci.CODEFRESH` | ✅ |
48 | [Codeship](https://codeship.com) | `ci.CODESHIP` | 🚫 |
49 | [Drone](https://drone.io) | `ci.DRONE` | ✅ |
50 | [dsari](https://github.com/rfinnie/dsari) | `ci.DSARI` | 🚫 |
51 | [GitHub Actions](https://github.com/features/actions/) | `ci.GITHUB_ACTIONS` | ✅ |
52 | [GitLab CI](https://about.gitlab.com/gitlab-ci/) | `ci.GITLAB` | ✅ |
53 | [GoCD](https://www.go.cd/) | `ci.GOCD` | 🚫 |
54 | [Hudson](http://hudson-ci.org) | `ci.HUDSON` | 🚫 |
55 | [Jenkins CI](https://jenkins-ci.org) | `ci.JENKINS` | ✅ |
56 | [LayerCI](https://layerci.com/) | `ci.LAYERCI` | ✅ |
57 | [Magnum CI](https://magnum-ci.com) | `ci.MAGNUM` | 🚫 |
58 | [Netlify CI](https://www.netlify.com/) | `ci.NETLIFY` | ✅ |
59 | [Nevercode](http://nevercode.io/) | `ci.NEVERCODE` | ✅ |
60 | [Render](https://render.com/) | `ci.RENDER` | ✅ |
61 | [Sail CI](https://sail.ci/) | `ci.SAIL` | ✅ |
62 | [Screwdriver](https://screwdriver.cd/) | `ci.SCREWDRIVER` | ✅ |
63 | [Semaphore](https://semaphoreci.com) | `ci.SEMAPHORE` | ✅ |
64 | [Shippable](https://www.shippable.com/) | `ci.SHIPPABLE` | ✅ |
65 | [Solano CI](https://www.solanolabs.com/) | `ci.SOLANO` | ✅ |
66 | [Strider CD](https://strider-cd.github.io/) | `ci.STRIDER` | 🚫 |
67 | [TaskCluster](http://docs.taskcluster.net) | `ci.TASKCLUSTER` | 🚫 |
68 | [TeamCity](https://www.jetbrains.com/teamcity/) by JetBrains | `ci.TEAMCITY` | 🚫 |
69 | [Travis CI](http://travis-ci.org) | `ci.TRAVIS` | ✅ |
70 | [Vercel](https://vercel.com/) | `ci.VERCEL` | 🚫 |
71 | [Visual Studio App Center](https://appcenter.ms/) | `ci.APPCENTER` | 🚫 |
6372
6473 ## API
6574
0 /**
1 * Returns a boolean. Will be `true` if the code is running on a CI server,
2 * otherwise `false`.
3 *
4 * Some CI servers not listed here might still trigger the `ci.isCI`
5 * boolean to be set to `true` if they use certain vendor neutral environment
6 * variables. In those cases `ci.name` will be `null` and no vendor specific
7 * boolean will be set to `true`.
8 */
9 export const isCI: boolean;
10 /**
11 * Returns a boolean if PR detection is supported for the current CI server.
12 * Will be `true` if a PR is being tested, otherwise `false`. If PR detection is
13 * not supported for the current CI server, the value will be `null`.
14 */
15 export const isPR: boolean | null;
16 /**
17 * Returns a string containing name of the CI server the code is running on. If
18 * CI server is not detected, it returns `null`.
19 *
20 * Don't depend on the value of this string not to change for a specific vendor.
21 * If you find your self writing `ci.name === 'Travis CI'`, you most likely want
22 * to use `ci.TRAVIS` instead.
23 */
24 export const name: string | null;
25
26 export const APPVEYOR: boolean;
27 export const AZURE_PIPELINES: boolean;
28 export const APPCIRCLE: boolean;
29 export const BAMBOO: boolean;
30 export const BITBUCKET: boolean;
31 export const BITRISE: boolean;
32 export const BUDDY: boolean;
33 export const BUILDKITE: boolean;
34 export const CIRCLE: boolean;
35 export const CIRRUS: boolean;
36 export const CODEBUILD: boolean;
37 export const CODEFRESH: boolean;
38 export const CODESHIP: boolean;
39 export const DRONE: boolean;
40 export const DSARI: boolean;
41 export const GITHUB_ACTIONS: boolean;
42 export const GITLAB: boolean;
43 export const GOCD: boolean;
44 export const HUDSON: boolean;
45 export const JENKINS: boolean;
46 export const LAYERCI: boolean;
47 export const MAGNUM: boolean;
48 export const NETLIFY: boolean;
49 export const NEVERCODE: boolean;
50 export const RENDER: boolean;
51 export const SAIL: boolean;
52 export const SEMAPHORE: boolean;
53 export const SCREWDRIVER: boolean;
54 export const SHIPPABLE: boolean;
55 export const SOLANO: boolean;
56 export const STRIDER: boolean;
57 export const TASKCLUSTER: boolean;
58 export const TEAMCITY: boolean;
59 export const TRAVIS: boolean;
60 export const VERCEL: boolean;
61 export const APPCENTER: boolean;
00 'use strict'
11
2 var vendors = require('./vendors.json')
2 const vendors = require('./vendors.json')
33
4 var env = process.env
4 const env = process.env
55
66 // Used for testing only
77 Object.defineProperty(exports, '_vendors', {
1212 exports.isPR = null
1313
1414 vendors.forEach(function (vendor) {
15 var envs = Array.isArray(vendor.env) ? vendor.env : [vendor.env]
16 var isCI = envs.every(function (obj) {
15 const envs = Array.isArray(vendor.env) ? vendor.env : [vendor.env]
16 const isCI = envs.every(function (obj) {
1717 return checkEnv(obj)
1818 })
1919
0 root = true
1
2 [*]
3 indent_style = tab
4 end_of_line = lf
5 charset = utf-8
6 trim_trailing_whitespace = true
7 insert_final_newline = true
8
9 [*.yml]
10 indent_style = space
11 indent_size = 2
0 package-lock=false
0 export interface Options {
1 /**
2 The stream to check.
3
4 @default process.stdout
5 */
6 readonly stream?: NodeJS.WritableStream;
7 }
8
9 /**
10 Check if stdout or stderr is [interactive](https://unix.stackexchange.com/a/43389/7678).
11
12 It checks that the stream is [TTY](https://jameshfisher.com/2017/12/09/what-is-a-tty/), not a dumb terminal, and not running in a CI.
13
14 This can be useful to decide whether to present interactive UI or animations in the terminal.
15
16 @example
17 ```
18 import isInteractive from 'is-interactive';
19
20 isInteractive();
21 //=> true
22 ```
23 */
24 export default function isInteractive(options?: Options): boolean;
0 export default function isInteractive({stream = process.stdout} = {}) {
1 return Boolean(
2 stream && stream.isTTY &&
3 process.env.TERM !== 'dumb' &&
4 !('CI' in process.env)
5 );
6 }
0 import {expectType} from 'tsd';
1 import isInteractive from './index.js';
2
3 expectType<boolean>(isInteractive({
4 stream: process.stderr
5 }));
0 MIT License
1
2 Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
3
4 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:
5
6 The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
7
8 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.
0 {
1 "name": "is-interactive",
2 "version": "2.0.0",
3 "description": "Check if stdout or stderr is interactive",
4 "license": "MIT",
5 "repository": "sindresorhus/is-interactive",
6 "funding": "https://github.com/sponsors/sindresorhus",
7 "author": {
8 "name": "Sindre Sorhus",
9 "email": "sindresorhus@gmail.com",
10 "url": "https://sindresorhus.com"
11 },
12 "type": "module",
13 "exports": "./index.js",
14 "engines": {
15 "node": ">=12"
16 },
17 "scripts": {
18 "test": "xo && ava && tsd"
19 },
20 "files": [
21 "index.js",
22 "index.d.ts"
23 ],
24 "keywords": [
25 "interactive",
26 "stdout",
27 "stderr",
28 "detect",
29 "is",
30 "terminal",
31 "shell",
32 "tty"
33 ],
34 "devDependencies": {
35 "@types/node": "^15.0.1",
36 "ava": "^3.15.0",
37 "tsd": "^0.14.0",
38 "xo": "^0.39.1"
39 }
40 }
0 # is-interactive
1
2 > Check if stdout or stderr is [interactive](https://unix.stackexchange.com/a/43389/7678)
3
4 It checks that the stream is [TTY](https://jameshfisher.com/2017/12/09/what-is-a-tty/), not a dumb terminal, and not running in a CI.
5
6 This can be useful to decide whether to present interactive UI or animations in the terminal.
7
8 ## Install
9
10 ```
11 $ npm install is-interactive
12 ```
13
14 ## Usage
15
16 ```js
17 import isInteractive from 'is-interactive';
18
19 isInteractive();
20 //=> true
21 ```
22
23 ## API
24
25 ### isInteractive(options?)
26
27 #### options
28
29 Type: `object`
30
31 ##### stream
32
33 Type: [`stream.Writable`](https://nodejs.org/api/stream.html#stream_class_stream_writable)\
34 Default: [`process.stdout`](https://nodejs.org/api/process.html#process_process_stdout)
35
36 The stream to check.
37
38 ## FAQ
39
40 #### Why are you not using [`ci-info`](https://github.com/watson/ci-info) for the CI check?
41
42 It's silly to have to detect individual CIs. They should identify themselves with the `CI` environment variable, and most do just that. A manually maintained list of detections will easily get out of date. And if a package using `ci-info` doesn't update to the latest version all the time, they will not support certain CIs. It also creates unpredictability as you might assume a CI is not supported and then suddenly it gets supported and you didn't account for that. In addition, some of the manual detections are loose and might cause false-positives which could create hard-to-debug bugs.
43
44 #### Why does this even exist? It's just a few lines.
45
46 It's not about the number of lines, but rather discoverability and documentation. A lot of people wouldn't even know they need this. Feel free to copy-paste the code if you don't want the dependency. You might also want to read [this blog post](https://blog.sindresorhus.com/small-focused-modules-9238d977a92a).
47
48 ## Related
49
50 - [is-unicode-supported](https://github.com/sindresorhus/is-unicode-supported) - Detect whether the terminal supports Unicode
51 - [supports-color](https://github.com/chalk/supports-color) - Detect whether a terminal supports color
0 import {PassThrough as PassThroughStream} from 'node:stream';
1 import test from 'ava';
2 import isInteractive from './index.js';
3
4 test('tty', t => {
5 const ci = process.env.CI;
6 delete process.env.CI;
7 const stream = new PassThroughStream();
8 stream.isTTY = true;
9 t.true(isInteractive({stream}));
10 process.env.CI = ci;
11 });
12
13 test('non-tty', t => {
14 const stream = new PassThroughStream();
15 stream.isTTY = false;
16 t.false(isInteractive({stream}));
17 });
18
19 test('dumb', t => {
20 const term = process.env.TERM;
21 process.env.TERM = 'dumb';
22 t.false(isInteractive());
23 process.env.TERM = term;
24 });
00 {
11 "name": "ci-info",
2 "version": "2.0.0",
2 "version": "3.2.0",
33 "description": "Get details about the current Continuous Integration environment",
44 "main": "index.js",
5 "dependencies": {},
6 "devDependencies": {
7 "clear-require": "^1.0.1",
8 "standard": "^12.0.1",
9 "tape": "^4.9.1"
10 },
11 "scripts": {
12 "test": "standard && node test.js"
13 },
5 "typings": "index.d.ts",
6 "author": "Thomas Watson Steen <w@tson.dk> (https://twitter.com/wa7son)",
7 "license": "MIT",
148 "repository": {
159 "type": "git",
1610 "url": "https://github.com/watson/ci-info.git"
1711 },
12 "bugs": {
13 "url": "https://github.com/watson/ci-info/issues"
14 },
15 "homepage": "https://github.com/watson/ci-info",
1816 "keywords": [
1917 "ci",
2018 "continuous",
2220 "test",
2321 "detect"
2422 ],
25 "author": "Thomas Watson Steen <w@tson.dk> (https://twitter.com/wa7son)",
26 "license": "MIT",
27 "bugs": {
28 "url": "https://github.com/watson/ci-info/issues"
29 },
30 "homepage": "https://github.com/watson/ci-info",
3123 "coordinates": [
3224 55.778231,
3325 12.593179
34 ]
26 ],
27 "scripts": {
28 "test": "standard && node test.js"
29 },
30 "devDependencies": {
31 "clear-module": "^4.1.1",
32 "standard": "^16.0.3",
33 "tape": "^5.2.2"
34 }
3535 }
00 'use strict'
11
2 var test = require('tape')
3 var clearRequire = require('clear-require')
4
5 var isActualPR = !!(process.env.TRAVIS_PULL_REQUEST && process.env.TRAVIS_PULL_REQUEST !== 'false')
2 const test = require('tape')
3 const clearModule = require('clear-module')
4
5 const isActualPR = !!(process.env.GITHUB_EVENT_NAME && process.env.GITHUB_EVENT_NAME === 'pull_request')
66
77 test('Known CI', function (t) {
8 process.env.TRAVIS = 'true'
9
10 var ci = require('./')
8 process.env.GITHUB_ACTIONS = 'true'
9
10 const ci = require('./')
1111
1212 t.ok(Array.isArray(ci._vendors))
1313 t.ok(ci._vendors.length > 0)
1414
1515 t.equal(ci.isCI, true)
1616 t.equal(ci.isPR, isActualPR)
17 t.equal(ci.name, 'Travis CI')
18 t.equal(ci.TRAVIS, true)
19 assertVendorConstants('TRAVIS', ci, t)
17 t.equal(ci.name, 'GitHub Actions')
18 t.equal(ci.GITHUB_ACTIONS, true)
19 assertVendorConstants('GITHUB_ACTIONS', ci, t)
2020
2121 t.end()
2222 })
2626 delete process.env.CONTINUOUS_INTEGRATION
2727 delete process.env.BUILD_NUMBER
2828 delete process.env.TRAVIS
29
30 clearRequire('./')
31 var ci = require('./')
29 delete process.env.GITHUB_ACTIONS
30
31 clearModule('./')
32 const ci = require('./')
3233
3334 t.equal(ci.isCI, false)
3435 t.equal(ci.isPR, null)
4243 test('Unknown CI', function (t) {
4344 process.env.CI = 'true'
4445
45 clearRequire('./')
46 var ci = require('./')
46 clearModule('./')
47 const ci = require('./')
4748
4849 t.equal(ci.isCI, true)
4950 t.equal(ci.isPR, null)
5859 process.env.APPVEYOR = 'true'
5960 process.env.APPVEYOR_PULL_REQUEST_NUMBER = '42'
6061
61 clearRequire('./')
62 var ci = require('./')
62 clearModule('./')
63 const ci = require('./')
6364
6465 t.equal(ci.isCI, true)
6566 t.equal(ci.isPR, true)
7677 test('AppVeyor - Not PR', function (t) {
7778 process.env.APPVEYOR = 'true'
7879
79 clearRequire('./')
80 var ci = require('./')
80 clearModule('./')
81 const ci = require('./')
8182
8283 t.equal(ci.isCI, true)
8384 t.equal(ci.isPR, false)
9495 process.env.SYSTEM_TEAMFOUNDATIONCOLLECTIONURI = 'https://dev.azure.com/Contoso'
9596 process.env.SYSTEM_PULLREQUEST_PULLREQUESTID = '42'
9697
97 clearRequire('./')
98 var ci = require('./')
98 clearModule('./')
99 const ci = require('./')
99100
100101 t.equal(ci.isCI, true)
101102 t.equal(ci.isPR, true)
112113 test('Azure Pipelines - Not PR', function (t) {
113114 process.env.SYSTEM_TEAMFOUNDATIONCOLLECTIONURI = 'https://dev.azure.com/Contoso'
114115
115 clearRequire('./')
116 var ci = require('./')
116 clearModule('./')
117 const ci = require('./')
117118
118119 t.equal(ci.isCI, true)
119120 t.equal(ci.isPR, false)
130131 process.env.BITBUCKET_COMMIT = 'true'
131132 process.env.BITBUCKET_PR_ID = '42'
132133
133 clearRequire('./')
134 var ci = require('./')
134 clearModule('./')
135 const ci = require('./')
135136
136137 t.equal(ci.isCI, true)
137138 t.equal(ci.isPR, true)
148149 test('Bitbucket Pipelines - Not PR', function (t) {
149150 process.env.BITBUCKET_COMMIT = 'true'
150151
151 clearRequire('./')
152 var ci = require('./')
152 clearModule('./')
153 const ci = require('./')
153154
154155 t.equal(ci.isCI, true)
155156 t.equal(ci.isPR, false)
166167 process.env.BUILDKITE = 'true'
167168 process.env.BUILDKITE_PULL_REQUEST = '42'
168169
169 clearRequire('./')
170 var ci = require('./')
170 clearModule('./')
171 const ci = require('./')
171172
172173 t.equal(ci.isCI, true)
173174 t.equal(ci.isPR, true)
185186 process.env.BUILDKITE = 'true'
186187 process.env.BUILDKITE_PULL_REQUEST = 'false'
187188
188 clearRequire('./')
189 var ci = require('./')
189 clearModule('./')
190 const ci = require('./')
190191
191192 t.equal(ci.isCI, true)
192193 t.equal(ci.isPR, false)
204205 process.env.CIRCLECI = 'true'
205206 process.env.CIRCLE_PULL_REQUEST = '42'
206207
207 clearRequire('./')
208 var ci = require('./')
208 clearModule('./')
209 const ci = require('./')
209210
210211 t.equal(ci.isCI, true)
211212 t.equal(ci.isPR, true)
222223 test('CircleCI - Not PR', function (t) {
223224 process.env.CIRCLECI = 'true'
224225
225 clearRequire('./')
226 var ci = require('./')
226 clearModule('./')
227 const ci = require('./')
227228
228229 t.equal(ci.isCI, true)
229230 t.equal(ci.isPR, false)
240241 process.env.CIRRUS_CI = 'true'
241242 process.env.CIRRUS_PR = '42'
242243
243 clearRequire('./')
244 var ci = require('./')
244 clearModule('./')
245 const ci = require('./')
245246
246247 t.equal(ci.isCI, true)
247248 t.equal(ci.isPR, true)
258259 test('Cirrus CI - Not PR', function (t) {
259260 process.env.CIRRUS_CI = 'true'
260261
261 clearRequire('./')
262 var ci = require('./')
262 clearModule('./')
263 const ci = require('./')
263264
264265 t.equal(ci.isCI, true)
265266 t.equal(ci.isPR, false)
272273 t.end()
273274 })
274275
276 test('Codefresh - PR', function (t) {
277 process.env.CF_BUILD_ID = 'true'
278 process.env.CF_PULL_REQUEST_ID = '42'
279
280 clearModule('./')
281 const ci = require('./')
282
283 t.equal(ci.isCI, true)
284 t.equal(ci.isPR, true)
285 t.equal(ci.name, 'Codefresh')
286 t.equal(ci.CODEFRESH, true)
287 assertVendorConstants('CODEFRESH', ci, t)
288
289 delete process.env.CF_BUILD_ID
290 delete process.env.CF_PULL_REQUEST_ID
291
292 t.end()
293 })
294
295 test('Codefresh - Not PR', function (t) {
296 process.env.CF_BUILD_ID = 'true'
297
298 clearModule('./')
299 const ci = require('./')
300
301 t.equal(ci.isCI, true)
302 t.equal(ci.isPR, false)
303 t.equal(ci.name, 'Codefresh')
304 t.equal(ci.CODEFRESH, true)
305 assertVendorConstants('CODEFRESH', ci, t)
306
307 delete process.env.CF_BUILD_ID
308
309 t.end()
310 })
311
312 test('LayerCI - PR', function (t) {
313 process.env.LAYERCI = 'true'
314 process.env.LAYERCI_PULL_REQUEST = 'https://link-to-pr/5'
315
316 clearModule('./')
317 const ci = require('./')
318
319 t.equal(ci.isCI, true)
320 t.equal(ci.isPR, true)
321 t.equal(ci.name, 'LayerCI')
322 t.equal(ci.LAYERCI, true)
323 assertVendorConstants('LAYERCI', ci, t)
324
325 delete process.env.LAYERCI
326 delete process.env.LAYERCI_PULL_REQUEST
327
328 t.end()
329 })
330
331 test('LayerCI - Not PR', function (t) {
332 process.env.LAYERCI = 'true'
333
334 clearModule('./')
335 const ci = require('./')
336
337 t.equal(ci.isCI, true)
338 t.equal(ci.isPR, false)
339 t.equal(ci.name, 'LayerCI')
340 t.equal(ci.LAYERCI, true)
341 assertVendorConstants('LAYERCI', ci, t)
342
343 delete process.env.LAYERCI
344
345 t.end()
346 })
347
348 test('Appcircle', function (t) {
349 process.env.AC_APPCIRCLE = 'true'
350
351 clearModule('./')
352 const ci = require('./')
353
354 t.equal(ci.isCI, true)
355 t.equal(ci.name, 'Appcircle')
356 t.equal(ci.APPCIRCLE, true)
357 assertVendorConstants('APPCIRCLE', ci, t)
358
359 delete process.env.AC_APPCIRCLE
360
361 t.end()
362 })
363
364 test('Render - PR', function (t) {
365 process.env.RENDER = 'true'
366 process.env.IS_PULL_REQUEST = 'true'
367
368 clearModule('./')
369 const ci = require('./')
370
371 t.equal(ci.isCI, true)
372 t.equal(ci.isPR, true)
373 t.equal(ci.name, 'Render')
374 t.equal(ci.RENDER, true)
375 assertVendorConstants('RENDER', ci, t)
376
377 delete process.env.RENDER
378 delete process.env.IS_PULL_REQUEST
379
380 t.end()
381 })
382
383 test('Render - Not PR', function (t) {
384 process.env.RENDER = 'true'
385 process.env.IS_PULL_REQUEST = 'false'
386
387 clearModule('./')
388 const ci = require('./')
389
390 t.equal(ci.isCI, true)
391 t.equal(ci.isPR, false)
392 t.equal(ci.name, 'Render')
393 t.equal(ci.RENDER, true)
394 assertVendorConstants('RENDER', ci, t)
395
396 delete process.env.RENDER
397 delete process.env.IS_PULL_REQUEST
398
399 t.end()
400 })
401
275402 test('Semaphore - PR', function (t) {
276403 process.env.SEMAPHORE = 'true'
277404 process.env.PULL_REQUEST_NUMBER = '42'
278405
279 clearRequire('./')
280 var ci = require('./')
406 clearModule('./')
407 const ci = require('./')
281408
282409 t.equal(ci.isCI, true)
283410 t.equal(ci.isPR, true)
294421 test('Semaphore - Not PR', function (t) {
295422 process.env.SEMAPHORE = 'true'
296423
297 clearRequire('./')
298 var ci = require('./')
424 clearModule('./')
425 const ci = require('./')
299426
300427 t.equal(ci.isCI, true)
301428 t.equal(ci.isPR, false)
312439 process.env.SHIPPABLE = 'true'
313440 process.env.IS_PULL_REQUEST = 'true'
314441
315 clearRequire('./')
316 var ci = require('./')
442 clearModule('./')
443 const ci = require('./')
317444
318445 t.equal(ci.isCI, true)
319446 t.equal(ci.isPR, true)
331458 process.env.SHIPPABLE = 'true'
332459 process.env.IS_PULL_REQUEST = 'false'
333460
334 clearRequire('./')
335 var ci = require('./')
461 clearModule('./')
462 const ci = require('./')
336463
337464 t.equal(ci.isCI, true)
338465 t.equal(ci.isPR, false)
350477 process.env.TDDIUM = 'true'
351478 process.env.TDDIUM_PR_ID = '42'
352479
353 clearRequire('./')
354 var ci = require('./')
480 clearModule('./')
481 const ci = require('./')
355482
356483 t.equal(ci.isCI, true)
357484 t.equal(ci.isPR, true)
368495 test('Solano CI - Not PR', function (t) {
369496 process.env.TDDIUM = 'true'
370497
371 clearRequire('./')
372 var ci = require('./')
498 clearModule('./')
499 const ci = require('./')
373500
374501 t.equal(ci.isCI, true)
375502 t.equal(ci.isPR, false)
386513 process.env.TRAVIS = 'true'
387514 process.env.TRAVIS_PULL_REQUEST = '42'
388515
389 clearRequire('./')
390 var ci = require('./')
516 clearModule('./')
517 const ci = require('./')
391518
392519 t.equal(ci.isCI, true)
393520 t.equal(ci.isPR, true)
405532 process.env.TRAVIS = 'true'
406533 process.env.TRAVIS_PULL_REQUEST = 'false'
407534
408 clearRequire('./')
409 var ci = require('./')
535 clearModule('./')
536 const ci = require('./')
410537
411538 t.equal(ci.isCI, true)
412539 t.equal(ci.isPR, false)
421548 })
422549
423550 test('Netlify CI - PR', function (t) {
424 process.env.NETLIFY_BUILD_BASE = '/opt/build'
551 process.env.NETLIFY = 'true'
425552 process.env.PULL_REQUEST = 'true'
426553
427 clearRequire('./')
428 var ci = require('./')
554 clearModule('./')
555 const ci = require('./')
429556
430557 t.equal(ci.isCI, true)
431558 t.equal(ci.isPR, true)
433560 t.equal(ci.NETLIFY, true)
434561 assertVendorConstants('NETLIFY', ci, t)
435562
436 delete process.env.NETLIFY_BUILD_BASE
563 delete process.env.NETLIFY
437564 delete process.env.PULL_REQUEST
438565
439566 t.end()
440567 })
441568
442569 test('Netlify CI - Not PR', function (t) {
443 process.env.NETLIFY_BUILD_BASE = '/opt/build'
570 process.env.NETLIFY = 'true'
444571 process.env.PULL_REQUEST = 'false'
445572
446 clearRequire('./')
447 var ci = require('./')
573 clearModule('./')
574 const ci = require('./')
448575
449576 t.equal(ci.isCI, true)
450577 t.equal(ci.isPR, false)
452579 t.equal(ci.NETLIFY, true)
453580 assertVendorConstants('NETLIFY', ci, t)
454581
455 delete process.env.NETLIFY_BUILD_BASE
582 delete process.env.NETLIFY
456583 delete process.env.PULL_REQUEST
584
585 t.end()
586 })
587
588 test('Vercel', function (t) {
589 process.env.NOW_BUILDER = '1'
590
591 clearModule('./')
592 const ci = require('./')
593
594 t.equal(ci.isCI, true)
595 t.equal(ci.isPR, null)
596 t.equal(ci.name, 'Vercel')
597 t.equal(ci.VERCEL, true)
598 assertVendorConstants('VERCEL', ci, t)
599
600 delete process.env.NOW_BUILDER
601
602 t.end()
603 })
604
605 test('Nevercode - PR', function (t) {
606 process.env.NEVERCODE = 'true'
607 process.env.NEVERCODE_PULL_REQUEST = 'true'
608
609 clearModule('./')
610 const ci = require('./')
611
612 t.equal(ci.isCI, true)
613 t.equal(ci.isPR, true)
614 t.equal(ci.name, 'Nevercode')
615 t.equal(ci.NEVERCODE, true)
616 assertVendorConstants('NEVERCODE', ci, t)
617
618 delete process.env.NEVERCODE
619 delete process.env.NEVERCODE_PULL_REQUEST
620
621 t.end()
622 })
623
624 test('Nevercode - Not PR', function (t) {
625 process.env.NEVERCODE = 'true'
626 process.env.NEVERCODE_PULL_REQUEST = 'false'
627
628 clearModule('./')
629 const ci = require('./')
630
631 t.equal(ci.isCI, true)
632 t.equal(ci.isPR, false)
633 t.equal(ci.name, 'Nevercode')
634 t.equal(ci.NEVERCODE, true)
635 assertVendorConstants('NEVERCODE', ci, t)
636
637 delete process.env.NEVERCODE
638 delete process.env.NEVERCODE_PULL_REQUEST
639
640 t.end()
641 })
642
643 test('GitHub Actions - PR', function (t) {
644 process.env.GITHUB_ACTIONS = 'true'
645 process.env.GITHUB_EVENT_NAME = 'pull_request'
646
647 clearModule('./')
648 const ci = require('./')
649
650 t.equal(ci.isCI, true)
651 t.equal(ci.isPR, true)
652 t.equal(ci.name, 'GitHub Actions')
653 t.equal(ci.GITHUB_ACTIONS, true)
654 assertVendorConstants('GITHUB_ACTIONS', ci, t)
655
656 delete process.env.GITHUB_ACTIONS
657 delete process.env.GITHUB_EVENT_NAME
658
659 t.end()
660 })
661
662 test('GitHub Actions - Not PR', function (t) {
663 process.env.GITHUB_ACTIONS = 'true'
664 process.env.GITHUB_EVENT_NAME = 'push'
665
666 clearModule('./')
667 const ci = require('./')
668
669 t.equal(ci.isCI, true)
670 t.equal(ci.isPR, false)
671 t.equal(ci.name, 'GitHub Actions')
672 t.equal(ci.GITHUB_ACTIONS, true)
673 assertVendorConstants('GITHUB_ACTIONS', ci, t)
674
675 delete process.env.GITHUB_ACTIONS
676 delete process.env.GITHUB_EVENT_NAME
677
678 t.end()
679 })
680
681 test('Screwdriver - PR', function (t) {
682 process.env.SCREWDRIVER = 'true'
683 process.env.SD_PULL_REQUEST = '1'
684
685 clearModule('./')
686 const ci = require('./')
687
688 t.equal(ci.isCI, true)
689 t.equal(ci.isPR, true)
690 t.equal(ci.name, 'Screwdriver')
691 t.equal(ci.SCREWDRIVER, true)
692 assertVendorConstants('SCREWDRIVER', ci, t)
693
694 delete process.env.SCREWDRIVER
695 delete process.env.SD_PULL_REQUEST
696
697 t.end()
698 })
699
700 test('Screwdriver - Not PR', function (t) {
701 process.env.SCREWDRIVER = 'true'
702 process.env.SD_PULL_REQUEST = 'false'
703
704 clearModule('./')
705 const ci = require('./')
706
707 t.equal(ci.isCI, true)
708 t.equal(ci.isPR, false)
709 t.equal(ci.name, 'Screwdriver')
710 t.equal(ci.SCREWDRIVER, true)
711 assertVendorConstants('SCREWDRIVER', ci, t)
712
713 delete process.env.SCREWDRIVER
714 delete process.env.SD_PULL_REQUEST
715
716 t.end()
717 })
718
719 test('Visual Studio App Center', function (t) {
720 process.env.APPCENTER_BUILD_ID = '1'
721
722 clearModule('./')
723 const ci = require('./')
724
725 t.equal(ci.isCI, true)
726 // t.equal(ci.isPR, false)
727 t.equal(ci.name, 'Visual Studio App Center')
728 t.equal(ci.APPCENTER, true)
729 assertVendorConstants('APPCENTER', ci, t)
730
731 delete process.env.APPCENTER
457732
458733 t.end()
459734 })
460735
461736 function assertVendorConstants (expect, ci, t) {
462737 ci._vendors.forEach(function (constant) {
463 var bool = constant === expect
738 let bool = constant === expect
464739 bool = (expect === 'SOLANO' && constant === 'TDDIUM') || bool // support deprecated option
465740 t.equal(ci[constant], bool, 'ci.' + constant)
466741 })
0 MIT License
1
2 Copyright (c) Microsoft Corporation. All rights reserved.
3
4 Permission is hereby granted, free of charge, to any person obtaining a copy
5 of this software and associated documentation files (the "Software"), to deal
6 in the Software without restriction, including without limitation the rights
7 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 copies of the Software, and to permit persons to whom the Software is
9 furnished to do so, subject to the following conditions:
10
11 The above copyright notice and this permission notice shall be included in all
12 copies or substantial portions of the Software.
13
14 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 SOFTWARE
0 MIT License
1
2 Copyright (c) Microsoft Corporation.
3
4 Permission is hereby granted, free of charge, to any person obtaining a copy
5 of this software and associated documentation files (the "Software"), to deal
6 in the Software without restriction, including without limitation the rights
7 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 copies of the Software, and to permit persons to whom the Software is
9 furnished to do so, subject to the following conditions:
10
11 The above copyright notice and this permission notice shall be included in all
12 copies or substantial portions of the Software.
13
14 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 SOFTWARE
0 # Installation
1 > `npm install --save @types/ci-info`
2
3 # Summary
4 This package contains type definitions for ci-info ( https://github.com/watson/ci-info ).
5
6 # Details
7 Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ci-info
8
9 Additional Details
10 * Last updated: Thu, 30 May 2019 19:18:07 GMT
11 * Dependencies: none
12 * Global values: none
13
14 # Credits
15 These definitions were written by Florian Keller <https://github.com/ffflorian>.
0 This is a stub types definition for @types/ci-info (https://github.com/watson/ci-info).
1
2 ci-info provides its own type definitions, so you don't need @types/ci-info installed!
+0
-58
types-ci-info/index.d.ts less more
0 // Type definitions for ci-info 2.0
1 // Project: https://github.com/watson/ci-info
2 // Definitions by: Florian Keller <https://github.com/ffflorian>
3 // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
4
5 /**
6 * Returns a boolean. Will be `true` if the code is running on a CI server,
7 * otherwise `false`.
8 *
9 * Some CI servers not listed here might still trigger the `ci.isCI`
10 * boolean to be set to `true` if they use certain vendor neutral environment
11 * variables. In those cases `ci.name` will be `null` and no vendor specific
12 * boolean will be set to `true`.
13 */
14 export const isCI: boolean;
15 /**
16 * Returns a boolean if PR detection is supported for the current CI server.
17 * Will be `true` if a PR is being tested, otherwise `false`. If PR detection is
18 * not supported for the current CI server, the value will be `null`.
19 */
20 export const isPR: boolean | null;
21 /**
22 * Returns a string containing name of the CI server the code is running on. If
23 * CI server is not detected, it returns `null`.
24 *
25 * Don't depend on the value of this string not to change for a specific vendor.
26 * If you find your self writing `ci.name === 'Travis CI'`, you most likely want
27 * to use `ci.TRAVIS` instead.
28 */
29 export const name: string | null;
30
31 export const APPVEYOR: boolean;
32 export const AZURE_PIPELINES: boolean;
33 export const BAMBOO: boolean;
34 export const BITBUCKET: boolean;
35 export const BITRISE: boolean;
36 export const BUDDY: boolean;
37 export const BUILDKITE: boolean;
38 export const CIRCLE: boolean;
39 export const CIRRUS: boolean;
40 export const CODEBUILD: boolean;
41 export const CODESHIP: boolean;
42 export const DRONE: boolean;
43 export const DSARI: boolean;
44 export const GITLAB: boolean;
45 export const GOCD: boolean;
46 export const HUDSON: boolean;
47 export const JENKINS: boolean;
48 export const MAGNUM: boolean;
49 export const NETLIFY: boolean;
50 export const SAIL: boolean;
51 export const SEMAPHORE: boolean;
52 export const SHIPPABLE: boolean;
53 export const SOLANO: boolean;
54 export const STRIDER: boolean;
55 export const TASKCLUSTER: boolean;
56 export const TEAMCITY: boolean;
57 export const TRAVIS: boolean;
00 {
11 "name": "@types/ci-info",
2 "version": "2.0.0",
3 "description": "TypeScript definitions for ci-info",
2 "version": "3.1.0",
3 "typings": null,
4 "description": "Stub TypeScript definitions entry for ci-info, which provides its own types definitions",
5 "main": "",
6 "scripts": {},
7 "author": "",
48 "license": "MIT",
5 "contributors": [
6 {
7 "name": "Florian Keller",
8 "url": "https://github.com/ffflorian",
9 "githubUsername": "ffflorian"
10 }
11 ],
12 "main": "",
13 "types": "index",
14 "repository": {
15 "type": "git",
16 "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
17 "directory": "types/ci-info"
18 },
19 "scripts": {},
20 "dependencies": {},
21 "typesPublisherContentHash": "e6c493e61b2974ff40875edce1616a42e098b7792efea9c9e3eb433ccdecbaae",
22 "typeScriptVersion": "2.0"
9 "dependencies": {
10 "ci-info": "*"
11 }
2312 }
1111 "pr": "SYSTEM_PULLREQUEST_PULLREQUESTID"
1212 },
1313 {
14 "name": "Appcircle",
15 "constant": "APPCIRCLE",
16 "env": "AC_APPCIRCLE"
17 },
18 {
1419 "name": "Bamboo",
1520 "constant": "BAMBOO",
1621 "env": "bamboo_planKey"
5762 "env": "CODEBUILD_BUILD_ARN"
5863 },
5964 {
65 "name": "Codefresh",
66 "constant": "CODEFRESH",
67 "env": "CF_BUILD_ID",
68 "pr": { "any": ["CF_PULL_REQUEST_NUMBER", "CF_PULL_REQUEST_ID"] }
69 },
70 {
6071 "name": "Codeship",
6172 "constant": "CODESHIP",
6273 "env": { "CI_NAME": "codeship" }
7384 "env": "DSARI"
7485 },
7586 {
87 "name": "GitHub Actions",
88 "constant": "GITHUB_ACTIONS",
89 "env": "GITHUB_ACTIONS",
90 "pr": { "GITHUB_EVENT_NAME": "pull_request" }
91 },
92 {
7693 "name": "GitLab CI",
7794 "constant": "GITLAB",
78 "env": "GITLAB_CI"
95 "env": "GITLAB_CI",
96 "pr": "CI_MERGE_REQUEST_ID"
7997 },
8098 {
8199 "name": "GoCD",
82100 "constant": "GOCD",
83101 "env": "GO_PIPELINE_LABEL"
102 },
103 {
104 "name": "LayerCI",
105 "constant": "LAYERCI",
106 "env": "LAYERCI",
107 "pr": "LAYERCI_PULL_REQUEST"
84108 },
85109 {
86110 "name": "Hudson",
101125 {
102126 "name": "Netlify CI",
103127 "constant": "NETLIFY",
104 "env": "NETLIFY_BUILD_BASE",
128 "env": "NETLIFY",
105129 "pr": { "env": "PULL_REQUEST", "ne": "false" }
130 },
131 {
132 "name": "Nevercode",
133 "constant": "NEVERCODE",
134 "env": "NEVERCODE",
135 "pr": { "env": "NEVERCODE_PULL_REQUEST", "ne": "false" }
136 },
137 {
138 "name": "Render",
139 "constant": "RENDER",
140 "env": "RENDER",
141 "pr": { "IS_PULL_REQUEST": "true" }
106142 },
107143 {
108144 "name": "Sail CI",
117153 "pr": "PULL_REQUEST_NUMBER"
118154 },
119155 {
156 "name": "Screwdriver",
157 "constant": "SCREWDRIVER",
158 "env": "SCREWDRIVER",
159 "pr": { "env": "SD_PULL_REQUEST", "ne": "false" }
160 },
161 {
120162 "name": "Shippable",
121163 "constant": "SHIPPABLE",
122164 "env": "SHIPPABLE",
148190 "constant": "TRAVIS",
149191 "env": "TRAVIS",
150192 "pr": { "env": "TRAVIS_PULL_REQUEST", "ne": "false" }
193 },
194 {
195 "name": "Vercel",
196 "constant": "VERCEL",
197 "env": "NOW_BUILDER"
198 },
199 {
200 "name": "Visual Studio App Center",
201 "constant": "APPCENTER",
202 "env": "APPCENTER_BUILD_ID"
151203 }
152204 ]