@posthog/core 1.69.9 → 1.71.0

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.
Files changed (122) hide show
  1. package/capture-v1/package.json +6 -0
  2. package/dist/capture-v1/compression.d.ts +18 -0
  3. package/dist/capture-v1/compression.d.ts.map +1 -0
  4. package/dist/capture-v1/compression.js +70 -0
  5. package/dist/capture-v1/compression.mjs +26 -0
  6. package/dist/capture-v1/errors.d.ts +48 -0
  7. package/dist/capture-v1/errors.d.ts.map +1 -0
  8. package/dist/capture-v1/errors.js +82 -0
  9. package/dist/capture-v1/errors.mjs +38 -0
  10. package/dist/capture-v1/index.d.ts +15 -0
  11. package/dist/capture-v1/index.d.ts.map +1 -0
  12. package/dist/capture-v1/index.js +88 -0
  13. package/dist/capture-v1/index.mjs +7 -0
  14. package/dist/capture-v1/sender.d.ts +150 -0
  15. package/dist/capture-v1/sender.d.ts.map +1 -0
  16. package/dist/capture-v1/sender.js +554 -0
  17. package/dist/capture-v1/sender.mjs +507 -0
  18. package/dist/capture-v1/serialize.d.ts +30 -0
  19. package/dist/capture-v1/serialize.d.ts.map +1 -0
  20. package/dist/capture-v1/serialize.js +106 -0
  21. package/dist/capture-v1/serialize.mjs +59 -0
  22. package/dist/capture-v1/transform.d.ts +19 -0
  23. package/dist/capture-v1/transform.d.ts.map +1 -0
  24. package/dist/capture-v1/transform.js +118 -0
  25. package/dist/capture-v1/transform.mjs +77 -0
  26. package/dist/capture-v1/types.d.ts +52 -0
  27. package/dist/capture-v1/types.d.ts.map +1 -0
  28. package/dist/capture-v1/types.js +44 -0
  29. package/dist/capture-v1/types.mjs +3 -0
  30. package/dist/capture-v1/uuid.d.ts +9 -0
  31. package/dist/capture-v1/uuid.d.ts.map +1 -0
  32. package/dist/capture-v1/uuid.js +75 -0
  33. package/dist/capture-v1/uuid.mjs +34 -0
  34. package/dist/featureFlagLocalEvaluation.d.ts +2 -0
  35. package/dist/featureFlagLocalEvaluation.d.ts.map +1 -1
  36. package/dist/featureFlagLocalEvaluation.js +38 -0
  37. package/dist/featureFlagLocalEvaluation.mjs +38 -0
  38. package/dist/featureFlagUtils.d.ts +7 -5
  39. package/dist/featureFlagUtils.d.ts.map +1 -1
  40. package/dist/featureFlagUtils.js +17 -11
  41. package/dist/featureFlagUtils.mjs +14 -11
  42. package/dist/index.d.ts +1 -1
  43. package/dist/index.d.ts.map +1 -1
  44. package/dist/index.js +27 -16
  45. package/dist/index.mjs +1 -1
  46. package/dist/posthog-core-stateless.d.ts +44 -7
  47. package/dist/posthog-core-stateless.d.ts.map +1 -1
  48. package/dist/posthog-core-stateless.js +103 -24
  49. package/dist/posthog-core-stateless.mjs +103 -24
  50. package/dist/posthog-core.d.ts +138 -53
  51. package/dist/posthog-core.d.ts.map +1 -1
  52. package/dist/posthog-core.js +341 -115
  53. package/dist/posthog-core.mjs +338 -115
  54. package/dist/types.d.ts +33 -1
  55. package/dist/types.d.ts.map +1 -1
  56. package/dist/utils/index.d.ts +1 -1
  57. package/dist/utils/index.d.ts.map +1 -1
  58. package/dist/utils/index.js +25 -12
  59. package/dist/utils/index.mjs +1 -1
  60. package/dist/utils/json-utils.d.ts +11 -1
  61. package/dist/utils/json-utils.d.ts.map +1 -1
  62. package/dist/utils/json-utils.js +50 -2
  63. package/dist/utils/json-utils.mjs +46 -1
  64. package/package.json +13 -3
  65. package/src/capture-v1/compression.ts +50 -0
  66. package/src/capture-v1/errors.ts +91 -0
  67. package/src/capture-v1/index.ts +34 -0
  68. package/src/capture-v1/sender.ts +779 -0
  69. package/src/capture-v1/serialize.ts +113 -0
  70. package/src/capture-v1/transform.ts +135 -0
  71. package/src/capture-v1/types.ts +59 -0
  72. package/src/capture-v1/uuid.ts +53 -0
  73. package/src/featureFlagLocalEvaluation.ts +51 -0
  74. package/src/featureFlagUtils.ts +22 -10
  75. package/src/index.ts +1 -0
  76. package/src/posthog-core-stateless.ts +190 -35
  77. package/src/posthog-core.ts +615 -178
  78. package/src/types.ts +31 -1
  79. package/src/utils/index.ts +1 -1
  80. package/src/utils/json-utils.ts +64 -1
  81. package/src/error-tracking/chunk-ids.spec.ts +0 -77
  82. package/src/error-tracking/coercers/error-event-coercer.spec.ts +0 -142
  83. package/src/error-tracking/coercers/promise-rejection-event.spec.ts +0 -77
  84. package/src/error-tracking/coercers/string-coercer.spec.ts +0 -26
  85. package/src/error-tracking/error-properties-builder.aggregate-errors.spec.ts +0 -412
  86. package/src/error-tracking/error-properties-builder.coerce.spec.ts +0 -337
  87. package/src/error-tracking/error-properties-builder.metadata.spec.ts +0 -318
  88. package/src/error-tracking/error-properties-builder.parse.spec.ts +0 -37
  89. package/src/error-tracking/exception-steps.spec.ts +0 -115
  90. package/src/error-tracking/parsers/base.spec.ts +0 -156
  91. package/src/error-tracking/parsers/index.spec.ts +0 -270
  92. package/src/error-tracking/parsers/node.spec.ts +0 -34
  93. package/src/error-tracking/release.spec.ts +0 -34
  94. package/src/logs/index.spec.ts +0 -2421
  95. package/src/logs/logs-utils.spec.ts +0 -266
  96. package/src/metrics/index.spec.ts +0 -1249
  97. package/src/surveys/activation.spec.ts +0 -61
  98. package/src/surveys/events.spec.ts +0 -183
  99. package/src/surveys/keys.spec.ts +0 -29
  100. package/src/surveys/property-matching.spec.ts +0 -539
  101. package/src/surveys/shuffling.spec.ts +0 -51
  102. package/src/surveys/translations.spec.ts +0 -274
  103. package/src/surveys/validation.spec.ts +0 -168
  104. package/src/traces/config.spec.ts +0 -271
  105. package/src/traces/ids.spec.ts +0 -115
  106. package/src/traces/index.spec.ts +0 -3287
  107. package/src/traces/live-spans.spec.ts +0 -69
  108. package/src/traces/otlp.spec.ts +0 -368
  109. package/src/traces/span.spec.ts +0 -1137
  110. package/src/traces/traceparent.spec.ts +0 -184
  111. package/src/utils/bot-detection.spec.ts +0 -107
  112. package/src/utils/bucketed-rate-limiter.spec.ts +0 -327
  113. package/src/utils/json-utils.spec.ts +0 -115
  114. package/src/utils/named-error.spec.ts +0 -36
  115. package/src/utils/number-utils.spec.ts +0 -212
  116. package/src/utils/otlp-any-value.spec.ts +0 -376
  117. package/src/utils/otlp-resource.spec.ts +0 -171
  118. package/src/utils/promise-queue.spec.ts +0 -55
  119. package/src/utils/string-utils.spec.ts +0 -158
  120. package/src/utils/type-utils.spec.ts +0 -38
  121. package/src/utils/webview-app-utils.spec.ts +0 -118
  122. package/src/vendor/uuidv7.spec.ts +0 -26
@@ -0,0 +1,6 @@
1
+ {
2
+ "private": true,
3
+ "main": "../dist/capture-v1/index.js",
4
+ "module": "../dist/capture-v1/index.mjs",
5
+ "types": "../dist/capture-v1/index.d.ts"
6
+ }
@@ -0,0 +1,18 @@
1
+ export declare const CAPTURE_COMPRESSIONS: readonly ['none', 'gzip', 'deflate', 'zstd'];
2
+ /** A capture request body encoding; `deflate` is zlib-wrapped, as HTTP `Content-Encoding: deflate` requires. */
3
+ export type CaptureCompression = (typeof CAPTURE_COMPRESSIONS)[number];
4
+ export type CaptureCodec = Exclude<CaptureCompression, 'none'>;
5
+ /** Compresses capture request bodies with the codecs one runtime provides. */
6
+ export interface CaptureCompressor {
7
+ supports(codec: CaptureCodec): boolean;
8
+ /** Resolves to null, or rejects, when compression fails; the sender then sends the body uncompressed. */
9
+ compress(payload: string, codec: CaptureCodec): Promise<Uint8Array | null>;
10
+ }
11
+ /** Uses CompressionStream, so it works wherever the runtime has one. It has no zstd. */
12
+ export declare const webCompressor: CaptureCompressor;
13
+ /**
14
+ * The codec a lane sends with: `requested` when the runtime has it, gzip in place of an unavailable
15
+ * zstd, or no compression when the runtime cannot compress at all.
16
+ */
17
+ export declare function resolveCaptureCodec(requested: CaptureCompression, compressor: CaptureCompressor, onZstdUnavailable: (fallback: CaptureCompression) => void): CaptureCompression;
18
+ //# sourceMappingURL=compression.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compression.d.ts","sourceRoot":"","sources":["../../src/capture-v1/compression.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,oBAAoB,YAAI,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,CAAU,CAAA;AAEhF,gHAAgH;AAChH,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAA;AAEtE,MAAM,MAAM,YAAY,GAAG,OAAO,CAAC,kBAAkB,EAAE,MAAM,CAAC,CAAA;AAE9D,8EAA8E;AAC9E,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO,CAAA;IACtC,yGAAyG;IACzG,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,CAAA;CAC3E;AAED,wFAAwF;AACxF,eAAO,MAAM,aAAa,EAAE,iBAa3B,CAAA;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,kBAAkB,EAC7B,UAAU,EAAE,iBAAiB,EAC7B,iBAAiB,EAAE,CAAC,QAAQ,EAAE,kBAAkB,KAAK,IAAI,GACxD,kBAAkB,CASpB"}
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+ var __webpack_require__ = {};
3
+ (()=>{
4
+ __webpack_require__.d = (exports1, getters, values)=>{
5
+ var define = (defs, kind)=>{
6
+ for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
7
+ enumerable: true,
8
+ [kind]: defs[key]
9
+ });
10
+ };
11
+ define(getters, "get");
12
+ define(values, "value");
13
+ };
14
+ })();
15
+ (()=>{
16
+ __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
17
+ })();
18
+ (()=>{
19
+ __webpack_require__.r = (exports1)=>{
20
+ if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
21
+ value: 'Module'
22
+ });
23
+ Object.defineProperty(exports1, '__esModule', {
24
+ value: true
25
+ });
26
+ };
27
+ })();
28
+ var __webpack_exports__ = {};
29
+ __webpack_require__.r(__webpack_exports__);
30
+ __webpack_require__.d(__webpack_exports__, {
31
+ CAPTURE_COMPRESSIONS: ()=>CAPTURE_COMPRESSIONS,
32
+ resolveCaptureCodec: ()=>resolveCaptureCodec,
33
+ webCompressor: ()=>webCompressor
34
+ });
35
+ const external_gzip_js_namespaceObject = require("../gzip.js");
36
+ const CAPTURE_COMPRESSIONS = [
37
+ 'none',
38
+ 'gzip',
39
+ 'deflate',
40
+ 'zstd'
41
+ ];
42
+ const webCompressor = {
43
+ supports: (codec)=>'zstd' !== codec && (0, external_gzip_js_namespaceObject.isGzipSupported)(),
44
+ async compress (payload, codec) {
45
+ if ('gzip' === codec) {
46
+ const compressed = await (0, external_gzip_js_namespaceObject.gzipCompress)(payload, false);
47
+ return compressed && new Uint8Array(await compressed.arrayBuffer());
48
+ }
49
+ if ('deflate' !== codec) return null;
50
+ const stream = new Response(payload).body.pipeThrough(new globalThis.CompressionStream('deflate'));
51
+ return new Uint8Array(await new Response(stream).arrayBuffer());
52
+ }
53
+ };
54
+ function resolveCaptureCodec(requested, compressor, onZstdUnavailable) {
55
+ if ('none' === requested || compressor.supports(requested)) return requested;
56
+ const fallback = compressor.supports('gzip') ? 'gzip' : 'none';
57
+ if ('zstd' === requested) onZstdUnavailable(fallback);
58
+ return fallback;
59
+ }
60
+ exports.CAPTURE_COMPRESSIONS = __webpack_exports__.CAPTURE_COMPRESSIONS;
61
+ exports.resolveCaptureCodec = __webpack_exports__.resolveCaptureCodec;
62
+ exports.webCompressor = __webpack_exports__.webCompressor;
63
+ for(var __rspack_i in __webpack_exports__)if (-1 === [
64
+ "CAPTURE_COMPRESSIONS",
65
+ "resolveCaptureCodec",
66
+ "webCompressor"
67
+ ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
68
+ Object.defineProperty(exports, '__esModule', {
69
+ value: true
70
+ });
@@ -0,0 +1,26 @@
1
+ import { gzipCompress, isGzipSupported } from "../gzip.mjs";
2
+ const CAPTURE_COMPRESSIONS = [
3
+ 'none',
4
+ 'gzip',
5
+ 'deflate',
6
+ 'zstd'
7
+ ];
8
+ const webCompressor = {
9
+ supports: (codec)=>'zstd' !== codec && isGzipSupported(),
10
+ async compress (payload, codec) {
11
+ if ('gzip' === codec) {
12
+ const compressed = await gzipCompress(payload, false);
13
+ return compressed && new Uint8Array(await compressed.arrayBuffer());
14
+ }
15
+ if ('deflate' !== codec) return null;
16
+ const stream = new Response(payload).body.pipeThrough(new globalThis.CompressionStream('deflate'));
17
+ return new Uint8Array(await new Response(stream).arrayBuffer());
18
+ }
19
+ };
20
+ function resolveCaptureCodec(requested, compressor, onZstdUnavailable) {
21
+ if ('none' === requested || compressor.supports(requested)) return requested;
22
+ const fallback = compressor.supports('gzip') ? 'gzip' : 'none';
23
+ if ('zstd' === requested) onZstdUnavailable(fallback);
24
+ return fallback;
25
+ }
26
+ export { CAPTURE_COMPRESSIONS, resolveCaptureCodec, webCompressor };
@@ -0,0 +1,48 @@
1
+ import type { CaptureEndpoint } from './types';
2
+ /** A single event the server explicitly rejected (`drop`). */
3
+ export interface CaptureDroppedEvent {
4
+ uuid: string;
5
+ details?: string;
6
+ }
7
+ export interface CaptureErrorParams {
8
+ /** The capture lane the batch was sent to. */
9
+ endpoint: CaptureEndpoint;
10
+ requestId: string;
11
+ /** Events the server rejected outright (billing/validation). */
12
+ drops: CaptureDroppedEvent[];
13
+ /** UUIDs of events still pending `retry` after the attempt budget was exhausted, or lost to a batch-level failure. */
14
+ retryExhausted: string[];
15
+ /** The underlying transport/HTTP/parse failure, when the whole batch failed. */
16
+ cause?: unknown;
17
+ }
18
+ /**
19
+ * Surfaced on the client error channel whenever a capture batch did not
20
+ * fully deliver: some events were `drop`ped, some `retry` events outlived the
21
+ * attempt budget, or the batch hit a terminal transport/HTTP/parse failure.
22
+ *
23
+ * A 2xx with drops is still a partial failure and is reported here — a
24
+ * successful HTTP status does not mean every event was accepted.
25
+ */
26
+ export declare class CaptureError extends Error {
27
+ name: string;
28
+ readonly endpoint: CaptureEndpoint;
29
+ readonly requestId: string;
30
+ readonly drops: CaptureDroppedEvent[];
31
+ readonly retryExhausted: string[];
32
+ cause?: unknown;
33
+ constructor({ endpoint, requestId, drops, retryExhausted, cause }: CaptureErrorParams);
34
+ private static buildMessage;
35
+ }
36
+ /** Counts of undelivered events by cause, in the order the causes first occurred. */
37
+ export declare class CaptureLossTally {
38
+ private readonly counts;
39
+ add(cause: string, count: number): void;
40
+ get total(): number;
41
+ entries(): [cause: string, count: number][];
42
+ }
43
+ /**
44
+ * The one line logged for a capture loss when nothing listens for `'error'`. It holds the lane,
45
+ * counts and causes only: never server response text, event content or uuids.
46
+ */
47
+ export declare function describeCaptureLoss(endpoint: CaptureEndpoint, loss: CaptureLossTally): string;
48
+ //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/capture-v1/errors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAE9C,8DAA8D;AAC9D,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,WAAW,kBAAkB;IACjC,8CAA8C;IAC9C,QAAQ,EAAE,eAAe,CAAA;IACzB,SAAS,EAAE,MAAM,CAAA;IACjB,gEAAgE;IAChE,KAAK,EAAE,mBAAmB,EAAE,CAAA;IAC5B,sHAAsH;IACtH,cAAc,EAAE,MAAM,EAAE,CAAA;IACxB,gFAAgF;IAChF,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AAED;;;;;;;GAOG;AACH,qBAAa,YAAa,SAAQ,KAAK;IACrC,IAAI,SAAiB;IACrB,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAAA;IAClC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,KAAK,EAAE,mBAAmB,EAAE,CAAA;IACrC,QAAQ,CAAC,cAAc,EAAE,MAAM,EAAE,CAAA;IACjC,KAAK,CAAC,EAAE,OAAO,CAAA;IAEf,YAAY,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,EAAE,kBAAkB,EAOpF;IAED,OAAO,CAAC,MAAM,CAAC,YAAY;CAa5B;AAED,qFAAqF;AACrF,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA4B;IAEnD,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAItC;IAED,IAAI,KAAK,IAAI,MAAM,CAMlB;IAED,OAAO,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,EAAE,CAE1C;CACF;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,eAAe,EAAE,IAAI,EAAE,gBAAgB,GAAG,MAAM,CAG7F"}
@@ -0,0 +1,82 @@
1
+ "use strict";
2
+ var __webpack_require__ = {};
3
+ (()=>{
4
+ __webpack_require__.d = (exports1, getters, values)=>{
5
+ var define = (defs, kind)=>{
6
+ for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
7
+ enumerable: true,
8
+ [kind]: defs[key]
9
+ });
10
+ };
11
+ define(getters, "get");
12
+ define(values, "value");
13
+ };
14
+ })();
15
+ (()=>{
16
+ __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
17
+ })();
18
+ (()=>{
19
+ __webpack_require__.r = (exports1)=>{
20
+ if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
21
+ value: 'Module'
22
+ });
23
+ Object.defineProperty(exports1, '__esModule', {
24
+ value: true
25
+ });
26
+ };
27
+ })();
28
+ var __webpack_exports__ = {};
29
+ __webpack_require__.r(__webpack_exports__);
30
+ class CaptureError extends Error {
31
+ constructor({ endpoint, requestId, drops, retryExhausted, cause }){
32
+ super(CaptureError.buildMessage(endpoint, requestId, drops, retryExhausted, cause)), this.name = 'CaptureError';
33
+ this.endpoint = endpoint;
34
+ this.requestId = requestId;
35
+ this.drops = drops;
36
+ this.retryExhausted = retryExhausted;
37
+ this.cause = cause;
38
+ }
39
+ static buildMessage(endpoint, requestId, drops, retryExhausted, cause) {
40
+ let message = `Capture batch ${requestId} to ${endpoint} did not fully deliver: ${drops.length} dropped, ${retryExhausted.length} undelivered`;
41
+ if (cause instanceof Error) message += ` (${cause.message})`;
42
+ return message;
43
+ }
44
+ }
45
+ class CaptureLossTally {
46
+ add(cause, count) {
47
+ if (count > 0) this.counts.set(cause, (this.counts.get(cause) ?? 0) + count);
48
+ }
49
+ get total() {
50
+ let total = 0;
51
+ for (const count of this.counts.values())total += count;
52
+ return total;
53
+ }
54
+ entries() {
55
+ return [
56
+ ...this.counts
57
+ ];
58
+ }
59
+ constructor(){
60
+ this.counts = new Map();
61
+ }
62
+ }
63
+ function describeCaptureLoss(endpoint, loss) {
64
+ const causes = loss.entries().map(([cause, count])=>`${count} ${cause}`);
65
+ return `${loss.total} event(s) were not delivered to ${endpoint}: ${causes.join(', ')}`;
66
+ }
67
+ __webpack_require__.d(__webpack_exports__, {
68
+ CaptureError: ()=>CaptureError,
69
+ CaptureLossTally: ()=>CaptureLossTally,
70
+ describeCaptureLoss: ()=>describeCaptureLoss
71
+ });
72
+ exports.CaptureError = __webpack_exports__.CaptureError;
73
+ exports.CaptureLossTally = __webpack_exports__.CaptureLossTally;
74
+ exports.describeCaptureLoss = __webpack_exports__.describeCaptureLoss;
75
+ for(var __rspack_i in __webpack_exports__)if (-1 === [
76
+ "CaptureError",
77
+ "CaptureLossTally",
78
+ "describeCaptureLoss"
79
+ ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
80
+ Object.defineProperty(exports, '__esModule', {
81
+ value: true
82
+ });
@@ -0,0 +1,38 @@
1
+ class CaptureError extends Error {
2
+ constructor({ endpoint, requestId, drops, retryExhausted, cause }){
3
+ super(CaptureError.buildMessage(endpoint, requestId, drops, retryExhausted, cause)), this.name = 'CaptureError';
4
+ this.endpoint = endpoint;
5
+ this.requestId = requestId;
6
+ this.drops = drops;
7
+ this.retryExhausted = retryExhausted;
8
+ this.cause = cause;
9
+ }
10
+ static buildMessage(endpoint, requestId, drops, retryExhausted, cause) {
11
+ let message = `Capture batch ${requestId} to ${endpoint} did not fully deliver: ${drops.length} dropped, ${retryExhausted.length} undelivered`;
12
+ if (cause instanceof Error) message += ` (${cause.message})`;
13
+ return message;
14
+ }
15
+ }
16
+ class CaptureLossTally {
17
+ add(cause, count) {
18
+ if (count > 0) this.counts.set(cause, (this.counts.get(cause) ?? 0) + count);
19
+ }
20
+ get total() {
21
+ let total = 0;
22
+ for (const count of this.counts.values())total += count;
23
+ return total;
24
+ }
25
+ entries() {
26
+ return [
27
+ ...this.counts
28
+ ];
29
+ }
30
+ constructor(){
31
+ this.counts = new Map();
32
+ }
33
+ }
34
+ function describeCaptureLoss(endpoint, loss) {
35
+ const causes = loss.entries().map(([cause, count])=>`${count} ${cause}`);
36
+ return `${loss.total} event(s) were not delivered to ${endpoint}: ${causes.join(', ')}`;
37
+ }
38
+ export { CaptureError, CaptureLossTally, describeCaptureLoss };
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Capture V1 transport shared by the PostHog SDKs. It follows semver, because the SDKs depend on
3
+ * core with a caret range. `CaptureError`, `CaptureDroppedEvent`, `CaptureErrorParams` and
4
+ * `CaptureEndpoint` are also public through posthog-node.
5
+ *
6
+ * @packageDocumentation
7
+ */
8
+ export { CAPTURE_COMPRESSIONS, resolveCaptureCodec, webCompressor, type CaptureCodec, type CaptureCompression, type CaptureCompressor, } from './compression';
9
+ export { CaptureError, CaptureLossTally, describeCaptureLoss, type CaptureDroppedEvent, type CaptureErrorParams, } from './errors';
10
+ export { V1CaptureSender, type V1CaptureSenderConfig, type V1CaptureSenderHooks, type V1RequestIdentity, type V1SendDeferral, type V1SendOptions, } from './sender';
11
+ export { serializeV1Event, utf8Length, wireProblem, type SerializedV1Event } from './serialize';
12
+ export { readEventOptions } from './transform';
13
+ export { AI_CAPTURE_ENDPOINT, ANALYTICS_CAPTURE_ENDPOINT, type CaptureEndpoint, type V1EventOptions } from './types';
14
+ export { canonicalizeUuid, eventUuidv7 } from './uuid';
15
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/capture-v1/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EACL,oBAAoB,EACpB,mBAAmB,EACnB,aAAa,EACb,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,GACvB,MAAM,eAAe,CAAA;AACtB,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,mBAAmB,EACnB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,GACxB,MAAM,UAAU,CAAA;AACjB,OAAO,EACL,eAAe,EACf,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,aAAa,GACnB,MAAM,UAAU,CAAA;AACjB,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,WAAW,EAAE,KAAK,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAC/F,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAC9C,OAAO,EAAE,mBAAmB,EAAE,0BAA0B,EAAE,KAAK,eAAe,EAAE,KAAK,cAAc,EAAE,MAAM,SAAS,CAAA;AACpH,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAA"}
@@ -0,0 +1,88 @@
1
+ "use strict";
2
+ var __webpack_require__ = {};
3
+ (()=>{
4
+ __webpack_require__.d = (exports1, getters, values)=>{
5
+ var define = (defs, kind)=>{
6
+ for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
7
+ enumerable: true,
8
+ [kind]: defs[key]
9
+ });
10
+ };
11
+ define(getters, "get");
12
+ define(values, "value");
13
+ };
14
+ })();
15
+ (()=>{
16
+ __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
17
+ })();
18
+ (()=>{
19
+ __webpack_require__.r = (exports1)=>{
20
+ if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
21
+ value: 'Module'
22
+ });
23
+ Object.defineProperty(exports1, '__esModule', {
24
+ value: true
25
+ });
26
+ };
27
+ })();
28
+ var __webpack_exports__ = {};
29
+ __webpack_require__.r(__webpack_exports__);
30
+ __webpack_require__.d(__webpack_exports__, {
31
+ AI_CAPTURE_ENDPOINT: ()=>external_types_js_namespaceObject.AI_CAPTURE_ENDPOINT,
32
+ ANALYTICS_CAPTURE_ENDPOINT: ()=>external_types_js_namespaceObject.ANALYTICS_CAPTURE_ENDPOINT,
33
+ CAPTURE_COMPRESSIONS: ()=>external_compression_js_namespaceObject.CAPTURE_COMPRESSIONS,
34
+ CaptureError: ()=>external_errors_js_namespaceObject.CaptureError,
35
+ CaptureLossTally: ()=>external_errors_js_namespaceObject.CaptureLossTally,
36
+ V1CaptureSender: ()=>external_sender_js_namespaceObject.V1CaptureSender,
37
+ canonicalizeUuid: ()=>external_uuid_js_namespaceObject.canonicalizeUuid,
38
+ describeCaptureLoss: ()=>external_errors_js_namespaceObject.describeCaptureLoss,
39
+ eventUuidv7: ()=>external_uuid_js_namespaceObject.eventUuidv7,
40
+ readEventOptions: ()=>external_transform_js_namespaceObject.readEventOptions,
41
+ resolveCaptureCodec: ()=>external_compression_js_namespaceObject.resolveCaptureCodec,
42
+ serializeV1Event: ()=>external_serialize_js_namespaceObject.serializeV1Event,
43
+ utf8Length: ()=>external_serialize_js_namespaceObject.utf8Length,
44
+ webCompressor: ()=>external_compression_js_namespaceObject.webCompressor,
45
+ wireProblem: ()=>external_serialize_js_namespaceObject.wireProblem
46
+ });
47
+ const external_compression_js_namespaceObject = require("./compression.js");
48
+ const external_errors_js_namespaceObject = require("./errors.js");
49
+ const external_sender_js_namespaceObject = require("./sender.js");
50
+ const external_serialize_js_namespaceObject = require("./serialize.js");
51
+ const external_transform_js_namespaceObject = require("./transform.js");
52
+ const external_types_js_namespaceObject = require("./types.js");
53
+ const external_uuid_js_namespaceObject = require("./uuid.js");
54
+ exports.AI_CAPTURE_ENDPOINT = __webpack_exports__.AI_CAPTURE_ENDPOINT;
55
+ exports.ANALYTICS_CAPTURE_ENDPOINT = __webpack_exports__.ANALYTICS_CAPTURE_ENDPOINT;
56
+ exports.CAPTURE_COMPRESSIONS = __webpack_exports__.CAPTURE_COMPRESSIONS;
57
+ exports.CaptureError = __webpack_exports__.CaptureError;
58
+ exports.CaptureLossTally = __webpack_exports__.CaptureLossTally;
59
+ exports.V1CaptureSender = __webpack_exports__.V1CaptureSender;
60
+ exports.canonicalizeUuid = __webpack_exports__.canonicalizeUuid;
61
+ exports.describeCaptureLoss = __webpack_exports__.describeCaptureLoss;
62
+ exports.eventUuidv7 = __webpack_exports__.eventUuidv7;
63
+ exports.readEventOptions = __webpack_exports__.readEventOptions;
64
+ exports.resolveCaptureCodec = __webpack_exports__.resolveCaptureCodec;
65
+ exports.serializeV1Event = __webpack_exports__.serializeV1Event;
66
+ exports.utf8Length = __webpack_exports__.utf8Length;
67
+ exports.webCompressor = __webpack_exports__.webCompressor;
68
+ exports.wireProblem = __webpack_exports__.wireProblem;
69
+ for(var __rspack_i in __webpack_exports__)if (-1 === [
70
+ "AI_CAPTURE_ENDPOINT",
71
+ "ANALYTICS_CAPTURE_ENDPOINT",
72
+ "CAPTURE_COMPRESSIONS",
73
+ "CaptureError",
74
+ "CaptureLossTally",
75
+ "V1CaptureSender",
76
+ "canonicalizeUuid",
77
+ "describeCaptureLoss",
78
+ "eventUuidv7",
79
+ "readEventOptions",
80
+ "resolveCaptureCodec",
81
+ "serializeV1Event",
82
+ "utf8Length",
83
+ "webCompressor",
84
+ "wireProblem"
85
+ ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
86
+ Object.defineProperty(exports, '__esModule', {
87
+ value: true
88
+ });
@@ -0,0 +1,7 @@
1
+ export { CAPTURE_COMPRESSIONS, resolveCaptureCodec, webCompressor } from "./compression.mjs";
2
+ export { CaptureError, CaptureLossTally, describeCaptureLoss } from "./errors.mjs";
3
+ export { V1CaptureSender } from "./sender.mjs";
4
+ export { serializeV1Event, utf8Length, wireProblem } from "./serialize.mjs";
5
+ export { readEventOptions } from "./transform.mjs";
6
+ export { AI_CAPTURE_ENDPOINT, ANALYTICS_CAPTURE_ENDPOINT } from "./types.mjs";
7
+ export { canonicalizeUuid, eventUuidv7 } from "./uuid.mjs";
@@ -0,0 +1,150 @@
1
+ import type { FetchLike } from '../types';
2
+ import { type CaptureCodec, type CaptureCompression } from './compression';
3
+ import { CaptureError } from './errors';
4
+ import { type SerializedV1Event } from './serialize';
5
+ import type { CaptureEndpoint } from './types';
6
+ /** Wait before the first retry; each later retry doubles it. */
7
+ export declare const RETRY_BASE_DELAY_MS = 100;
8
+ /** Ceiling for every retry wait, including one raised by `Retry-After`. */
9
+ export declare const MAX_RETRY_DELAY_MS = 30000;
10
+ /** Drop details for a copy of an event the server dropped as a duplicate of an earlier one in the request. */
11
+ export declare const DUPLICATE_EVENT_UUID = "duplicate_event_uuid";
12
+ export interface V1CaptureSenderConfig {
13
+ host: string;
14
+ /** The capture lane this sender posts to. */
15
+ path: CaptureEndpoint;
16
+ /** The project token, sent as `Authorization: Bearer <projectToken>`. */
17
+ projectToken: string;
18
+ /**
19
+ * @deprecated Pass `projectToken`. Read only when `projectToken` is missing, for SDK builds
20
+ * published before the rename.
21
+ */
22
+ apiKey?: string;
23
+ /** The `PostHog-Sdk-Info` library name. PostHog fills `$lib` from it only for an event that has no `$lib`. */
24
+ libraryId: string;
25
+ libraryVersion: string;
26
+ /** Value for the `User-Agent` header, if the runtime allows setting it. */
27
+ userAgent?: string;
28
+ /** Extra headers sent on every request. A header the sender sets itself always wins, whatever its case. */
29
+ extraHeaders?: Record<string, string>;
30
+ historicalMigration: boolean;
31
+ /** The body encoding; a body that fails to compress is sent uncompressed. */
32
+ compression: CaptureCompression;
33
+ requestTimeoutMs: number;
34
+ /** Retries after the first attempt. */
35
+ maxRetries: number;
36
+ isDebug?: boolean;
37
+ }
38
+ export interface V1CaptureSenderHooks {
39
+ fetch: FetchLike;
40
+ /**
41
+ * Surfaces partial/terminal delivery failures on the client error channel, at most once per
42
+ * batch. `summary` is one line with counts and causes only, for when nothing listens.
43
+ */
44
+ onError: (error: CaptureError, summary: string) => void;
45
+ now?: () => number;
46
+ /** Waits between attempts. The sender stops waiting when `signal` aborts, even if this does not. */
47
+ sleep?: (ms: number, signal?: AbortSignal) => Promise<void>;
48
+ generateRequestId?: () => string;
49
+ /** Uniform in [0, 1); sets the jitter of each retry wait. */
50
+ random?: () => number;
51
+ compress?: (payload: string, codec: CaptureCodec) => Promise<Uint8Array | null>;
52
+ }
53
+ export interface V1SendOptions {
54
+ /** Aborting stops the current attempt and every later one; the pending events come back as unsent. */
55
+ signal?: AbortSignal;
56
+ /**
57
+ * When true, events whose last attempt got no HTTP response (or were cut off by `signal`) are
58
+ * returned to the caller unreported, so it can queue them again. When false they are reported
59
+ * as undelivered.
60
+ */
61
+ keepUnsent?: boolean;
62
+ /**
63
+ * For an SDK with a durable queue. When set, events the server asked to resend (a retryable
64
+ * status or `retry` results on the last attempt) and a batch of more than one event that got a
65
+ * `413` are returned to the caller unreported, and this is called once with why, so the caller can
66
+ * wait or halve the batch before sending them again. Unsent events (`keepUnsent`) also call it.
67
+ */
68
+ onDeferred?: (deferral: V1SendDeferral) => void;
69
+ /**
70
+ * The request these events were kept from, when they are exactly the events it left to send again.
71
+ * The send reuses its request ID and `created_at` and continues its attempt numbers.
72
+ */
73
+ retryOf?: V1RequestIdentity;
74
+ }
75
+ /** A capture request's identity, which a resend of the same events keeps. */
76
+ export interface V1RequestIdentity {
77
+ requestId: string;
78
+ /** The batch's `created_at`. */
79
+ createdAt: string;
80
+ /** The `PostHog-Attempt` of the request's last attempt. */
81
+ attempt: number;
82
+ }
83
+ export interface V1SendDeferral {
84
+ /** Why the events were kept, such as `HTTP 404`, for logs. */
85
+ reason: string;
86
+ /** The server's `Retry-After`, when the last response carried one. */
87
+ retryAfterMs?: number;
88
+ /** The batch got a `413` and should be resent in smaller batches. */
89
+ tooLarge: boolean;
90
+ /** The last attempt hit `requestTimeoutMs` before a response was read. */
91
+ timedOut?: boolean;
92
+ /** The request the events were kept from, for a resend of exactly those events to pass as `retryOf`. */
93
+ request: V1RequestIdentity;
94
+ }
95
+ /**
96
+ * Sends already-serialized events to one Capture V1 lane (`config.path`),
97
+ * owning the full attempt loop: per-event partial retry, exponential backoff
98
+ * clamped against `Retry-After`, v1 status classification, and surfacing drops
99
+ * / undelivered events on the error channel. Used by both the batched and
100
+ * immediate send paths.
101
+ *
102
+ * Never throws for a handled outcome: after exhausting its own attempt budget it
103
+ * reports the failure via `onError` and resolves. Only events that never got an
104
+ * HTTP response can come back to the caller, and only with `keepUnsent`.
105
+ */
106
+ export declare class V1CaptureSender {
107
+ private readonly config;
108
+ private readonly hostOrigin;
109
+ private readonly fetchFn;
110
+ private readonly onError;
111
+ private readonly now;
112
+ private readonly sleep;
113
+ private readonly generateRequestId;
114
+ private readonly random;
115
+ private readonly compress;
116
+ constructor(config: V1CaptureSenderConfig, hooks: V1CaptureSenderHooks);
117
+ /** Sends `events` and resolves with the ones to queue again (always empty unless `keepUnsent`). */
118
+ send<T extends SerializedV1Event>(events: T[], options?: V1SendOptions): Promise<T[]>;
119
+ private sleepUnlessAborted;
120
+ private sendOnce;
121
+ /**
122
+ * Sends with `redirect: 'manual'` and follows 307 and 308 to the configured host's origin, at most
123
+ * `MAX_REDIRECTS` times, with the same method, headers and body. A fetch that follows redirects
124
+ * itself still works: its final response is not a redirect.
125
+ */
126
+ private fetchFollowingRedirects;
127
+ /** Compresses `payload` with the configured codec; `contentEncoding` names the codec when it compressed. */
128
+ private encodeBody;
129
+ private buildHeaders;
130
+ /**
131
+ * Partition the pending events against a 2xx result map: `drop` accumulates as
132
+ * a terminal failure, `retry` is returned for the next attempt, and
133
+ * `ok`/`warning`/unknown/absent are terminal successes.
134
+ */
135
+ private classify;
136
+ /** The wait after failed attempt `attempt` (1-based): jittered exponential backoff, raised to `Retry-After`. */
137
+ private backoffDelay;
138
+ /** Parse `Retry-After` (delta-seconds or HTTP-date). Non-positive/past values are ignored. */
139
+ private parseRetryAfter;
140
+ private parseResponse;
141
+ private buildHttpError;
142
+ private surfaceBatchFailure;
143
+ private surfacePartialDrops;
144
+ private report;
145
+ /** A failure without an HTTP response, named by type only: its message can carry server or proxy text. */
146
+ private describeTransportFailure;
147
+ private captureError;
148
+ private cancelBody;
149
+ }
150
+ //# sourceMappingURL=sender.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sender.d.ts","sourceRoot":"","sources":["../../src/capture-v1/sender.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAA6C,MAAM,UAAU,CAAA;AAGpF,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,kBAAkB,EAAiB,MAAM,eAAe,CAAA;AACzF,OAAO,EACL,YAAY,EAKb,MAAM,UAAU,CAAA;AACjB,OAAO,EAAE,KAAK,iBAAiB,EAAe,MAAM,aAAa,CAAA;AACjE,OAAO,KAAK,EAAE,eAAe,EAAkC,MAAM,SAAS,CAAA;AAG9E,gEAAgE;AAChE,eAAO,MAAM,mBAAmB,MAAM,CAAA;AACtC,2EAA2E;AAC3E,eAAO,MAAM,kBAAkB,QAAS,CAAA;AA0DxC,8GAA8G;AAC9G,eAAO,MAAM,oBAAoB,yBAAyB,CAAA;AAE1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