@smplkit/sdk 1.6.4 → 1.6.6

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.cjs CHANGED
@@ -16949,6 +16949,9 @@ function _parseDebugEnv(value) {
16949
16949
  return v === "1" || v === "true" || v === "yes";
16950
16950
  }
16951
16951
  var _DEBUG_ENABLED = _parseDebugEnv(process.env.SMPLKIT_DEBUG ?? "");
16952
+ function enableDebug() {
16953
+ _DEBUG_ENABLED = true;
16954
+ }
16952
16955
  function debug(subsystem, message) {
16953
16956
  if (!_DEBUG_ENABLED) return;
16954
16957
  const ts = (/* @__PURE__ */ new Date()).toISOString();
@@ -19709,6 +19712,9 @@ var SmplClient = class {
19709
19712
  _appHttp;
19710
19713
  constructor(options = {}) {
19711
19714
  const cfg = resolveConfig(options);
19715
+ if (cfg.debug) {
19716
+ enableDebug();
19717
+ }
19712
19718
  this._apiKey = cfg.apiKey;
19713
19719
  this._environment = cfg.environment;
19714
19720
  this._service = cfg.service;