@dotcom-reliability-kit/app-info
Advanced tools
Comparing version 2.2.0 to 2.3.0
@@ -13,3 +13,5 @@ export const systemCode: string | null; | ||
export declare let cloudProvider: string | null; | ||
export declare let herokuAppId: string | null; | ||
export declare let herokuDynoId: string | null; | ||
export default module.exports; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -47,3 +47,3 @@ const path = require('node:path'); | ||
/** | ||
* Extract the proceess type from a Heroku dyno name. | ||
* Extract the process type from a Heroku dyno name. | ||
* | ||
@@ -153,3 +153,19 @@ * @param {string} dyno | ||
*/ | ||
cloudProvider: cloudProvider() | ||
cloudProvider: cloudProvider(), | ||
/** | ||
* The heroku application Id. | ||
* | ||
* @readonly | ||
* @type {string | null} | ||
*/ | ||
herokuAppId: process.env.HEROKU_APP_ID || null, | ||
/** | ||
* The heroku dyno Id. | ||
* | ||
* @readonly | ||
* @type {string | null} | ||
*/ | ||
herokuDynoId: process.env.HEROKU_DYNO_ID || null | ||
}; | ||
@@ -156,0 +172,0 @@ |
{ | ||
"name": "@dotcom-reliability-kit/app-info", | ||
"version": "2.2.0", | ||
"version": "2.3.0", | ||
"description": "A utility to get application info in a consistent way.", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -14,3 +14,5 @@ | ||
* [`appInfo.processType`](#appinfoprocesstype) | ||
* [`appInfo.cloudProvider](#appinfocloudprovider) | ||
* [`appInfo.cloudProvider`](#appinfocloudprovider) | ||
* [`appInfo.herokuAppId`](#appinfoherokuappId) | ||
* [`appInfo.herokuDynoId`](#appinfoherokudynoId) | ||
* [Contributing](#contributing) | ||
@@ -88,2 +90,14 @@ * [License](#license) | ||
### `appInfo.herokuAppId` | ||
Get the `process.env.HEROKU_APP_ID` which is the unique identifier for the application.e.g "9daa2797-e49b-4624-932f-ec3f9688e3da" | ||
This is derived from the dyno metadata | ||
### `appInfo.herokuDynoId` | ||
Get the `process.env.HEROKU_DYNO_ID` which is the dyno identifier | ||
This is derived from the dyno metadata | ||
## Contributing | ||
@@ -90,0 +104,0 @@ |
Sorry, the diff of this file is not supported yet
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
10420
170
110
18