posthog-node 3.5.0 → 3.6.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 3.6.0 - 2024-01-18
2
+
3
+ 1. Adds support for overriding the event `uuid`
4
+
1
5
  # 3.5.0 - 2024-01-09
2
6
 
3
7
  1. When local evaluation is enabled, we automatically add flag information to all events sent to PostHog, whenever possible. This makes it easier to use these events in experiments.
package/lib/index.cjs.js CHANGED
@@ -158,7 +158,7 @@ function __spreadArray(to, from, pack) {
158
158
  return to.concat(ar || Array.prototype.slice.call(from));
159
159
  }
160
160
 
161
- var version = "3.5.0";
161
+ var version = "3.6.0";
162
162
 
163
163
  var PostHogPersistedProperty;
164
164
  (function (PostHogPersistedProperty) {
@@ -1016,7 +1016,7 @@ var PostHogCoreStateless = /** @class */ (function () {
1016
1016
  this._events.emit(type, "Library is disabled. Not sending event. To re-enable, call posthog.optIn()");
1017
1017
  return;
1018
1018
  }
1019
- var message = __assign(__assign({}, _message), { type: type, library: this.getLibraryId(), library_version: this.getLibraryVersion(), timestamp: (options === null || options === void 0 ? void 0 : options.timestamp) ? options === null || options === void 0 ? void 0 : options.timestamp : currentISOTime() });
1019
+ var message = __assign(__assign({}, _message), { type: type, library: this.getLibraryId(), library_version: this.getLibraryVersion(), timestamp: (options === null || options === void 0 ? void 0 : options.timestamp) ? options === null || options === void 0 ? void 0 : options.timestamp : currentISOTime(), uuid: (options === null || options === void 0 ? void 0 : options.uuid) ? options.uuid : generateUUID(globalThis) });
1020
1020
  var addGeoipDisableProperty = (_a = options === null || options === void 0 ? void 0 : options.disableGeoip) !== null && _a !== void 0 ? _a : this.disableGeoip;
1021
1021
  if (addGeoipDisableProperty) {
1022
1022
  if (!message.properties) {
@@ -2750,12 +2750,14 @@ function (_super) {
2750
2750
  groups = _a.groups,
2751
2751
  sendFeatureFlags = _a.sendFeatureFlags,
2752
2752
  timestamp = _a.timestamp,
2753
- disableGeoip = _a.disableGeoip;
2753
+ disableGeoip = _a.disableGeoip,
2754
+ uuid = _a.uuid;
2754
2755
 
2755
2756
  var _capture = function (props) {
2756
2757
  _super.prototype.captureStateless.call(_this, distinctId, event, props, {
2757
2758
  timestamp: timestamp,
2758
- disableGeoip: disableGeoip
2759
+ disableGeoip: disableGeoip,
2760
+ uuid: uuid
2759
2761
  });
2760
2762
  }; // :TRICKY: If we flush, or need to shut down, to not lose events we want this promise to resolve before we flush
2761
2763