1 | Object.defineProperty(exports, "__esModule", { value: true });
|
2 | var tslib_1 = require("tslib");
|
3 | var core_1 = require("@sentry/core");
|
4 | var backend_1 = require("./backend");
|
5 | var version_1 = require("./version");
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 | var NodeClient = (function (_super) {
|
13 | tslib_1.__extends(NodeClient, _super);
|
14 | |
15 |
|
16 |
|
17 |
|
18 | function NodeClient(options) {
|
19 | return _super.call(this, backend_1.NodeBackend, options) || this;
|
20 | }
|
21 | |
22 |
|
23 |
|
24 | NodeClient.prototype._prepareEvent = function (event, scope, hint) {
|
25 | event.platform = event.platform || 'node';
|
26 | event.sdk = tslib_1.__assign({}, event.sdk, { name: version_1.SDK_NAME, packages: tslib_1.__spread(((event.sdk && event.sdk.packages) || []), [
|
27 | {
|
28 | name: 'npm:@sentry/node',
|
29 | version: version_1.SDK_VERSION,
|
30 | },
|
31 | ]), version: version_1.SDK_VERSION });
|
32 | if (this.getOptions().serverName) {
|
33 | event.server_name = this.getOptions().serverName;
|
34 | }
|
35 | return _super.prototype._prepareEvent.call(this, event, scope, hint);
|
36 | };
|
37 | return NodeClient;
|
38 | }(core_1.BaseClient));
|
39 | exports.NodeClient = NodeClient;
|
40 |
|
\ | No newline at end of file |