@based/client
Advanced tools
Comparing version 4.7.3 to 4.7.4
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.incoming = void 0; | ||
const fflate_1 = __importDefault(require("fflate")); | ||
const fflate = __importStar(require("fflate")); | ||
const diff_1 = require("@saulx/diff"); | ||
@@ -37,3 +57,3 @@ const error_1 = require("../types/error"); | ||
payload = JSON.parse(new TextDecoder().decode(isDeflate | ||
? fflate_1.default.inflateSync(buffer.slice(start, end)) | ||
? fflate.inflateSync(buffer.slice(start, end)) | ||
: buffer.slice(start, end))); | ||
@@ -85,3 +105,3 @@ } | ||
diff = JSON.parse(new TextDecoder().decode(isDeflate | ||
? fflate_1.default.inflateSync(buffer.slice(start, end)) | ||
? fflate.inflateSync(buffer.slice(start, end)) | ||
: buffer.slice(start, end))); | ||
@@ -132,3 +152,3 @@ } | ||
payload = JSON.parse(new TextDecoder().decode(isDeflate | ||
? fflate_1.default.inflateSync(buffer.slice(start, end)) | ||
? fflate.inflateSync(buffer.slice(start, end)) | ||
: buffer.slice(start, end))); | ||
@@ -174,3 +194,3 @@ } | ||
payload = JSON.parse(new TextDecoder().decode(isDeflate | ||
? fflate_1.default.inflateSync(buffer.slice(start, end)) | ||
? fflate.inflateSync(buffer.slice(start, end)) | ||
: buffer.slice(start, end))); | ||
@@ -210,3 +230,3 @@ } | ||
payload = JSON.parse(new TextDecoder().decode(isDeflate | ||
? fflate_1.default.inflateSync(buffer.slice(start, end)) | ||
? fflate.inflateSync(buffer.slice(start, end)) | ||
: buffer.slice(start, end))); | ||
@@ -320,3 +340,3 @@ } | ||
const r = new TextDecoder().decode(isDeflate | ||
? fflate_1.default.inflateSync(buffer.slice(start, end)) | ||
? fflate.inflateSync(buffer.slice(start, end)) | ||
: buffer.slice(start, end)); | ||
@@ -323,0 +343,0 @@ try { |
@@ -119,3 +119,6 @@ "use strict"; | ||
if (authState) { | ||
client.setAuthState(authState); | ||
client.setAuthState(authState).catch((err) => { | ||
console.error(err.message); | ||
(0, exports.removeStorageBrowser)(client, key); | ||
}); | ||
} | ||
@@ -122,0 +125,0 @@ continue; |
@@ -60,3 +60,6 @@ "use strict"; | ||
if (c.authState) { | ||
client.setAuthState(c.authState); | ||
client.setAuthState(c.authState).catch(() => { | ||
console.error(' [Based-client] Invalid authState'); | ||
(0, exports.clearStorageNode)(client); | ||
}); | ||
} | ||
@@ -63,0 +66,0 @@ } |
{ | ||
"name": "@based/client", | ||
"version": "4.7.3", | ||
"version": "4.7.4", | ||
"license": "MIT", | ||
@@ -8,2 +8,3 @@ "main": "dist/index.js", | ||
"build": "npx tsc", | ||
"test-stream": "npx ts-node ./test/browser/upload-file.ts", | ||
"watch": "npm run build -- --watch", | ||
@@ -10,0 +11,0 @@ "clean": "rimraf {.turbo,dist,node_modules}", |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
204876
3250