@bugsnag/cli
Advanced tools
Comparing version 2.6.1 to 2.6.2
# Changelog | ||
## 2.6.2 (2024-10-17) | ||
### Fixes | ||
- Ensure that the node package is configured correctly so that you can run `npx @bugsnag/cli` and `yarn bugsnag-cli`. [144](https://github.com/bugsnag/bugsnag-cli/pull/144) | ||
- Replace the axios dependency with fetch to reduce the size of the package. [145](https://github.com/bugsnag/bugsnag-cli/pull/144) | ||
## 2.6.1 (2024-09-18) | ||
# Fixes | ||
### Fixes | ||
- Ensure that we only pass either `--code-bundle-id` or `--version-code`/`--version-name`/`--bundle-version` to the upload API. [140](https://github.com/bugsnag/bugsnag-cli/pull/140) | ||
@@ -6,0 +12,0 @@ |
@@ -1,2 +0,1 @@ | ||
const axios = require('axios'); | ||
const fs = require('fs'); | ||
@@ -6,2 +5,4 @@ const path = require('path'); | ||
const yaml = require('js-yaml'); | ||
const createWriteStream = require('fs').createWriteStream; | ||
const Readable = require('stream').Readable; | ||
@@ -55,3 +56,3 @@ const supportedPlatformsConfig = fs.readFileSync(path.join(__dirname, 'supported-platforms.yml'), 'utf8'); | ||
try { | ||
const binDir = path.resolve(process.cwd(),'..','..','.bin'); | ||
const binDir = path.resolve(process.cwd(),'bin'); | ||
if (!fs.existsSync(binDir)) { | ||
@@ -61,5 +62,10 @@ fs.mkdirSync(binDir, { recursive: true }); | ||
const response = await axios.get(downloadUrl, { responseType: 'arraybuffer' }); | ||
const binaryData = response.data; | ||
fs.writeFileSync(outputPath, binaryData, 'binary'); | ||
const fileName = downloadUrl.split("/").pop(); | ||
const resp = await fetch(downloadUrl); | ||
if (resp.ok && resp.body) { | ||
let writer = createWriteStream(outputPath); | ||
Readable.fromWeb(resp.body).pipe(writer); | ||
} | ||
fs.chmodSync(outputPath, '755'); | ||
@@ -75,4 +81,4 @@ console.log('Binary downloaded successfully!'); | ||
const binaryUrl = `${repoUrl}/releases/download/v${version}/${platformMetadata.ARTIFACT_NAME}`; | ||
const binaryOutputPath = path.join(process.cwd(),'..','..','.bin', platformMetadata.BINARY_NAME); | ||
const binaryOutputPath = path.join(process.cwd(),'bin', platformMetadata.BINARY_NAME); | ||
downloadBinaryFromGitHub(binaryUrl, binaryOutputPath); |
{ | ||
"name": "@bugsnag/cli", | ||
"version": "2.6.1", | ||
"version": "2.6.2", | ||
"description": "BugSnag CLI", | ||
@@ -23,3 +23,2 @@ "main": "install.js", | ||
"dependencies": { | ||
"axios": "^1.7.4", | ||
"js-yaml": "^4.1.0" | ||
@@ -29,2 +28,3 @@ }, | ||
"install.js", | ||
"bin/bugsnag-cli", | ||
"supported-platforms.yml" | ||
@@ -31,0 +31,0 @@ ], |
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
19580
1
7
66
2
1
- Removedaxios@^1.7.4
- Removedasynckit@0.4.0(transitive)
- Removedaxios@1.7.9(transitive)
- Removedcombined-stream@1.0.8(transitive)
- Removeddelayed-stream@1.0.0(transitive)
- Removedfollow-redirects@1.15.9(transitive)
- Removedform-data@4.0.1(transitive)
- Removedmime-db@1.52.0(transitive)
- Removedmime-types@2.1.35(transitive)
- Removedproxy-from-env@1.1.0(transitive)