@smplkit/sdk 1.6.4 → 1.6.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/dist/index.js CHANGED
@@ -16908,6 +16908,9 @@ function _parseDebugEnv(value) {
16908
16908
  return v === "1" || v === "true" || v === "yes";
16909
16909
  }
16910
16910
  var _DEBUG_ENABLED = _parseDebugEnv(process.env.SMPLKIT_DEBUG ?? "");
16911
+ function enableDebug() {
16912
+ _DEBUG_ENABLED = true;
16913
+ }
16911
16914
  function debug(subsystem, message) {
16912
16915
  if (!_DEBUG_ENABLED) return;
16913
16916
  const ts = (/* @__PURE__ */ new Date()).toISOString();
@@ -19668,6 +19671,9 @@ var SmplClient = class {
19668
19671
  _appHttp;
19669
19672
  constructor(options = {}) {
19670
19673
  const cfg = resolveConfig(options);
19674
+ if (cfg.debug) {
19675
+ enableDebug();
19676
+ }
19671
19677
  this._apiKey = cfg.apiKey;
19672
19678
  this._environment = cfg.environment;
19673
19679
  this._service = cfg.service;