posthog-node 4.11.5 → 4.11.7
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/CHANGELOG.md +10 -0
- package/lib/index.cjs.js +66 -7
- package/lib/index.cjs.js.map +1 -1
- package/lib/index.d.ts +181 -210
- package/lib/index.esm.js +64 -5
- package/lib/index.esm.js.map +1 -1
- package/lib/posthog-core/src/index.d.ts +1 -2
- package/lib/posthog-core/src/types.d.ts +201 -5
- package/lib/posthog-node/src/extensions/error-tracking/context-lines.d.ts +2 -2
- package/package.json +1 -1
- package/src/extensions/error-tracking/context-lines.ts +4 -4
- package/src/extensions/error-tracking/stack-trace.ts +1 -1
package/CHANGELOG.md
CHANGED
package/lib/index.cjs.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var path = require('path');
|
|
6
6
|
|
|
7
7
|
function _interopNamespace(e) {
|
|
8
8
|
if (e && e.__esModule) return e;
|
|
@@ -22,7 +22,7 @@ function _interopNamespace(e) {
|
|
|
22
22
|
return Object.freeze(n);
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
var version = "4.11.
|
|
25
|
+
var version = "4.11.7";
|
|
26
26
|
|
|
27
27
|
var PostHogPersistedProperty;
|
|
28
28
|
(function (PostHogPersistedProperty) {
|
|
@@ -50,7 +50,66 @@ var PostHogPersistedProperty;
|
|
|
50
50
|
PostHogPersistedProperty["SurveysSeen"] = "surveys_seen";
|
|
51
51
|
PostHogPersistedProperty["Surveys"] = "surveys";
|
|
52
52
|
PostHogPersistedProperty["RemoteConfig"] = "remote_config";
|
|
53
|
-
})(PostHogPersistedProperty || (PostHogPersistedProperty = {}));
|
|
53
|
+
})(PostHogPersistedProperty || (PostHogPersistedProperty = {}));
|
|
54
|
+
var SurveyPosition;
|
|
55
|
+
(function (SurveyPosition) {
|
|
56
|
+
SurveyPosition["Left"] = "left";
|
|
57
|
+
SurveyPosition["Right"] = "right";
|
|
58
|
+
SurveyPosition["Center"] = "center";
|
|
59
|
+
})(SurveyPosition || (SurveyPosition = {}));
|
|
60
|
+
var SurveyWidgetType;
|
|
61
|
+
(function (SurveyWidgetType) {
|
|
62
|
+
SurveyWidgetType["Button"] = "button";
|
|
63
|
+
SurveyWidgetType["Tab"] = "tab";
|
|
64
|
+
SurveyWidgetType["Selector"] = "selector";
|
|
65
|
+
})(SurveyWidgetType || (SurveyWidgetType = {}));
|
|
66
|
+
var SurveyType;
|
|
67
|
+
(function (SurveyType) {
|
|
68
|
+
SurveyType["Popover"] = "popover";
|
|
69
|
+
SurveyType["API"] = "api";
|
|
70
|
+
SurveyType["Widget"] = "widget";
|
|
71
|
+
})(SurveyType || (SurveyType = {}));
|
|
72
|
+
var SurveyQuestionDescriptionContentType;
|
|
73
|
+
(function (SurveyQuestionDescriptionContentType) {
|
|
74
|
+
SurveyQuestionDescriptionContentType["Html"] = "html";
|
|
75
|
+
SurveyQuestionDescriptionContentType["Text"] = "text";
|
|
76
|
+
})(SurveyQuestionDescriptionContentType || (SurveyQuestionDescriptionContentType = {}));
|
|
77
|
+
var SurveyRatingDisplay;
|
|
78
|
+
(function (SurveyRatingDisplay) {
|
|
79
|
+
SurveyRatingDisplay["Number"] = "number";
|
|
80
|
+
SurveyRatingDisplay["Emoji"] = "emoji";
|
|
81
|
+
})(SurveyRatingDisplay || (SurveyRatingDisplay = {}));
|
|
82
|
+
var SurveyQuestionType;
|
|
83
|
+
(function (SurveyQuestionType) {
|
|
84
|
+
SurveyQuestionType["Open"] = "open";
|
|
85
|
+
SurveyQuestionType["MultipleChoice"] = "multiple_choice";
|
|
86
|
+
SurveyQuestionType["SingleChoice"] = "single_choice";
|
|
87
|
+
SurveyQuestionType["Rating"] = "rating";
|
|
88
|
+
SurveyQuestionType["Link"] = "link";
|
|
89
|
+
})(SurveyQuestionType || (SurveyQuestionType = {}));
|
|
90
|
+
var SurveyQuestionBranchingType;
|
|
91
|
+
(function (SurveyQuestionBranchingType) {
|
|
92
|
+
SurveyQuestionBranchingType["NextQuestion"] = "next_question";
|
|
93
|
+
SurveyQuestionBranchingType["End"] = "end";
|
|
94
|
+
SurveyQuestionBranchingType["ResponseBased"] = "response_based";
|
|
95
|
+
SurveyQuestionBranchingType["SpecificQuestion"] = "specific_question";
|
|
96
|
+
})(SurveyQuestionBranchingType || (SurveyQuestionBranchingType = {}));
|
|
97
|
+
var SurveyMatchType;
|
|
98
|
+
(function (SurveyMatchType) {
|
|
99
|
+
SurveyMatchType["Regex"] = "regex";
|
|
100
|
+
SurveyMatchType["NotRegex"] = "not_regex";
|
|
101
|
+
SurveyMatchType["Exact"] = "exact";
|
|
102
|
+
SurveyMatchType["IsNot"] = "is_not";
|
|
103
|
+
SurveyMatchType["Icontains"] = "icontains";
|
|
104
|
+
SurveyMatchType["NotIcontains"] = "not_icontains";
|
|
105
|
+
})(SurveyMatchType || (SurveyMatchType = {}));
|
|
106
|
+
/** Sync with plugin-server/src/types.ts */
|
|
107
|
+
var ActionStepStringMatching;
|
|
108
|
+
(function (ActionStepStringMatching) {
|
|
109
|
+
ActionStepStringMatching["Contains"] = "contains";
|
|
110
|
+
ActionStepStringMatching["Exact"] = "exact";
|
|
111
|
+
ActionStepStringMatching["Regex"] = "regex";
|
|
112
|
+
})(ActionStepStringMatching || (ActionStepStringMatching = {}));
|
|
54
113
|
|
|
55
114
|
const normalizeDecideResponse = (decideResponse) => {
|
|
56
115
|
if ('flags' in decideResponse) {
|
|
@@ -2543,7 +2602,7 @@ class ReduceableCache {
|
|
|
2543
2602
|
// Portions of this file are derived from getsentry/sentry-javascript by Software, Inc. dba Sentry
|
|
2544
2603
|
const nodeFs = new Lazy(async () => {
|
|
2545
2604
|
try {
|
|
2546
|
-
return await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('
|
|
2605
|
+
return await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('fs')); });
|
|
2547
2606
|
} catch {
|
|
2548
2607
|
return undefined;
|
|
2549
2608
|
}
|
|
@@ -2553,7 +2612,7 @@ async function getNodeFs() {
|
|
|
2553
2612
|
}
|
|
2554
2613
|
const nodeReadline = new Lazy(async () => {
|
|
2555
2614
|
try {
|
|
2556
|
-
return await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('
|
|
2615
|
+
return await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('readline')); });
|
|
2557
2616
|
} catch {
|
|
2558
2617
|
return undefined;
|
|
2559
2618
|
}
|
|
@@ -3201,7 +3260,7 @@ function nodeStackLineParser(getModule) {
|
|
|
3201
3260
|
}
|
|
3202
3261
|
const defaultStackParser = createStackParser(nodeStackLineParser(createGetModuleFromFilename()));
|
|
3203
3262
|
/** Creates a function that gets the module name from a filename */
|
|
3204
|
-
function createGetModuleFromFilename(basePath = process.argv[1] ?
|
|
3263
|
+
function createGetModuleFromFilename(basePath = process.argv[1] ? path.dirname(process.argv[1]) : process.cwd(), isWindows = path.sep === '\\') {
|
|
3205
3264
|
const normalizedBase = isWindows ? normalizeWindowsPath(basePath) : basePath;
|
|
3206
3265
|
return filename => {
|
|
3207
3266
|
if (!filename) {
|
|
@@ -3213,7 +3272,7 @@ function createGetModuleFromFilename(basePath = process.argv[1] ? node_path.dirn
|
|
|
3213
3272
|
dir,
|
|
3214
3273
|
base: file,
|
|
3215
3274
|
ext
|
|
3216
|
-
} =
|
|
3275
|
+
} = path.posix.parse(normalizedFilename);
|
|
3217
3276
|
if (ext === '.js' || ext === '.mjs' || ext === '.cjs') {
|
|
3218
3277
|
file = file.slice(0, ext.length * -1);
|
|
3219
3278
|
}
|