bugsnag-sourcemaps
Advanced tools
Comparing version 0.0.6 to 0.0.7
10
index.js
const fs = require('fs'); | ||
const request = require('request'); | ||
const UPLOAD_URL = 'https://upload.bugsnag.com'; | ||
const DEFAULT_OPTIONS = { | ||
@@ -13,2 +12,3 @@ apiKey: null, | ||
// sources: {}, | ||
endpoint: 'https://upload.bugsnag.com', | ||
}; | ||
@@ -40,2 +40,6 @@ | ||
} | ||
// Settings (omit from formData) | ||
case 'endpoint': { | ||
break; | ||
} | ||
// Basic fields (strings/booleans) & future fields | ||
@@ -49,3 +53,3 @@ default: { | ||
request.post({ | ||
url: UPLOAD_URL, | ||
url: optionsWithDefaults.endpoint, | ||
formData, | ||
@@ -66,2 +70,2 @@ }, function (err, res, body) { | ||
exports.upload = upload; | ||
exports.upload = upload; |
{ | ||
"name": "bugsnag-sourcemaps", | ||
"description": "A Node.js module to programmatically upload your sourcemap files to Bugsnag", | ||
"version": "0.0.6", | ||
"version": "0.0.7", | ||
"keywords": [ | ||
@@ -6,0 +6,0 @@ "bugsnag", |
@@ -36,4 +36,22 @@ # bugsnag-sourcemaps | ||
### Bugsnag Enterprise | ||
If you are using Bugsnag Enterprise (on premise installation) with a custom domain, you can pass an optional `endpoint` option to define a custom upload url. | ||
Example with endpoint option: | ||
```js | ||
import path from 'path'; | ||
import { upload } from 'bugsnag-sourcemaps'; | ||
upload({ | ||
// apiKey, appVersion, etc... | ||
endpoint: 'https://bugsnag.my-company.com', | ||
}, function(err) { | ||
// ... | ||
}); | ||
``` | ||
## License | ||
MIT License ❤️ | ||
MIT License ❤️ |
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
5061
64
57