Socket
Socket
Sign inDemoInstall

sentry-api

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sentry-api - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

test.js

25

lib/client.js

@@ -37,2 +37,8 @@ var fs = require('fs');

var Client = function(dsn, config) {
// If no DSN is provided, use the default.
if (lodash.isObject(dsn)) {
config = dsn;
dsn = 'https://app.getsentry.com';
}
this.dsn = new DSN(dsn);

@@ -43,2 +49,3 @@

logging: false,
token: null,
});

@@ -116,9 +123,19 @@

return new Promise(function (resolve, reject) {
request(lodash.extend({
var requestOptions = lodash.extend({
uri: uri,
json: true,
auth: {
}, options);
if (this.config.token) {
requestOptions.auth = {
bearer: this.config.token,
};
}
else {
requestOptions.auth = {
user: this.dsn.publicKey,
},
}, options), function(error, response, body) {
};
}
request(requestOptions, function(error, response, body) {
if (error) {

@@ -125,0 +142,0 @@ this.logger.error(error);

2

package.json
{
"name": "sentry-api",
"version": "0.1.0",
"version": "0.1.1",
"description": "A client for the Sentry API",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -28,2 +28,14 @@ # sentry-api

// If you're using authentication tokens, you'll want to pass the token as
// a configuration option.
var sentry = new Sentry('https://abc123:@app.getsentry.com', {
token: 'mytoken'
});
// You can also leave off the DSN if you're using token authentication and
// hosted sentry.
var sentry = new Sentry({
token: 'mytoken'
});
// Retrieve a project using the callback style.

@@ -30,0 +42,0 @@ sentry.projects.get('org-slug', 'project-slug', function(error, project) {

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