vite-plugin-rollbar
Advanced tools
Comparing version 0.0.13 to 0.0.14
'use strict'; | ||
var FormData = require('form-data'); | ||
var fs = require('fs'); | ||
var path = require('path'); | ||
var glob = require('fast-glob'); | ||
var fetch = require('node-fetch-native'); | ||
var VError = require('verror'); | ||
@@ -12,5 +10,3 @@ | ||
var FormData__default = /*#__PURE__*/_interopDefaultLegacy(FormData); | ||
var glob__default = /*#__PURE__*/_interopDefaultLegacy(glob); | ||
var fetch__default = /*#__PURE__*/_interopDefaultLegacy(fetch); | ||
var VError__default = /*#__PURE__*/_interopDefaultLegacy(VError); | ||
@@ -27,3 +23,3 @@ | ||
try { | ||
res = await fetch__default["default"](rollbarEndpoint, { | ||
res = await fetch(rollbarEndpoint, { | ||
method: 'POST', | ||
@@ -108,11 +104,8 @@ body: form | ||
sourcemaps.map((asset) => { | ||
const form = new FormData__default["default"](); | ||
const form = new FormData(); | ||
form.append('access_token', accessToken); | ||
form.append('version', version); | ||
form.append('minified_url', `${baseUrl}${asset.original_file}`); | ||
form.append('source_map', asset.content, { | ||
filename: asset.original_file, | ||
contentType: 'application/json' | ||
}); | ||
form.set('access_token', accessToken); | ||
form.set('version', version); | ||
form.set('minified_url', `${baseUrl}${asset.original_file}`); | ||
form.set('source_map', new Blob([asset.content]), asset.original_file); | ||
@@ -119,0 +112,0 @@ return uploadSourcemap(form, { |
@@ -1,6 +0,4 @@ | ||
import FormData from 'form-data'; | ||
import { existsSync, readFileSync } from 'fs'; | ||
import { resolve } from 'path'; | ||
import glob from 'fast-glob'; | ||
import fetch from 'node-fetch-native'; | ||
import VError from 'verror'; | ||
@@ -99,9 +97,6 @@ | ||
form.append('access_token', accessToken); | ||
form.append('version', version); | ||
form.append('minified_url', `${baseUrl}${asset.original_file}`); | ||
form.append('source_map', asset.content, { | ||
filename: asset.original_file, | ||
contentType: 'application/json' | ||
}); | ||
form.set('access_token', accessToken); | ||
form.set('version', version); | ||
form.set('minified_url', `${baseUrl}${asset.original_file}`); | ||
form.set('source_map', new Blob([asset.content]), asset.original_file); | ||
@@ -108,0 +103,0 @@ return uploadSourcemap(form, { |
{ | ||
"name": "vite-plugin-rollbar", | ||
"version": "0.0.13", | ||
"version": "0.0.14", | ||
"description": "A Vite plugin to upload sourcemaps to Rollbar after build.", | ||
"type": "module", | ||
"main": "./cjs/index.js", | ||
@@ -49,4 +50,2 @@ "module": "./esm/index.js", | ||
"fast-glob": "^3.2.11", | ||
"form-data": "^4.0.0", | ||
"node-fetch-native": "^0.1.4", | ||
"verror": "^1.10.1" | ||
@@ -53,0 +52,0 @@ }, |
@@ -31,3 +31,3 @@ # Plugin to integrate Vite ⚡️ with Rollbar | ||
baseUrl: 'yourwebsite.com', | ||
ignoreUploadErrors = true, | ||
ignoreUploadErrors: true, | ||
silent: true, | ||
@@ -34,0 +34,0 @@ } |
// Custom rollup plugin for uploading rollbar deploys | ||
import FormData from 'form-data' | ||
import { existsSync, readFileSync } from 'fs' | ||
import { resolve } from 'path' | ||
import glob from 'fast-glob' | ||
import fetch from 'node-fetch-native' | ||
import VError from 'verror' | ||
@@ -97,9 +95,6 @@ import { ROLLBAR_ENDPOINT } from './constants' | ||
form.append('access_token', accessToken) | ||
form.append('version', version) | ||
form.append('minified_url', `${baseUrl}${asset.original_file}`) | ||
form.append('source_map', asset.content, { | ||
filename: asset.original_file, | ||
contentType: 'application/json' | ||
}) | ||
form.set('access_token', accessToken) | ||
form.set('version', version) | ||
form.set('minified_url', `${baseUrl}${asset.original_file}`) | ||
form.set('source_map', new Blob([asset.content]), asset.original_file) | ||
@@ -106,0 +101,0 @@ return uploadSourcemap(form, { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
3
Yes
28049
372
- Removedform-data@^4.0.0
- Removednode-fetch-native@^0.1.4
- Removedasynckit@0.4.0(transitive)
- Removedcombined-stream@1.0.8(transitive)
- Removeddelayed-stream@1.0.0(transitive)
- Removedform-data@4.0.1(transitive)
- Removedmime-db@1.52.0(transitive)
- Removedmime-types@2.1.35(transitive)
- Removednode-fetch-native@0.1.8(transitive)