@flareapp/flare-webpack-plugin-sourcemap
Advanced tools
Comparing version 1.0.4 to 1.0.5
@@ -87,4 +87,5 @@ (function (factory) { | ||
return chunks.reduce(function (sourcemaps, currentChunk) { | ||
var filename = currentChunk.files.find(function (file) { return /\.js$/.test(file); }); | ||
var sourcemapUrl = currentChunk.files.find(function (file) { return /\.js\.map$/.test(file); }); | ||
var filename = currentChunk.files.find(function (file) { return /\.js/.test(file); }); | ||
var sourcemapUrl = currentChunk.files.find(function (file) { return /\.js\.map/.test(file); }); | ||
console.log(currentChunk.files, 'filename', filename, 'sourcemapUrl', sourcemapUrl); | ||
if (filename && sourcemapUrl) { | ||
@@ -117,5 +118,7 @@ var sourcemapLocation = util_1.removeQuery(compiler.outputFileSystem.join(outputPath, sourcemapUrl)); | ||
if (!error || !error.response) { | ||
return reject('Something went wrong while uploading the sourcemaps to Flare.'); | ||
return reject('An unknown error occurred while uploading the sourcemaps to Flare.'); | ||
} | ||
util_1.flareLog(error.response.status + ": " + error.response.data.message + ", " + JSON.stringify(error.response.data.errors), true); | ||
if (error.response.status && error.response.data.message && error.response.data.errors) { | ||
util_1.flareLog(error.response.status + ": " + error.response.data.message + ", " + JSON.stringify(error.response.data.errors), true); | ||
} | ||
return reject(error); | ||
@@ -122,0 +125,0 @@ }); |
{ | ||
"name": "@flareapp/flare-webpack-plugin-sourcemap", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"main": "dist", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -115,4 +115,4 @@ import { Compiler, DefinePlugin, compilation } from 'webpack'; | ||
return chunks.reduce((sourcemaps, currentChunk) => { | ||
const filename = currentChunk.files.find(file => /\.js$/.test(file)); | ||
const sourcemapUrl = currentChunk.files.find(file => /\.js\.map$/.test(file)); | ||
const filename = currentChunk.files.find(file => /\.js/.test(file)); | ||
const sourcemapUrl = currentChunk.files.find(file => /\.js\.map/.test(file)); | ||
@@ -148,11 +148,13 @@ if (filename && sourcemapUrl) { | ||
if (!error || !error.response) { | ||
return reject('Something went wrong while uploading the sourcemaps to Flare.'); | ||
return reject('An unknown error occurred while uploading the sourcemaps to Flare.'); | ||
} | ||
flareLog( | ||
`${error.response.status}: ${error.response.data.message}, ${JSON.stringify( | ||
error.response.data.errors | ||
)}`, | ||
true | ||
); | ||
if (error.response.status && error.response.data.message && error.response.data.errors) { | ||
flareLog( | ||
`${error.response.status}: ${error.response.data.message}, ${JSON.stringify( | ||
error.response.data.errors | ||
)}`, | ||
true | ||
); | ||
} | ||
@@ -159,0 +161,0 @@ return reject(error); |
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
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
17096
368