@tonconnect/sdk 0.0.26 → 0.0.28
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.
|
@@ -14,12 +14,11 @@ const protocol_1 = require("@tonconnect/protocol");
|
|
|
14
14
|
const errors_1 = require("../../errors");
|
|
15
15
|
const http_bridge_gateway_storage_1 = require("../../storage/http-bridge-gateway-storage");
|
|
16
16
|
const url_1 = require("../../utils/url");
|
|
17
|
-
|
|
18
|
-
if ((0, web_api_1.isNode)()) {
|
|
17
|
+
if ((0, protocol_1.isNode)()) {
|
|
19
18
|
try {
|
|
20
19
|
// noinspection JSConstantReassignment
|
|
21
|
-
global.EventSource = require('eventsource');
|
|
22
|
-
global.fetch = require('node-fetch');
|
|
20
|
+
eval("global.EventSource = require('eventsource')");
|
|
21
|
+
eval("global.fetch = require('node-fetch')");
|
|
23
22
|
}
|
|
24
23
|
catch (err) {
|
|
25
24
|
console.error(err);
|
package/lib/utils/web-api.d.ts
CHANGED
package/lib/utils/web-api.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getWebPageMetadata = exports.
|
|
3
|
+
exports.getWebPageMetadata = exports.getDocument = exports.getWindow = void 0;
|
|
4
4
|
function getWindow() {
|
|
5
5
|
if (typeof window === 'undefined') {
|
|
6
6
|
return undefined;
|
|
@@ -15,10 +15,6 @@ function getDocument() {
|
|
|
15
15
|
return document;
|
|
16
16
|
}
|
|
17
17
|
exports.getDocument = getDocument;
|
|
18
|
-
function isNode() {
|
|
19
|
-
return typeof require === 'function' && typeof global === 'object';
|
|
20
|
-
}
|
|
21
|
-
exports.isNode = isNode;
|
|
22
18
|
function getWebPageMetadata() {
|
|
23
19
|
var _a, _b;
|
|
24
20
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tonconnect/sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.28",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "npx rimraf lib && ttsc",
|
|
6
6
|
"build:production": "npx rimraf lib && ttsc --sourceMap false"
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"tweetnacl": "^1.0.3",
|
|
29
29
|
"eventsource": "^2.0.2",
|
|
30
30
|
"node-fetch": "^2.6.7",
|
|
31
|
-
"@tonconnect/protocol": "^0.0.
|
|
31
|
+
"@tonconnect/protocol": "^0.0.15"
|
|
32
32
|
},
|
|
33
33
|
"files": [
|
|
34
34
|
"lib"
|