posthog-node 5.8.8 → 5.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{index.d.ts → client.d.ts} +7 -378
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +480 -0
- package/dist/client.mjs +436 -0
- package/dist/entrypoints/index.edge.d.ts +6 -0
- package/dist/entrypoints/index.edge.d.ts.map +1 -0
- package/dist/entrypoints/index.edge.js +96 -0
- package/dist/entrypoints/index.edge.mjs +19 -0
- package/dist/entrypoints/index.node.d.ts +6 -0
- package/dist/entrypoints/index.node.d.ts.map +1 -0
- package/dist/entrypoints/index.node.js +107 -0
- package/dist/entrypoints/index.node.mjs +24 -0
- package/dist/exports.d.ts +4 -0
- package/dist/exports.d.ts.map +1 -0
- package/dist/exports.js +78 -0
- package/dist/exports.mjs +3 -0
- package/dist/extensions/error-tracking/autocapture.d.ts +4 -0
- package/dist/extensions/error-tracking/autocapture.d.ts.map +1 -0
- package/dist/extensions/error-tracking/autocapture.js +68 -0
- package/dist/extensions/error-tracking/autocapture.mjs +31 -0
- package/dist/extensions/error-tracking/index.d.ts +19 -0
- package/dist/extensions/error-tracking/index.d.ts.map +1 -0
- package/dist/extensions/error-tracking/index.js +97 -0
- package/dist/extensions/error-tracking/index.mjs +63 -0
- package/dist/extensions/error-tracking/modifiers/context-lines.node.d.ts +5 -0
- package/dist/extensions/error-tracking/modifiers/context-lines.node.d.ts.map +1 -0
- package/dist/extensions/error-tracking/modifiers/context-lines.node.js +227 -0
- package/dist/extensions/error-tracking/modifiers/context-lines.node.mjs +187 -0
- package/dist/extensions/error-tracking/modifiers/module.node.d.ts +3 -0
- package/dist/extensions/error-tracking/modifiers/module.node.d.ts.map +1 -0
- package/dist/extensions/error-tracking/modifiers/module.node.js +64 -0
- package/dist/extensions/error-tracking/modifiers/module.node.mjs +30 -0
- package/dist/extensions/express.d.ts +17 -0
- package/dist/extensions/express.d.ts.map +1 -0
- package/dist/extensions/express.js +61 -0
- package/dist/extensions/express.mjs +17 -0
- package/dist/extensions/feature-flags/crypto-helpers.d.ts +3 -0
- package/dist/extensions/feature-flags/crypto-helpers.d.ts.map +1 -0
- package/dist/extensions/feature-flags/crypto-helpers.js +77 -0
- package/dist/extensions/feature-flags/crypto-helpers.mjs +22 -0
- package/dist/extensions/feature-flags/crypto.d.ts +2 -0
- package/dist/extensions/feature-flags/crypto.d.ts.map +1 -0
- package/dist/extensions/feature-flags/crypto.js +47 -0
- package/dist/extensions/feature-flags/crypto.mjs +13 -0
- package/dist/extensions/feature-flags/feature-flags.d.ts +89 -0
- package/dist/extensions/feature-flags/feature-flags.d.ts.map +1 -0
- package/dist/extensions/feature-flags/feature-flags.js +529 -0
- package/dist/extensions/feature-flags/feature-flags.mjs +483 -0
- package/dist/extensions/feature-flags/lazy.d.ts +24 -0
- package/dist/extensions/feature-flags/lazy.d.ts.map +1 -0
- package/dist/extensions/feature-flags/lazy.js +60 -0
- package/dist/extensions/feature-flags/lazy.mjs +26 -0
- package/dist/extensions/sentry-integration.d.ts +54 -0
- package/dist/extensions/sentry-integration.d.ts.map +1 -0
- package/dist/extensions/sentry-integration.js +113 -0
- package/dist/extensions/sentry-integration.mjs +73 -0
- package/dist/storage-memory.d.ts +7 -0
- package/dist/storage-memory.d.ts.map +1 -0
- package/dist/storage-memory.js +46 -0
- package/dist/storage-memory.mjs +12 -0
- package/dist/types.d.ts +253 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +18 -0
- package/dist/types.mjs +0 -0
- package/dist/utils/logger.d.ts +3 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +63 -0
- package/dist/utils/logger.mjs +29 -0
- package/dist/version.d.ts +2 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +36 -0
- package/dist/version.mjs +2 -0
- package/package.json +32 -31
- package/src/client.ts +1532 -0
- package/src/entrypoints/index.edge.ts +22 -0
- package/src/entrypoints/index.node.ts +26 -0
- package/src/exports.ts +3 -0
- package/src/extensions/error-tracking/autocapture.ts +67 -0
- package/src/extensions/error-tracking/index.ts +104 -0
- package/src/extensions/error-tracking/modifiers/context-lines.node.ts +404 -0
- package/src/extensions/error-tracking/modifiers/module.node.ts +68 -0
- package/src/extensions/express.ts +40 -0
- package/src/extensions/feature-flags/crypto-helpers.ts +36 -0
- package/src/extensions/feature-flags/crypto.ts +22 -0
- package/src/extensions/feature-flags/feature-flags.ts +1003 -0
- package/src/extensions/feature-flags/lazy.ts +55 -0
- package/src/extensions/sentry-integration.ts +216 -0
- package/src/storage-memory.ts +13 -0
- package/src/types.ts +294 -0
- package/src/utils/logger.ts +39 -0
- package/src/version.ts +1 -0
- package/dist/edge/index.cjs +0 -3150
- package/dist/edge/index.cjs.map +0 -1
- package/dist/edge/index.mjs +0 -3144
- package/dist/edge/index.mjs.map +0 -1
- package/dist/node/index.cjs +0 -3556
- package/dist/node/index.cjs.map +0 -1
- package/dist/node/index.mjs +0 -3550
- package/dist/node/index.mjs.map +0 -1
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { createModulerModifier } from "../extensions/error-tracking/modifiers/module.node.mjs";
|
|
2
|
+
import { addSourceContext } from "../extensions/error-tracking/modifiers/context-lines.node.mjs";
|
|
3
|
+
import error_tracking from "../extensions/error-tracking/index.mjs";
|
|
4
|
+
import { PostHogBackendClient } from "../client.mjs";
|
|
5
|
+
import { ErrorTracking } from "@posthog/core";
|
|
6
|
+
export * from "../exports.mjs";
|
|
7
|
+
error_tracking.errorPropertiesBuilder = new ErrorTracking.ErrorPropertiesBuilder([
|
|
8
|
+
new ErrorTracking.EventCoercer(),
|
|
9
|
+
new ErrorTracking.ErrorCoercer(),
|
|
10
|
+
new ErrorTracking.ObjectCoercer(),
|
|
11
|
+
new ErrorTracking.StringCoercer(),
|
|
12
|
+
new ErrorTracking.PrimitiveCoercer()
|
|
13
|
+
], [
|
|
14
|
+
ErrorTracking.nodeStackLineParser
|
|
15
|
+
], [
|
|
16
|
+
createModulerModifier(),
|
|
17
|
+
addSourceContext
|
|
18
|
+
]);
|
|
19
|
+
class PostHog extends PostHogBackendClient {
|
|
20
|
+
getLibraryId() {
|
|
21
|
+
return 'posthog-node';
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
export { PostHog };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exports.d.ts","sourceRoot":"","sources":["../src/exports.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAA;AAC/C,cAAc,sBAAsB,CAAA;AACpC,cAAc,SAAS,CAAA"}
|
package/dist/exports.js
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_modules__ = {
|
|
3
|
+
"./extensions/express": function(module) {
|
|
4
|
+
module.exports = require("./extensions/express.js");
|
|
5
|
+
},
|
|
6
|
+
"./extensions/sentry-integration": function(module) {
|
|
7
|
+
module.exports = require("./extensions/sentry-integration.js");
|
|
8
|
+
},
|
|
9
|
+
"./types": function(module) {
|
|
10
|
+
module.exports = require("./types.js");
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
var __webpack_module_cache__ = {};
|
|
14
|
+
function __webpack_require__(moduleId) {
|
|
15
|
+
var cachedModule = __webpack_module_cache__[moduleId];
|
|
16
|
+
if (void 0 !== cachedModule) return cachedModule.exports;
|
|
17
|
+
var module = __webpack_module_cache__[moduleId] = {
|
|
18
|
+
exports: {}
|
|
19
|
+
};
|
|
20
|
+
__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
21
|
+
return module.exports;
|
|
22
|
+
}
|
|
23
|
+
(()=>{
|
|
24
|
+
__webpack_require__.n = (module)=>{
|
|
25
|
+
var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
|
|
26
|
+
__webpack_require__.d(getter, {
|
|
27
|
+
a: getter
|
|
28
|
+
});
|
|
29
|
+
return getter;
|
|
30
|
+
};
|
|
31
|
+
})();
|
|
32
|
+
(()=>{
|
|
33
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
34
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
35
|
+
enumerable: true,
|
|
36
|
+
get: definition[key]
|
|
37
|
+
});
|
|
38
|
+
};
|
|
39
|
+
})();
|
|
40
|
+
(()=>{
|
|
41
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
42
|
+
})();
|
|
43
|
+
(()=>{
|
|
44
|
+
__webpack_require__.r = (exports1)=>{
|
|
45
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
46
|
+
value: 'Module'
|
|
47
|
+
});
|
|
48
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
49
|
+
value: true
|
|
50
|
+
});
|
|
51
|
+
};
|
|
52
|
+
})();
|
|
53
|
+
var __webpack_exports__ = {};
|
|
54
|
+
(()=>{
|
|
55
|
+
__webpack_require__.r(__webpack_exports__);
|
|
56
|
+
var _extensions_sentry_integration__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("./extensions/sentry-integration");
|
|
57
|
+
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
58
|
+
for(var __WEBPACK_IMPORT_KEY__ in _extensions_sentry_integration__WEBPACK_IMPORTED_MODULE_0__)if ("default" !== __WEBPACK_IMPORT_KEY__) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
|
|
59
|
+
return _extensions_sentry_integration__WEBPACK_IMPORTED_MODULE_0__[key];
|
|
60
|
+
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
|
61
|
+
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
|
62
|
+
var _extensions_express__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("./extensions/express");
|
|
63
|
+
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
64
|
+
for(var __WEBPACK_IMPORT_KEY__ in _extensions_express__WEBPACK_IMPORTED_MODULE_1__)if ("default" !== __WEBPACK_IMPORT_KEY__) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
|
|
65
|
+
return _extensions_express__WEBPACK_IMPORTED_MODULE_1__[key];
|
|
66
|
+
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
|
67
|
+
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
|
68
|
+
var _types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("./types");
|
|
69
|
+
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
70
|
+
for(var __WEBPACK_IMPORT_KEY__ in _types__WEBPACK_IMPORTED_MODULE_2__)if ("default" !== __WEBPACK_IMPORT_KEY__) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
|
|
71
|
+
return _types__WEBPACK_IMPORTED_MODULE_2__[key];
|
|
72
|
+
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
|
73
|
+
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
|
74
|
+
})();
|
|
75
|
+
for(var __webpack_i__ in __webpack_exports__)exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
76
|
+
Object.defineProperty(exports, '__esModule', {
|
|
77
|
+
value: true
|
|
78
|
+
});
|
package/dist/exports.mjs
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ErrorTracking as CoreErrorTracking } from '@posthog/core';
|
|
2
|
+
export declare function addUncaughtExceptionListener(captureFn: (exception: Error, hint: CoreErrorTracking.EventHint) => void, onFatalFn: (exception: Error) => void): void;
|
|
3
|
+
export declare function addUnhandledRejectionListener(captureFn: (exception: unknown, hint: CoreErrorTracking.EventHint) => void): void;
|
|
4
|
+
//# sourceMappingURL=autocapture.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"autocapture.d.ts","sourceRoot":"","sources":["../../../src/extensions/error-tracking/autocapture.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,IAAI,iBAAiB,EAAE,MAAM,eAAe,CAAA;AA6ClE,wBAAgB,4BAA4B,CAC1C,SAAS,EAAE,CAAC,SAAS,EAAE,KAAK,EAAE,IAAI,EAAE,iBAAiB,CAAC,SAAS,KAAK,IAAI,EACxE,SAAS,EAAE,CAAC,SAAS,EAAE,KAAK,KAAK,IAAI,GACpC,IAAI,CAEN;AAED,wBAAgB,6BAA6B,CAC3C,SAAS,EAAE,CAAC,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,iBAAiB,CAAC,SAAS,KAAK,IAAI,GACzE,IAAI,CASN"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
+
})();
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
|
16
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
+
value: 'Module'
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
addUncaughtExceptionListener: ()=>addUncaughtExceptionListener,
|
|
28
|
+
addUnhandledRejectionListener: ()=>addUnhandledRejectionListener
|
|
29
|
+
});
|
|
30
|
+
function makeUncaughtExceptionHandler(captureFn, onFatalFn) {
|
|
31
|
+
let calledFatalError = false;
|
|
32
|
+
return Object.assign((error)=>{
|
|
33
|
+
const userProvidedListenersCount = global.process.listeners('uncaughtException').filter((listener)=>'domainUncaughtExceptionClear' !== listener.name && true !== listener._posthogErrorHandler).length;
|
|
34
|
+
const processWouldExit = 0 === userProvidedListenersCount;
|
|
35
|
+
captureFn(error, {
|
|
36
|
+
mechanism: {
|
|
37
|
+
type: 'onuncaughtexception',
|
|
38
|
+
handled: false
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
if (!calledFatalError && processWouldExit) {
|
|
42
|
+
calledFatalError = true;
|
|
43
|
+
onFatalFn(error);
|
|
44
|
+
}
|
|
45
|
+
}, {
|
|
46
|
+
_posthogErrorHandler: true
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
function addUncaughtExceptionListener(captureFn, onFatalFn) {
|
|
50
|
+
global.process.on('uncaughtException', makeUncaughtExceptionHandler(captureFn, onFatalFn));
|
|
51
|
+
}
|
|
52
|
+
function addUnhandledRejectionListener(captureFn) {
|
|
53
|
+
global.process.on('unhandledRejection', (reason)=>captureFn(reason, {
|
|
54
|
+
mechanism: {
|
|
55
|
+
type: 'onunhandledrejection',
|
|
56
|
+
handled: false
|
|
57
|
+
}
|
|
58
|
+
}));
|
|
59
|
+
}
|
|
60
|
+
exports.addUncaughtExceptionListener = __webpack_exports__.addUncaughtExceptionListener;
|
|
61
|
+
exports.addUnhandledRejectionListener = __webpack_exports__.addUnhandledRejectionListener;
|
|
62
|
+
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
63
|
+
"addUncaughtExceptionListener",
|
|
64
|
+
"addUnhandledRejectionListener"
|
|
65
|
+
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
66
|
+
Object.defineProperty(exports, '__esModule', {
|
|
67
|
+
value: true
|
|
68
|
+
});
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
function makeUncaughtExceptionHandler(captureFn, onFatalFn) {
|
|
2
|
+
let calledFatalError = false;
|
|
3
|
+
return Object.assign((error)=>{
|
|
4
|
+
const userProvidedListenersCount = global.process.listeners('uncaughtException').filter((listener)=>'domainUncaughtExceptionClear' !== listener.name && true !== listener._posthogErrorHandler).length;
|
|
5
|
+
const processWouldExit = 0 === userProvidedListenersCount;
|
|
6
|
+
captureFn(error, {
|
|
7
|
+
mechanism: {
|
|
8
|
+
type: 'onuncaughtexception',
|
|
9
|
+
handled: false
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
if (!calledFatalError && processWouldExit) {
|
|
13
|
+
calledFatalError = true;
|
|
14
|
+
onFatalFn(error);
|
|
15
|
+
}
|
|
16
|
+
}, {
|
|
17
|
+
_posthogErrorHandler: true
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
function addUncaughtExceptionListener(captureFn, onFatalFn) {
|
|
21
|
+
global.process.on('uncaughtException', makeUncaughtExceptionHandler(captureFn, onFatalFn));
|
|
22
|
+
}
|
|
23
|
+
function addUnhandledRejectionListener(captureFn) {
|
|
24
|
+
global.process.on('unhandledRejection', (reason)=>captureFn(reason, {
|
|
25
|
+
mechanism: {
|
|
26
|
+
type: 'onunhandledrejection',
|
|
27
|
+
handled: false
|
|
28
|
+
}
|
|
29
|
+
}));
|
|
30
|
+
}
|
|
31
|
+
export { addUncaughtExceptionListener, addUnhandledRejectionListener };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { PostHogBackendClient } from '../../client';
|
|
2
|
+
import { EventMessage, PostHogOptions } from '../../types';
|
|
3
|
+
import type { Logger } from '@posthog/core';
|
|
4
|
+
import { ErrorTracking as CoreErrorTracking } from '@posthog/core';
|
|
5
|
+
export default class ErrorTracking {
|
|
6
|
+
private client;
|
|
7
|
+
private _exceptionAutocaptureEnabled;
|
|
8
|
+
private _rateLimiter;
|
|
9
|
+
private _logger;
|
|
10
|
+
static errorPropertiesBuilder: CoreErrorTracking.ErrorPropertiesBuilder;
|
|
11
|
+
constructor(client: PostHogBackendClient, options: PostHogOptions, _logger: Logger);
|
|
12
|
+
static buildEventMessage(error: unknown, hint: CoreErrorTracking.EventHint, distinctId?: string, additionalProperties?: Record<string | number, any>): Promise<EventMessage>;
|
|
13
|
+
private startAutocaptureIfEnabled;
|
|
14
|
+
private onException;
|
|
15
|
+
private onFatalError;
|
|
16
|
+
isEnabled(): boolean;
|
|
17
|
+
shutdown(): void;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/extensions/error-tracking/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AAE/C,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AACtD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAE3C,OAAO,EAAE,aAAa,IAAI,iBAAiB,EAAE,MAAM,eAAe,CAAA;AAIlE,MAAM,CAAC,OAAO,OAAO,aAAa;IAChC,OAAO,CAAC,MAAM,CAAsB;IACpC,OAAO,CAAC,4BAA4B,CAAS;IAC7C,OAAO,CAAC,YAAY,CAA6B;IACjD,OAAO,CAAC,OAAO,CAAQ;IAEvB,MAAM,CAAC,sBAAsB,EAAE,iBAAiB,CAAC,sBAAsB,CAAA;gBAE3D,MAAM,EAAE,oBAAoB,EAAE,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM;WAkBrE,iBAAiB,CAC5B,KAAK,EAAE,OAAO,EACd,IAAI,EAAE,iBAAiB,CAAC,SAAS,EACjC,UAAU,CAAC,EAAE,MAAM,EACnB,oBAAoB,CAAC,EAAE,MAAM,CAAC,MAAM,GAAG,MAAM,EAAE,GAAG,CAAC,GAClD,OAAO,CAAC,YAAY,CAAC;IAwBxB,OAAO,CAAC,yBAAyB;IAOjC,OAAO,CAAC,WAAW;YAkBL,YAAY;IAM1B,SAAS,IAAI,OAAO;IAIpB,QAAQ,IAAI,IAAI;CAGjB"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
+
})();
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
|
16
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
+
value: 'Module'
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
default: ()=>ErrorTracking
|
|
28
|
+
});
|
|
29
|
+
const external_autocapture_js_namespaceObject = require("./autocapture.js");
|
|
30
|
+
const core_namespaceObject = require("@posthog/core");
|
|
31
|
+
const SHUTDOWN_TIMEOUT = 2000;
|
|
32
|
+
class ErrorTracking {
|
|
33
|
+
constructor(client, options, _logger){
|
|
34
|
+
this.client = client;
|
|
35
|
+
this._exceptionAutocaptureEnabled = options.enableExceptionAutocapture || false;
|
|
36
|
+
this._logger = _logger;
|
|
37
|
+
this._rateLimiter = new core_namespaceObject.BucketedRateLimiter({
|
|
38
|
+
refillRate: 1,
|
|
39
|
+
bucketSize: 10,
|
|
40
|
+
refillInterval: 10000,
|
|
41
|
+
_logger: this._logger
|
|
42
|
+
});
|
|
43
|
+
this.startAutocaptureIfEnabled();
|
|
44
|
+
}
|
|
45
|
+
static async buildEventMessage(error, hint, distinctId, additionalProperties) {
|
|
46
|
+
const properties = {
|
|
47
|
+
...additionalProperties
|
|
48
|
+
};
|
|
49
|
+
if (!distinctId) properties.$process_person_profile = false;
|
|
50
|
+
const exceptionProperties = this.errorPropertiesBuilder.buildFromUnknown(error, hint);
|
|
51
|
+
exceptionProperties.$exception_list = await this.errorPropertiesBuilder.modifyFrames(exceptionProperties.$exception_list);
|
|
52
|
+
return {
|
|
53
|
+
event: '$exception',
|
|
54
|
+
distinctId: distinctId || (0, core_namespaceObject.uuidv7)(),
|
|
55
|
+
properties: {
|
|
56
|
+
...exceptionProperties,
|
|
57
|
+
...properties
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
startAutocaptureIfEnabled() {
|
|
62
|
+
if (this.isEnabled()) {
|
|
63
|
+
(0, external_autocapture_js_namespaceObject.addUncaughtExceptionListener)(this.onException.bind(this), this.onFatalError.bind(this));
|
|
64
|
+
(0, external_autocapture_js_namespaceObject.addUnhandledRejectionListener)(this.onException.bind(this));
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
onException(exception, hint) {
|
|
68
|
+
this.client.addPendingPromise((async ()=>{
|
|
69
|
+
const eventMessage = await ErrorTracking.buildEventMessage(exception, hint);
|
|
70
|
+
const exceptionProperties = eventMessage.properties;
|
|
71
|
+
const exceptionType = exceptionProperties?.$exception_list[0]?.type ?? 'Exception';
|
|
72
|
+
const isRateLimited = this._rateLimiter.consumeRateLimit(exceptionType);
|
|
73
|
+
if (isRateLimited) return void this._logger.info('Skipping exception capture because of client rate limiting.', {
|
|
74
|
+
exception: exceptionType
|
|
75
|
+
});
|
|
76
|
+
return this.client.capture(eventMessage);
|
|
77
|
+
})());
|
|
78
|
+
}
|
|
79
|
+
async onFatalError(exception) {
|
|
80
|
+
console.error(exception);
|
|
81
|
+
await this.client.shutdown(SHUTDOWN_TIMEOUT);
|
|
82
|
+
process.exit(1);
|
|
83
|
+
}
|
|
84
|
+
isEnabled() {
|
|
85
|
+
return !this.client.isDisabled && this._exceptionAutocaptureEnabled;
|
|
86
|
+
}
|
|
87
|
+
shutdown() {
|
|
88
|
+
this._rateLimiter.stop();
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
exports["default"] = __webpack_exports__["default"];
|
|
92
|
+
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
93
|
+
"default"
|
|
94
|
+
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
95
|
+
Object.defineProperty(exports, '__esModule', {
|
|
96
|
+
value: true
|
|
97
|
+
});
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { addUncaughtExceptionListener, addUnhandledRejectionListener } from "./autocapture.mjs";
|
|
2
|
+
import { BucketedRateLimiter, uuidv7 } from "@posthog/core";
|
|
3
|
+
const SHUTDOWN_TIMEOUT = 2000;
|
|
4
|
+
class ErrorTracking {
|
|
5
|
+
constructor(client, options, _logger){
|
|
6
|
+
this.client = client;
|
|
7
|
+
this._exceptionAutocaptureEnabled = options.enableExceptionAutocapture || false;
|
|
8
|
+
this._logger = _logger;
|
|
9
|
+
this._rateLimiter = new BucketedRateLimiter({
|
|
10
|
+
refillRate: 1,
|
|
11
|
+
bucketSize: 10,
|
|
12
|
+
refillInterval: 10000,
|
|
13
|
+
_logger: this._logger
|
|
14
|
+
});
|
|
15
|
+
this.startAutocaptureIfEnabled();
|
|
16
|
+
}
|
|
17
|
+
static async buildEventMessage(error, hint, distinctId, additionalProperties) {
|
|
18
|
+
const properties = {
|
|
19
|
+
...additionalProperties
|
|
20
|
+
};
|
|
21
|
+
if (!distinctId) properties.$process_person_profile = false;
|
|
22
|
+
const exceptionProperties = this.errorPropertiesBuilder.buildFromUnknown(error, hint);
|
|
23
|
+
exceptionProperties.$exception_list = await this.errorPropertiesBuilder.modifyFrames(exceptionProperties.$exception_list);
|
|
24
|
+
return {
|
|
25
|
+
event: '$exception',
|
|
26
|
+
distinctId: distinctId || uuidv7(),
|
|
27
|
+
properties: {
|
|
28
|
+
...exceptionProperties,
|
|
29
|
+
...properties
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
startAutocaptureIfEnabled() {
|
|
34
|
+
if (this.isEnabled()) {
|
|
35
|
+
addUncaughtExceptionListener(this.onException.bind(this), this.onFatalError.bind(this));
|
|
36
|
+
addUnhandledRejectionListener(this.onException.bind(this));
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
onException(exception, hint) {
|
|
40
|
+
this.client.addPendingPromise((async ()=>{
|
|
41
|
+
const eventMessage = await ErrorTracking.buildEventMessage(exception, hint);
|
|
42
|
+
const exceptionProperties = eventMessage.properties;
|
|
43
|
+
const exceptionType = exceptionProperties?.$exception_list[0]?.type ?? 'Exception';
|
|
44
|
+
const isRateLimited = this._rateLimiter.consumeRateLimit(exceptionType);
|
|
45
|
+
if (isRateLimited) return void this._logger.info('Skipping exception capture because of client rate limiting.', {
|
|
46
|
+
exception: exceptionType
|
|
47
|
+
});
|
|
48
|
+
return this.client.capture(eventMessage);
|
|
49
|
+
})());
|
|
50
|
+
}
|
|
51
|
+
async onFatalError(exception) {
|
|
52
|
+
console.error(exception);
|
|
53
|
+
await this.client.shutdown(SHUTDOWN_TIMEOUT);
|
|
54
|
+
process.exit(1);
|
|
55
|
+
}
|
|
56
|
+
isEnabled() {
|
|
57
|
+
return !this.client.isDisabled && this._exceptionAutocaptureEnabled;
|
|
58
|
+
}
|
|
59
|
+
shutdown() {
|
|
60
|
+
this._rateLimiter.stop();
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
export { ErrorTracking as default };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ErrorTracking as CoreErrorTracking } from '@posthog/core';
|
|
2
|
+
export declare const MAX_CONTEXTLINES_COLNO: number;
|
|
3
|
+
export declare const MAX_CONTEXTLINES_LINENO: number;
|
|
4
|
+
export declare function addSourceContext(frames: CoreErrorTracking.StackFrame[]): Promise<CoreErrorTracking.StackFrame[]>;
|
|
5
|
+
//# sourceMappingURL=context-lines.node.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context-lines.node.d.ts","sourceRoot":"","sources":["../../../../src/extensions/error-tracking/modifiers/context-lines.node.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,IAAI,iBAAiB,EAAE,MAAM,eAAe,CAAA;AAUlE,eAAO,MAAM,sBAAsB,EAAE,MAAa,CAAA;AAClD,eAAO,MAAM,uBAAuB,EAAE,MAAc,CAAA;AAIpD,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,iBAAiB,CAAC,UAAU,EAAE,GACrC,OAAO,CAAC,iBAAiB,CAAC,UAAU,EAAE,CAAC,CAuEzC"}
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
+
})();
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
|
16
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
+
value: 'Module'
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
MAX_CONTEXTLINES_LINENO: ()=>MAX_CONTEXTLINES_LINENO,
|
|
28
|
+
MAX_CONTEXTLINES_COLNO: ()=>MAX_CONTEXTLINES_COLNO,
|
|
29
|
+
addSourceContext: ()=>addSourceContext
|
|
30
|
+
});
|
|
31
|
+
const core_namespaceObject = require("@posthog/core");
|
|
32
|
+
const external_node_fs_namespaceObject = require("node:fs");
|
|
33
|
+
const external_node_readline_namespaceObject = require("node:readline");
|
|
34
|
+
const LRU_FILE_CONTENTS_CACHE = new core_namespaceObject.ErrorTracking.ReduceableCache(25);
|
|
35
|
+
const LRU_FILE_CONTENTS_FS_READ_FAILED = new core_namespaceObject.ErrorTracking.ReduceableCache(20);
|
|
36
|
+
const DEFAULT_LINES_OF_CONTEXT = 7;
|
|
37
|
+
const MAX_CONTEXTLINES_COLNO = 1000;
|
|
38
|
+
const MAX_CONTEXTLINES_LINENO = 10000;
|
|
39
|
+
async function addSourceContext(frames) {
|
|
40
|
+
const filesToLines = {};
|
|
41
|
+
for(let i = frames.length - 1; i >= 0; i--){
|
|
42
|
+
const frame = frames[i];
|
|
43
|
+
const filename = frame?.filename;
|
|
44
|
+
if (!frame || 'string' != typeof filename || 'number' != typeof frame.lineno || shouldSkipContextLinesForFile(filename) || shouldSkipContextLinesForFrame(frame)) continue;
|
|
45
|
+
const filesToLinesOutput = filesToLines[filename];
|
|
46
|
+
if (!filesToLinesOutput) filesToLines[filename] = [];
|
|
47
|
+
filesToLines[filename].push(frame.lineno);
|
|
48
|
+
}
|
|
49
|
+
const files = Object.keys(filesToLines);
|
|
50
|
+
if (0 == files.length) return frames;
|
|
51
|
+
const readlinePromises = [];
|
|
52
|
+
for (const file of files){
|
|
53
|
+
if (LRU_FILE_CONTENTS_FS_READ_FAILED.get(file)) continue;
|
|
54
|
+
const filesToLineRanges = filesToLines[file];
|
|
55
|
+
if (!filesToLineRanges) continue;
|
|
56
|
+
filesToLineRanges.sort((a, b)=>a - b);
|
|
57
|
+
const ranges = makeLineReaderRanges(filesToLineRanges);
|
|
58
|
+
if (ranges.every((r)=>rangeExistsInContentCache(file, r))) continue;
|
|
59
|
+
const cache = emplace(LRU_FILE_CONTENTS_CACHE, file, {});
|
|
60
|
+
readlinePromises.push(getContextLinesFromFile(file, ranges, cache));
|
|
61
|
+
}
|
|
62
|
+
await Promise.all(readlinePromises).catch(()=>{});
|
|
63
|
+
if (frames && frames.length > 0) addSourceContextToFrames(frames, LRU_FILE_CONTENTS_CACHE);
|
|
64
|
+
LRU_FILE_CONTENTS_CACHE.reduce();
|
|
65
|
+
return frames;
|
|
66
|
+
}
|
|
67
|
+
function getContextLinesFromFile(path, ranges, output) {
|
|
68
|
+
return new Promise((resolve)=>{
|
|
69
|
+
const stream = (0, external_node_fs_namespaceObject.createReadStream)(path);
|
|
70
|
+
const lineReaded = (0, external_node_readline_namespaceObject.createInterface)({
|
|
71
|
+
input: stream
|
|
72
|
+
});
|
|
73
|
+
function destroyStreamAndResolve() {
|
|
74
|
+
stream.destroy();
|
|
75
|
+
resolve();
|
|
76
|
+
}
|
|
77
|
+
let lineNumber = 0;
|
|
78
|
+
let currentRangeIndex = 0;
|
|
79
|
+
const range = ranges[currentRangeIndex];
|
|
80
|
+
if (void 0 === range) return void destroyStreamAndResolve();
|
|
81
|
+
let rangeStart = range[0];
|
|
82
|
+
let rangeEnd = range[1];
|
|
83
|
+
function onStreamError() {
|
|
84
|
+
LRU_FILE_CONTENTS_FS_READ_FAILED.set(path, 1);
|
|
85
|
+
lineReaded.close();
|
|
86
|
+
lineReaded.removeAllListeners();
|
|
87
|
+
destroyStreamAndResolve();
|
|
88
|
+
}
|
|
89
|
+
stream.on('error', onStreamError);
|
|
90
|
+
lineReaded.on('error', onStreamError);
|
|
91
|
+
lineReaded.on('close', destroyStreamAndResolve);
|
|
92
|
+
lineReaded.on('line', (line)=>{
|
|
93
|
+
lineNumber++;
|
|
94
|
+
if (lineNumber < rangeStart) return;
|
|
95
|
+
output[lineNumber] = snipLine(line, 0);
|
|
96
|
+
if (lineNumber >= rangeEnd) {
|
|
97
|
+
if (currentRangeIndex === ranges.length - 1) {
|
|
98
|
+
lineReaded.close();
|
|
99
|
+
lineReaded.removeAllListeners();
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
currentRangeIndex++;
|
|
103
|
+
const range = ranges[currentRangeIndex];
|
|
104
|
+
if (void 0 === range) {
|
|
105
|
+
lineReaded.close();
|
|
106
|
+
lineReaded.removeAllListeners();
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
rangeStart = range[0];
|
|
110
|
+
rangeEnd = range[1];
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
function addSourceContextToFrames(frames, cache) {
|
|
116
|
+
for (const frame of frames)if (frame.filename && void 0 === frame.context_line && 'number' == typeof frame.lineno) {
|
|
117
|
+
const contents = cache.get(frame.filename);
|
|
118
|
+
if (void 0 === contents) continue;
|
|
119
|
+
addContextToFrame(frame.lineno, frame, contents);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
function addContextToFrame(lineno, frame, contents) {
|
|
123
|
+
if (void 0 === frame.lineno || void 0 === contents) return;
|
|
124
|
+
frame.pre_context = [];
|
|
125
|
+
for(let i = makeRangeStart(lineno); i < lineno; i++){
|
|
126
|
+
const line = contents[i];
|
|
127
|
+
if (void 0 === line) return void clearLineContext(frame);
|
|
128
|
+
frame.pre_context.push(line);
|
|
129
|
+
}
|
|
130
|
+
if (void 0 === contents[lineno]) return void clearLineContext(frame);
|
|
131
|
+
frame.context_line = contents[lineno];
|
|
132
|
+
const end = makeRangeEnd(lineno);
|
|
133
|
+
frame.post_context = [];
|
|
134
|
+
for(let i = lineno + 1; i <= end; i++){
|
|
135
|
+
const line = contents[i];
|
|
136
|
+
if (void 0 === line) break;
|
|
137
|
+
frame.post_context.push(line);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
function clearLineContext(frame) {
|
|
141
|
+
delete frame.pre_context;
|
|
142
|
+
delete frame.context_line;
|
|
143
|
+
delete frame.post_context;
|
|
144
|
+
}
|
|
145
|
+
function shouldSkipContextLinesForFile(path) {
|
|
146
|
+
return path.startsWith('node:') || path.endsWith('.min.js') || path.endsWith('.min.cjs') || path.endsWith('.min.mjs') || path.startsWith('data:');
|
|
147
|
+
}
|
|
148
|
+
function shouldSkipContextLinesForFrame(frame) {
|
|
149
|
+
if (void 0 !== frame.lineno && frame.lineno > MAX_CONTEXTLINES_LINENO) return true;
|
|
150
|
+
if (void 0 !== frame.colno && frame.colno > MAX_CONTEXTLINES_COLNO) return true;
|
|
151
|
+
return false;
|
|
152
|
+
}
|
|
153
|
+
function rangeExistsInContentCache(file, range) {
|
|
154
|
+
const contents = LRU_FILE_CONTENTS_CACHE.get(file);
|
|
155
|
+
if (void 0 === contents) return false;
|
|
156
|
+
for(let i = range[0]; i <= range[1]; i++)if (void 0 === contents[i]) return false;
|
|
157
|
+
return true;
|
|
158
|
+
}
|
|
159
|
+
function makeLineReaderRanges(lines) {
|
|
160
|
+
if (!lines.length) return [];
|
|
161
|
+
let i = 0;
|
|
162
|
+
const line = lines[0];
|
|
163
|
+
if ('number' != typeof line) return [];
|
|
164
|
+
let current = makeContextRange(line);
|
|
165
|
+
const out = [];
|
|
166
|
+
while(true){
|
|
167
|
+
if (i === lines.length - 1) {
|
|
168
|
+
out.push(current);
|
|
169
|
+
break;
|
|
170
|
+
}
|
|
171
|
+
const next = lines[i + 1];
|
|
172
|
+
if ('number' != typeof next) break;
|
|
173
|
+
if (next <= current[1]) current[1] = next + DEFAULT_LINES_OF_CONTEXT;
|
|
174
|
+
else {
|
|
175
|
+
out.push(current);
|
|
176
|
+
current = makeContextRange(next);
|
|
177
|
+
}
|
|
178
|
+
i++;
|
|
179
|
+
}
|
|
180
|
+
return out;
|
|
181
|
+
}
|
|
182
|
+
function makeContextRange(line) {
|
|
183
|
+
return [
|
|
184
|
+
makeRangeStart(line),
|
|
185
|
+
makeRangeEnd(line)
|
|
186
|
+
];
|
|
187
|
+
}
|
|
188
|
+
function makeRangeStart(line) {
|
|
189
|
+
return Math.max(1, line - DEFAULT_LINES_OF_CONTEXT);
|
|
190
|
+
}
|
|
191
|
+
function makeRangeEnd(line) {
|
|
192
|
+
return line + DEFAULT_LINES_OF_CONTEXT;
|
|
193
|
+
}
|
|
194
|
+
function emplace(map, key, contents) {
|
|
195
|
+
const value = map.get(key);
|
|
196
|
+
if (void 0 === value) {
|
|
197
|
+
map.set(key, contents);
|
|
198
|
+
return contents;
|
|
199
|
+
}
|
|
200
|
+
return value;
|
|
201
|
+
}
|
|
202
|
+
function snipLine(line, colno) {
|
|
203
|
+
let newLine = line;
|
|
204
|
+
const lineLength = newLine.length;
|
|
205
|
+
if (lineLength <= 150) return newLine;
|
|
206
|
+
if (colno > lineLength) colno = lineLength;
|
|
207
|
+
let start = Math.max(colno - 60, 0);
|
|
208
|
+
if (start < 5) start = 0;
|
|
209
|
+
let end = Math.min(start + 140, lineLength);
|
|
210
|
+
if (end > lineLength - 5) end = lineLength;
|
|
211
|
+
if (end === lineLength) start = Math.max(end - 140, 0);
|
|
212
|
+
newLine = newLine.slice(start, end);
|
|
213
|
+
if (start > 0) newLine = `...${newLine}`;
|
|
214
|
+
if (end < lineLength) newLine += '...';
|
|
215
|
+
return newLine;
|
|
216
|
+
}
|
|
217
|
+
exports.MAX_CONTEXTLINES_COLNO = __webpack_exports__.MAX_CONTEXTLINES_COLNO;
|
|
218
|
+
exports.MAX_CONTEXTLINES_LINENO = __webpack_exports__.MAX_CONTEXTLINES_LINENO;
|
|
219
|
+
exports.addSourceContext = __webpack_exports__.addSourceContext;
|
|
220
|
+
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
221
|
+
"MAX_CONTEXTLINES_COLNO",
|
|
222
|
+
"MAX_CONTEXTLINES_LINENO",
|
|
223
|
+
"addSourceContext"
|
|
224
|
+
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
225
|
+
Object.defineProperty(exports, '__esModule', {
|
|
226
|
+
value: true
|
|
227
|
+
});
|