canicode 0.6.3 → 0.6.4

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/cli/index.js CHANGED
@@ -2766,6 +2766,8 @@ var monitoringEnabled = false;
2766
2766
  var posthogApiKey;
2767
2767
  var sentryDsn;
2768
2768
  var distinctId = "anonymous";
2769
+ var environment = "unknown";
2770
+ var version = "unknown";
2769
2771
  var commonProps = {};
2770
2772
  function uuid4() {
2771
2773
  return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (c) => {
@@ -2793,10 +2795,12 @@ function initCapture(config2) {
2793
2795
  posthogApiKey = config2.posthogApiKey;
2794
2796
  sentryDsn = config2.sentryDsn;
2795
2797
  distinctId = config2.distinctId ?? "anonymous";
2798
+ environment = config2.environment ?? "unknown";
2799
+ version = config2.version ?? "unknown";
2796
2800
  commonProps = {
2797
2801
  _sdk: "canicode",
2798
- _sdk_version: config2.version ?? "unknown",
2799
- _env: config2.environment ?? "unknown"
2802
+ _sdk_version: version,
2803
+ _env: environment
2800
2804
  };
2801
2805
  }
2802
2806
  function captureEvent(event, properties) {
@@ -2831,6 +2835,8 @@ function captureError(error, context) {
2831
2835
  event_id: eventId,
2832
2836
  exception: { values: [{ type: error.name, value: error.message }] },
2833
2837
  platform: "node",
2838
+ environment,
2839
+ release: `canicode@${version}`,
2834
2840
  timestamp: Date.now() / 1e3,
2835
2841
  extra: context
2836
2842
  })
@@ -2855,6 +2861,8 @@ function shutdownCapture() {
2855
2861
  posthogApiKey = void 0;
2856
2862
  sentryDsn = void 0;
2857
2863
  distinctId = "anonymous";
2864
+ environment = "unknown";
2865
+ version = "unknown";
2858
2866
  commonProps = {};
2859
2867
  }
2860
2868