@nsshunt/stsobservability 1.0.113 → 1.0.115

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.
@@ -3888,6 +3888,8 @@ function utf8Encode(str, output, outputOffset) {
3888
3888
  }
3889
3889
  new TextDecoder();
3890
3890
  class ExtData {
3891
+ type;
3892
+ data;
3891
3893
  constructor(type, data) {
3892
3894
  this.type = type;
3893
3895
  this.data = data;
@@ -4001,11 +4003,18 @@ const timestampExtension = {
4001
4003
  decode: decodeTimestampExtension
4002
4004
  };
4003
4005
  class ExtensionCodec {
4006
+ static defaultCodec = new ExtensionCodec();
4007
+ // ensures ExtensionCodecType<X> matches ExtensionCodec<X>
4008
+ // this will make type errors a lot more clear
4009
+ // eslint-disable-next-line @typescript-eslint/naming-convention
4010
+ __brand;
4011
+ // built-in extensions
4012
+ builtInEncoders = [];
4013
+ builtInDecoders = [];
4014
+ // custom extensions
4015
+ encoders = [];
4016
+ decoders = [];
4004
4017
  constructor() {
4005
- this.builtInEncoders = [];
4006
- this.builtInDecoders = [];
4007
- this.encoders = [];
4008
- this.decoders = [];
4009
4018
  this.register(timestampExtension);
4010
4019
  }
4011
4020
  register({ type, encode: encode2, decode }) {
@@ -4053,7 +4062,6 @@ class ExtensionCodec {
4053
4062
  }
4054
4063
  }
4055
4064
  }
4056
- ExtensionCodec.defaultCodec = new ExtensionCodec();
4057
4065
  function isArrayBufferLike(buffer) {
4058
4066
  return buffer instanceof ArrayBuffer || typeof SharedArrayBuffer !== "undefined" && buffer instanceof SharedArrayBuffer;
4059
4067
  }
@@ -4071,8 +4079,20 @@ function ensureUint8Array(buffer) {
4071
4079
  const DEFAULT_MAX_DEPTH = 100;
4072
4080
  const DEFAULT_INITIAL_BUFFER_SIZE = 2048;
4073
4081
  class Encoder {
4082
+ extensionCodec;
4083
+ context;
4084
+ useBigInt64;
4085
+ maxDepth;
4086
+ initialBufferSize;
4087
+ sortKeys;
4088
+ forceFloat32;
4089
+ ignoreUndefined;
4090
+ forceIntegerToFloat;
4091
+ pos;
4092
+ view;
4093
+ bytes;
4094
+ entered = false;
4074
4095
  constructor(options) {
4075
- this.entered = false;
4076
4096
  this.extensionCodec = options?.extensionCodec ?? ExtensionCodec.defaultCodec;
4077
4097
  this.context = options?.context;
4078
4098
  this.useBigInt64 = options?.useBigInt64 ?? false;
@@ -4758,7 +4778,7 @@ class PublishInstrumentController extends STSOptionsBase {
4758
4778
  return new PublishInstrumentController(options);
4759
4779
  }
4760
4780
  }
4761
- const STSInstrumentControllerPluginKey = Symbol("instrumentController");
4781
+ const STSInstrumentControllerPluginKey = /* @__PURE__ */ Symbol("instrumentController");
4762
4782
  const GetSTSInstrumentControllerPluginKey = () => STSInstrumentControllerPluginKey;
4763
4783
  const CompareSTSInstrumentControllerPluginKey = (val) => val === STSInstrumentControllerPluginKey;
4764
4784
  const useSTSInstrumentControllerPlugin = () => inject(STSInstrumentControllerPluginKey);