@vercel/devlow-bench
Advanced tools
Comparing version 0.3.1 to 0.3.2
import datadogApiClient from "@datadog/datadog-api-client"; | ||
import os from "os"; | ||
import { command } from "../shell.js"; | ||
function toIdentifier(str) { | ||
@@ -11,2 +12,14 @@ return str.replace(/\//g, ".").replace(/ /g, "_"); | ||
}; | ||
const GIT_SHA = process.env.GITHUB_SHA ?? | ||
(await (async () => { | ||
const cmd = command("git", ["rev-parse", "HEAD"]); | ||
await cmd.ok(); | ||
return cmd.output.trim(); | ||
})()); | ||
const GIT_BRANCH = process.env.GITHUB_REF_NAME ?? | ||
(await (async () => { | ||
const cmd = command("git", ["rev-parse", "--abbrev-ref", "HEAD"]); | ||
await cmd.ok(); | ||
return cmd.output.trim(); | ||
})()); | ||
export default function createInterface({ apiKey = process.env.DATADOG_API_KEY, appKey = process.env.DATADOG_APP_KEY, host = process.env.DATADOG_HOST || os.hostname(), } = {}) { | ||
@@ -25,2 +38,4 @@ if (!apiKey) | ||
`node_version:${process.version}`, | ||
`git_sha:${GIT_SHA}`, | ||
`git_branch:${GIT_BRANCH}`, | ||
]; | ||
@@ -27,0 +42,0 @@ const configuration = datadogApiClient.client.createConfiguration({ |
{ | ||
"name": "@vercel/devlow-bench", | ||
"version": "0.3.1", | ||
"version": "0.3.2", | ||
"description": "Benchmarking tool for the developer workflow", | ||
@@ -5,0 +5,0 @@ "publishConfig": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
51457
1211
16