@balancy/wasm 1.0.29 → 1.0.34
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/Balancy.wasm +0 -0
- package/dist/index.cjs.js +7 -244
- package/dist/index.es.js +7 -244
- package/dist/index.umd.js +7 -244
- package/dist/interfaces/core.interface.d.ts +2 -1
- package/dist/interfaces/core.interface.d.ts.map +1 -1
- package/dist/interfaces/status-notification.interface.d.ts +2 -0
- package/dist/interfaces/status-notification.interface.d.ts.map +1 -1
- package/dist/node/index.cjs.js +0 -239
- package/dist/node/index.es.js +0 -239
- package/dist/node/index.umd.js +0 -239
- package/package.json +1 -1
package/dist/node/index.umd.js
CHANGED
|
@@ -1353,161 +1353,6 @@
|
|
|
1353
1353
|
invokeErrorCallback(-1, error.message, callbackPtr);
|
|
1354
1354
|
});
|
|
1355
1355
|
}
|
|
1356
|
-
function js_call_typescript_bridge_connect(connectionId, url, authData) {
|
|
1357
|
-
if (typeof Module !== "undefined" && Module.typescript_websocket_connect_request) {
|
|
1358
|
-
try {
|
|
1359
|
-
var urlStr = UTF8ToString(url);
|
|
1360
|
-
var authStr = UTF8ToString(authData);
|
|
1361
|
-
console.log("[C++ -> TS Bridge] Connect request", connectionId, urlStr);
|
|
1362
|
-
Module.typescript_websocket_connect_request(connectionId, urlStr, authStr);
|
|
1363
|
-
return true;
|
|
1364
|
-
} catch (error) {
|
|
1365
|
-
console.error("[ERROR] calling typescript_websocket_connect_request via Module:", error);
|
|
1366
|
-
}
|
|
1367
|
-
}
|
|
1368
|
-
if (typeof window !== "undefined" && window.Module && window.Module.typescript_websocket_connect_request) {
|
|
1369
|
-
try {
|
|
1370
|
-
var urlStr1 = UTF8ToString(url);
|
|
1371
|
-
var authStr1 = UTF8ToString(authData);
|
|
1372
|
-
console.log("[C++ -> TS Bridge] Connect request via window.Module", connectionId, urlStr1);
|
|
1373
|
-
window.Module.typescript_websocket_connect_request(connectionId, urlStr1, authStr1);
|
|
1374
|
-
return true;
|
|
1375
|
-
} catch (error) {
|
|
1376
|
-
console.error("[ERROR] calling typescript_websocket_connect_request via window.Module:", error);
|
|
1377
|
-
}
|
|
1378
|
-
}
|
|
1379
|
-
if (typeof globalThis !== "undefined" && globalThis.Module && globalThis.Module.typescript_websocket_connect_request) {
|
|
1380
|
-
try {
|
|
1381
|
-
var urlStr2 = UTF8ToString(url);
|
|
1382
|
-
var authStr2 = UTF8ToString(authData);
|
|
1383
|
-
console.log("[C++ -> TS Bridge] Connect request via globalThis.Module", connectionId, urlStr2);
|
|
1384
|
-
globalThis.Module.typescript_websocket_connect_request(connectionId, urlStr2, authStr2);
|
|
1385
|
-
return true;
|
|
1386
|
-
} catch (error) {
|
|
1387
|
-
console.error("[ERROR] calling typescript_websocket_connect_request via globalThis.Module:", error);
|
|
1388
|
-
}
|
|
1389
|
-
}
|
|
1390
|
-
console.error("[ERROR] TypeScript WebSocket Bridge connect method not found. Available contexts:", {
|
|
1391
|
-
Module: typeof Module !== "undefined" ? Object.keys(Module).filter(function(k) {
|
|
1392
|
-
return k.includes("websocket") || k.includes("typescript");
|
|
1393
|
-
}) : "undefined",
|
|
1394
|
-
windowModule: typeof window !== "undefined" && window.Module ? Object.keys(window.Module).filter(function(k) {
|
|
1395
|
-
return k.includes("websocket") || k.includes("typescript");
|
|
1396
|
-
}) : "undefined",
|
|
1397
|
-
globalThisModule: typeof globalThis !== "undefined" && globalThis.Module ? Object.keys(globalThis.Module).filter(function(k) {
|
|
1398
|
-
return k.includes("websocket") || k.includes("typescript");
|
|
1399
|
-
}) : "undefined"
|
|
1400
|
-
});
|
|
1401
|
-
return false;
|
|
1402
|
-
}
|
|
1403
|
-
function js_call_typescript_bridge_disconnect(connectionId) {
|
|
1404
|
-
var success = false;
|
|
1405
|
-
if (typeof Module !== "undefined" && Module.typescript_websocket_disconnect_request) {
|
|
1406
|
-
try {
|
|
1407
|
-
console.log("[C++ -> TS Bridge] Disconnect request", connectionId);
|
|
1408
|
-
Module.typescript_websocket_disconnect_request(connectionId);
|
|
1409
|
-
success = true;
|
|
1410
|
-
} catch (error) {
|
|
1411
|
-
console.error("[ERROR] calling typescript_websocket_disconnect_request via Module:", error);
|
|
1412
|
-
}
|
|
1413
|
-
}
|
|
1414
|
-
if (!success && typeof window !== "undefined" && window.Module && window.Module.typescript_websocket_disconnect_request) {
|
|
1415
|
-
try {
|
|
1416
|
-
console.log("[C++ -> TS Bridge] Disconnect request via window.Module", connectionId);
|
|
1417
|
-
window.Module.typescript_websocket_disconnect_request(connectionId);
|
|
1418
|
-
success = true;
|
|
1419
|
-
} catch (error) {
|
|
1420
|
-
console.error("[ERROR] calling typescript_websocket_disconnect_request via window.Module:", error);
|
|
1421
|
-
}
|
|
1422
|
-
}
|
|
1423
|
-
if (!success && typeof globalThis !== "undefined" && globalThis.Module && globalThis.Module.typescript_websocket_disconnect_request) {
|
|
1424
|
-
try {
|
|
1425
|
-
console.log("[C++ -> TS Bridge] Disconnect request via globalThis.Module", connectionId);
|
|
1426
|
-
globalThis.Module.typescript_websocket_disconnect_request(connectionId);
|
|
1427
|
-
success = true;
|
|
1428
|
-
} catch (error) {
|
|
1429
|
-
console.error("[ERROR] calling typescript_websocket_disconnect_request via globalThis.Module:", error);
|
|
1430
|
-
}
|
|
1431
|
-
}
|
|
1432
|
-
if (!success) {
|
|
1433
|
-
console.error("[ERROR] TypeScript WebSocket Bridge disconnect method not found");
|
|
1434
|
-
}
|
|
1435
|
-
}
|
|
1436
|
-
function js_call_typescript_bridge_subscribe(connectionId, eventName) {
|
|
1437
|
-
var success = false;
|
|
1438
|
-
if (typeof Module !== "undefined" && Module.typescript_websocket_subscribe_event) {
|
|
1439
|
-
try {
|
|
1440
|
-
var eventStr = UTF8ToString(eventName);
|
|
1441
|
-
console.log("[C++ -> TS Bridge] Subscribe event", connectionId, eventStr);
|
|
1442
|
-
Module.typescript_websocket_subscribe_event(connectionId, eventStr);
|
|
1443
|
-
success = true;
|
|
1444
|
-
} catch (error) {
|
|
1445
|
-
console.error("[ERROR] calling typescript_websocket_subscribe_event via Module:", error);
|
|
1446
|
-
}
|
|
1447
|
-
}
|
|
1448
|
-
if (!success && typeof window !== "undefined" && window.Module && window.Module.typescript_websocket_subscribe_event) {
|
|
1449
|
-
try {
|
|
1450
|
-
var eventStr1 = UTF8ToString(eventName);
|
|
1451
|
-
console.log("[C++ -> TS Bridge] Subscribe event via window.Module", connectionId, eventStr1);
|
|
1452
|
-
window.Module.typescript_websocket_subscribe_event(connectionId, eventStr1);
|
|
1453
|
-
success = true;
|
|
1454
|
-
} catch (error) {
|
|
1455
|
-
console.error("[ERROR] calling typescript_websocket_subscribe_event via window.Module:", error);
|
|
1456
|
-
}
|
|
1457
|
-
}
|
|
1458
|
-
if (!success && typeof globalThis !== "undefined" && globalThis.Module && globalThis.Module.typescript_websocket_subscribe_event) {
|
|
1459
|
-
try {
|
|
1460
|
-
var eventStr2 = UTF8ToString(eventName);
|
|
1461
|
-
console.log("[C++ -> TS Bridge] Subscribe event via globalThis.Module", connectionId, eventStr2);
|
|
1462
|
-
globalThis.Module.typescript_websocket_subscribe_event(connectionId, eventStr2);
|
|
1463
|
-
success = true;
|
|
1464
|
-
} catch (error) {
|
|
1465
|
-
console.error("[ERROR] calling typescript_websocket_subscribe_event via globalThis.Module:", error);
|
|
1466
|
-
}
|
|
1467
|
-
}
|
|
1468
|
-
if (!success) {
|
|
1469
|
-
console.error("[ERROR] TypeScript WebSocket Bridge subscribe method not found");
|
|
1470
|
-
}
|
|
1471
|
-
}
|
|
1472
|
-
function js_call_typescript_bridge_send_message(connectionId, eventName, data) {
|
|
1473
|
-
var success = false;
|
|
1474
|
-
if (typeof Module !== "undefined" && Module.typescript_websocket_send_message) {
|
|
1475
|
-
try {
|
|
1476
|
-
var eventStr = UTF8ToString(eventName);
|
|
1477
|
-
var dataStr = UTF8ToString(data);
|
|
1478
|
-
console.log("[C++ -> TS Bridge] Send message", connectionId, eventStr);
|
|
1479
|
-
Module.typescript_websocket_send_message(connectionId, eventStr, dataStr);
|
|
1480
|
-
success = true;
|
|
1481
|
-
} catch (error) {
|
|
1482
|
-
console.error("[ERROR] calling typescript_websocket_send_message via Module:", error);
|
|
1483
|
-
}
|
|
1484
|
-
}
|
|
1485
|
-
if (!success && typeof window !== "undefined" && window.Module && window.Module.typescript_websocket_send_message) {
|
|
1486
|
-
try {
|
|
1487
|
-
var eventStr1 = UTF8ToString(eventName);
|
|
1488
|
-
var dataStr1 = UTF8ToString(data);
|
|
1489
|
-
console.log("[C++ -> TS Bridge] Send message via window.Module", connectionId, eventStr1);
|
|
1490
|
-
window.Module.typescript_websocket_send_message(connectionId, eventStr1, dataStr1);
|
|
1491
|
-
success = true;
|
|
1492
|
-
} catch (error) {
|
|
1493
|
-
console.error("[ERROR] calling typescript_websocket_send_message via window.Module:", error);
|
|
1494
|
-
}
|
|
1495
|
-
}
|
|
1496
|
-
if (!success && typeof globalThis !== "undefined" && globalThis.Module && globalThis.Module.typescript_websocket_send_message) {
|
|
1497
|
-
try {
|
|
1498
|
-
var eventStr2 = UTF8ToString(eventName);
|
|
1499
|
-
var dataStr2 = UTF8ToString(data);
|
|
1500
|
-
console.log("[C++ -> TS Bridge] Send message via globalThis.Module", connectionId, eventStr2);
|
|
1501
|
-
globalThis.Module.typescript_websocket_send_message(connectionId, eventStr2, dataStr2);
|
|
1502
|
-
success = true;
|
|
1503
|
-
} catch (error) {
|
|
1504
|
-
console.error("[ERROR] calling typescript_websocket_send_message via globalThis.Module:", error);
|
|
1505
|
-
}
|
|
1506
|
-
}
|
|
1507
|
-
if (!success) {
|
|
1508
|
-
console.error("[ERROR] TypeScript WebSocket Bridge send message method not found");
|
|
1509
|
-
}
|
|
1510
|
-
}
|
|
1511
1356
|
function js_call_typescript_bridge_send_ack(connectionId, ackId, responseData) {
|
|
1512
1357
|
var success = false;
|
|
1513
1358
|
if (typeof Module !== "undefined" && Module.typescript_websocket_send_ack) {
|
|
@@ -1544,85 +1389,6 @@
|
|
|
1544
1389
|
console.error("[ERROR] TypeScript WebSocket Bridge send ack method not found");
|
|
1545
1390
|
}
|
|
1546
1391
|
}
|
|
1547
|
-
function js_initialize_typescript_bridge() {
|
|
1548
|
-
console.log("[INIT] Initializing TypeScript WebSocket Bridge integration...");
|
|
1549
|
-
if (typeof window !== "undefined" && window.initializeTypeScriptWebSocketBridge) {
|
|
1550
|
-
try {
|
|
1551
|
-
window.initializeTypeScriptWebSocketBridge();
|
|
1552
|
-
console.log("[SUCCESS] TypeScript WebSocket Bridge initialized via window");
|
|
1553
|
-
} catch (error) {
|
|
1554
|
-
console.warn("[WARNING] Failed to initialize bridge via window:", error);
|
|
1555
|
-
}
|
|
1556
|
-
}
|
|
1557
|
-
if (typeof globalThis !== "undefined" && globalThis.initializeTypeScriptWebSocketBridge) {
|
|
1558
|
-
try {
|
|
1559
|
-
globalThis.initializeTypeScriptWebSocketBridge();
|
|
1560
|
-
console.log("[SUCCESS] TypeScript WebSocket Bridge initialized via globalThis");
|
|
1561
|
-
} catch (error) {
|
|
1562
|
-
console.warn("[WARNING] Failed to initialize bridge via globalThis:", error);
|
|
1563
|
-
}
|
|
1564
|
-
}
|
|
1565
|
-
var bridgeMethods = [
|
|
1566
|
-
"typescript_websocket_connect_request",
|
|
1567
|
-
"typescript_websocket_disconnect_request",
|
|
1568
|
-
"typescript_websocket_subscribe_event",
|
|
1569
|
-
"typescript_websocket_send_message",
|
|
1570
|
-
"typescript_websocket_send_ack"
|
|
1571
|
-
];
|
|
1572
|
-
var bridgeFound = false;
|
|
1573
|
-
var contexts = [];
|
|
1574
|
-
if (typeof Module !== "undefined") {
|
|
1575
|
-
contexts.push({
|
|
1576
|
-
name: "Module",
|
|
1577
|
-
obj: Module
|
|
1578
|
-
});
|
|
1579
|
-
}
|
|
1580
|
-
if (typeof window !== "undefined" && window.Module) {
|
|
1581
|
-
contexts.push({
|
|
1582
|
-
name: "window.Module",
|
|
1583
|
-
obj: window.Module
|
|
1584
|
-
});
|
|
1585
|
-
}
|
|
1586
|
-
if (typeof globalThis !== "undefined" && globalThis.Module) {
|
|
1587
|
-
contexts.push({
|
|
1588
|
-
name: "globalThis.Module",
|
|
1589
|
-
obj: globalThis.Module
|
|
1590
|
-
});
|
|
1591
|
-
}
|
|
1592
|
-
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
1593
|
-
try {
|
|
1594
|
-
var _loop = function() {
|
|
1595
|
-
var context = _step.value;
|
|
1596
|
-
var availableMethods = bridgeMethods.filter(function(method) {
|
|
1597
|
-
return typeof context.obj[method] === "function";
|
|
1598
|
-
});
|
|
1599
|
-
if (availableMethods.length > 0) {
|
|
1600
|
-
console.log("[SUCCESS] Bridge methods found in " + context.name + ": " + availableMethods.join(", "));
|
|
1601
|
-
bridgeFound = true;
|
|
1602
|
-
}
|
|
1603
|
-
};
|
|
1604
|
-
for(var _iterator = contexts[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true)_loop();
|
|
1605
|
-
} catch (err) {
|
|
1606
|
-
_didIteratorError = true;
|
|
1607
|
-
_iteratorError = err;
|
|
1608
|
-
} finally{
|
|
1609
|
-
try {
|
|
1610
|
-
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
1611
|
-
_iterator.return();
|
|
1612
|
-
}
|
|
1613
|
-
} finally{
|
|
1614
|
-
if (_didIteratorError) {
|
|
1615
|
-
throw _iteratorError;
|
|
1616
|
-
}
|
|
1617
|
-
}
|
|
1618
|
-
}
|
|
1619
|
-
if (!bridgeFound) {
|
|
1620
|
-
console.warn("[WARNING] No TypeScript WebSocket Bridge methods found in any context");
|
|
1621
|
-
console.log("Available in Module:", typeof Module !== "undefined" ? Object.keys(Module).filter(function(k) {
|
|
1622
|
-
return k.includes("websocket") || k.includes("typescript");
|
|
1623
|
-
}) : "undefined");
|
|
1624
|
-
}
|
|
1625
|
-
}
|
|
1626
1392
|
var ExitStatus = function ExitStatus(status) {
|
|
1627
1393
|
_class_call_check(this, ExitStatus);
|
|
1628
1394
|
_define_property(this, "name", "ExitStatus");
|
|
@@ -7540,13 +7306,8 @@
|
|
|
7540
7306
|
invoke_viiiiiiiiii: invoke_viiiiiiiiii,
|
|
7541
7307
|
invoke_viiiiiiiiiiiiiii: invoke_viiiiiiiiiiiiiii,
|
|
7542
7308
|
invoke_viijii: invoke_viijii,
|
|
7543
|
-
js_call_typescript_bridge_connect: js_call_typescript_bridge_connect,
|
|
7544
|
-
js_call_typescript_bridge_disconnect: js_call_typescript_bridge_disconnect,
|
|
7545
7309
|
js_call_typescript_bridge_send_ack: js_call_typescript_bridge_send_ack,
|
|
7546
|
-
js_call_typescript_bridge_send_message: js_call_typescript_bridge_send_message,
|
|
7547
|
-
js_call_typescript_bridge_subscribe: js_call_typescript_bridge_subscribe,
|
|
7548
7310
|
js_fetch: js_fetch,
|
|
7549
|
-
js_initialize_typescript_bridge: js_initialize_typescript_bridge,
|
|
7550
7311
|
random_get: _random_get
|
|
7551
7312
|
};
|
|
7552
7313
|
var wasmExports;
|