Skip to content
This repository was archived by the owner on Nov 20, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ declare namespace SentryCliPlugin {
declare class SentryCliPlugin implements WebpackPluginInstance {
options: SentryCliPlugin.SentryCliPluginOptions;
constructor(options: SentryCliPlugin.SentryCliPluginOptions);
static cliBinaryExists(): string;
apply(compiler: Compiler): void;
}

Expand Down
5 changes: 5 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const SentryCli = require('@sentry/cli');
const fs = require('fs');
const path = require('path');
const util = require('util');
const { RawSource } = require('webpack-sources');
Expand Down Expand Up @@ -193,6 +194,10 @@ class SentryCliPlugin {
return this.options.dryRun === true;
}

static cliBinaryExists() {
return fs.existsSync(SentryCli.getPath());
}

/** Creates a new Sentry CLI instance. */
getSentryCli() {
const cli = new SentryCli(this.options.configFile, {
Expand Down