@honeybadger-io/webpack
Advanced tools
Comparing version 1.0.3 to 1.0.4
@@ -8,2 +8,2 @@ 'use strict'; | ||
var REQUIRED_FIELDS = exports.REQUIRED_FIELDS = ['api_key', 'assets_url']; | ||
var REQUIRED_FIELDS = exports.REQUIRED_FIELDS = ['apiKey', 'assetsUrl']; |
@@ -43,4 +43,4 @@ 'use strict'; | ||
function HoneybadgerSourceMapPlugin(_ref) { | ||
var api_key = _ref.api_key, | ||
assets_url = _ref.assets_url, | ||
var apiKey = _ref.apiKey, | ||
assetsUrl = _ref.assetsUrl, | ||
_ref$revision = _ref.revision, | ||
@@ -51,12 +51,10 @@ revision = _ref$revision === undefined ? "master" : _ref$revision, | ||
_ref$ignoreErrors = _ref.ignoreErrors, | ||
ignoreErrors = _ref$ignoreErrors === undefined ? false : _ref$ignoreErrors, | ||
source_map = _ref.source_map; | ||
ignoreErrors = _ref$ignoreErrors === undefined ? false : _ref$ignoreErrors; | ||
(0, _classCallCheck3.default)(this, HoneybadgerSourceMapPlugin); | ||
this.api_key = api_key; | ||
this.assets_url = assets_url; | ||
this.apiKey = apiKey; | ||
this.assetsUrl = assetsUrl; | ||
this.revision = revision; | ||
this.silent = silent; | ||
this.ignoreErrors = ignoreErrors; | ||
this.source_map = source_map; | ||
} | ||
@@ -155,4 +153,4 @@ | ||
var form = req.form(); | ||
form.append('api_key', this.api_key); | ||
form.append('minified_url', this.assets_url + '/' + sourceFile); | ||
form.append('api_key', this.apiKey); | ||
form.append('minified_url', this.assetsUrl + '/' + sourceFile); | ||
form.append('minified_file', compilation.assets[sourceFile].source(), { | ||
@@ -159,0 +157,0 @@ filename: sourceFile, |
{ | ||
"name": "@honeybadger-io/webpack", | ||
"version": "1.0.3", | ||
"description": "Webpack plugin to upload a minified js source map to Honeybadger's API - http://docs.honeybadger.io/guides/source-maps.html", | ||
"version": "1.0.4", | ||
"description": "Webpack plugin to upload source maps to Honeybadger's API - http://docs.honeybadger.io/guides/source-maps.html", | ||
"main": "./dist/HoneybadgerSourceMapPlugin.js", | ||
@@ -25,6 +25,8 @@ "scripts": { | ||
"source map", | ||
"minified js" | ||
"minified js", | ||
"honeybadger", | ||
"honey badger" | ||
], | ||
"author": "Honeybadger.io", | ||
"license": "ISC", | ||
"author": "Honeybadger.io <support@honeybadger.io> (https://www.honeybadger.io/)", | ||
"license": "MIT", | ||
"bugs": { | ||
@@ -31,0 +33,0 @@ "url": "https://github.com/honeybadger-io/honeybadger-webpack/issues" |
# Honeybadger's Webpack Source Map Plugin | ||
[![CircleCI honeybadger-io/honeybadger-webpack](https://circleci.com/gh/honeybadger-io/honeybadger-webpack.svg?style=shield&circle-token=73022b639c6abad8d31c13cb1225c14eb5e37631)](https://circleci.com/gh/honeybadger-io/honeybadger-webpack) | ||
This is a [webpack](https://webpack.js.org/) plugin to upload javascript | ||
@@ -25,10 +27,10 @@ sourcemaps to [Honeybadger's](https://honeybadger.io/) | ||
<dl> | ||
<dt><code>api_key</code> (required)</dt> | ||
<dt><code>apiKey</code> (required)</dt> | ||
<dd>The API key of your Honeybadger project</dd> | ||
<dt><code>assets_url</code> (required)</dt> | ||
<dd>The base URL to production assets (scheme://host/path)<code>*</code><a href="https://docs.honeybadger.io/guides/source-maps.html#wildcards">wildcards</a> are supported. The plugin combines <code>assets_url</code> with the generated minified js file name to build the API parameter <code>minified_url</code></dd> | ||
<dt><code>assetsUrl</code> (required)</dt> | ||
<dd>The base URL to production assets (scheme://host/path)<code>*</code><a href="https://docs.honeybadger.io/guides/source-maps.html#wildcards">wildcards</a> are supported. The plugin combines <code>assetsUrl</code> with the generated minified js file name to build the API parameter <code>minified_url</code></dd> | ||
<dt><code>revision</code> (optional — default: "master")</dt> | ||
<dd>The deploy revision (i.e. commit sha) that your source map applies to. This could also be a code version. For best results, set it to something unique every time your code changes. The <code>revision</code> option must also be configured in <a href="https://github.com/honeybadger-io/honeybadger-js#advanced-configuration">honeybadger.js</a>.</dd> | ||
<dd>The deploy revision (i.e. commit sha) that your source map applies to. This could also be a code version. For best results, set it to something unique every time your code changes.</dd> | ||
@@ -49,4 +51,4 @@ <dt><code>silent</code> (optional — default: "null/false")</dt> | ||
plugins: [new HoneybadgerSourceMapPlugin({ | ||
api_key: 'abc123', | ||
assets_url: ASSETS_URL, | ||
apiKey: 'abc123', | ||
assetsUrl: ASSETS_URL, | ||
revision: 'master' | ||
@@ -71,4 +73,4 @@ })] | ||
new HoneybadgerSourceMapPlugin({ | ||
api_key: process.env.HONEYBADGER_API_KEY, | ||
assets_url: process.env.ASSETS_URL, | ||
apiKey: process.env.HONEYBADGER_API_KEY, | ||
assetsUrl: process.env.ASSETS_URL, | ||
silent: false, | ||
@@ -75,0 +77,0 @@ ignoreErrors: false, |
export const ENDPOINT = 'https://api.honeybadger.io/v1/source_maps '; | ||
export const REQUIRED_FIELDS = [ | ||
'api_key', | ||
'assets_url', | ||
'apiKey', | ||
'assetsUrl', | ||
]; |
@@ -11,15 +11,13 @@ import async from 'async'; | ||
constructor({ | ||
api_key, | ||
assets_url, | ||
apiKey, | ||
assetsUrl, | ||
revision = "master", | ||
silent = false, | ||
ignoreErrors = false, | ||
source_map | ||
ignoreErrors = false | ||
}) { | ||
this.api_key = api_key; | ||
this.assets_url = assets_url; | ||
this.apiKey = apiKey; | ||
this.assetsUrl = assetsUrl; | ||
this.revision = revision; | ||
this.silent = silent; | ||
this.ignoreErrors = ignoreErrors; | ||
this.source_map = source_map; | ||
} | ||
@@ -94,4 +92,4 @@ | ||
const form = req.form(); | ||
form.append('api_key', this.api_key); | ||
form.append('minified_url', `${this.assets_url}/${sourceFile}`); | ||
form.append('api_key', this.apiKey); | ||
form.append('minified_url', `${this.assetsUrl}/${sourceFile}`); | ||
form.append('minified_file', compilation.assets[sourceFile].source(), { | ||
@@ -98,0 +96,0 @@ filename: sourceFile, |
Sorry, the diff of this file is not supported yet
spdx disjunction for an artifact's license information
Licensespdx disjunction for an artifact's license information
Found 1 instance in 1 package
spdx disjunction for an artifact's license information
Licensespdx disjunction for an artifact's license information
Found 1 instance in 1 package
17938
101
300