autotel-subscribers 15.0.0 → 16.0.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/amplitude.cjs +64 -64
- package/dist/amplitude.cjs.map +1 -1
- package/dist/amplitude.js +64 -64
- package/dist/amplitude.js.map +1 -1
- package/dist/factories.cjs +987 -347
- package/dist/factories.cjs.map +1 -1
- package/dist/factories.js +987 -347
- package/dist/factories.js.map +1 -1
- package/dist/index.cjs +987 -347
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +987 -347
- package/dist/index.js.map +1 -1
- package/dist/mixpanel.cjs +686 -130
- package/dist/mixpanel.cjs.map +1 -1
- package/dist/mixpanel.js +686 -130
- package/dist/mixpanel.js.map +1 -1
- package/dist/posthog.cjs +234 -150
- package/dist/posthog.cjs.map +1 -1
- package/dist/posthog.js +234 -150
- package/dist/posthog.js.map +1 -1
- package/package.json +13 -13
package/dist/posthog.cjs
CHANGED
|
@@ -43,11 +43,11 @@ function normalizeWindowsPath(path) {
|
|
|
43
43
|
return path.replace(/^[A-Z]:/, "").replace(/\\/g, "/");
|
|
44
44
|
}
|
|
45
45
|
var init_module_node = __esm({
|
|
46
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
46
|
+
"../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/extensions/error-tracking/modifiers/module.node.mjs"() {
|
|
47
47
|
}
|
|
48
48
|
});
|
|
49
49
|
|
|
50
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
50
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/featureFlagUtils.mjs
|
|
51
51
|
function getFlagDetailFromFlagAndPayload(key, value, payload) {
|
|
52
52
|
return {
|
|
53
53
|
key,
|
|
@@ -64,7 +64,7 @@ function getFlagDetailFromFlagAndPayload(key, value, payload) {
|
|
|
64
64
|
}
|
|
65
65
|
var normalizeFlagsResponse, getFlagValuesFromFlags, getPayloadsFromFlags, getFeatureFlagValue, parsePayload;
|
|
66
66
|
var init_featureFlagUtils = __esm({
|
|
67
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
67
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/featureFlagUtils.mjs"() {
|
|
68
68
|
normalizeFlagsResponse = (flagsResponse) => {
|
|
69
69
|
if ("flags" in flagsResponse) {
|
|
70
70
|
const featureFlags = getFlagValuesFromFlags(flagsResponse.flags);
|
|
@@ -122,10 +122,10 @@ var init_featureFlagUtils = __esm({
|
|
|
122
122
|
}
|
|
123
123
|
});
|
|
124
124
|
|
|
125
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
125
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/vendor/uuidv7.mjs
|
|
126
126
|
var DIGITS, UUID, V7Generator, getDefaultRandom, defaultGenerator, uuidv7, uuidv7obj;
|
|
127
127
|
var init_uuidv7 = __esm({
|
|
128
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
128
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/vendor/uuidv7.mjs"() {
|
|
129
129
|
DIGITS = "0123456789abcdef";
|
|
130
130
|
UUID = class _UUID {
|
|
131
131
|
constructor(bytes) {
|
|
@@ -286,10 +286,10 @@ var init_uuidv7 = __esm({
|
|
|
286
286
|
}
|
|
287
287
|
});
|
|
288
288
|
|
|
289
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
289
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/utils/bot-detection.mjs
|
|
290
290
|
var DEFAULT_BLOCKED_UA_STRS, isBlockedUA;
|
|
291
291
|
var init_bot_detection = __esm({
|
|
292
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
292
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/utils/bot-detection.mjs"() {
|
|
293
293
|
DEFAULT_BLOCKED_UA_STRS = [
|
|
294
294
|
"amazonbot",
|
|
295
295
|
"amazonproductbot",
|
|
@@ -380,10 +380,10 @@ var init_bot_detection = __esm({
|
|
|
380
380
|
}
|
|
381
381
|
});
|
|
382
382
|
|
|
383
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
383
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/types.mjs
|
|
384
384
|
var types_PostHogPersistedProperty;
|
|
385
385
|
var init_types = __esm({
|
|
386
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
386
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/types.mjs"() {
|
|
387
387
|
types_PostHogPersistedProperty = /* @__PURE__ */ (function(PostHogPersistedProperty) {
|
|
388
388
|
PostHogPersistedProperty["AnonymousId"] = "anonymous_id";
|
|
389
389
|
PostHogPersistedProperty["DistinctId"] = "distinct_id";
|
|
@@ -415,20 +415,13 @@ var init_types = __esm({
|
|
|
415
415
|
}
|
|
416
416
|
});
|
|
417
417
|
|
|
418
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
418
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/utils/string-utils.mjs
|
|
419
419
|
var init_string_utils = __esm({
|
|
420
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
420
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/utils/string-utils.mjs"() {
|
|
421
421
|
}
|
|
422
422
|
});
|
|
423
423
|
|
|
424
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
425
|
-
function isInstanceOf(candidate, base) {
|
|
426
|
-
try {
|
|
427
|
-
return candidate instanceof base;
|
|
428
|
-
} catch {
|
|
429
|
-
return false;
|
|
430
|
-
}
|
|
431
|
-
}
|
|
424
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/utils/type-utils.mjs
|
|
432
425
|
function isPrimitive(value) {
|
|
433
426
|
return null === value || "object" != typeof value;
|
|
434
427
|
}
|
|
@@ -444,9 +437,16 @@ function isEvent(candidate) {
|
|
|
444
437
|
function isPlainObject(candidate) {
|
|
445
438
|
return isBuiltin(candidate, "Object");
|
|
446
439
|
}
|
|
447
|
-
|
|
440
|
+
function isInstanceOf(candidate, base) {
|
|
441
|
+
try {
|
|
442
|
+
return candidate instanceof base;
|
|
443
|
+
} catch {
|
|
444
|
+
return false;
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
var nativeIsArray, ObjProto, type_utils_toString, isArray, isObject, isUndefined, isString, isEmptyString, isNumber, isPlainError;
|
|
448
448
|
var init_type_utils = __esm({
|
|
449
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
449
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/utils/type-utils.mjs"() {
|
|
450
450
|
init_types();
|
|
451
451
|
init_string_utils();
|
|
452
452
|
nativeIsArray = Array.isArray;
|
|
@@ -456,6 +456,7 @@ var init_type_utils = __esm({
|
|
|
456
456
|
isArray = nativeIsArray || function(obj) {
|
|
457
457
|
return "[object Array]" === type_utils_toString.call(obj);
|
|
458
458
|
};
|
|
459
|
+
isObject = (x) => x === Object(x) && !isArray(x);
|
|
459
460
|
isUndefined = (x) => void 0 === x;
|
|
460
461
|
isString = (x) => "[object String]" == type_utils_toString.call(x);
|
|
461
462
|
isEmptyString = (x) => isString(x) && 0 === x.trim().length;
|
|
@@ -464,7 +465,7 @@ var init_type_utils = __esm({
|
|
|
464
465
|
}
|
|
465
466
|
});
|
|
466
467
|
|
|
467
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
468
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/utils/number-utils.mjs
|
|
468
469
|
function clampToRange(value, min, max, logger, fallbackValue) {
|
|
469
470
|
if (min > max) {
|
|
470
471
|
logger.warn("min cannot be greater than max.");
|
|
@@ -482,15 +483,15 @@ function clampToRange(value, min, max, logger, fallbackValue) {
|
|
|
482
483
|
return clampToRange(max, min, max, logger);
|
|
483
484
|
}
|
|
484
485
|
var init_number_utils = __esm({
|
|
485
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
486
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/utils/number-utils.mjs"() {
|
|
486
487
|
init_type_utils();
|
|
487
488
|
}
|
|
488
489
|
});
|
|
489
490
|
|
|
490
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
491
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/utils/bucketed-rate-limiter.mjs
|
|
491
492
|
var ONE_DAY_IN_MS, BucketedRateLimiter;
|
|
492
493
|
var init_bucketed_rate_limiter = __esm({
|
|
493
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
494
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/utils/bucketed-rate-limiter.mjs"() {
|
|
494
495
|
init_number_utils();
|
|
495
496
|
ONE_DAY_IN_MS = 864e5;
|
|
496
497
|
BucketedRateLimiter = class {
|
|
@@ -534,10 +535,10 @@ var init_bucketed_rate_limiter = __esm({
|
|
|
534
535
|
}
|
|
535
536
|
});
|
|
536
537
|
|
|
537
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
538
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/utils/promise-queue.mjs
|
|
538
539
|
var PromiseQueue;
|
|
539
540
|
var init_promise_queue = __esm({
|
|
540
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
541
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/utils/promise-queue.mjs"() {
|
|
541
542
|
init_uuidv7();
|
|
542
543
|
PromiseQueue = class {
|
|
543
544
|
add(promise) {
|
|
@@ -568,7 +569,7 @@ var init_promise_queue = __esm({
|
|
|
568
569
|
}
|
|
569
570
|
});
|
|
570
571
|
|
|
571
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
572
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/utils/logger.mjs
|
|
572
573
|
function createConsole(consoleLike = console) {
|
|
573
574
|
const lockedMethods = {
|
|
574
575
|
log: consoleLike.log.bind(consoleLike),
|
|
@@ -583,7 +584,7 @@ function createLogger(prefix, maybeCall = passThrough) {
|
|
|
583
584
|
}
|
|
584
585
|
var _createLogger, passThrough;
|
|
585
586
|
var init_logger = __esm({
|
|
586
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
587
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/utils/logger.mjs"() {
|
|
587
588
|
_createLogger = (prefix, maybeCall, consoleLike) => {
|
|
588
589
|
function _log(level, ...args) {
|
|
589
590
|
maybeCall(() => {
|
|
@@ -612,10 +613,10 @@ var init_logger = __esm({
|
|
|
612
613
|
}
|
|
613
614
|
});
|
|
614
615
|
|
|
615
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
616
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/utils/user-agent-utils.mjs
|
|
616
617
|
var MOBILE, TABLET, GENERIC;
|
|
617
618
|
var init_user_agent_utils = __esm({
|
|
618
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
619
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/utils/user-agent-utils.mjs"() {
|
|
619
620
|
init_string_utils();
|
|
620
621
|
init_type_utils();
|
|
621
622
|
MOBILE = "Mobile";
|
|
@@ -626,7 +627,7 @@ var init_user_agent_utils = __esm({
|
|
|
626
627
|
}
|
|
627
628
|
});
|
|
628
629
|
|
|
629
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
630
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/utils/index.mjs
|
|
630
631
|
function assert(truthyValue, message) {
|
|
631
632
|
if (!truthyValue || "string" != typeof truthyValue || isEmpty(truthyValue)) throw new Error(message);
|
|
632
633
|
}
|
|
@@ -670,7 +671,7 @@ function allSettled(promises) {
|
|
|
670
671
|
}
|
|
671
672
|
var STRING_FORMAT, isError;
|
|
672
673
|
var init_utils = __esm({
|
|
673
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
674
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/utils/index.mjs"() {
|
|
674
675
|
init_bot_detection();
|
|
675
676
|
init_bucketed_rate_limiter();
|
|
676
677
|
init_number_utils();
|
|
@@ -684,10 +685,10 @@ var init_utils = __esm({
|
|
|
684
685
|
}
|
|
685
686
|
});
|
|
686
687
|
|
|
687
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
688
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/eventemitter.mjs
|
|
688
689
|
var SimpleEventEmitter;
|
|
689
690
|
var init_eventemitter = __esm({
|
|
690
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
691
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/eventemitter.mjs"() {
|
|
691
692
|
SimpleEventEmitter = class {
|
|
692
693
|
constructor() {
|
|
693
694
|
this.events = {};
|
|
@@ -708,7 +709,7 @@ var init_eventemitter = __esm({
|
|
|
708
709
|
}
|
|
709
710
|
});
|
|
710
711
|
|
|
711
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
712
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/gzip.mjs
|
|
712
713
|
function isGzipSupported() {
|
|
713
714
|
return "CompressionStream" in globalThis;
|
|
714
715
|
}
|
|
@@ -727,11 +728,11 @@ async function gzipCompress(input, isDebug = true) {
|
|
|
727
728
|
}
|
|
728
729
|
}
|
|
729
730
|
var init_gzip = __esm({
|
|
730
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
731
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/gzip.mjs"() {
|
|
731
732
|
}
|
|
732
733
|
});
|
|
733
734
|
|
|
734
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
735
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/posthog-core-stateless.mjs
|
|
735
736
|
async function logFlushError(err) {
|
|
736
737
|
if (err instanceof PostHogFetchHttpError) {
|
|
737
738
|
let text = "";
|
|
@@ -751,7 +752,7 @@ function isPostHogFetchContentTooLargeError(err) {
|
|
|
751
752
|
}
|
|
752
753
|
var PostHogFetchHttpError, PostHogFetchNetworkError, PostHogCoreStateless;
|
|
753
754
|
var init_posthog_core_stateless = __esm({
|
|
754
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
755
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/posthog-core-stateless.mjs"() {
|
|
755
756
|
init_eventemitter();
|
|
756
757
|
init_featureFlagUtils();
|
|
757
758
|
init_gzip();
|
|
@@ -1369,9 +1370,9 @@ var init_posthog_core_stateless = __esm({
|
|
|
1369
1370
|
}
|
|
1370
1371
|
});
|
|
1371
1372
|
|
|
1372
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1373
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/posthog-core.mjs
|
|
1373
1374
|
var init_posthog_core = __esm({
|
|
1374
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1375
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/posthog-core.mjs"() {
|
|
1375
1376
|
init_featureFlagUtils();
|
|
1376
1377
|
init_types();
|
|
1377
1378
|
init_posthog_core_stateless();
|
|
@@ -1380,7 +1381,7 @@ var init_posthog_core = __esm({
|
|
|
1380
1381
|
}
|
|
1381
1382
|
});
|
|
1382
1383
|
|
|
1383
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1384
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/chunk-ids.mjs
|
|
1384
1385
|
function getFilenameToChunkIdMap(stackParser) {
|
|
1385
1386
|
const chunkIdMap = globalThis._posthogChunkIds;
|
|
1386
1387
|
if (!chunkIdMap) return;
|
|
@@ -1413,14 +1414,14 @@ function getFilenameToChunkIdMap(stackParser) {
|
|
|
1413
1414
|
}
|
|
1414
1415
|
var parsedStackResults, lastKeysCount, cachedFilenameChunkIds;
|
|
1415
1416
|
var init_chunk_ids = __esm({
|
|
1416
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1417
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/chunk-ids.mjs"() {
|
|
1417
1418
|
}
|
|
1418
1419
|
});
|
|
1419
1420
|
|
|
1420
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1421
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/error-properties-builder.mjs
|
|
1421
1422
|
var MAX_CAUSE_RECURSION, ErrorPropertiesBuilder;
|
|
1422
1423
|
var init_error_properties_builder = __esm({
|
|
1423
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1424
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/error-properties-builder.mjs"() {
|
|
1424
1425
|
init_utils();
|
|
1425
1426
|
init_chunk_ids();
|
|
1426
1427
|
MAX_CAUSE_RECURSION = 4;
|
|
@@ -1534,7 +1535,7 @@ var init_error_properties_builder = __esm({
|
|
|
1534
1535
|
}
|
|
1535
1536
|
});
|
|
1536
1537
|
|
|
1537
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1538
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/parsers/base.mjs
|
|
1538
1539
|
function createFrame(platform, filename, func, lineno, colno) {
|
|
1539
1540
|
const frame = {
|
|
1540
1541
|
platform,
|
|
@@ -1548,16 +1549,16 @@ function createFrame(platform, filename, func, lineno, colno) {
|
|
|
1548
1549
|
}
|
|
1549
1550
|
var UNKNOWN_FUNCTION;
|
|
1550
1551
|
var init_base = __esm({
|
|
1551
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1552
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/parsers/base.mjs"() {
|
|
1552
1553
|
init_utils();
|
|
1553
1554
|
UNKNOWN_FUNCTION = "?";
|
|
1554
1555
|
}
|
|
1555
1556
|
});
|
|
1556
1557
|
|
|
1557
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1558
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/parsers/safari.mjs
|
|
1558
1559
|
var extractSafariExtensionDetails;
|
|
1559
1560
|
var init_safari = __esm({
|
|
1560
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1561
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/parsers/safari.mjs"() {
|
|
1561
1562
|
init_base();
|
|
1562
1563
|
extractSafariExtensionDetails = (func, filename) => {
|
|
1563
1564
|
const isSafariExtension = -1 !== func.indexOf("safari-extension");
|
|
@@ -1573,10 +1574,10 @@ var init_safari = __esm({
|
|
|
1573
1574
|
}
|
|
1574
1575
|
});
|
|
1575
1576
|
|
|
1576
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1577
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/parsers/chrome.mjs
|
|
1577
1578
|
var chromeRegexNoFnName, chromeRegex, chromeEvalRegex, chromeStackLineParser;
|
|
1578
1579
|
var init_chrome = __esm({
|
|
1579
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1580
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/parsers/chrome.mjs"() {
|
|
1580
1581
|
init_base();
|
|
1581
1582
|
init_safari();
|
|
1582
1583
|
chromeRegexNoFnName = /^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i;
|
|
@@ -1606,23 +1607,10 @@ var init_chrome = __esm({
|
|
|
1606
1607
|
}
|
|
1607
1608
|
});
|
|
1608
1609
|
|
|
1609
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1610
|
-
var winjsRegex, winjsStackLineParser;
|
|
1611
|
-
var init_winjs = __esm({
|
|
1612
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/error-tracking/parsers/winjs.mjs"() {
|
|
1613
|
-
init_base();
|
|
1614
|
-
winjsRegex = /^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i;
|
|
1615
|
-
winjsStackLineParser = (line, platform) => {
|
|
1616
|
-
const parts = winjsRegex.exec(line);
|
|
1617
|
-
return parts ? createFrame(platform, parts[2], parts[1] || UNKNOWN_FUNCTION, +parts[3], parts[4] ? +parts[4] : void 0) : void 0;
|
|
1618
|
-
};
|
|
1619
|
-
}
|
|
1620
|
-
});
|
|
1621
|
-
|
|
1622
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.0/node_modules/@posthog/core/dist/error-tracking/parsers/gecko.mjs
|
|
1610
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/parsers/gecko.mjs
|
|
1623
1611
|
var geckoREgex, geckoEvalRegex, geckoStackLineParser;
|
|
1624
1612
|
var init_gecko = __esm({
|
|
1625
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1613
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/parsers/gecko.mjs"() {
|
|
1626
1614
|
init_base();
|
|
1627
1615
|
init_safari();
|
|
1628
1616
|
geckoREgex = /^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i;
|
|
@@ -1649,10 +1637,23 @@ var init_gecko = __esm({
|
|
|
1649
1637
|
}
|
|
1650
1638
|
});
|
|
1651
1639
|
|
|
1652
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1640
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/parsers/winjs.mjs
|
|
1641
|
+
var winjsRegex, winjsStackLineParser;
|
|
1642
|
+
var init_winjs = __esm({
|
|
1643
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/parsers/winjs.mjs"() {
|
|
1644
|
+
init_base();
|
|
1645
|
+
winjsRegex = /^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i;
|
|
1646
|
+
winjsStackLineParser = (line, platform) => {
|
|
1647
|
+
const parts = winjsRegex.exec(line);
|
|
1648
|
+
return parts ? createFrame(platform, parts[2], parts[1] || UNKNOWN_FUNCTION, +parts[3], parts[4] ? +parts[4] : void 0) : void 0;
|
|
1649
|
+
};
|
|
1650
|
+
}
|
|
1651
|
+
});
|
|
1652
|
+
|
|
1653
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/parsers/opera.mjs
|
|
1653
1654
|
var opera10Regex, opera10StackLineParser, opera11Regex, opera11StackLineParser;
|
|
1654
1655
|
var init_opera = __esm({
|
|
1655
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1656
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/parsers/opera.mjs"() {
|
|
1656
1657
|
init_base();
|
|
1657
1658
|
opera10Regex = / line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i;
|
|
1658
1659
|
opera10StackLineParser = (line, platform) => {
|
|
@@ -1667,7 +1668,7 @@ var init_opera = __esm({
|
|
|
1667
1668
|
}
|
|
1668
1669
|
});
|
|
1669
1670
|
|
|
1670
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1671
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/parsers/node.mjs
|
|
1671
1672
|
function filenameIsInApp(filename, isNative = false) {
|
|
1672
1673
|
const isInternal = isNative || filename && !filename.startsWith("/") && !filename.match(/^[A-Z]:/) && !filename.startsWith(".") && !filename.match(/^[a-zA-Z]([a-zA-Z0-9.\-+])*:\/\//);
|
|
1673
1674
|
return !isInternal && void 0 !== filename && !filename.includes("node_modules/");
|
|
@@ -1677,7 +1678,7 @@ function _parseIntOrUndefined(input) {
|
|
|
1677
1678
|
}
|
|
1678
1679
|
var FILENAME_MATCH, FULL_MATCH, nodeStackLineParser;
|
|
1679
1680
|
var init_node = __esm({
|
|
1680
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1681
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/parsers/node.mjs"() {
|
|
1681
1682
|
init_base();
|
|
1682
1683
|
FILENAME_MATCH = /^\s*[-]{4,}$/;
|
|
1683
1684
|
FULL_MATCH = /at (?:async )?(?:(.+?)\s+\()?(?:(.+):(\d+):(\d+)?|([^)]+))\)?/;
|
|
@@ -1738,7 +1739,7 @@ var init_node = __esm({
|
|
|
1738
1739
|
}
|
|
1739
1740
|
});
|
|
1740
1741
|
|
|
1741
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1742
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/parsers/index.mjs
|
|
1742
1743
|
function reverseAndStripFrames(stack) {
|
|
1743
1744
|
if (!stack.length) return [];
|
|
1744
1745
|
const localStack = Array.from(stack);
|
|
@@ -1752,6 +1753,9 @@ function reverseAndStripFrames(stack) {
|
|
|
1752
1753
|
function getLastStackFrame(arr) {
|
|
1753
1754
|
return arr[arr.length - 1] || {};
|
|
1754
1755
|
}
|
|
1756
|
+
function createDefaultStackParser() {
|
|
1757
|
+
return createStackParser("web:javascript", chromeStackLineParser, geckoStackLineParser);
|
|
1758
|
+
}
|
|
1755
1759
|
function createStackParser(platform, ...parsers) {
|
|
1756
1760
|
return (stack, skipFirstLines = 0) => {
|
|
1757
1761
|
const frames = [];
|
|
@@ -1776,11 +1780,11 @@ function createStackParser(platform, ...parsers) {
|
|
|
1776
1780
|
}
|
|
1777
1781
|
var WEBPACK_ERROR_REGEXP, STACKTRACE_FRAME_LIMIT;
|
|
1778
1782
|
var init_parsers = __esm({
|
|
1779
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1783
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/parsers/index.mjs"() {
|
|
1780
1784
|
init_base();
|
|
1781
1785
|
init_chrome();
|
|
1782
|
-
init_winjs();
|
|
1783
1786
|
init_gecko();
|
|
1787
|
+
init_winjs();
|
|
1784
1788
|
init_opera();
|
|
1785
1789
|
init_node();
|
|
1786
1790
|
WEBPACK_ERROR_REGEXP = /\(error: (.*)\)/;
|
|
@@ -1788,10 +1792,10 @@ var init_parsers = __esm({
|
|
|
1788
1792
|
}
|
|
1789
1793
|
});
|
|
1790
1794
|
|
|
1791
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1795
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/coercers/dom-exception-coercer.mjs
|
|
1792
1796
|
var DOMExceptionCoercer;
|
|
1793
1797
|
var init_dom_exception_coercer = __esm({
|
|
1794
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1798
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/coercers/dom-exception-coercer.mjs"() {
|
|
1795
1799
|
init_utils();
|
|
1796
1800
|
DOMExceptionCoercer = class {
|
|
1797
1801
|
match(err) {
|
|
@@ -1825,10 +1829,10 @@ var init_dom_exception_coercer = __esm({
|
|
|
1825
1829
|
}
|
|
1826
1830
|
});
|
|
1827
1831
|
|
|
1828
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1832
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/coercers/error-coercer.mjs
|
|
1829
1833
|
var ErrorCoercer;
|
|
1830
1834
|
var init_error_coercer = __esm({
|
|
1831
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1835
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/coercers/error-coercer.mjs"() {
|
|
1832
1836
|
init_utils();
|
|
1833
1837
|
ErrorCoercer = class {
|
|
1834
1838
|
match(err) {
|
|
@@ -1858,10 +1862,10 @@ var init_error_coercer = __esm({
|
|
|
1858
1862
|
}
|
|
1859
1863
|
});
|
|
1860
1864
|
|
|
1861
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1865
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/coercers/error-event-coercer.mjs
|
|
1862
1866
|
var ErrorEventCoercer;
|
|
1863
1867
|
var init_error_event_coercer = __esm({
|
|
1864
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1868
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/coercers/error-event-coercer.mjs"() {
|
|
1865
1869
|
init_utils();
|
|
1866
1870
|
ErrorEventCoercer = class {
|
|
1867
1871
|
constructor() {
|
|
@@ -1883,10 +1887,10 @@ var init_error_event_coercer = __esm({
|
|
|
1883
1887
|
}
|
|
1884
1888
|
});
|
|
1885
1889
|
|
|
1886
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1890
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/coercers/string-coercer.mjs
|
|
1887
1891
|
var ERROR_TYPES_PATTERN, StringCoercer;
|
|
1888
1892
|
var init_string_coercer = __esm({
|
|
1889
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1893
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/coercers/string-coercer.mjs"() {
|
|
1890
1894
|
ERROR_TYPES_PATTERN = /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;
|
|
1891
1895
|
StringCoercer = class {
|
|
1892
1896
|
match(input) {
|
|
@@ -1918,10 +1922,10 @@ var init_string_coercer = __esm({
|
|
|
1918
1922
|
}
|
|
1919
1923
|
});
|
|
1920
1924
|
|
|
1921
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1925
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/types.mjs
|
|
1922
1926
|
var severityLevels;
|
|
1923
1927
|
var init_types2 = __esm({
|
|
1924
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1928
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/types.mjs"() {
|
|
1925
1929
|
severityLevels = [
|
|
1926
1930
|
"fatal",
|
|
1927
1931
|
"error",
|
|
@@ -1933,7 +1937,7 @@ var init_types2 = __esm({
|
|
|
1933
1937
|
}
|
|
1934
1938
|
});
|
|
1935
1939
|
|
|
1936
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1940
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/coercers/utils.mjs
|
|
1937
1941
|
function extractExceptionKeysForMessage(err, maxLength = 40) {
|
|
1938
1942
|
const keys = Object.keys(err);
|
|
1939
1943
|
keys.sort();
|
|
@@ -1948,14 +1952,14 @@ function extractExceptionKeysForMessage(err, maxLength = 40) {
|
|
|
1948
1952
|
return "";
|
|
1949
1953
|
}
|
|
1950
1954
|
var init_utils2 = __esm({
|
|
1951
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1955
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/coercers/utils.mjs"() {
|
|
1952
1956
|
}
|
|
1953
1957
|
});
|
|
1954
1958
|
|
|
1955
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1959
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/coercers/object-coercer.mjs
|
|
1956
1960
|
var ObjectCoercer;
|
|
1957
1961
|
var init_object_coercer = __esm({
|
|
1958
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
1962
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/coercers/object-coercer.mjs"() {
|
|
1959
1963
|
init_utils();
|
|
1960
1964
|
init_types2();
|
|
1961
1965
|
init_utils2();
|
|
@@ -2009,10 +2013,10 @@ var init_object_coercer = __esm({
|
|
|
2009
2013
|
}
|
|
2010
2014
|
});
|
|
2011
2015
|
|
|
2012
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
2016
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/coercers/event-coercer.mjs
|
|
2013
2017
|
var EventCoercer;
|
|
2014
2018
|
var init_event_coercer = __esm({
|
|
2015
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
2019
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/coercers/event-coercer.mjs"() {
|
|
2016
2020
|
init_utils();
|
|
2017
2021
|
init_utils2();
|
|
2018
2022
|
EventCoercer = class {
|
|
@@ -2032,10 +2036,10 @@ var init_event_coercer = __esm({
|
|
|
2032
2036
|
}
|
|
2033
2037
|
});
|
|
2034
2038
|
|
|
2035
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
2039
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/coercers/primitive-coercer.mjs
|
|
2036
2040
|
var PrimitiveCoercer;
|
|
2037
2041
|
var init_primitive_coercer = __esm({
|
|
2038
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
2042
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/coercers/primitive-coercer.mjs"() {
|
|
2039
2043
|
init_utils();
|
|
2040
2044
|
PrimitiveCoercer = class {
|
|
2041
2045
|
match(candidate) {
|
|
@@ -2053,10 +2057,10 @@ var init_primitive_coercer = __esm({
|
|
|
2053
2057
|
}
|
|
2054
2058
|
});
|
|
2055
2059
|
|
|
2056
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
2060
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/coercers/promise-rejection-event.mjs
|
|
2057
2061
|
var PromiseRejectionEventCoercer;
|
|
2058
2062
|
var init_promise_rejection_event = __esm({
|
|
2059
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
2063
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/coercers/promise-rejection-event.mjs"() {
|
|
2060
2064
|
init_utils();
|
|
2061
2065
|
PromiseRejectionEventCoercer = class {
|
|
2062
2066
|
match(err) {
|
|
@@ -2085,9 +2089,9 @@ var init_promise_rejection_event = __esm({
|
|
|
2085
2089
|
}
|
|
2086
2090
|
});
|
|
2087
2091
|
|
|
2088
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
2092
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/coercers/index.mjs
|
|
2089
2093
|
var init_coercers = __esm({
|
|
2090
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
2094
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/coercers/index.mjs"() {
|
|
2091
2095
|
init_dom_exception_coercer();
|
|
2092
2096
|
init_error_coercer();
|
|
2093
2097
|
init_error_event_coercer();
|
|
@@ -2099,10 +2103,10 @@ var init_coercers = __esm({
|
|
|
2099
2103
|
}
|
|
2100
2104
|
});
|
|
2101
2105
|
|
|
2102
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
2106
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/utils.mjs
|
|
2103
2107
|
var ReduceableCache;
|
|
2104
2108
|
var init_utils3 = __esm({
|
|
2105
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
2109
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/utils.mjs"() {
|
|
2106
2110
|
ReduceableCache = class {
|
|
2107
2111
|
constructor(_maxSize) {
|
|
2108
2112
|
this._maxSize = _maxSize;
|
|
@@ -2128,7 +2132,7 @@ var init_utils3 = __esm({
|
|
|
2128
2132
|
}
|
|
2129
2133
|
});
|
|
2130
2134
|
|
|
2131
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
2135
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/index.mjs
|
|
2132
2136
|
var error_tracking_exports = {};
|
|
2133
2137
|
__export(error_tracking_exports, {
|
|
2134
2138
|
DOMExceptionCoercer: () => DOMExceptionCoercer,
|
|
@@ -2142,6 +2146,7 @@ __export(error_tracking_exports, {
|
|
|
2142
2146
|
ReduceableCache: () => ReduceableCache,
|
|
2143
2147
|
StringCoercer: () => StringCoercer,
|
|
2144
2148
|
chromeStackLineParser: () => chromeStackLineParser,
|
|
2149
|
+
createDefaultStackParser: () => createDefaultStackParser,
|
|
2145
2150
|
createStackParser: () => createStackParser,
|
|
2146
2151
|
geckoStackLineParser: () => geckoStackLineParser,
|
|
2147
2152
|
nodeStackLineParser: () => nodeStackLineParser,
|
|
@@ -2151,7 +2156,7 @@ __export(error_tracking_exports, {
|
|
|
2151
2156
|
winjsStackLineParser: () => winjsStackLineParser
|
|
2152
2157
|
});
|
|
2153
2158
|
var init_error_tracking = __esm({
|
|
2154
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
2159
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/error-tracking/index.mjs"() {
|
|
2155
2160
|
init_error_properties_builder();
|
|
2156
2161
|
init_parsers();
|
|
2157
2162
|
init_coercers();
|
|
@@ -2159,9 +2164,9 @@ var init_error_tracking = __esm({
|
|
|
2159
2164
|
}
|
|
2160
2165
|
});
|
|
2161
2166
|
|
|
2162
|
-
// ../../node_modules/.pnpm/@posthog+core@1.9.
|
|
2167
|
+
// ../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/index.mjs
|
|
2163
2168
|
var init_dist = __esm({
|
|
2164
|
-
"../../node_modules/.pnpm/@posthog+core@1.9.
|
|
2169
|
+
"../../node_modules/.pnpm/@posthog+core@1.9.1/node_modules/@posthog/core/dist/index.mjs"() {
|
|
2165
2170
|
init_featureFlagUtils();
|
|
2166
2171
|
init_uuidv7();
|
|
2167
2172
|
init_utils();
|
|
@@ -2352,7 +2357,7 @@ function snipLine(line, colno) {
|
|
|
2352
2357
|
}
|
|
2353
2358
|
var LRU_FILE_CONTENTS_CACHE, LRU_FILE_CONTENTS_FS_READ_FAILED, DEFAULT_LINES_OF_CONTEXT, MAX_CONTEXTLINES_COLNO, MAX_CONTEXTLINES_LINENO;
|
|
2354
2359
|
var init_context_lines_node = __esm({
|
|
2355
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
2360
|
+
"../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/extensions/error-tracking/modifiers/context-lines.node.mjs"() {
|
|
2356
2361
|
init_dist();
|
|
2357
2362
|
LRU_FILE_CONTENTS_CACHE = new error_tracking_exports.ReduceableCache(25);
|
|
2358
2363
|
LRU_FILE_CONTENTS_FS_READ_FAILED = new error_tracking_exports.ReduceableCache(20);
|
|
@@ -2362,7 +2367,7 @@ var init_context_lines_node = __esm({
|
|
|
2362
2367
|
}
|
|
2363
2368
|
});
|
|
2364
2369
|
|
|
2365
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
2370
|
+
// ../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/extensions/error-tracking/autocapture.mjs
|
|
2366
2371
|
function makeUncaughtExceptionHandler(captureFn, onFatalFn) {
|
|
2367
2372
|
let calledFatalError = false;
|
|
2368
2373
|
return Object.assign((error) => {
|
|
@@ -2394,14 +2399,14 @@ function addUnhandledRejectionListener(captureFn) {
|
|
|
2394
2399
|
}));
|
|
2395
2400
|
}
|
|
2396
2401
|
var init_autocapture = __esm({
|
|
2397
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
2402
|
+
"../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/extensions/error-tracking/autocapture.mjs"() {
|
|
2398
2403
|
}
|
|
2399
2404
|
});
|
|
2400
2405
|
|
|
2401
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
2406
|
+
// ../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/extensions/error-tracking/index.mjs
|
|
2402
2407
|
var SHUTDOWN_TIMEOUT, ErrorTracking;
|
|
2403
2408
|
var init_error_tracking2 = __esm({
|
|
2404
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
2409
|
+
"../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/extensions/error-tracking/index.mjs"() {
|
|
2405
2410
|
init_autocapture();
|
|
2406
2411
|
init_dist();
|
|
2407
2412
|
SHUTDOWN_TIMEOUT = 2e3;
|
|
@@ -2418,6 +2423,9 @@ var init_error_tracking2 = __esm({
|
|
|
2418
2423
|
});
|
|
2419
2424
|
this.startAutocaptureIfEnabled();
|
|
2420
2425
|
}
|
|
2426
|
+
static isPreviouslyCapturedError(x) {
|
|
2427
|
+
return isObject(x) && "__posthog_previously_captured_error" in x && true === x.__posthog_previously_captured_error;
|
|
2428
|
+
}
|
|
2421
2429
|
static async buildEventMessage(error, hint, distinctId, additionalProperties) {
|
|
2422
2430
|
const properties = {
|
|
2423
2431
|
...additionalProperties
|
|
@@ -2442,14 +2450,16 @@ var init_error_tracking2 = __esm({
|
|
|
2442
2450
|
}
|
|
2443
2451
|
onException(exception, hint) {
|
|
2444
2452
|
this.client.addPendingPromise((async () => {
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
exception
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
+
if (!_ErrorTracking.isPreviouslyCapturedError(exception)) {
|
|
2454
|
+
const eventMessage = await _ErrorTracking.buildEventMessage(exception, hint);
|
|
2455
|
+
const exceptionProperties = eventMessage.properties;
|
|
2456
|
+
const exceptionType = exceptionProperties?.$exception_list[0]?.type ?? "Exception";
|
|
2457
|
+
const isRateLimited = this._rateLimiter.consumeRateLimit(exceptionType);
|
|
2458
|
+
if (isRateLimited) return void this._logger.info("Skipping exception capture because of client rate limiting.", {
|
|
2459
|
+
exception: exceptionType
|
|
2460
|
+
});
|
|
2461
|
+
return this.client.capture(eventMessage);
|
|
2462
|
+
}
|
|
2453
2463
|
})());
|
|
2454
2464
|
}
|
|
2455
2465
|
async onFatalError(exception) {
|
|
@@ -2467,18 +2477,18 @@ var init_error_tracking2 = __esm({
|
|
|
2467
2477
|
}
|
|
2468
2478
|
});
|
|
2469
2479
|
|
|
2470
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
2480
|
+
// ../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/version.mjs
|
|
2471
2481
|
var version;
|
|
2472
2482
|
var init_version = __esm({
|
|
2473
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
2474
|
-
version = "5.
|
|
2483
|
+
"../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/version.mjs"() {
|
|
2484
|
+
version = "5.21.0";
|
|
2475
2485
|
}
|
|
2476
2486
|
});
|
|
2477
2487
|
|
|
2478
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
2488
|
+
// ../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/types.mjs
|
|
2479
2489
|
var FeatureFlagError;
|
|
2480
2490
|
var init_types3 = __esm({
|
|
2481
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
2491
|
+
"../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/types.mjs"() {
|
|
2482
2492
|
FeatureFlagError = {
|
|
2483
2493
|
ERRORS_WHILE_COMPUTING: "errors_while_computing_flags",
|
|
2484
2494
|
FLAG_MISSING: "flag_missing",
|
|
@@ -2488,7 +2498,7 @@ var init_types3 = __esm({
|
|
|
2488
2498
|
}
|
|
2489
2499
|
});
|
|
2490
2500
|
|
|
2491
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
2501
|
+
// ../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/extensions/feature-flags/crypto.mjs
|
|
2492
2502
|
async function hashSHA1(text) {
|
|
2493
2503
|
const subtle = globalThis.crypto?.subtle;
|
|
2494
2504
|
if (!subtle) throw new Error("SubtleCrypto API not available");
|
|
@@ -2497,11 +2507,11 @@ async function hashSHA1(text) {
|
|
|
2497
2507
|
return hashArray.map((byte) => byte.toString(16).padStart(2, "0")).join("");
|
|
2498
2508
|
}
|
|
2499
2509
|
var init_crypto = __esm({
|
|
2500
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
2510
|
+
"../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/extensions/feature-flags/crypto.mjs"() {
|
|
2501
2511
|
}
|
|
2502
2512
|
});
|
|
2503
2513
|
|
|
2504
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
2514
|
+
// ../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/extensions/feature-flags/feature-flags.mjs
|
|
2505
2515
|
async function _hash(key, distinctId, salt = "") {
|
|
2506
2516
|
const hashString = await hashSHA1(`${key}.${distinctId}${salt}`);
|
|
2507
2517
|
return parseInt(hashString.slice(0, 15), 16) / LONG_SCALE;
|
|
@@ -2669,7 +2679,7 @@ function relativeDateParseForFeatureFlagMatching(value) {
|
|
|
2669
2679
|
}
|
|
2670
2680
|
var SIXTY_SECONDS, LONG_SCALE, NULL_VALUES_ALLOWED_OPERATORS, ClientError, InconclusiveMatchError, RequiresServerEvaluation, FeatureFlagsPoller;
|
|
2671
2681
|
var init_feature_flags = __esm({
|
|
2672
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
2682
|
+
"../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/extensions/feature-flags/feature-flags.mjs"() {
|
|
2673
2683
|
init_dist();
|
|
2674
2684
|
init_crypto();
|
|
2675
2685
|
SIXTY_SECONDS = 6e4;
|
|
@@ -2723,6 +2733,7 @@ var init_feature_flags = __esm({
|
|
|
2723
2733
|
this.customHeaders = customHeaders;
|
|
2724
2734
|
this.onLoad = options.onLoad;
|
|
2725
2735
|
this.cacheProvider = options.cacheProvider;
|
|
2736
|
+
this.strictLocalEvaluation = options.strictLocalEvaluation ?? false;
|
|
2726
2737
|
this.loadFeatureFlags();
|
|
2727
2738
|
}
|
|
2728
2739
|
debug(enabled = true) {
|
|
@@ -2918,6 +2929,11 @@ var init_feature_flags = __esm({
|
|
|
2918
2929
|
this.cohorts = flagData.cohorts;
|
|
2919
2930
|
this.loadedSuccessfullyOnce = true;
|
|
2920
2931
|
}
|
|
2932
|
+
warnAboutExperienceContinuityFlags(flags) {
|
|
2933
|
+
if (this.strictLocalEvaluation) return;
|
|
2934
|
+
const experienceContinuityFlags = flags.filter((f) => f.ensure_experience_continuity);
|
|
2935
|
+
if (experienceContinuityFlags.length > 0) console.warn(`[PostHog] You are using local evaluation but ${experienceContinuityFlags.length} flag(s) have experience continuity enabled: ${experienceContinuityFlags.map((f) => f.key).join(", ")}. Experience continuity is incompatible with local evaluation and will cause a server request on every flag evaluation, negating local evaluation cost savings. To avoid server requests and unexpected costs, either disable experience continuity on these flags in PostHog, use strictLocalEvaluation: true in client init, or pass onlyEvaluateLocally: true per flag call (flags that cannot be evaluated locally will return undefined).`);
|
|
2936
|
+
}
|
|
2921
2937
|
async loadFromCache(debugMessage) {
|
|
2922
2938
|
if (!this.cacheProvider) return false;
|
|
2923
2939
|
try {
|
|
@@ -2926,6 +2942,7 @@ var init_feature_flags = __esm({
|
|
|
2926
2942
|
this.updateFlagState(cached);
|
|
2927
2943
|
this.logMsgIfDebug(() => console.debug(`[FEATURE FLAGS] ${debugMessage} (${cached.flags.length} flags)`));
|
|
2928
2944
|
this.onLoad?.(this.featureFlags.length);
|
|
2945
|
+
this.warnAboutExperienceContinuityFlags(cached.flags);
|
|
2929
2946
|
return true;
|
|
2930
2947
|
}
|
|
2931
2948
|
return false;
|
|
@@ -3019,6 +3036,7 @@ var init_feature_flags = __esm({
|
|
|
3019
3036
|
this.onError?.(new Error(`Failed to store in cache: ${err}`));
|
|
3020
3037
|
}
|
|
3021
3038
|
this.onLoad?.(this.featureFlags.length);
|
|
3039
|
+
this.warnAboutExperienceContinuityFlags(flagData.flags);
|
|
3022
3040
|
break;
|
|
3023
3041
|
}
|
|
3024
3042
|
default:
|
|
@@ -3074,10 +3092,10 @@ var init_feature_flags = __esm({
|
|
|
3074
3092
|
}
|
|
3075
3093
|
});
|
|
3076
3094
|
|
|
3077
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
3095
|
+
// ../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/storage-memory.mjs
|
|
3078
3096
|
var PostHogMemoryStorage;
|
|
3079
3097
|
var init_storage_memory = __esm({
|
|
3080
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
3098
|
+
"../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/storage-memory.mjs"() {
|
|
3081
3099
|
PostHogMemoryStorage = class {
|
|
3082
3100
|
getProperty(key) {
|
|
3083
3101
|
return this._memoryStorage[key];
|
|
@@ -3092,10 +3110,10 @@ var init_storage_memory = __esm({
|
|
|
3092
3110
|
}
|
|
3093
3111
|
});
|
|
3094
3112
|
|
|
3095
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
3113
|
+
// ../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/client.mjs
|
|
3096
3114
|
var MINIMUM_POLLING_INTERVAL, THIRTY_SECONDS, MAX_CACHE_SIZE, PostHogBackendClient;
|
|
3097
3115
|
var init_client = __esm({
|
|
3098
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
3116
|
+
"../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/client.mjs"() {
|
|
3099
3117
|
init_version();
|
|
3100
3118
|
init_dist();
|
|
3101
3119
|
init_types3();
|
|
@@ -3128,7 +3146,8 @@ var init_client = __esm({
|
|
|
3128
3146
|
this._events.emit("localEvaluationFlagsLoaded", count);
|
|
3129
3147
|
},
|
|
3130
3148
|
customHeaders: this.getCustomHeaders(),
|
|
3131
|
-
cacheProvider: options.flagDefinitionCacheProvider
|
|
3149
|
+
cacheProvider: options.flagDefinitionCacheProvider,
|
|
3150
|
+
strictLocalEvaluation: options.strictLocalEvaluation
|
|
3132
3151
|
});
|
|
3133
3152
|
}
|
|
3134
3153
|
this.errorTracking = new ErrorTracking(this, options, this._logger);
|
|
@@ -3235,12 +3254,13 @@ var init_client = __esm({
|
|
|
3235
3254
|
});
|
|
3236
3255
|
}
|
|
3237
3256
|
async getFeatureFlag(key, distinctId, options) {
|
|
3257
|
+
if (void 0 !== this._flagOverrides && key in this._flagOverrides) return this._flagOverrides[key];
|
|
3238
3258
|
const { groups, disableGeoip } = options || {};
|
|
3239
3259
|
let { onlyEvaluateLocally, sendFeatureFlagEvents, personProperties, groupProperties } = options || {};
|
|
3240
3260
|
const adjustedProperties = this.addLocalPersonAndGroupProperties(distinctId, groups, personProperties, groupProperties);
|
|
3241
3261
|
personProperties = adjustedProperties.allPersonProperties;
|
|
3242
3262
|
groupProperties = adjustedProperties.allGroupProperties;
|
|
3243
|
-
if (void 0 == onlyEvaluateLocally) onlyEvaluateLocally = false;
|
|
3263
|
+
if (void 0 == onlyEvaluateLocally) onlyEvaluateLocally = this.options.strictLocalEvaluation ?? false;
|
|
3244
3264
|
if (void 0 == sendFeatureFlagEvents) sendFeatureFlagEvents = this.options.sendFeatureFlagEvent ?? true;
|
|
3245
3265
|
let response = await this.featureFlagsPoller?.getFeatureFlag(key, distinctId, groups, personProperties, groupProperties);
|
|
3246
3266
|
const flagWasLocallyEvaluated = void 0 !== response;
|
|
@@ -3295,6 +3315,7 @@ var init_client = __esm({
|
|
|
3295
3315
|
return response;
|
|
3296
3316
|
}
|
|
3297
3317
|
async getFeatureFlagPayload(key, distinctId, matchValue, options) {
|
|
3318
|
+
if (void 0 !== this._payloadOverrides && key in this._payloadOverrides) return this._payloadOverrides[key];
|
|
3298
3319
|
const { groups, disableGeoip } = options || {};
|
|
3299
3320
|
let { onlyEvaluateLocally, personProperties, groupProperties } = options || {};
|
|
3300
3321
|
const adjustedProperties = this.addLocalPersonAndGroupProperties(distinctId, groups, personProperties, groupProperties);
|
|
@@ -3316,7 +3337,7 @@ var init_client = __esm({
|
|
|
3316
3337
|
else throw e;
|
|
3317
3338
|
}
|
|
3318
3339
|
}
|
|
3319
|
-
if (void 0 == onlyEvaluateLocally) onlyEvaluateLocally = false;
|
|
3340
|
+
if (void 0 == onlyEvaluateLocally) onlyEvaluateLocally = this.options.strictLocalEvaluation ?? false;
|
|
3320
3341
|
const payloadWasLocallyEvaluated = void 0 !== response;
|
|
3321
3342
|
if (!payloadWasLocallyEvaluated && !onlyEvaluateLocally) response = await super.getFeatureFlagPayloadStateless(key, distinctId, groups, personProperties, groupProperties, disableGeoip);
|
|
3322
3343
|
return response;
|
|
@@ -3347,7 +3368,7 @@ var init_client = __esm({
|
|
|
3347
3368
|
const adjustedProperties = this.addLocalPersonAndGroupProperties(distinctId, groups, personProperties, groupProperties);
|
|
3348
3369
|
personProperties = adjustedProperties.allPersonProperties;
|
|
3349
3370
|
groupProperties = adjustedProperties.allGroupProperties;
|
|
3350
|
-
if (void 0 == onlyEvaluateLocally) onlyEvaluateLocally = false;
|
|
3371
|
+
if (void 0 == onlyEvaluateLocally) onlyEvaluateLocally = this.options.strictLocalEvaluation ?? false;
|
|
3351
3372
|
const localEvaluationResult = await this.featureFlagsPoller?.getAllFlagsAndPayloads(distinctId, groups, personProperties, groupProperties, flagKeys);
|
|
3352
3373
|
let featureFlags = {};
|
|
3353
3374
|
let featureFlagPayloads = {};
|
|
@@ -3368,6 +3389,14 @@ var init_client = __esm({
|
|
|
3368
3389
|
...remoteEvaluationResult.payloads || {}
|
|
3369
3390
|
};
|
|
3370
3391
|
}
|
|
3392
|
+
if (void 0 !== this._flagOverrides) featureFlags = {
|
|
3393
|
+
...featureFlags,
|
|
3394
|
+
...this._flagOverrides
|
|
3395
|
+
};
|
|
3396
|
+
if (void 0 !== this._payloadOverrides) featureFlagPayloads = {
|
|
3397
|
+
...featureFlagPayloads,
|
|
3398
|
+
...this._payloadOverrides
|
|
3399
|
+
};
|
|
3371
3400
|
return {
|
|
3372
3401
|
featureFlags,
|
|
3373
3402
|
featureFlagPayloads
|
|
@@ -3381,6 +3410,53 @@ var init_client = __esm({
|
|
|
3381
3410
|
async reloadFeatureFlags() {
|
|
3382
3411
|
await this.featureFlagsPoller?.loadFeatureFlags(true);
|
|
3383
3412
|
}
|
|
3413
|
+
overrideFeatureFlags(overrides) {
|
|
3414
|
+
const flagArrayToRecord = (flags) => Object.fromEntries(flags.map((f) => [
|
|
3415
|
+
f,
|
|
3416
|
+
true
|
|
3417
|
+
]));
|
|
3418
|
+
if (false === overrides) {
|
|
3419
|
+
this._flagOverrides = void 0;
|
|
3420
|
+
this._payloadOverrides = void 0;
|
|
3421
|
+
return;
|
|
3422
|
+
}
|
|
3423
|
+
if (Array.isArray(overrides)) {
|
|
3424
|
+
this._flagOverrides = flagArrayToRecord(overrides);
|
|
3425
|
+
return;
|
|
3426
|
+
}
|
|
3427
|
+
if (this._isFeatureFlagOverrideOptions(overrides)) {
|
|
3428
|
+
if ("flags" in overrides) {
|
|
3429
|
+
if (false === overrides.flags) this._flagOverrides = void 0;
|
|
3430
|
+
else if (Array.isArray(overrides.flags)) this._flagOverrides = flagArrayToRecord(overrides.flags);
|
|
3431
|
+
else if (void 0 !== overrides.flags) this._flagOverrides = {
|
|
3432
|
+
...overrides.flags
|
|
3433
|
+
};
|
|
3434
|
+
}
|
|
3435
|
+
if ("payloads" in overrides) {
|
|
3436
|
+
if (false === overrides.payloads) this._payloadOverrides = void 0;
|
|
3437
|
+
else if (void 0 !== overrides.payloads) this._payloadOverrides = {
|
|
3438
|
+
...overrides.payloads
|
|
3439
|
+
};
|
|
3440
|
+
}
|
|
3441
|
+
return;
|
|
3442
|
+
}
|
|
3443
|
+
this._flagOverrides = {
|
|
3444
|
+
...overrides
|
|
3445
|
+
};
|
|
3446
|
+
}
|
|
3447
|
+
_isFeatureFlagOverrideOptions(overrides) {
|
|
3448
|
+
if ("object" != typeof overrides || null === overrides || Array.isArray(overrides)) return false;
|
|
3449
|
+
const obj = overrides;
|
|
3450
|
+
if ("flags" in obj) {
|
|
3451
|
+
const flagsValue = obj["flags"];
|
|
3452
|
+
if (false === flagsValue || Array.isArray(flagsValue) || "object" == typeof flagsValue && null !== flagsValue) return true;
|
|
3453
|
+
}
|
|
3454
|
+
if ("payloads" in obj) {
|
|
3455
|
+
const payloadsValue = obj["payloads"];
|
|
3456
|
+
if (false === payloadsValue || "object" == typeof payloadsValue && null !== payloadsValue) return true;
|
|
3457
|
+
}
|
|
3458
|
+
return false;
|
|
3459
|
+
}
|
|
3384
3460
|
withContext(data, fn, options) {
|
|
3385
3461
|
if (!this.context) return fn();
|
|
3386
3462
|
return this.context.run(data, fn, options);
|
|
@@ -3442,7 +3518,7 @@ var init_client = __esm({
|
|
|
3442
3518
|
const finalPersonProperties = sendFeatureFlagsOptions?.personProperties || {};
|
|
3443
3519
|
const finalGroupProperties = sendFeatureFlagsOptions?.groupProperties || {};
|
|
3444
3520
|
const flagKeys = sendFeatureFlagsOptions?.flagKeys;
|
|
3445
|
-
const onlyEvaluateLocally = sendFeatureFlagsOptions?.onlyEvaluateLocally ?? false;
|
|
3521
|
+
const onlyEvaluateLocally = sendFeatureFlagsOptions?.onlyEvaluateLocally ?? this.options.strictLocalEvaluation ?? false;
|
|
3446
3522
|
if (onlyEvaluateLocally) if (!((this.featureFlagsPoller?.featureFlags?.length || 0) > 0)) return {};
|
|
3447
3523
|
else {
|
|
3448
3524
|
const groupsWithStringValues = {};
|
|
@@ -3485,17 +3561,24 @@ var init_client = __esm({
|
|
|
3485
3561
|
allGroupProperties
|
|
3486
3562
|
};
|
|
3487
3563
|
}
|
|
3488
|
-
captureException(error, distinctId, additionalProperties) {
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
|
|
3564
|
+
captureException(error, distinctId, additionalProperties, uuid) {
|
|
3565
|
+
if (!ErrorTracking.isPreviouslyCapturedError(error)) {
|
|
3566
|
+
const syntheticException = new Error("PostHog syntheticException");
|
|
3567
|
+
this.addPendingPromise(ErrorTracking.buildEventMessage(error, {
|
|
3568
|
+
syntheticException
|
|
3569
|
+
}, distinctId, additionalProperties).then((msg) => this.capture({
|
|
3570
|
+
...msg,
|
|
3571
|
+
uuid
|
|
3572
|
+
})));
|
|
3573
|
+
}
|
|
3493
3574
|
}
|
|
3494
3575
|
async captureExceptionImmediate(error, distinctId, additionalProperties) {
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
|
|
3576
|
+
if (!ErrorTracking.isPreviouslyCapturedError(error)) {
|
|
3577
|
+
const syntheticException = new Error("PostHog syntheticException");
|
|
3578
|
+
this.addPendingPromise(ErrorTracking.buildEventMessage(error, {
|
|
3579
|
+
syntheticException
|
|
3580
|
+
}, distinctId, additionalProperties).then((msg) => this.captureImmediate(msg)));
|
|
3581
|
+
}
|
|
3499
3582
|
}
|
|
3500
3583
|
async prepareEventMessage(props) {
|
|
3501
3584
|
const { distinctId, event, properties, groups, sendFeatureFlags, timestamp, disableGeoip, uuid } = props;
|
|
@@ -3584,7 +3667,7 @@ var init_client = __esm({
|
|
|
3584
3667
|
});
|
|
3585
3668
|
var PostHogContext;
|
|
3586
3669
|
var init_context = __esm({
|
|
3587
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
3670
|
+
"../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/extensions/context/context.mjs"() {
|
|
3588
3671
|
PostHogContext = class {
|
|
3589
3672
|
constructor() {
|
|
3590
3673
|
this.storage = new async_hooks.AsyncLocalStorage();
|
|
@@ -3612,7 +3695,7 @@ var init_context = __esm({
|
|
|
3612
3695
|
}
|
|
3613
3696
|
});
|
|
3614
3697
|
|
|
3615
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
3698
|
+
// ../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/extensions/sentry-integration.mjs
|
|
3616
3699
|
function createEventProcessor(_posthog, { organization, projectId, prefix, severityAllowList = [
|
|
3617
3700
|
"error"
|
|
3618
3701
|
], sendExceptionsToPostHog = true } = {}) {
|
|
@@ -3668,7 +3751,7 @@ function sentryIntegration(_posthog, options) {
|
|
|
3668
3751
|
}
|
|
3669
3752
|
var NAME, PostHogSentryIntegration;
|
|
3670
3753
|
var init_sentry_integration = __esm({
|
|
3671
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
3754
|
+
"../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/extensions/sentry-integration.mjs"() {
|
|
3672
3755
|
NAME = "posthog-node";
|
|
3673
3756
|
PostHogSentryIntegration = class {
|
|
3674
3757
|
static #_ = this.POSTHOG_ID_TAG = "posthog_distinct_id";
|
|
@@ -3690,12 +3773,13 @@ var init_sentry_integration = __esm({
|
|
|
3690
3773
|
}
|
|
3691
3774
|
});
|
|
3692
3775
|
|
|
3693
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
3776
|
+
// ../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/extensions/express.mjs
|
|
3694
3777
|
function setupExpressErrorHandler(_posthog, app) {
|
|
3695
3778
|
app.use(posthogErrorHandler(_posthog));
|
|
3696
3779
|
}
|
|
3697
3780
|
function posthogErrorHandler(posthog) {
|
|
3698
3781
|
return (error, req, res, next) => {
|
|
3782
|
+
if (ErrorTracking.isPreviouslyCapturedError(error)) return void next(error);
|
|
3699
3783
|
const sessionId = req.headers["x-posthog-session-id"];
|
|
3700
3784
|
const distinctId = req.headers["x-posthog-distinct-id"];
|
|
3701
3785
|
const syntheticException = new Error("Synthetic exception");
|
|
@@ -3721,21 +3805,21 @@ function posthogErrorHandler(posthog) {
|
|
|
3721
3805
|
};
|
|
3722
3806
|
}
|
|
3723
3807
|
var init_express = __esm({
|
|
3724
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
3808
|
+
"../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/extensions/express.mjs"() {
|
|
3725
3809
|
init_error_tracking2();
|
|
3726
3810
|
}
|
|
3727
3811
|
});
|
|
3728
3812
|
|
|
3729
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
3813
|
+
// ../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/exports.mjs
|
|
3730
3814
|
var init_exports = __esm({
|
|
3731
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
3815
|
+
"../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/exports.mjs"() {
|
|
3732
3816
|
init_sentry_integration();
|
|
3733
3817
|
init_express();
|
|
3734
3818
|
init_types3();
|
|
3735
3819
|
}
|
|
3736
3820
|
});
|
|
3737
3821
|
|
|
3738
|
-
// ../../node_modules/.pnpm/posthog-node@5.
|
|
3822
|
+
// ../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/entrypoints/index.node.mjs
|
|
3739
3823
|
var index_node_exports = {};
|
|
3740
3824
|
__export(index_node_exports, {
|
|
3741
3825
|
FeatureFlagError: () => FeatureFlagError,
|
|
@@ -3747,7 +3831,7 @@ __export(index_node_exports, {
|
|
|
3747
3831
|
});
|
|
3748
3832
|
var PostHog;
|
|
3749
3833
|
var init_index_node = __esm({
|
|
3750
|
-
"../../node_modules/.pnpm/posthog-node@5.
|
|
3834
|
+
"../../node_modules/.pnpm/posthog-node@5.21.0/node_modules/posthog-node/dist/entrypoints/index.node.mjs"() {
|
|
3751
3835
|
init_module_node();
|
|
3752
3836
|
init_context_lines_node();
|
|
3753
3837
|
init_error_tracking2();
|