@absmartly/sdk-plugins 1.1.2 → 1.2.2
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/absmartly-cookie.min.js +1 -1
- package/dist/absmartly-dom-changes-core.min.js +1 -1
- package/dist/absmartly-dom-changes-lite.min.js +1 -1
- package/dist/absmartly-overrides-full.min.js +1 -1
- package/dist/absmartly-overrides-lite.min.js +1 -1
- package/dist/absmartly-sdk-plugins.min.js +1 -1
- package/dist/absmartly-vitals.min.js +1 -1
- package/es/cookies/cookieUtils.js +2 -1
- package/es/cookies/cookieUtils.js.map +1 -1
- package/es/core/DOMChangesPluginLite.js +195 -221
- package/es/core/DOMChangesPluginLite.js.map +1 -1
- package/es/core/DOMManipulatorLite.js +76 -10
- package/es/core/DOMManipulatorLite.js.map +1 -1
- package/es/core/ExposureTracker.js +136 -11
- package/es/core/ExposureTracker.js.map +1 -1
- package/es/core/PendingChangeManager.js +14 -14
- package/es/core/PendingChangeManager.js.map +1 -1
- package/es/entries/dom-with-overrides-lite.js +3 -0
- package/es/entries/dom-with-overrides-lite.js.map +1 -1
- package/es/generated/buildInfo.js +3 -0
- package/es/generated/buildInfo.js.map +1 -0
- package/es/index.js +9 -2
- package/es/index.js.map +1 -1
- package/es/overrides/OverridesPlugin.js +2 -2
- package/es/overrides/OverridesPlugin.js.map +1 -1
- package/es/overrides/OverridesPluginLite.js +29 -1
- package/es/overrides/OverridesPluginLite.js.map +1 -1
- package/es/overrides/overridesUtils.js +27 -18
- package/es/overrides/overridesUtils.js.map +1 -1
- package/es/parsers/VariantExtractor.js +14 -7
- package/es/parsers/VariantExtractor.js.map +1 -1
- package/es/url-redirect/URLRedirectExtractor.js +185 -0
- package/es/url-redirect/URLRedirectExtractor.js.map +1 -0
- package/es/url-redirect/URLRedirectMatcher.js +116 -0
- package/es/url-redirect/URLRedirectMatcher.js.map +1 -0
- package/es/url-redirect/URLRedirectPlugin.js +351 -0
- package/es/url-redirect/URLRedirectPlugin.js.map +1 -0
- package/es/url-redirect/index.js +5 -0
- package/es/url-redirect/index.js.map +1 -0
- package/es/url-redirect/types.js +2 -0
- package/es/url-redirect/types.js.map +1 -0
- package/es/utils/URLMatcher.js +4 -3
- package/es/utils/URLMatcher.js.map +1 -1
- package/es/utils/debug.js +4 -3
- package/es/utils/debug.js.map +1 -1
- package/es/utils/persistence.js +278 -0
- package/es/utils/persistence.js.map +1 -0
- package/es/utils/plugin-registry.js +47 -0
- package/es/utils/plugin-registry.js.map +1 -0
- package/lib/cookies/cookieUtils.d.ts +0 -4
- package/lib/cookies/cookieUtils.js +6 -5
- package/lib/cookies/cookieUtils.js.map +1 -1
- package/lib/core/DOMChangesPluginLite.d.ts +10 -7
- package/lib/core/DOMChangesPluginLite.js +195 -221
- package/lib/core/DOMChangesPluginLite.js.map +1 -1
- package/lib/core/DOMManipulatorLite.js +76 -10
- package/lib/core/DOMManipulatorLite.js.map +1 -1
- package/lib/core/ExposureTracker.d.ts +6 -0
- package/lib/core/ExposureTracker.js +136 -11
- package/lib/core/ExposureTracker.js.map +1 -1
- package/lib/core/PendingChangeManager.d.ts +0 -1
- package/lib/core/PendingChangeManager.js +14 -14
- package/lib/core/PendingChangeManager.js.map +1 -1
- package/lib/entries/dom-with-overrides-lite.d.ts +2 -0
- package/lib/entries/dom-with-overrides-lite.js +3 -1
- package/lib/entries/dom-with-overrides-lite.js.map +1 -1
- package/lib/generated/buildInfo.d.ts +2 -0
- package/lib/generated/buildInfo.js +6 -0
- package/lib/generated/buildInfo.js.map +1 -0
- package/lib/index.d.ts +8 -2
- package/lib/index.js +17 -1
- package/lib/index.js.map +1 -1
- package/lib/overrides/OverridesPlugin.js +2 -2
- package/lib/overrides/OverridesPlugin.js.map +1 -1
- package/lib/overrides/OverridesPluginLite.d.ts +8 -0
- package/lib/overrides/OverridesPluginLite.js +29 -1
- package/lib/overrides/OverridesPluginLite.js.map +1 -1
- package/lib/overrides/overridesUtils.d.ts +10 -5
- package/lib/overrides/overridesUtils.js +28 -18
- package/lib/overrides/overridesUtils.js.map +1 -1
- package/lib/parsers/VariantExtractor.js +14 -7
- package/lib/parsers/VariantExtractor.js.map +1 -1
- package/lib/types/index.d.ts +1 -0
- package/lib/url-redirect/URLRedirectExtractor.d.ts +16 -0
- package/lib/url-redirect/URLRedirectExtractor.js +188 -0
- package/lib/url-redirect/URLRedirectExtractor.js.map +1 -0
- package/lib/url-redirect/URLRedirectMatcher.d.ts +8 -0
- package/lib/url-redirect/URLRedirectMatcher.js +119 -0
- package/lib/url-redirect/URLRedirectMatcher.js.map +1 -0
- package/lib/url-redirect/URLRedirectPlugin.d.ts +21 -0
- package/lib/url-redirect/URLRedirectPlugin.js +354 -0
- package/lib/url-redirect/URLRedirectPlugin.js.map +1 -0
- package/lib/url-redirect/index.d.ts +4 -0
- package/lib/url-redirect/index.js +25 -0
- package/lib/url-redirect/index.js.map +1 -0
- package/lib/url-redirect/types.d.ts +29 -0
- package/lib/url-redirect/types.js +3 -0
- package/lib/url-redirect/types.js.map +1 -0
- package/lib/utils/URLMatcher.js +4 -3
- package/lib/utils/URLMatcher.js.map +1 -1
- package/lib/utils/debug.d.ts +1 -1
- package/lib/utils/debug.js +4 -3
- package/lib/utils/debug.js.map +1 -1
- package/lib/utils/persistence.d.ts +23 -0
- package/lib/utils/persistence.js +281 -0
- package/lib/utils/persistence.js.map +1 -0
- package/lib/utils/plugin-registry.d.ts +40 -0
- package/lib/utils/plugin-registry.js +53 -0
- package/lib/utils/plugin-registry.js.map +1 -0
- package/package.json +64 -6
- package/types/cookies/cookieUtils.d.ts +0 -4
- package/types/core/DOMChangesPluginLite.d.ts +10 -7
- package/types/core/ExposureTracker.d.ts +6 -0
- package/types/core/PendingChangeManager.d.ts +0 -1
- package/types/entries/dom-with-overrides-lite.d.ts +2 -0
- package/types/generated/buildInfo.d.ts +2 -0
- package/types/index.d.ts +8 -2
- package/types/overrides/OverridesPluginLite.d.ts +8 -0
- package/types/overrides/overridesUtils.d.ts +10 -5
- package/types/types/index.d.ts +1 -0
- package/types/url-redirect/URLRedirectExtractor.d.ts +16 -0
- package/types/url-redirect/URLRedirectMatcher.d.ts +8 -0
- package/types/url-redirect/URLRedirectPlugin.d.ts +21 -0
- package/types/url-redirect/index.d.ts +4 -0
- package/types/url-redirect/types.d.ts +29 -0
- package/types/utils/debug.d.ts +1 -1
- package/types/utils/persistence.d.ts +23 -0
- package/types/utils/plugin-registry.d.ts +40 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { URLRedirectPluginConfig, RedirectMatch } from './types';
|
|
2
|
+
import { URLRedirectExtractor } from './URLRedirectExtractor';
|
|
3
|
+
export declare class URLRedirectPlugin {
|
|
4
|
+
static readonly VERSION: string;
|
|
5
|
+
private config;
|
|
6
|
+
private extractor;
|
|
7
|
+
private initialized;
|
|
8
|
+
private readyPromise;
|
|
9
|
+
constructor(config: URLRedirectPluginConfig);
|
|
10
|
+
ready(): Promise<RedirectMatch | null>;
|
|
11
|
+
private initialize;
|
|
12
|
+
findRedirectMatch(url?: string): RedirectMatch | null;
|
|
13
|
+
private getAnyConfig;
|
|
14
|
+
executeRedirect(match: RedirectMatch): Promise<void>;
|
|
15
|
+
private publishViaBeacon;
|
|
16
|
+
getExtractor(): URLRedirectExtractor;
|
|
17
|
+
refreshExperiments(): void;
|
|
18
|
+
destroy(): void;
|
|
19
|
+
private registerWithContext;
|
|
20
|
+
private unregisterFromContext;
|
|
21
|
+
}
|
|
@@ -0,0 +1,354 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
13
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
var __values = (this && this.__values) || function(o) {
|
|
39
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
40
|
+
if (m) return m.call(o);
|
|
41
|
+
if (o && typeof o.length === "number") return {
|
|
42
|
+
next: function () {
|
|
43
|
+
if (o && i >= o.length) o = void 0;
|
|
44
|
+
return { value: o && o[i++], done: !o };
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
48
|
+
};
|
|
49
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
50
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
51
|
+
if (!m) return o;
|
|
52
|
+
var i = m.call(o), r, ar = [], e;
|
|
53
|
+
try {
|
|
54
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
55
|
+
}
|
|
56
|
+
catch (error) { e = { error: error }; }
|
|
57
|
+
finally {
|
|
58
|
+
try {
|
|
59
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
60
|
+
}
|
|
61
|
+
finally { if (e) throw e.error; }
|
|
62
|
+
}
|
|
63
|
+
return ar;
|
|
64
|
+
};
|
|
65
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
66
|
+
exports.URLRedirectPlugin = void 0;
|
|
67
|
+
var URLRedirectExtractor_1 = require("./URLRedirectExtractor");
|
|
68
|
+
var URLRedirectMatcher_1 = require("./URLRedirectMatcher");
|
|
69
|
+
var URLMatcher_1 = require("../utils/URLMatcher");
|
|
70
|
+
var debug_1 = require("../utils/debug");
|
|
71
|
+
var buildInfo_1 = require("../generated/buildInfo");
|
|
72
|
+
var URLRedirectPlugin = /** @class */ (function () {
|
|
73
|
+
function URLRedirectPlugin(config) {
|
|
74
|
+
var _this = this;
|
|
75
|
+
var _a, _b, _c, _d;
|
|
76
|
+
this.initialized = false;
|
|
77
|
+
this.config = {
|
|
78
|
+
context: config.context,
|
|
79
|
+
variableName: (_a = config.variableName) !== null && _a !== void 0 ? _a : '__url_redirect',
|
|
80
|
+
debug: (_b = config.debug) !== null && _b !== void 0 ? _b : false,
|
|
81
|
+
autoApply: (_c = config.autoApply) !== null && _c !== void 0 ? _c : true,
|
|
82
|
+
useBeacon: (_d = config.useBeacon) !== null && _d !== void 0 ? _d : true,
|
|
83
|
+
onBeforeRedirect: config.onBeforeRedirect,
|
|
84
|
+
};
|
|
85
|
+
if (!this.config.context) {
|
|
86
|
+
throw new Error('[ABsmartly URLRedirect] Context is required');
|
|
87
|
+
}
|
|
88
|
+
console.log("[ABsmartly] URLRedirectPlugin v".concat(URLRedirectPlugin.VERSION, " initialized"));
|
|
89
|
+
this.extractor = new URLRedirectExtractor_1.URLRedirectExtractor(this.config.context, this.config.variableName, this.config.debug);
|
|
90
|
+
this.readyPromise = this.config.context
|
|
91
|
+
.ready()
|
|
92
|
+
.then(function () {
|
|
93
|
+
(0, debug_1.logDebug)('[URLRedirectPlugin] Context is ready, checking for redirects');
|
|
94
|
+
return _this.initialize();
|
|
95
|
+
})
|
|
96
|
+
.catch(function (error) {
|
|
97
|
+
(0, debug_1.logDebug)('[URLRedirectPlugin] ERROR during initialization:', error);
|
|
98
|
+
throw error;
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
URLRedirectPlugin.prototype.ready = function () {
|
|
102
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
103
|
+
return __generator(this, function (_a) {
|
|
104
|
+
return [2 /*return*/, this.readyPromise];
|
|
105
|
+
});
|
|
106
|
+
});
|
|
107
|
+
};
|
|
108
|
+
URLRedirectPlugin.prototype.initialize = function () {
|
|
109
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
110
|
+
var currentUrl, match;
|
|
111
|
+
return __generator(this, function (_a) {
|
|
112
|
+
switch (_a.label) {
|
|
113
|
+
case 0:
|
|
114
|
+
if (this.initialized) {
|
|
115
|
+
(0, debug_1.logDebug)('[URLRedirectPlugin] Already initialized');
|
|
116
|
+
return [2 /*return*/, null];
|
|
117
|
+
}
|
|
118
|
+
currentUrl = typeof window !== 'undefined' ? window.location.href : '';
|
|
119
|
+
if (!currentUrl) {
|
|
120
|
+
(0, debug_1.logDebug)('[URLRedirectPlugin] No window.location available (server-side?)');
|
|
121
|
+
this.initialized = true;
|
|
122
|
+
return [2 /*return*/, null];
|
|
123
|
+
}
|
|
124
|
+
if (this.config.debug) {
|
|
125
|
+
(0, debug_1.logDebug)('[URLRedirectPlugin] Initializing', {
|
|
126
|
+
version: URLRedirectPlugin.VERSION,
|
|
127
|
+
currentUrl: currentUrl,
|
|
128
|
+
autoApply: this.config.autoApply,
|
|
129
|
+
useBeacon: this.config.useBeacon,
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
match = this.findRedirectMatch(currentUrl);
|
|
133
|
+
this.initialized = true;
|
|
134
|
+
this.registerWithContext();
|
|
135
|
+
if (!(match && this.config.autoApply)) return [3 /*break*/, 2];
|
|
136
|
+
return [4 /*yield*/, this.executeRedirect(match)];
|
|
137
|
+
case 1:
|
|
138
|
+
_a.sent();
|
|
139
|
+
_a.label = 2;
|
|
140
|
+
case 2: return [2 /*return*/, match];
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
});
|
|
144
|
+
};
|
|
145
|
+
URLRedirectPlugin.prototype.findRedirectMatch = function (url) {
|
|
146
|
+
var e_1, _a;
|
|
147
|
+
if (url === void 0) { url = window.location.href; }
|
|
148
|
+
var allConfigs = this.extractor.extractAllConfigs();
|
|
149
|
+
if (this.config.debug) {
|
|
150
|
+
(0, debug_1.logDebug)('[URLRedirectPlugin] Checking redirects for URL:', url);
|
|
151
|
+
(0, debug_1.logDebug)('[URLRedirectPlugin] Experiments with redirect configs:', Array.from(allConfigs.keys()));
|
|
152
|
+
}
|
|
153
|
+
try {
|
|
154
|
+
for (var allConfigs_1 = __values(allConfigs), allConfigs_1_1 = allConfigs_1.next(); !allConfigs_1_1.done; allConfigs_1_1 = allConfigs_1.next()) {
|
|
155
|
+
var _b = __read(allConfigs_1_1.value, 2), experimentName = _b[0], variantConfigs = _b[1];
|
|
156
|
+
var currentVariant = this.config.context.peek(experimentName);
|
|
157
|
+
if (currentVariant === undefined || currentVariant === null) {
|
|
158
|
+
continue;
|
|
159
|
+
}
|
|
160
|
+
var config = variantConfigs.get(currentVariant);
|
|
161
|
+
if (!config) {
|
|
162
|
+
if (currentVariant === 0) {
|
|
163
|
+
var anyConfig = this.getAnyConfig(variantConfigs);
|
|
164
|
+
if ((anyConfig === null || anyConfig === void 0 ? void 0 : anyConfig.controlBehavior) === 'redirect-same') {
|
|
165
|
+
if (this.config.debug) {
|
|
166
|
+
(0, debug_1.logDebug)("[URLRedirectPlugin] Control variant with redirect-same behavior for ".concat(experimentName));
|
|
167
|
+
}
|
|
168
|
+
return {
|
|
169
|
+
redirect: { from: url, to: url, type: 'page', preservePath: true },
|
|
170
|
+
targetUrl: url,
|
|
171
|
+
experimentName: experimentName,
|
|
172
|
+
variant: 0,
|
|
173
|
+
isControl: true,
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
continue;
|
|
178
|
+
}
|
|
179
|
+
if (config.urlFilter && !URLMatcher_1.URLMatcher.matches(config.urlFilter, url)) {
|
|
180
|
+
if (this.config.debug) {
|
|
181
|
+
(0, debug_1.logDebug)("[URLRedirectPlugin] URL doesn't match filter for ".concat(experimentName));
|
|
182
|
+
}
|
|
183
|
+
continue;
|
|
184
|
+
}
|
|
185
|
+
var match = URLRedirectMatcher_1.URLRedirectMatcher.findMatch(url, config.redirects, experimentName, currentVariant);
|
|
186
|
+
if (match) {
|
|
187
|
+
if (this.config.debug) {
|
|
188
|
+
(0, debug_1.logDebug)('[URLRedirectPlugin] Found redirect match:', {
|
|
189
|
+
experimentName: experimentName,
|
|
190
|
+
variant: currentVariant,
|
|
191
|
+
from: match.redirect.from,
|
|
192
|
+
to: match.redirect.to,
|
|
193
|
+
targetUrl: match.targetUrl,
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
return match;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
201
|
+
finally {
|
|
202
|
+
try {
|
|
203
|
+
if (allConfigs_1_1 && !allConfigs_1_1.done && (_a = allConfigs_1.return)) _a.call(allConfigs_1);
|
|
204
|
+
}
|
|
205
|
+
finally { if (e_1) throw e_1.error; }
|
|
206
|
+
}
|
|
207
|
+
return null;
|
|
208
|
+
};
|
|
209
|
+
URLRedirectPlugin.prototype.getAnyConfig = function (configs) {
|
|
210
|
+
var e_2, _a;
|
|
211
|
+
try {
|
|
212
|
+
for (var _b = __values(configs.values()), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
213
|
+
var config = _c.value;
|
|
214
|
+
return config;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
218
|
+
finally {
|
|
219
|
+
try {
|
|
220
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
221
|
+
}
|
|
222
|
+
finally { if (e_2) throw e_2.error; }
|
|
223
|
+
}
|
|
224
|
+
return null;
|
|
225
|
+
};
|
|
226
|
+
URLRedirectPlugin.prototype.executeRedirect = function (match) {
|
|
227
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
228
|
+
var error_1;
|
|
229
|
+
return __generator(this, function (_a) {
|
|
230
|
+
switch (_a.label) {
|
|
231
|
+
case 0:
|
|
232
|
+
if (this.config.debug) {
|
|
233
|
+
(0, debug_1.logDebug)('[URLRedirectPlugin] Executing redirect:', {
|
|
234
|
+
experimentName: match.experimentName,
|
|
235
|
+
targetUrl: match.targetUrl,
|
|
236
|
+
isControl: match.isControl,
|
|
237
|
+
});
|
|
238
|
+
}
|
|
239
|
+
if (!this.config.onBeforeRedirect) return [3 /*break*/, 2];
|
|
240
|
+
return [4 /*yield*/, this.config.onBeforeRedirect(match)];
|
|
241
|
+
case 1:
|
|
242
|
+
_a.sent();
|
|
243
|
+
_a.label = 2;
|
|
244
|
+
case 2:
|
|
245
|
+
this.config.context.treatment(match.experimentName);
|
|
246
|
+
_a.label = 3;
|
|
247
|
+
case 3:
|
|
248
|
+
_a.trys.push([3, 8, , 9]);
|
|
249
|
+
if (!this.config.useBeacon) return [3 /*break*/, 5];
|
|
250
|
+
return [4 /*yield*/, this.publishViaBeacon()];
|
|
251
|
+
case 4:
|
|
252
|
+
_a.sent();
|
|
253
|
+
return [3 /*break*/, 7];
|
|
254
|
+
case 5: return [4 /*yield*/, this.config.context.publish()];
|
|
255
|
+
case 6:
|
|
256
|
+
_a.sent();
|
|
257
|
+
_a.label = 7;
|
|
258
|
+
case 7: return [3 /*break*/, 9];
|
|
259
|
+
case 8:
|
|
260
|
+
error_1 = _a.sent();
|
|
261
|
+
(0, debug_1.logDebug)('[URLRedirectPlugin] Failed to publish exposure:', error_1);
|
|
262
|
+
return [3 /*break*/, 9];
|
|
263
|
+
case 9:
|
|
264
|
+
if (match.targetUrl !== window.location.href) {
|
|
265
|
+
if (this.config.debug) {
|
|
266
|
+
(0, debug_1.logDebug)('[URLRedirectPlugin] Redirecting to:', match.targetUrl);
|
|
267
|
+
}
|
|
268
|
+
window.location.href = match.targetUrl;
|
|
269
|
+
}
|
|
270
|
+
else if (this.config.debug) {
|
|
271
|
+
(0, debug_1.logDebug)('[URLRedirectPlugin] Target URL same as current, skipping redirect');
|
|
272
|
+
}
|
|
273
|
+
return [2 /*return*/];
|
|
274
|
+
}
|
|
275
|
+
});
|
|
276
|
+
});
|
|
277
|
+
};
|
|
278
|
+
URLRedirectPlugin.prototype.publishViaBeacon = function () {
|
|
279
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
280
|
+
var context, error_2;
|
|
281
|
+
return __generator(this, function (_a) {
|
|
282
|
+
switch (_a.label) {
|
|
283
|
+
case 0:
|
|
284
|
+
context = this.config.context;
|
|
285
|
+
if (!(typeof context.publish === 'function')) return [3 /*break*/, 5];
|
|
286
|
+
_a.label = 1;
|
|
287
|
+
case 1:
|
|
288
|
+
_a.trys.push([1, 3, , 5]);
|
|
289
|
+
return [4 /*yield*/, context.publish({ useBeacon: true })];
|
|
290
|
+
case 2:
|
|
291
|
+
_a.sent();
|
|
292
|
+
return [3 /*break*/, 5];
|
|
293
|
+
case 3:
|
|
294
|
+
error_2 = _a.sent();
|
|
295
|
+
(0, debug_1.logDebug)('[URLRedirectPlugin] Beacon publish failed, falling back to regular publish');
|
|
296
|
+
return [4 /*yield*/, context.publish()];
|
|
297
|
+
case 4:
|
|
298
|
+
_a.sent();
|
|
299
|
+
return [3 /*break*/, 5];
|
|
300
|
+
case 5: return [2 /*return*/];
|
|
301
|
+
}
|
|
302
|
+
});
|
|
303
|
+
});
|
|
304
|
+
};
|
|
305
|
+
URLRedirectPlugin.prototype.getExtractor = function () {
|
|
306
|
+
return this.extractor;
|
|
307
|
+
};
|
|
308
|
+
URLRedirectPlugin.prototype.refreshExperiments = function () {
|
|
309
|
+
this.extractor.clearCache();
|
|
310
|
+
if (this.config.debug) {
|
|
311
|
+
(0, debug_1.logDebug)('[URLRedirectPlugin] Cache cleared');
|
|
312
|
+
}
|
|
313
|
+
};
|
|
314
|
+
URLRedirectPlugin.prototype.destroy = function () {
|
|
315
|
+
this.unregisterFromContext();
|
|
316
|
+
this.initialized = false;
|
|
317
|
+
if (this.config.debug) {
|
|
318
|
+
(0, debug_1.logDebug)('[URLRedirectPlugin] Destroyed');
|
|
319
|
+
}
|
|
320
|
+
};
|
|
321
|
+
URLRedirectPlugin.prototype.registerWithContext = function () {
|
|
322
|
+
var context = this.config.context;
|
|
323
|
+
if (context) {
|
|
324
|
+
if (!context.__plugins) {
|
|
325
|
+
context.__plugins = {};
|
|
326
|
+
}
|
|
327
|
+
context.__plugins.urlRedirectPlugin = {
|
|
328
|
+
name: 'URLRedirectPlugin',
|
|
329
|
+
version: URLRedirectPlugin.VERSION,
|
|
330
|
+
initialized: true,
|
|
331
|
+
capabilities: ['redirect', 'domain-redirect', 'page-redirect'],
|
|
332
|
+
instance: this,
|
|
333
|
+
timestamp: Date.now(),
|
|
334
|
+
};
|
|
335
|
+
if (this.config.debug) {
|
|
336
|
+
(0, debug_1.logDebug)('[URLRedirectPlugin] Registered with context at __plugins.urlRedirectPlugin');
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
};
|
|
340
|
+
URLRedirectPlugin.prototype.unregisterFromContext = function () {
|
|
341
|
+
var _a;
|
|
342
|
+
var context = this.config.context;
|
|
343
|
+
if ((_a = context === null || context === void 0 ? void 0 : context.__plugins) === null || _a === void 0 ? void 0 : _a.urlRedirectPlugin) {
|
|
344
|
+
delete context.__plugins.urlRedirectPlugin;
|
|
345
|
+
if (this.config.debug) {
|
|
346
|
+
(0, debug_1.logDebug)('[URLRedirectPlugin] Unregistered from context');
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
};
|
|
350
|
+
URLRedirectPlugin.VERSION = buildInfo_1.BUILD_VERSION;
|
|
351
|
+
return URLRedirectPlugin;
|
|
352
|
+
}());
|
|
353
|
+
exports.URLRedirectPlugin = URLRedirectPlugin;
|
|
354
|
+
//# sourceMappingURL=URLRedirectPlugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"URLRedirectPlugin.js","sourceRoot":"","sources":["../../src/url-redirect/URLRedirectPlugin.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,+DAA8D;AAC9D,2DAA0D;AAC1D,kDAAiD;AACjD,wCAA0C;AAC1C,oDAAuD;AAEvD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AC,KAAK,EAAE,CAAC;gBACtB,IAAA,gBAAQ,EAAC,4EAA4E,CAAC,CAAC;YACzF,CAAC;QACH,CAAC;IACH,CAAC;IAEO,iDAAqB,GAA7B;;QACE,IAAM,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC,OAA2B,CAAC;QACxD,IAAI,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,SAAS,0CAAE,iBAAiB,EAAE,CAAC;YAC1C,OAAO,OAAO,CAAC,SAAS,CAAC,iBAAiB,CAAC;YAC3C,IAAI,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;gBACtB,IAAA,gBAAQ,EAAC,+CAA+C,CAAC,CAAC;YAC5D,CAAC;QACH,CAAC;IACH,CAAC;IApQsB,yBAAO,GAAW,yBAAa,AAAxB,CAAyB;IAqQzD,wBAAC;CAAA,AAtQD,IAsQC;AAtQY,8CAAiB"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.URLRedirectMatcher = exports.URLRedirectExtractor = exports.URLRedirectPlugin = void 0;
|
|
18
|
+
__exportStar(require("./types"), exports);
|
|
19
|
+
var URLRedirectPlugin_1 = require("./URLRedirectPlugin");
|
|
20
|
+
Object.defineProperty(exports, "URLRedirectPlugin", { enumerable: true, get: function () { return URLRedirectPlugin_1.URLRedirectPlugin; } });
|
|
21
|
+
var URLRedirectExtractor_1 = require("./URLRedirectExtractor");
|
|
22
|
+
Object.defineProperty(exports, "URLRedirectExtractor", { enumerable: true, get: function () { return URLRedirectExtractor_1.URLRedirectExtractor; } });
|
|
23
|
+
var URLRedirectMatcher_1 = require("./URLRedirectMatcher");
|
|
24
|
+
Object.defineProperty(exports, "URLRedirectMatcher", { enumerable: true, get: function () { return URLRedirectMatcher_1.URLRedirectMatcher; } });
|
|
25
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/url-redirect/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,yDAAwD;AAA/C,sHAAA,iBAAiB,OAAA;AAC1B,+DAA8D;AAArD,4HAAA,oBAAoB,OAAA;AAC7B,2DAA0D;AAAjD,wHAAA,kBAAkB,OAAA"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { URLFilter } from '../types';
|
|
2
|
+
export type RedirectType = 'domain' | 'page';
|
|
3
|
+
export type ControlBehavior = 'redirect-same' | 'no-redirect';
|
|
4
|
+
export interface URLRedirect {
|
|
5
|
+
from: string;
|
|
6
|
+
to: string;
|
|
7
|
+
preservePath?: boolean;
|
|
8
|
+
type: RedirectType;
|
|
9
|
+
}
|
|
10
|
+
export interface URLRedirectConfig {
|
|
11
|
+
redirects: URLRedirect[];
|
|
12
|
+
urlFilter?: URLFilter;
|
|
13
|
+
controlBehavior?: ControlBehavior;
|
|
14
|
+
}
|
|
15
|
+
export interface RedirectMatch {
|
|
16
|
+
redirect: URLRedirect;
|
|
17
|
+
targetUrl: string;
|
|
18
|
+
experimentName: string;
|
|
19
|
+
variant: number;
|
|
20
|
+
isControl: boolean;
|
|
21
|
+
}
|
|
22
|
+
export interface URLRedirectPluginConfig {
|
|
23
|
+
context: import('../types').ABsmartlyContext;
|
|
24
|
+
variableName?: string;
|
|
25
|
+
debug?: boolean;
|
|
26
|
+
autoApply?: boolean;
|
|
27
|
+
useBeacon?: boolean;
|
|
28
|
+
onBeforeRedirect?: (match: RedirectMatch) => void | Promise<void>;
|
|
29
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/url-redirect/types.ts"],"names":[],"mappings":""}
|
package/lib/utils/URLMatcher.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.URLMatcher = void 0;
|
|
4
|
+
var debug_1 = require("./debug");
|
|
4
5
|
var URLMatcher = /** @class */ (function () {
|
|
5
6
|
function URLMatcher() {
|
|
6
7
|
}
|
|
@@ -55,7 +56,7 @@ var URLMatcher = /** @class */ (function () {
|
|
|
55
56
|
}
|
|
56
57
|
catch (error) {
|
|
57
58
|
// If URL parsing fails, return original string
|
|
58
|
-
|
|
59
|
+
(0, debug_1.logDebug)("[ABsmartly] Failed to parse URL: ".concat(url), error);
|
|
59
60
|
return url;
|
|
60
61
|
}
|
|
61
62
|
};
|
|
@@ -68,7 +69,7 @@ var URLMatcher = /** @class */ (function () {
|
|
|
68
69
|
return new RegExp(pattern).test(url);
|
|
69
70
|
}
|
|
70
71
|
catch (error) {
|
|
71
|
-
|
|
72
|
+
(0, debug_1.logDebug)("[ABsmartly] Invalid regex pattern: ".concat(pattern), error);
|
|
72
73
|
return false;
|
|
73
74
|
}
|
|
74
75
|
}
|
|
@@ -88,7 +89,7 @@ var URLMatcher = /** @class */ (function () {
|
|
|
88
89
|
return new RegExp("^".concat(regexPattern, "$")).test(url);
|
|
89
90
|
}
|
|
90
91
|
catch (error) {
|
|
91
|
-
|
|
92
|
+
(0, debug_1.logDebug)("[ABsmartly] Invalid pattern: ".concat(pattern), error);
|
|
92
93
|
return false;
|
|
93
94
|
}
|
|
94
95
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"URLMatcher.js","sourceRoot":"","sources":["../../src/utils/URLMatcher.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"URLMatcher.js","sourceRoot":"","sources":["../../src/utils/URLMatcher.ts"],"names":[],"mappings":";;;AAAA,iCAAmC;AAWnC;IAAA;IA8HA,CAAC;IA7HC;;OAEG;IACI,kBAAO,GAAd,UAAe,MAAiB,EAAE,GAAkC;QAAlC,oBAAA,EAAA,MAAc,MAAM,CAAC,QAAQ,CAAC,IAAI;QAClE,sCAAsC;QACtC,IAAM,MAAM,GAAG,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;QAE5C,sDAAsD;QACtD,IAAM,OAAO,GAAG,IAAI,CAAC,cAAc,CAAC,GAAG,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC;QAE3D,yBAAyB;QACzB,IAAI,MAAM,CAAC,OAAO,IAAI,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC;YACjF,OAAO,KAAK,CAAC;QACf,CAAC;QAED,mBAAmB;QACnB,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;YACpB,OAAO,IAAI,CAAC,CAAC,kCAAkC;QACjD,CAAC;QAED,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAChC,OAAO,KAAK,CAAC,CAAC,mEAAmE;QACnF,CAAC;QAED,OAAO,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;IACpE,CAAC;IAED;;OAEG;IACY,yBAAc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E,MAAM,CAAC,OAAO;YACvB,OAAO,EAAE,MAAM,CAAC,OAAO,IAAI,EAAE;YAC7B,IAAI,EAAE,MAAM,CAAC,IAAI,IAAI,QAAQ;YAC7B,SAAS,EAAE,MAAM,CAAC,SAAS,IAAI,MAAM;SACtC,CAAC;IACJ,CAAC;IACH,iBAAC;AAAD,CAAC,AA9HD,IA8HC;AA9HY,gCAAU"}
|
package/lib/utils/debug.d.ts
CHANGED
package/lib/utils/debug.js
CHANGED
|
@@ -45,9 +45,10 @@ exports.logStateOperation = logStateOperation;
|
|
|
45
45
|
exports.logVisibilityEvent = logVisibilityEvent;
|
|
46
46
|
exports.logMessage = logMessage;
|
|
47
47
|
exports.logPerformance = logPerformance;
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
48
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
49
|
+
/* eslint-disable no-console */
|
|
50
|
+
var buildInfo_1 = require("../generated/buildInfo");
|
|
51
|
+
exports.DEBUG = buildInfo_1.BUILD_DEBUG;
|
|
51
52
|
/**
|
|
52
53
|
* Logs debug messages only when DEBUG flag is true
|
|
53
54
|
* This function will be completely removed in production builds
|
package/lib/utils/debug.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"debug.js","sourceRoot":"","sources":["../../src/utils/debug.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"debug.js","sourceRoot":"","sources":["../../src/utils/debug.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkBA,4BA8BC;AAKD,oDAmBC;AAKD,4CAiBC;AAKD,oDAkBC;AAKD,8CAgBC;AAKD,gDAiBC;AAKD,gCAeC;AAKD,wCAWC;AApMD,uDAAuD;AACvD,+BAA+B;AAC/B,oDAAqD;AAExC,QAAA,KAAK,GAAG,uBAAW,CAAC;AAUjC;;;GAGG;AACH,SAA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AAE,YAAY;SACrB,CAAC,CAAC;IACL,CAAC;AACH,CAAC;AAED;;GAEG;AACH,SAAgB,UAAU,CACxB,SAA8B,EAC9B,WAAmB,EACnB,OAAa;IAEb,IAAI,aAAK,EAAE,CAAC;QACV,IAAM,OAAO,GAAG,kBAAW,SAAS,eAAK,WAAW,CAAE,CAAC;QAEvD,QAAQ,CAAC,OAAO,EAAE;YAChB,SAAS,WAAA;YACT,WAAW,aAAA;YACX,OAAO,SAAA;YACP,MAAM,EAAE,WAAW;SACpB,CAAC,CAAC;IACL,CAAC;AACH,CAAC;AAED;;GAEG;AACH,SAAgB,cAAc,CAAC,SAAiB,EAAE,QAAgB,EAAE,OAAa;IAC/E,IAAI,aAAK,EAAE,CAAC;QACV,IAAM,OAAO,GAAG,uBAAgB,SAAS,mBAAS,QAAQ,OAAI,CAAC;QAE/D,QAAQ,CAAC,OAAO,aACd,SAAS,WAAA,EACT,QAAQ,UAAA,EACR,WAAW,EAAE,IAAI,IACd,OAAO,EACV,CAAC;IACL,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { DOMChange } from '../types';
|
|
2
|
+
export interface PersistenceConfig {
|
|
3
|
+
debug?: boolean;
|
|
4
|
+
onReapply: (change: DOMChange, experimentName: string) => void;
|
|
5
|
+
}
|
|
6
|
+
export declare class DOMPersistenceManager {
|
|
7
|
+
private watchedElements;
|
|
8
|
+
private persistenceObserver;
|
|
9
|
+
private reapplyingElements;
|
|
10
|
+
private reapplyLogThrottle;
|
|
11
|
+
private appliedChanges;
|
|
12
|
+
private config;
|
|
13
|
+
constructor(config: PersistenceConfig);
|
|
14
|
+
watchElement(element: Element, experimentName: string, change: DOMChange): void;
|
|
15
|
+
unwatchElement(element: Element, experimentName: string): void;
|
|
16
|
+
unwatchExperiment(experimentName: string): void;
|
|
17
|
+
getAppliedChanges(): Map<string, DOMChange[]>;
|
|
18
|
+
clearAll(): void;
|
|
19
|
+
destroy(): void;
|
|
20
|
+
private setupPersistenceObserver;
|
|
21
|
+
private checkStyleOverwritten;
|
|
22
|
+
private checkAttributeOverwritten;
|
|
23
|
+
}
|