Security News
Opengrep Emerges as Open Source Alternative Amid Semgrep Licensing Controversy
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
@dotcom-reliability-kit/app-info
Advanced tools
A utility to get application info in a consistent way.
A utility to get application information (e.g. the system code) in a consistent way. This module is part of FT.com Reliability Kit.
Install @dotcom-reliability-kit/app-info
as a dependency:
npm install --save @dotcom-reliability-kit/app-info
Include in your code:
import appInfo from '@dotcom-reliability-kit/app-info';
// or
const appInfo = require('@dotcom-reliability-kit/app-info');
The appInfo
object has several properties which can be used to access application information.
appInfo.commitHash
Get the commit hash that the application last deployed. This will be a string (if process.env.HEROKU_SLUG_COMMIT
is defined) or null
otherwise. This relies on the Heroku Dyno metadata labs feature and will not be present in local development.
appInfo.environment
Get the application environment, normally either development
or production
. This will be a string, using process.env.NODE_ENV
and defaulting to development
.
appInfo.region
Get the application Heroku region. This will be a string (if process.env.REGION
is defined) or null
otherwise.
appInfo.releaseDate
Get the application Heroku release date. This will be a string (if process.env.HEROKU_RELEASE_CREATED_AT
is defined) or null
otherwise. This relies on the Heroku Dyno metadata labs feature and will not be present in local development.
appInfo.releaseVersion
Get the application Heroku release version. This will be a string (if process.env.HEROKU_RELEASE_VERSION
is defined) or null
otherwise. This relies on the Heroku Dyno metadata labs feature and will not be present in local development.
appInfo.systemCode
Get the application's Biz Ops system code. This will be a string (if process.env.SYSTEM_CODE
is defined), if not then it will be read from the name
property of $CWD/package.json
, if neither of these exist then it will be set to null
.
If the system code is read from the application's package.json
file then it will be stripped of any "ft-"
prefix – this is a legacy name and our app system codes do not begin with it.
See the central contributing guide for Reliability Kit.
Licensed under the MIT license.
Copyright © 2022, The Financial Times Ltd.
FAQs
A utility to get application info in a consistent way.
The npm package @dotcom-reliability-kit/app-info receives a total of 7,055 weekly downloads. As such, @dotcom-reliability-kit/app-info popularity was classified as popular.
We found that @dotcom-reliability-kit/app-info demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.