@zaplier/sdk 1.1.6 → 1.1.7
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 +8 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +8 -8
- package/dist/index.esm.js.map +1 -1
- package/dist/sdk.js +8 -8
- package/dist/sdk.js.map +1 -1
- package/dist/sdk.min.js +1 -1
- package/dist/src/modules/anti-adblock.d.ts +3 -3
- package/dist/src/modules/anti-adblock.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/sdk.js
CHANGED
|
@@ -6322,11 +6322,11 @@
|
|
|
6322
6322
|
}
|
|
6323
6323
|
}
|
|
6324
6324
|
/**
|
|
6325
|
-
*
|
|
6325
|
+
* Socket.io Transport (Real-time bidirectional communication for anti-adblock)
|
|
6326
6326
|
*/
|
|
6327
|
-
class
|
|
6327
|
+
class SocketIOTransport {
|
|
6328
6328
|
constructor(baseUrl) {
|
|
6329
|
-
this.name = '
|
|
6329
|
+
this.name = 'socketio';
|
|
6330
6330
|
this.available = typeof WebSocket !== 'undefined';
|
|
6331
6331
|
this.connected = false;
|
|
6332
6332
|
this.baseUrl = baseUrl;
|
|
@@ -6382,9 +6382,9 @@
|
|
|
6382
6382
|
try {
|
|
6383
6383
|
// Use dynamic import to load socket.io-client only when needed
|
|
6384
6384
|
Promise.resolve().then(function () { return index; }).then(({ io }) => {
|
|
6385
|
-
// Extract domain from baseUrl
|
|
6385
|
+
// Extract domain from baseUrl - use same port as main API
|
|
6386
6386
|
const url = new URL(this.baseUrl);
|
|
6387
|
-
const socketUrl = `${url.protocol}//${url.host}
|
|
6387
|
+
const socketUrl = `${url.protocol}//${url.host}`;
|
|
6388
6388
|
this.socket = io(socketUrl, {
|
|
6389
6389
|
transports: ['websocket', 'polling'],
|
|
6390
6390
|
timeout: 5000
|
|
@@ -6505,7 +6505,7 @@
|
|
|
6505
6505
|
this.baseUrl = baseUrl;
|
|
6506
6506
|
this.config = {
|
|
6507
6507
|
enabled: true,
|
|
6508
|
-
methods: ['
|
|
6508
|
+
methods: ['socketio', 'fetch', 'websocket', 'resource'], // Socket.io as primary
|
|
6509
6509
|
fallbackDelay: 100,
|
|
6510
6510
|
maxRetries: 2,
|
|
6511
6511
|
debug: false,
|
|
@@ -6515,7 +6515,7 @@
|
|
|
6515
6515
|
}
|
|
6516
6516
|
initializeTransports() {
|
|
6517
6517
|
const transportMap = {
|
|
6518
|
-
|
|
6518
|
+
socketio: () => new SocketIOTransport(this.baseUrl),
|
|
6519
6519
|
fetch: () => new FetchTransport(),
|
|
6520
6520
|
websocket: () => new WebSocketTransport(this.baseUrl),
|
|
6521
6521
|
resource: () => new ResourceSpoofTransport(this.baseUrl),
|
|
@@ -7763,7 +7763,7 @@
|
|
|
7763
7763
|
try {
|
|
7764
7764
|
this.antiAdblockManager = new AntiAdblockManager(this.config.apiEndpoint, {
|
|
7765
7765
|
enabled: true,
|
|
7766
|
-
methods: ["
|
|
7766
|
+
methods: ["socketio", "fetch", "websocket", "resource"], // Socket.io as primary
|
|
7767
7767
|
fallbackDelay: 100,
|
|
7768
7768
|
maxRetries: 2,
|
|
7769
7769
|
debug: this.config.debug,
|