featurely-site-manager 1.1.21 → 1.1.22

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.
Files changed (3) hide show
  1. package/dist/index.js +100 -44
  2. package/dist/index.mjs +100 -44
  3. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -123,7 +123,8 @@ var _SiteManager = class _SiteManager {
123
123
  } else if (key.startsWith("ft_")) {
124
124
  const flagKey = key.slice(3);
125
125
  if (value === "true" || value === "1") this.flagOverrides.set(flagKey, true);
126
- else if (value === "false" || value === "0") this.flagOverrides.set(flagKey, false);
126
+ else if (value === "false" || value === "0")
127
+ this.flagOverrides.set(flagKey, false);
127
128
  }
128
129
  });
129
130
  } catch {
@@ -195,7 +196,10 @@ var _SiteManager = class _SiteManager {
195
196
  this.config.userId = userId;
196
197
  }
197
198
  if (customAttributes) {
198
- this.config.customAttributes = { ...(_a = this.config.customAttributes) != null ? _a : {}, ...customAttributes };
199
+ this.config.customAttributes = {
200
+ ...(_a = this.config.customAttributes) != null ? _a : {},
201
+ ...customAttributes
202
+ };
199
203
  this.featureFlagBuckets.clear();
200
204
  }
201
205
  if (!wasLoggedIn && this.config.userId && this.config.enableAnalytics) {
@@ -217,16 +221,25 @@ var _SiteManager = class _SiteManager {
217
221
  var _a, _b;
218
222
  if (this.flagOverrides.has(flagKey)) {
219
223
  const overrideValue = this.flagOverrides.get(flagKey);
220
- this.debugLog("info", `[flag] "${flagKey}" \u2192 ${overrideValue ? "ENABLED" : "DISABLED"} (override)`);
224
+ this.debugLog(
225
+ "info",
226
+ `[flag] "${flagKey}" \u2192 ${overrideValue ? "ENABLED" : "DISABLED"} (override)`
227
+ );
221
228
  return overrideValue;
222
229
  }
223
230
  if (!((_a = this.siteConfig) == null ? void 0 : _a.featureFlags)) {
224
231
  if (this.config.bootstrapFlags && Object.prototype.hasOwnProperty.call(this.config.bootstrapFlags, flagKey)) {
225
232
  const bootstrapValue = this.config.bootstrapFlags[flagKey];
226
- this.debugLog("info", `[flag] "${flagKey}" \u2192 ${bootstrapValue ? "ENABLED" : "DISABLED"} (bootstrap)`);
233
+ this.debugLog(
234
+ "info",
235
+ `[flag] "${flagKey}" \u2192 ${bootstrapValue ? "ENABLED" : "DISABLED"} (bootstrap)`
236
+ );
227
237
  return bootstrapValue;
228
238
  }
229
- this.debugLog("info", `[flag] "${flagKey}" \u2192 default (${defaultValue}) \u2014 config not yet loaded`);
239
+ this.debugLog(
240
+ "info",
241
+ `[flag] "${flagKey}" \u2192 default (${defaultValue}) \u2014 config not yet loaded`
242
+ );
230
243
  return defaultValue;
231
244
  }
232
245
  const flag = this.siteConfig.featureFlags.find((f) => f.key === flagKey);
@@ -346,7 +359,10 @@ var _SiteManager = class _SiteManager {
346
359
  this.debugLog("info", `[flag] override removed for "${flagKey}"`);
347
360
  } else {
348
361
  this.flagOverrides.set(flagKey, value);
349
- this.debugLog("info", `[flag] override set "${flagKey}" \u2192 ${value ? "ENABLED" : "DISABLED"}`);
362
+ this.debugLog(
363
+ "info",
364
+ `[flag] override set "${flagKey}" \u2192 ${value ? "ENABLED" : "DISABLED"}`
365
+ );
350
366
  }
351
367
  }
352
368
  /**
@@ -504,7 +520,10 @@ var _SiteManager = class _SiteManager {
504
520
  return flag;
505
521
  })
506
522
  };
507
- this.debugLog("info", `[env] applied ${Object.keys(envOverrides).length} flag override(s) from environment "${matchedEnv.name}"`);
523
+ this.debugLog(
524
+ "info",
525
+ `[env] applied ${Object.keys(envOverrides).length} flag override(s) from environment "${matchedEnv.name}"`
526
+ );
508
527
  }
509
528
  }
510
529
  this.siteConfig = newConfig;
@@ -546,7 +565,10 @@ var _SiteManager = class _SiteManager {
546
565
  }
547
566
  }
548
567
  if (matchedEnv && matchedEnv.errorLoggingEnabled === false) {
549
- this.debugLog("info", `[env] error logging disabled for environment${envLabel}`);
568
+ this.debugLog(
569
+ "info",
570
+ `[env] error logging disabled for environment${envLabel}`
571
+ );
550
572
  }
551
573
  if (newConfig.maintenance.enabled && !wasMaintenanceEnabled) {
552
574
  this.enableMaintenanceMode();
@@ -1048,7 +1070,14 @@ var _SiteManager = class _SiteManager {
1048
1070
  const params = {};
1049
1071
  try {
1050
1072
  const sp = new URLSearchParams(search);
1051
- for (const key of ["utm_source", "utm_medium", "utm_campaign", "utm_content", "utm_term", "ref"]) {
1073
+ for (const key of [
1074
+ "utm_source",
1075
+ "utm_medium",
1076
+ "utm_campaign",
1077
+ "utm_content",
1078
+ "utm_term",
1079
+ "ref"
1080
+ ]) {
1052
1081
  const val = sp.get(key);
1053
1082
  if (val) params[key] = val;
1054
1083
  }
@@ -1116,46 +1145,59 @@ var _SiteManager = class _SiteManager {
1116
1145
  }
1117
1146
  }
1118
1147
  });
1119
- inpObs.observe({ type: "event", buffered: true, durationThreshold: 40 });
1148
+ inpObs.observe({
1149
+ type: "event",
1150
+ buffered: true,
1151
+ durationThreshold: 40
1152
+ });
1120
1153
  } catch {
1121
1154
  }
1122
1155
  }
1123
1156
  /** Set up outbound link click tracking. */
1124
1157
  setupOutboundLinkTracking() {
1125
1158
  const currentHost = window.location.hostname;
1126
- document.addEventListener("click", (e) => {
1127
- var _a;
1128
- const target = (_a = e.target) == null ? void 0 : _a.closest("a");
1129
- if (!target) return;
1130
- const href = target.getAttribute("href") || "";
1131
- if (!href || href.startsWith("#") || href.startsWith("mailto:") || href.startsWith("tel:")) return;
1132
- try {
1133
- const url = new URL(href, window.location.href);
1134
- if (url.hostname && url.hostname !== currentHost) {
1135
- this.trackEvent("outbound_link_click", {
1136
- href: url.href,
1137
- destination: url.hostname,
1138
- path: window.location.pathname
1139
- });
1159
+ document.addEventListener(
1160
+ "click",
1161
+ (e) => {
1162
+ var _a;
1163
+ const target = (_a = e.target) == null ? void 0 : _a.closest("a");
1164
+ if (!target) return;
1165
+ const href = target.getAttribute("href") || "";
1166
+ if (!href || href.startsWith("#") || href.startsWith("mailto:") || href.startsWith("tel:"))
1167
+ return;
1168
+ try {
1169
+ const url = new URL(href, window.location.href);
1170
+ if (url.hostname && url.hostname !== currentHost) {
1171
+ this.trackEvent("outbound_link_click", {
1172
+ href: url.href,
1173
+ destination: url.hostname,
1174
+ path: window.location.pathname
1175
+ });
1176
+ }
1177
+ } catch {
1140
1178
  }
1141
- } catch {
1142
- }
1143
- }, { capture: true, passive: true });
1179
+ },
1180
+ { capture: true, passive: true }
1181
+ );
1144
1182
  }
1145
1183
  /** Set up auto-capture for elements with data-featurely-click attribute. */
1146
1184
  setupAutoClickCapture() {
1147
- document.addEventListener("click", (e) => {
1148
- var _a, _b;
1149
- const target = (_a = e.target) == null ? void 0 : _a.closest("[data-featurely-click]");
1150
- if (!target) return;
1151
- const eventName = target.getAttribute("data-featurely-click") || "element_clicked";
1152
- const label = target.getAttribute("data-featurely-label") || ((_b = target.textContent) == null ? void 0 : _b.trim().slice(0, 100)) || "";
1153
- this.trackEvent(eventName, {
1154
- label,
1155
- path: window.location.pathname,
1156
- tag: target.tagName.toLowerCase()
1157
- });
1158
- }, { capture: true, passive: true });
1185
+ document.addEventListener(
1186
+ "click",
1187
+ (e) => {
1188
+ var _a, _b;
1189
+ const target = (_a = e.target) == null ? void 0 : _a.closest("[data-featurely-click]");
1190
+ if (!target) return;
1191
+ const eventName = target.getAttribute("data-featurely-click") || "element_clicked";
1192
+ const label = target.getAttribute("data-featurely-label") || ((_b = target.textContent) == null ? void 0 : _b.trim().slice(0, 100)) || "";
1193
+ this.trackEvent(eventName, {
1194
+ label,
1195
+ path: window.location.pathname,
1196
+ tag: target.tagName.toLowerCase()
1197
+ });
1198
+ },
1199
+ { capture: true, passive: true }
1200
+ );
1159
1201
  }
1160
1202
  setupPageTracking() {
1161
1203
  if (this.pageTrackingSetup) return;
@@ -1293,7 +1335,9 @@ var _SiteManager = class _SiteManager {
1293
1335
  let versionInfo = await response.json();
1294
1336
  const rollout = (_b = (_a = versionInfo.latestVersion) == null ? void 0 : _a.rolloutPercentage) != null ? _b : 100;
1295
1337
  if (rollout < 100 && versionInfo.updateAvailable) {
1296
- const bucket = this.getUserBucket(`version:${(_d = (_c = versionInfo.latestVersion) == null ? void 0 : _c.version) != null ? _d : ""}`);
1338
+ const bucket = this.getUserBucket(
1339
+ `version:${(_d = (_c = versionInfo.latestVersion) == null ? void 0 : _c.version) != null ? _d : ""}`
1340
+ );
1297
1341
  if (bucket >= rollout) {
1298
1342
  versionInfo = {
1299
1343
  ...versionInfo,
@@ -1301,7 +1345,10 @@ var _SiteManager = class _SiteManager {
1301
1345
  updateRequired: false,
1302
1346
  updateRecommended: false
1303
1347
  };
1304
- this.debugLog("info", `[version] outside phased rollout (${rollout}%) \u2014 skipping update`);
1348
+ this.debugLog(
1349
+ "info",
1350
+ `[version] outside phased rollout (${rollout}%) \u2014 skipping update`
1351
+ );
1305
1352
  }
1306
1353
  }
1307
1354
  if (this.config.updateRules && versionInfo.updateType && versionInfo.updateType !== "hash") {
@@ -1314,7 +1361,10 @@ var _SiteManager = class _SiteManager {
1314
1361
  updateRecommended: classification === "recommended",
1315
1362
  updateAvailable: classification === "available" || versionInfo.updateAvailable
1316
1363
  };
1317
- this.debugLog("info", `[version] update rules applied: ${type} \u2192 ${classification}`);
1364
+ this.debugLog(
1365
+ "info",
1366
+ `[version] update rules applied: ${type} \u2192 ${classification}`
1367
+ );
1318
1368
  }
1319
1369
  if (this.config.platform && ((_h = versionInfo.latestVersion) == null ? void 0 : _h.platformUrls)) {
1320
1370
  const platformUrl = versionInfo.latestVersion.platformUrls[this.config.platform];
@@ -1358,12 +1408,18 @@ var _SiteManager = class _SiteManager {
1358
1408
  */
1359
1409
  async forceUpdateWeb() {
1360
1410
  if (typeof window === "undefined") return;
1361
- this.debugLog("info", "[version] forceUpdateWeb: clearing SW registrations and caches\u2026");
1411
+ this.debugLog(
1412
+ "info",
1413
+ "[version] forceUpdateWeb: clearing SW registrations and caches\u2026"
1414
+ );
1362
1415
  try {
1363
1416
  if ("serviceWorker" in navigator) {
1364
1417
  const registrations = await navigator.serviceWorker.getRegistrations();
1365
1418
  await Promise.all(registrations.map((r) => r.unregister()));
1366
- this.debugLog("info", `[version] unregistered ${registrations.length} service worker(s)`);
1419
+ this.debugLog(
1420
+ "info",
1421
+ `[version] unregistered ${registrations.length} service worker(s)`
1422
+ );
1367
1423
  }
1368
1424
  if ("caches" in window) {
1369
1425
  const cacheKeys = await caches.keys();
package/dist/index.mjs CHANGED
@@ -88,7 +88,8 @@ var _SiteManager = class _SiteManager {
88
88
  } else if (key.startsWith("ft_")) {
89
89
  const flagKey = key.slice(3);
90
90
  if (value === "true" || value === "1") this.flagOverrides.set(flagKey, true);
91
- else if (value === "false" || value === "0") this.flagOverrides.set(flagKey, false);
91
+ else if (value === "false" || value === "0")
92
+ this.flagOverrides.set(flagKey, false);
92
93
  }
93
94
  });
94
95
  } catch {
@@ -160,7 +161,10 @@ var _SiteManager = class _SiteManager {
160
161
  this.config.userId = userId;
161
162
  }
162
163
  if (customAttributes) {
163
- this.config.customAttributes = { ...(_a = this.config.customAttributes) != null ? _a : {}, ...customAttributes };
164
+ this.config.customAttributes = {
165
+ ...(_a = this.config.customAttributes) != null ? _a : {},
166
+ ...customAttributes
167
+ };
164
168
  this.featureFlagBuckets.clear();
165
169
  }
166
170
  if (!wasLoggedIn && this.config.userId && this.config.enableAnalytics) {
@@ -182,16 +186,25 @@ var _SiteManager = class _SiteManager {
182
186
  var _a, _b;
183
187
  if (this.flagOverrides.has(flagKey)) {
184
188
  const overrideValue = this.flagOverrides.get(flagKey);
185
- this.debugLog("info", `[flag] "${flagKey}" \u2192 ${overrideValue ? "ENABLED" : "DISABLED"} (override)`);
189
+ this.debugLog(
190
+ "info",
191
+ `[flag] "${flagKey}" \u2192 ${overrideValue ? "ENABLED" : "DISABLED"} (override)`
192
+ );
186
193
  return overrideValue;
187
194
  }
188
195
  if (!((_a = this.siteConfig) == null ? void 0 : _a.featureFlags)) {
189
196
  if (this.config.bootstrapFlags && Object.prototype.hasOwnProperty.call(this.config.bootstrapFlags, flagKey)) {
190
197
  const bootstrapValue = this.config.bootstrapFlags[flagKey];
191
- this.debugLog("info", `[flag] "${flagKey}" \u2192 ${bootstrapValue ? "ENABLED" : "DISABLED"} (bootstrap)`);
198
+ this.debugLog(
199
+ "info",
200
+ `[flag] "${flagKey}" \u2192 ${bootstrapValue ? "ENABLED" : "DISABLED"} (bootstrap)`
201
+ );
192
202
  return bootstrapValue;
193
203
  }
194
- this.debugLog("info", `[flag] "${flagKey}" \u2192 default (${defaultValue}) \u2014 config not yet loaded`);
204
+ this.debugLog(
205
+ "info",
206
+ `[flag] "${flagKey}" \u2192 default (${defaultValue}) \u2014 config not yet loaded`
207
+ );
195
208
  return defaultValue;
196
209
  }
197
210
  const flag = this.siteConfig.featureFlags.find((f) => f.key === flagKey);
@@ -311,7 +324,10 @@ var _SiteManager = class _SiteManager {
311
324
  this.debugLog("info", `[flag] override removed for "${flagKey}"`);
312
325
  } else {
313
326
  this.flagOverrides.set(flagKey, value);
314
- this.debugLog("info", `[flag] override set "${flagKey}" \u2192 ${value ? "ENABLED" : "DISABLED"}`);
327
+ this.debugLog(
328
+ "info",
329
+ `[flag] override set "${flagKey}" \u2192 ${value ? "ENABLED" : "DISABLED"}`
330
+ );
315
331
  }
316
332
  }
317
333
  /**
@@ -469,7 +485,10 @@ var _SiteManager = class _SiteManager {
469
485
  return flag;
470
486
  })
471
487
  };
472
- this.debugLog("info", `[env] applied ${Object.keys(envOverrides).length} flag override(s) from environment "${matchedEnv.name}"`);
488
+ this.debugLog(
489
+ "info",
490
+ `[env] applied ${Object.keys(envOverrides).length} flag override(s) from environment "${matchedEnv.name}"`
491
+ );
473
492
  }
474
493
  }
475
494
  this.siteConfig = newConfig;
@@ -511,7 +530,10 @@ var _SiteManager = class _SiteManager {
511
530
  }
512
531
  }
513
532
  if (matchedEnv && matchedEnv.errorLoggingEnabled === false) {
514
- this.debugLog("info", `[env] error logging disabled for environment${envLabel}`);
533
+ this.debugLog(
534
+ "info",
535
+ `[env] error logging disabled for environment${envLabel}`
536
+ );
515
537
  }
516
538
  if (newConfig.maintenance.enabled && !wasMaintenanceEnabled) {
517
539
  this.enableMaintenanceMode();
@@ -1013,7 +1035,14 @@ var _SiteManager = class _SiteManager {
1013
1035
  const params = {};
1014
1036
  try {
1015
1037
  const sp = new URLSearchParams(search);
1016
- for (const key of ["utm_source", "utm_medium", "utm_campaign", "utm_content", "utm_term", "ref"]) {
1038
+ for (const key of [
1039
+ "utm_source",
1040
+ "utm_medium",
1041
+ "utm_campaign",
1042
+ "utm_content",
1043
+ "utm_term",
1044
+ "ref"
1045
+ ]) {
1017
1046
  const val = sp.get(key);
1018
1047
  if (val) params[key] = val;
1019
1048
  }
@@ -1081,46 +1110,59 @@ var _SiteManager = class _SiteManager {
1081
1110
  }
1082
1111
  }
1083
1112
  });
1084
- inpObs.observe({ type: "event", buffered: true, durationThreshold: 40 });
1113
+ inpObs.observe({
1114
+ type: "event",
1115
+ buffered: true,
1116
+ durationThreshold: 40
1117
+ });
1085
1118
  } catch {
1086
1119
  }
1087
1120
  }
1088
1121
  /** Set up outbound link click tracking. */
1089
1122
  setupOutboundLinkTracking() {
1090
1123
  const currentHost = window.location.hostname;
1091
- document.addEventListener("click", (e) => {
1092
- var _a;
1093
- const target = (_a = e.target) == null ? void 0 : _a.closest("a");
1094
- if (!target) return;
1095
- const href = target.getAttribute("href") || "";
1096
- if (!href || href.startsWith("#") || href.startsWith("mailto:") || href.startsWith("tel:")) return;
1097
- try {
1098
- const url = new URL(href, window.location.href);
1099
- if (url.hostname && url.hostname !== currentHost) {
1100
- this.trackEvent("outbound_link_click", {
1101
- href: url.href,
1102
- destination: url.hostname,
1103
- path: window.location.pathname
1104
- });
1124
+ document.addEventListener(
1125
+ "click",
1126
+ (e) => {
1127
+ var _a;
1128
+ const target = (_a = e.target) == null ? void 0 : _a.closest("a");
1129
+ if (!target) return;
1130
+ const href = target.getAttribute("href") || "";
1131
+ if (!href || href.startsWith("#") || href.startsWith("mailto:") || href.startsWith("tel:"))
1132
+ return;
1133
+ try {
1134
+ const url = new URL(href, window.location.href);
1135
+ if (url.hostname && url.hostname !== currentHost) {
1136
+ this.trackEvent("outbound_link_click", {
1137
+ href: url.href,
1138
+ destination: url.hostname,
1139
+ path: window.location.pathname
1140
+ });
1141
+ }
1142
+ } catch {
1105
1143
  }
1106
- } catch {
1107
- }
1108
- }, { capture: true, passive: true });
1144
+ },
1145
+ { capture: true, passive: true }
1146
+ );
1109
1147
  }
1110
1148
  /** Set up auto-capture for elements with data-featurely-click attribute. */
1111
1149
  setupAutoClickCapture() {
1112
- document.addEventListener("click", (e) => {
1113
- var _a, _b;
1114
- const target = (_a = e.target) == null ? void 0 : _a.closest("[data-featurely-click]");
1115
- if (!target) return;
1116
- const eventName = target.getAttribute("data-featurely-click") || "element_clicked";
1117
- const label = target.getAttribute("data-featurely-label") || ((_b = target.textContent) == null ? void 0 : _b.trim().slice(0, 100)) || "";
1118
- this.trackEvent(eventName, {
1119
- label,
1120
- path: window.location.pathname,
1121
- tag: target.tagName.toLowerCase()
1122
- });
1123
- }, { capture: true, passive: true });
1150
+ document.addEventListener(
1151
+ "click",
1152
+ (e) => {
1153
+ var _a, _b;
1154
+ const target = (_a = e.target) == null ? void 0 : _a.closest("[data-featurely-click]");
1155
+ if (!target) return;
1156
+ const eventName = target.getAttribute("data-featurely-click") || "element_clicked";
1157
+ const label = target.getAttribute("data-featurely-label") || ((_b = target.textContent) == null ? void 0 : _b.trim().slice(0, 100)) || "";
1158
+ this.trackEvent(eventName, {
1159
+ label,
1160
+ path: window.location.pathname,
1161
+ tag: target.tagName.toLowerCase()
1162
+ });
1163
+ },
1164
+ { capture: true, passive: true }
1165
+ );
1124
1166
  }
1125
1167
  setupPageTracking() {
1126
1168
  if (this.pageTrackingSetup) return;
@@ -1258,7 +1300,9 @@ var _SiteManager = class _SiteManager {
1258
1300
  let versionInfo = await response.json();
1259
1301
  const rollout = (_b = (_a = versionInfo.latestVersion) == null ? void 0 : _a.rolloutPercentage) != null ? _b : 100;
1260
1302
  if (rollout < 100 && versionInfo.updateAvailable) {
1261
- const bucket = this.getUserBucket(`version:${(_d = (_c = versionInfo.latestVersion) == null ? void 0 : _c.version) != null ? _d : ""}`);
1303
+ const bucket = this.getUserBucket(
1304
+ `version:${(_d = (_c = versionInfo.latestVersion) == null ? void 0 : _c.version) != null ? _d : ""}`
1305
+ );
1262
1306
  if (bucket >= rollout) {
1263
1307
  versionInfo = {
1264
1308
  ...versionInfo,
@@ -1266,7 +1310,10 @@ var _SiteManager = class _SiteManager {
1266
1310
  updateRequired: false,
1267
1311
  updateRecommended: false
1268
1312
  };
1269
- this.debugLog("info", `[version] outside phased rollout (${rollout}%) \u2014 skipping update`);
1313
+ this.debugLog(
1314
+ "info",
1315
+ `[version] outside phased rollout (${rollout}%) \u2014 skipping update`
1316
+ );
1270
1317
  }
1271
1318
  }
1272
1319
  if (this.config.updateRules && versionInfo.updateType && versionInfo.updateType !== "hash") {
@@ -1279,7 +1326,10 @@ var _SiteManager = class _SiteManager {
1279
1326
  updateRecommended: classification === "recommended",
1280
1327
  updateAvailable: classification === "available" || versionInfo.updateAvailable
1281
1328
  };
1282
- this.debugLog("info", `[version] update rules applied: ${type} \u2192 ${classification}`);
1329
+ this.debugLog(
1330
+ "info",
1331
+ `[version] update rules applied: ${type} \u2192 ${classification}`
1332
+ );
1283
1333
  }
1284
1334
  if (this.config.platform && ((_h = versionInfo.latestVersion) == null ? void 0 : _h.platformUrls)) {
1285
1335
  const platformUrl = versionInfo.latestVersion.platformUrls[this.config.platform];
@@ -1323,12 +1373,18 @@ var _SiteManager = class _SiteManager {
1323
1373
  */
1324
1374
  async forceUpdateWeb() {
1325
1375
  if (typeof window === "undefined") return;
1326
- this.debugLog("info", "[version] forceUpdateWeb: clearing SW registrations and caches\u2026");
1376
+ this.debugLog(
1377
+ "info",
1378
+ "[version] forceUpdateWeb: clearing SW registrations and caches\u2026"
1379
+ );
1327
1380
  try {
1328
1381
  if ("serviceWorker" in navigator) {
1329
1382
  const registrations = await navigator.serviceWorker.getRegistrations();
1330
1383
  await Promise.all(registrations.map((r) => r.unregister()));
1331
- this.debugLog("info", `[version] unregistered ${registrations.length} service worker(s)`);
1384
+ this.debugLog(
1385
+ "info",
1386
+ `[version] unregistered ${registrations.length} service worker(s)`
1387
+ );
1332
1388
  }
1333
1389
  if ("caches" in window) {
1334
1390
  const cacheKeys = await caches.keys();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "featurely-site-manager",
3
- "version": "1.1.21",
3
+ "version": "1.1.22",
4
4
  "description": "Complete site management SDK for maintenance mode, status messages, feature flags, version checking, and analytics",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",