posthog-node 4.11.3 → 4.11.5

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/lib/index.d.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  import { SeverityLevel } from 'posthog-node/src/extensions/error-tracking/types';
3
3
  import * as http from 'node:http';
4
4
 
5
- interface SurveyAppearance {
5
+ type SurveyAppearance = {
6
6
  // keep in sync with frontend/src/types.ts -> SurveyAppearance
7
7
  backgroundColor?: string
8
8
  submitButtonColor?: string
@@ -54,7 +54,7 @@ enum SurveyQuestionDescriptionContentType {
54
54
  Text = 'text',
55
55
  }
56
56
 
57
- interface SurveyQuestionBase {
57
+ type SurveyQuestionBase = {
58
58
  question: string
59
59
  id?: string // TODO: use this for the question id
60
60
  description?: string
@@ -109,25 +109,25 @@ enum SurveyQuestionBranchingType {
109
109
  SpecificQuestion = 'specific_question',
110
110
  }
111
111
 
112
- interface NextQuestionBranching {
112
+ type NextQuestionBranching = {
113
113
  type: SurveyQuestionBranchingType.NextQuestion
114
114
  }
115
115
 
116
- interface EndBranching {
116
+ type EndBranching = {
117
117
  type: SurveyQuestionBranchingType.End
118
118
  }
119
119
 
120
- interface ResponseBasedBranching {
120
+ type ResponseBasedBranching = {
121
121
  type: SurveyQuestionBranchingType.ResponseBased
122
122
  responseValues: Record<string, any>
123
123
  }
124
124
 
125
- interface SpecificQuestionBranching {
125
+ type SpecificQuestionBranching = {
126
126
  type: SurveyQuestionBranchingType.SpecificQuestion
127
127
  index: number
128
128
  }
129
129
 
130
- interface SurveyResponse {
130
+ type SurveyResponse = {
131
131
  surveys: Survey[]
132
132
  }
133
133
 
@@ -140,7 +140,7 @@ enum SurveyMatchType {
140
140
  NotIcontains = 'not_icontains',
141
141
  }
142
142
 
143
- interface Survey {
143
+ type Survey = {
144
144
  // Sync this with the backend's SurveyAPISerializer!
145
145
  id: string
146
146
  name: string
@@ -179,7 +179,7 @@ interface Survey {
179
179
  current_iteration_start_date?: string
180
180
  }
181
181
 
182
- interface SurveyActionType {
182
+ type SurveyActionType = {
183
183
  id: number
184
184
  name?: string
185
185
  steps?: ActionStepType[]
@@ -192,7 +192,7 @@ enum ActionStepStringMatching {
192
192
  Regex = 'regex',
193
193
  }
194
194
 
195
- interface ActionStepType {
195
+ type ActionStepType = {
196
196
  event?: string
197
197
  selector?: string
198
198
  /** @deprecated Only `selector` should be used now. */
package/lib/index.esm.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { posix, dirname, sep } from 'node:path';
2
2
 
3
- var version = "4.11.3";
3
+ var version = "4.11.5";
4
4
 
5
5
  var PostHogPersistedProperty;
6
6
  (function (PostHogPersistedProperty) {
@@ -2402,6 +2402,8 @@ function relativeDateParseForFeatureFlagMatching(value) {
2402
2402
  }
2403
2403
  }
2404
2404
 
2405
+ // Portions of this file are derived from getsentry/sentry-javascript by Software, Inc. dba Sentry
2406
+ // Licensed under the MIT License
2405
2407
  function makeUncaughtExceptionHandler(captureFn, onFatalFn) {
2406
2408
  let calledFatalError = false;
2407
2409
  return Object.assign(error => {
@@ -2448,6 +2450,8 @@ function addUnhandledRejectionListener(captureFn) {
2448
2450
  });
2449
2451
  }
2450
2452
 
2453
+ // Portions of this file are derived from getsentry/sentry-javascript by Software, Inc. dba Sentry
2454
+ // Licensed under the MIT License
2451
2455
  function isEvent(candidate) {
2452
2456
  return typeof Event !== 'undefined' && isInstanceOf(candidate, Event);
2453
2457
  }
@@ -2479,6 +2483,8 @@ function isBuiltin(candidate, className) {
2479
2483
  return Object.prototype.toString.call(candidate) === `[object ${className}]`;
2480
2484
  }
2481
2485
 
2486
+ // Portions of this file are derived from getsentry/sentry-javascript by Software, Inc. dba Sentry
2487
+ // Licensed under the MIT License
2482
2488
  /** A simple Least Recently Used map */
2483
2489
  class ReduceableCache {
2484
2490
  constructor(_maxSize) {
@@ -2512,6 +2518,7 @@ class ReduceableCache {
2512
2518
  }
2513
2519
  }
2514
2520
 
2521
+ // Portions of this file are derived from getsentry/sentry-javascript by Software, Inc. dba Sentry
2515
2522
  const nodeFs = new Lazy(async () => {
2516
2523
  try {
2517
2524
  return await import('node:fs');
@@ -2862,9 +2869,7 @@ function snipLine(line, colno) {
2862
2869
  return newLine;
2863
2870
  }
2864
2871
 
2865
- /**
2866
- * based on the very wonderful MIT licensed Sentry SDK
2867
- */
2872
+ // Portions of this file are derived from getsentry/sentry-javascript by Software, Inc. dba Sentry
2868
2873
  async function propertiesFromUnknownInput(stackParser, input, hint) {
2869
2874
  const providedMechanism = hint && hint.mechanism;
2870
2875
  const mechanism = providedMechanism || {
@@ -3052,7 +3057,7 @@ function parseStackFrames(stackParser, error) {
3052
3057
  return stackParser(error.stack || '', 1);
3053
3058
  }
3054
3059
 
3055
- // copied and adapted from https://github.com/getsentry/sentry-javascript/blob/41fef4b10f3a644179b77985f00f8696c908539f/packages/browser/src/stack-parsers.ts
3060
+ // Portions of this file are derived from getsentry/sentry-javascript by Software, Inc. dba Sentry
3056
3061
  // This was originally forked from https://github.com/csnover/TraceKit, and was largely
3057
3062
  // re-written as part of raven - js.
3058
3063
  //