@syntrologie/runtime-sdk 2.8.0-canary.42 → 2.8.0-canary.44

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.
@@ -3456,7 +3456,7 @@ function getAntiFlickerSnippet(config = {}) {
3456
3456
  }
3457
3457
 
3458
3458
  // src/version.ts
3459
- var SDK_VERSION = "2.8.0-canary.42";
3459
+ var SDK_VERSION = "2.8.0-canary.44";
3460
3460
 
3461
3461
  // src/types.ts
3462
3462
  var SDK_SCHEMA_VERSION = "2.0";
@@ -3607,12 +3607,14 @@ function getCachedConfig(sdkVersion) {
3607
3607
  var resolveConfigUri = ({
3608
3608
  configUri,
3609
3609
  experiments,
3610
- featureKey = "smart-canvas-config-uri"
3610
+ featureKey
3611
3611
  }) => {
3612
3612
  var _a2;
3613
3613
  if (configUri) return configUri;
3614
- const fromFeature = (_a2 = experiments == null ? void 0 : experiments.getFeatureValue) == null ? void 0 : _a2.call(experiments, featureKey, null);
3615
- if (fromFeature) return fromFeature;
3614
+ if (featureKey) {
3615
+ const fromFeature = (_a2 = experiments == null ? void 0 : experiments.getFeatureValue) == null ? void 0 : _a2.call(experiments, featureKey, null);
3616
+ if (fromFeature) return fromFeature;
3617
+ }
3616
3618
  return void 0;
3617
3619
  };
3618
3620
  function getVariantFlagKeys(experiments, manifestKey, variantFlagPrefix) {
@@ -3638,7 +3640,7 @@ var createCanvasConfigFetcher = ({
3638
3640
  experiments,
3639
3641
  featureKey,
3640
3642
  credentials,
3641
- configFeatureKey = "smart-canvas-config",
3643
+ configFeatureKey,
3642
3644
  manifestKey,
3643
3645
  variantFlagPrefix,
3644
3646
  sdkVersion
@@ -6259,8 +6261,8 @@ function SmartCanvasApp({
6259
6261
  controller,
6260
6262
  fetcher,
6261
6263
  configUri,
6262
- configUriFeatureKey = "smart-canvas-config-uri",
6263
- configFeatureKey = "smart-canvas-config",
6264
+ configUriFeatureKey,
6265
+ configFeatureKey,
6264
6266
  fetchCredentials = "include",
6265
6267
  pollIntervalMs,
6266
6268
  experiments,
@@ -6330,8 +6332,8 @@ function SmartCanvasAppInner({
6330
6332
  controller,
6331
6333
  fetcher,
6332
6334
  configUri,
6333
- configUriFeatureKey = "smart-canvas-config-uri",
6334
- configFeatureKey = "smart-canvas-config",
6335
+ configUriFeatureKey,
6336
+ configFeatureKey,
6335
6337
  fetchCredentials = "include",
6336
6338
  pollIntervalMs: _pollIntervalMs,
6337
6339
  experiments,
@@ -11608,9 +11610,8 @@ var ExperimentsFetcher = class {
11608
11610
  __publicField(this, "featureKey");
11609
11611
  __publicField(this, "manifestKey");
11610
11612
  __publicField(this, "variantFlagPrefix");
11611
- var _a2;
11612
11613
  this.client = options.client;
11613
- this.featureKey = (_a2 = options.featureKey) != null ? _a2 : "smart-canvas-config";
11614
+ this.featureKey = options.featureKey;
11614
11615
  this.manifestKey = options.manifestKey;
11615
11616
  this.variantFlagPrefix = options.variantFlagPrefix;
11616
11617
  }
@@ -11639,6 +11640,11 @@ var ExperimentsFetcher = class {
11639
11640
  };
11640
11641
  }
11641
11642
  }
11643
+ if (!this.featureKey) {
11644
+ throw new Error(
11645
+ "[SmartCanvas] No featureKey configured and no variant flags found. Ensure at least one config feature flag exists in your experiment platform."
11646
+ );
11647
+ }
11642
11648
  const config = (_b = (_a2 = this.client).getFeatureValue) == null ? void 0 : _b.call(_a2, this.featureKey, null);
11643
11649
  if (!config || typeof config !== "object") {
11644
11650
  throw new Error(
@@ -12237,4 +12243,4 @@ export {
12237
12243
  encodeToken,
12238
12244
  Syntro
12239
12245
  };
12240
- //# sourceMappingURL=chunk-MQ4WU2VR.js.map
12246
+ //# sourceMappingURL=chunk-OC3E47S2.js.map