Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vite-plugin-rollbar

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vite-plugin-rollbar - npm Package Compare versions

Comparing version 0.0.13 to 0.0.14

.eslintrc.cjs

19

cjs/index.js
'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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc