forked from rollbar/rollbar.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
defaults.js
24 lines (19 loc) · 986 Bytes
/
defaults.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
var semver = require('semver');
var pkg = require('./package.json');
var semVer = semver.parse(pkg.version);
// Get the minimum minor version to put into the CDN URL
semVer.patch = 0;
semVer.prerelease = [];
var pinnedVersion = semVer.major + '.' + semVer.minor;
module.exports = {
__NOTIFIER_VERSION__: JSON.stringify(pkg.version),
__JQUERY_PLUGIN_VERSION__: JSON.stringify(pkg.plugins.jquery.version),
__DEFAULT_SCRUB_FIELDS__: JSON.stringify(pkg.defaults.scrubFields),
__DEFAULT_ENDPOINT__: JSON.stringify(pkg.defaults.endpoint),
__DEFAULT_LOG_LEVEL__: JSON.stringify(pkg.defaults.logLevel),
__DEFAULT_REPORT_LEVEL__: JSON.stringify(pkg.defaults.reportLevel),
__DEFAULT_UNCAUGHT_ERROR_LEVEL: JSON.stringify(pkg.defaults.uncaughtErrorLevel),
__DEFAULT_ROLLBARJS_URL__: JSON.stringify('https://' + pkg.cdn.host + '/js/v' + pinnedVersion + '/rollbar.min.js'),
__DEFAULT_MAX_ITEMS__: pkg.defaults.maxItems,
__DEFAULT_ITEMS_PER_MIN__: pkg.defaults.itemsPerMin
};