pax_global_header00006660000000000000000000000064147252534470014527gustar00rootroot0000000000000052 comment=81c6f7757e0d5bf00866b078a69035d597b55e09 watson-is-ci-81c6f77/000077500000000000000000000000001472525344700144135ustar00rootroot00000000000000watson-is-ci-81c6f77/.github/000077500000000000000000000000001472525344700157535ustar00rootroot00000000000000watson-is-ci-81c6f77/.github/workflows/000077500000000000000000000000001472525344700200105ustar00rootroot00000000000000watson-is-ci-81c6f77/.github/workflows/tests.yml000066400000000000000000000006231472525344700216760ustar00rootroot00000000000000name: Tests on: [push, pull_request] jobs: build: runs-on: ubuntu-latest strategy: matrix: node-version: [8, 10, 12, 14, 16, 17] steps: - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} - run: npm install - run: npm test watson-is-ci-81c6f77/.gitignore000066400000000000000000000065341472525344700164130ustar00rootroot00000000000000### Bower ### bower_components .bower-cache .bower-registry .bower-tmp ### grunt ### # Grunt usually compiles files inside this directory dist/ # Grunt usually preprocesses files such as coffeescript, compass... inside the .tmp directory .tmp/ ### Linux ### *~ # temporary files which can be created if a process still has a handle open of a deleted file .fuse_hidden* # KDE directory preferences .directory # Linux trash folder which might appear on any partition or disk .Trash-* # .nfs files are created when an open file is removed but is still being accessed .nfs* ### macOS ### # General .DS_Store .AppleDouble .LSOverride # Icon must end with two \r Icon # Thumbnails ._* # Files that might appear in the root of a volume .DocumentRevisions-V100 .fseventsd .Spotlight-V100 .TemporaryItems .Trashes .VolumeIcon.icns .com.apple.timemachine.donotpresent # Directories potentially created on remote AFP share .AppleDB .AppleDesktop Network Trash Folder Temporary Items .apdisk ### Node ### # Logs logs *.log npm-debug.log* yarn-debug.log* yarn-error.log* lerna-debug.log* # Diagnostic reports (https://nodejs.org/api/report.html) report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json # Runtime data pids *.pid *.seed *.pid.lock # Directory for instrumented libs generated by jscoverage/JSCover lib-cov # Coverage directory used by tools like istanbul coverage *.lcov # nyc test coverage .nyc_output # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) .grunt # Bower dependency directory (https://bower.io/) # node-waf configuration .lock-wscript # Compiled binary addons (https://nodejs.org/api/addons.html) build/Release # Dependency directories node_modules/ jspm_packages/ # TypeScript v1 declaration files typings/ # TypeScript cache *.tsbuildinfo # Optional npm cache directory .npm # Optional eslint cache .eslintcache # Optional stylelint cache .stylelintcache # Microbundle cache .rpt2_cache/ .rts2_cache_cjs/ .rts2_cache_es/ .rts2_cache_umd/ # Optional REPL history .node_repl_history # Output of 'npm pack' *.tgz # Yarn Integrity file .yarn-integrity # dotenv environment variables file .env .env.test .env*.local # parcel-bundler cache (https://parceljs.org/) .cache .parcel-cache # Next.js build output .next # Nuxt.js build / generate output .nuxt dist # Gatsby files .cache/ # Comment in the public line in if your project uses Gatsby and not Next.js # https://nextjs.org/blog/next-9-1#public-directory-support # public # vuepress build output .vuepress/dist # Serverless directories .serverless/ # FuseBox cache .fusebox/ # DynamoDB Local files .dynamodb/ # TernJS port file .tern-port # Stores VSCode versions used for testing VSCode extensions .vscode-test ### Sass ### .sass-cache/ *.css.map *.sass.map *.scss.map ### Windows ### # Windows thumbnail cache files Thumbs.db Thumbs.db:encryptable ehthumbs.db ehthumbs_vista.db # Dump file *.stackdump # Folder config file [Dd]esktop.ini # Recycle Bin used on file shares $RECYCLE.BIN/ # Windows Installer files *.cab *.msi *.msix *.msm *.msp # Windows shortcuts *.lnk ### yarn ### # https://yarnpkg.com/advanced/qa#which-files-should-be-gitignored .yarn/* !.yarn/releases !.yarn/plugins !.yarn/sdks !.yarn/versions # if you are NOT using Zero-installs, then: # comment the following lines !.yarn/cache # and uncomment the following lines # .pnp.* package-lock.json yarn.lock watson-is-ci-81c6f77/.npmignore000066400000000000000000000000341472525344700164070ustar00rootroot00000000000000.travis.yml test.js .github watson-is-ci-81c6f77/CHANGELOG.md000066400000000000000000000012431472525344700162240ustar00rootroot00000000000000# Changelog ## v4.1.0 - add `types` ([116335d](https://github.com/watson/is-ci/commit/116335d)) ## v4.0.0 - update to `ci-info` v4 ([658c179](https://github.com/watson/is-ci/commit/658c179)) ## v3.0.1 - remove `.github` folder from published files ([dd15229](https://github.com/watson/is-ci/commit/dd15229)) ## v3.0.0 Breaking changes: - update to `ci-info` v3. This drops support for EOL node versions 6, 13 ## v2.0.0 Breaking changes: - Drop support for Node.js end-of-life versions: 0.10, 0.12, 4, 5, 7, and 9 Other changes: See [ci-info changelog](https://github.com/watson/ci-info/blob/master/CHANGELOG.md#v200) for a list of newly supported CI servers. watson-is-ci-81c6f77/LICENSE000066400000000000000000000021031472525344700154140ustar00rootroot00000000000000The MIT License (MIT) Copyright (c) 2016-2021 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. watson-is-ci-81c6f77/README.md000066400000000000000000000024261472525344700156760ustar00rootroot00000000000000# is-ci Returns `true` if the current environment is a Continuous Integration server. Please [open an issue](https://github.com/watson/is-ci/issues) if your CI server isn't properly detected :) [![npm](https://img.shields.io/npm/v/is-ci.svg)](https://www.npmjs.com/package/is-ci) [![Tests](https://github.com/watson/is-ci/workflows/Tests/badge.svg)](https://github.com/watson/is-ci/actions) [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://github.com/feross/standard) ## Installation ```bash npm install is-ci --save ``` ## Programmatic Usage ```js const isCI = require('is-ci') if (isCI) { console.log('The code is running on a CI server') } ``` ## CLI Usage For CLI usage you need to have the `is-ci` executable in your `PATH`. There's a few ways to do that: - Either install the module globally using `npm install is-ci -g` - Or add the module as a dependency to your app in which case it can be used inside your package.json scripts as is - Or provide the full path to the executable, e.g. `./node_modules/.bin/is-ci` ```bash is-ci && echo "This is a CI server" ``` ## Supported CI tools Refer to [ci-info](https://github.com/watson/ci-info#supported-ci-tools) docs for all supported CI's ## License [MIT](LICENSE) watson-is-ci-81c6f77/bin.js000077500000000000000000000001061472525344700155210ustar00rootroot00000000000000#!/usr/bin/env node 'use strict' process.exit(require('./') ? 0 : 1) watson-is-ci-81c6f77/index.d.ts000066400000000000000000000000601472525344700163100ustar00rootroot00000000000000import { isCI } from "ci-info"; export = isCI; watson-is-ci-81c6f77/index.js000066400000000000000000000000671472525344700160630ustar00rootroot00000000000000'use strict' module.exports = require('ci-info').isCI watson-is-ci-81c6f77/package.json000066400000000000000000000021741472525344700167050ustar00rootroot00000000000000{ "name": "is-ci", "version": "4.1.0", "description": "Detect if the current environment is a CI server", "bin": "bin.js", "type": "commonjs", "main": "index.js", "types": "index.d.ts", "author": "Thomas Watson Steen (https://twitter.com/wa7son)", "license": "MIT", "repository": { "type": "git", "url": "git+https://github.com/watson/is-ci.git" }, "bugs": { "url": "https://github.com/watson/is-ci/issues" }, "homepage": "https://github.com/watson/is-ci", "contributors": [ { "name": "Thomas Watson", "url": "https://github.com/watson" }, { "name": "Sibiraj", "url": "https://github.com/sibiraj-s" } ], "funding": [ { "type": "github", "url": "https://github.com/sponsors/sibiraj-s" } ], "keywords": [ "ci", "continuous", "integration", "test", "detect" ], "coordinates": [ 55.778272, 12.593116 ], "scripts": { "test": "standard && node test.js" }, "dependencies": { "ci-info": "^4.1.0" }, "devDependencies": { "clear-module": "^4.1.2", "standard": "^17.1.2" } } watson-is-ci-81c6f77/test.js000066400000000000000000000006051472525344700157310ustar00rootroot00000000000000'use strict' const assert = require('assert') const clearModule = require('clear-module') process.env.CI = 'true' let isCI = require('./') assert(isCI) delete process.env.CI delete process.env.CONTINUOUS_INTEGRATION delete process.env.BUILD_NUMBER delete process.env.TRAVIS delete process.env.GITHUB_ACTIONS clearModule('./') clearModule('ci-info') isCI = require('./') assert(!isCI)