Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
is-ci
Advanced tools
Package description
The is-ci npm package is designed to detect if your code is running in a Continuous Integration (CI) environment. It provides a simple interface to check whether the current execution context is within a CI service by checking environment variables that are typically set by CI services.
Detect CI environment
This feature allows you to detect if your application or script is running in a CI environment. The package exports a boolean value that is true if it detects a CI environment based on environment variables. This is useful for altering behavior, such as skipping interactive prompts or enabling more verbose logging, when running in CI.
"use strict";\nconst isCI = require('is-ci');\n\nif (isCI) {\n console.log('Running in a CI environment');\n} else {\n console.log('Not running in a CI environment');\n}
Similar to is-ci, ci-info provides information about the CI environment the code is running in. It offers more detailed information compared to is-ci, such as the name of the CI service and whether the environment is a pull request. This makes ci-info a more versatile choice if you need more than just a boolean check.
is-ci-cli extends the basic functionality of is-ci by providing a command-line interface (CLI). This allows users to check for a CI environment directly from the command line without writing any JavaScript code. While is-ci is primarily used within scripts, is-ci-cli can be used directly in shell scripts or CI configuration files.
Changelog
v3.0.0
Breaking changes:
ci-info
v3. This drops support for EOL node versions 6, 13Readme
Returns true
if the current environment is a Continuous Integration
server.
Please open an issue if your CI server isn't properly detected :)
npm install is-ci --save
const isCI = require('is-ci')
if (isCI) {
console.log('The code is running on a CI server')
}
For CLI usage you need to have the is-ci
executable in your PATH
.
There's a few ways to do that:
npm install is-ci -g
./node_modules/.bin/is-ci
is-ci && echo "This is a CI server"
Refer to ci-info docs for all supported CI's
FAQs
Detect if the current environment is a CI server
The npm package is-ci receives a total of 15,438,146 weekly downloads. As such, is-ci popularity was classified as popular.
We found that is-ci demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.