From 57b7f346a2973030ccd541e96c84da3347d70cad Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Wed, 15 Nov 2023 16:55:04 +0100 Subject: [PATCH] feat: Add function to download CLI binary (#456) --- CHANGELOG.md | 16 ++++++++++++---- index.d.ts | 3 ++- package.json | 2 +- src/index.js | 4 ++++ yarn.lock | 8 ++++---- 5 files changed, 23 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d3aecdf..2af2a3a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ # Changelog -- "Would I rather be feared or loved? Easy. Both. I want people to be afraid of how much they love me." — Michael Scott +- "Would I rather be feared or loved? Easy. Both. I want people to be afraid of + how much they love me." — Michael Scott + +## Unreleased + +- feat: Add function to download CLI binary (#456) ## 1.20.1 @@ -25,8 +30,10 @@ ## 1.18.9 -- ref: Update sentry-cli to latest v1 version and refresh GH actions (#368) by @kamilogorek -- docs: Update dryRun documentation to reflect auto-configuration. (#366) by @fiveable-jferg +- ref: Update sentry-cli to latest v1 version and refresh GH actions (#368) by + @kamilogorek +- docs: Update dryRun documentation to reflect auto-configuration. (#366) by + @fiveable-jferg ## 1.18.8 @@ -34,7 +41,8 @@ ## 1.18.7 -- deps: Remove webpack from peerDep and move info about ver to readme (#354) by @kamilogorek +- deps: Remove webpack from peerDep and move info about ver to readme (#354) by + @kamilogorek - misc: Correct 1.18.6 changelog (#353) by @kamilogorek ## 1.18.6 diff --git a/index.d.ts b/index.d.ts index de4d7b8..78c4e57 100644 --- a/index.d.ts +++ b/index.d.ts @@ -130,7 +130,8 @@ declare namespace SentryCliPlugin { declare class SentryCliPlugin implements WebpackPluginInstance { options: SentryCliPlugin.SentryCliPluginOptions; constructor(options: SentryCliPlugin.SentryCliPluginOptions); - static cliBinaryExists(): string; + static cliBinaryExists(): boolean; + static downloadCliBinary(logger: { log(...args: unknown[]) }): Promise; apply(compiler: Compiler): void; } diff --git a/package.json b/package.json index f126412..5e2f1f1 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "node": ">= 8" }, "dependencies": { - "@sentry/cli": "^1.75.1", + "@sentry/cli": "^1.77.1", "webpack-sources": "^2.0.0 || ^3.0.0" }, "devDependencies": { diff --git a/src/index.js b/src/index.js index 7d631fa..b737cd7 100644 --- a/src/index.js +++ b/src/index.js @@ -202,6 +202,10 @@ class SentryCliPlugin { return fs.existsSync(SentryCli.getPath()); } + static downloadCliBinary(logger) { + return SentryCli.downloadBinary(logger); + } + /** Creates a new Sentry CLI instance. */ getSentryCli() { const cli = new SentryCli(this.options.configFile, { diff --git a/yarn.lock b/yarn.lock index 64b8df5..ea0e96c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -361,10 +361,10 @@ "@types/istanbul-reports" "^1.1.1" "@types/yargs" "^13.0.0" -"@sentry/cli@^1.75.1": - version "1.75.1" - resolved "https://registry.yarnpkg.com/@sentry/cli/-/cli-1.75.1.tgz#49fd43a0619de1c1fa802522a741c42171bf6d2a" - integrity sha512-LjVmzeiyJyHQH/0ZKeaYwHSrUcgh+FV1fYlkf+fSSRQiuvijB7vln0CisbxJnMgp4k8qoQ/ZSmTcfv6FGMKIEA== +"@sentry/cli@^1.77.1": + version "1.77.1" + resolved "https://registry.yarnpkg.com/@sentry/cli/-/cli-1.77.1.tgz#ebcf884712ef6c3c75443f491ec16f6a22148aec" + integrity sha512-OtJ7U9LeuPUAY/xow9wwcjM9w42IJIpDtClTKI/RliE685vd/OJUIpiAvebHNthDYpQynvwb/0iuF4fonh+CKw== dependencies: https-proxy-agent "^5.0.0" mkdirp "^0.5.5"