🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@based/client

Package Overview
Dependencies
Maintainers
1
Versions
143
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@based/client - npm Package Compare versions

Comparing version

to
4.8.0

5

dist/incoming/protocol.js

@@ -39,2 +39,7 @@ "use strict";

const parseArrayBuffer = async (d) => {
console.log('DDD', d);
// needed for CF workers which return array buffers
if (d instanceof ArrayBuffer) {
return new Uint8Array(d);
}
if (typeof window === 'undefined') {

@@ -41,0 +46,0 @@ if (d instanceof Buffer) {

4

dist/stream/fetch.js

@@ -7,3 +7,3 @@ "use strict";

const __1 = require("..");
const cross_fetch_1 = __importDefault(require("cross-fetch"));
const fetch_1 = __importDefault(require("@based/fetch"));
const utils_1 = require("@saulx/utils");

@@ -27,3 +27,3 @@ const opts_1 = __importDefault(require("@based/opts"));

}
const result = await (0, cross_fetch_1.default)(url + '/' + name + q, {
const result = await (0, fetch_1.default)(url + '/' + name + q, {
method: 'POST',

@@ -30,0 +30,0 @@ cache: 'no-cache',

@@ -34,3 +34,2 @@ "use strict";

const p = payload || {};
console.log('go go go', contents.size);
body.append(`size=${contents.size},${JSON.stringify(p)}`, contents);

@@ -37,0 +36,0 @@ }

@@ -7,5 +7,5 @@ "use strict";

const urlLoader_1 = __importDefault(require("./urlLoader"));
const isomorphic_ws_1 = __importDefault(require("isomorphic-ws"));
const parseAuthState_1 = require("../authState/parseAuthState");
const uploadFileBrowser_1 = require("../stream/uploadFileBrowser");
const isomorphic_ws_1 = __importDefault(require("isomorphic-ws"));
const activityListeners = new Map();

@@ -73,3 +73,3 @@ let activeTimer;

ws.binaryType = 'blob';
ws.onerror = (err) => {
ws.addEventListener('error', (err) => {
// TODO: add a websocket close number

@@ -80,7 +80,8 @@ // also for rateLimit

}
};
ws.onmessage = (d) => {
});
ws.addEventListener('message', (d) => {
console.log('DATA', d.data);
client.onData(d);
};
ws.onopen = () => {
});
ws.addEventListener('open', () => {
if (isActive) {

@@ -96,4 +97,4 @@ if (connection.disconnected) {

}
};
ws.onclose = () => {
});
ws.addEventListener('close', () => {
if (isActive) {

@@ -110,3 +111,3 @@ if (connection.disconnected) {

}
};
});
}, time);

@@ -113,0 +114,0 @@ });

@@ -5,3 +5,5 @@ "use strict";

if (typeof url === 'function') {
console.log('url loader');
url().then((v) => {
console.log('loaded');
cb(v);

@@ -8,0 +10,0 @@ });

{
"name": "@based/client",
"version": "4.7.6",
"version": "4.8.0",
"license": "MIT",

@@ -28,3 +28,3 @@ "main": "dist/index.js",

"dependencies": {
"@based/opts": "0.6.0",
"@based/opts": "0.7.0",
"@saulx/diff": "^1.1.4",

@@ -34,3 +34,3 @@ "@saulx/hash": "^2.0.0",

"@saulx/utils": "^3.2.2",
"cross-fetch": "^3.1.4",
"@based/fetch": "^1.0.0",
"isomorphic-ws": "^5.0.0",

@@ -37,0 +37,0 @@ "ws": "^8.13.0"

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet