@erebos/api-bzz-browser
Advanced tools
Comparing version 0.5.3 to 0.6.0
@@ -8,2 +8,6 @@ "use strict"; | ||
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); | ||
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose")); | ||
var _inheritsLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/inheritsLoose")); | ||
@@ -19,6 +23,10 @@ | ||
function Bzz(url) { | ||
function Bzz(config) { | ||
var _this; | ||
_this = _BaseBzz.call(this, url) || this; | ||
var url = config.url, | ||
cfg = (0, _objectWithoutPropertiesLoose2.default)(config, ["url"]); | ||
_this = _BaseBzz.call(this, (0, _extends2.default)({}, cfg, { | ||
url: new URL(url).href | ||
})) || this; | ||
_this._fetch = window.fetch.bind(window); | ||
@@ -30,3 +38,3 @@ return _this; | ||
_proto.uploadDirectory = function uploadDirectory(directory, options, headers) { | ||
_proto.uploadDirectory = function uploadDirectory(directory, options) { | ||
if (options === void 0) { | ||
@@ -36,6 +44,2 @@ options = {}; | ||
if (headers === void 0) { | ||
headers = {}; | ||
} | ||
var form = new FormData(); | ||
@@ -58,3 +62,3 @@ Object.keys(directory).forEach(function (key) { | ||
return this._upload(form, options, headers); | ||
return this._upload(form, options); | ||
}; | ||
@@ -61,0 +65,0 @@ |
@@ -0,1 +1,3 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; | ||
import _inheritsLoose from "@babel/runtime/helpers/esm/inheritsLoose"; | ||
@@ -11,6 +13,11 @@ | ||
function Bzz(url) { | ||
function Bzz(config) { | ||
var _this; | ||
_this = _BaseBzz.call(this, url) || this; | ||
var url = config.url, | ||
cfg = _objectWithoutPropertiesLoose(config, ["url"]); | ||
_this = _BaseBzz.call(this, _extends({}, cfg, { | ||
url: new URL(url).href | ||
})) || this; | ||
_this._fetch = window.fetch.bind(window); | ||
@@ -22,3 +29,3 @@ return _this; | ||
_proto.uploadDirectory = function uploadDirectory(directory, options, headers) { | ||
_proto.uploadDirectory = function uploadDirectory(directory, options) { | ||
if (options === void 0) { | ||
@@ -28,6 +35,2 @@ options = {}; | ||
if (headers === void 0) { | ||
headers = {}; | ||
} | ||
var form = new FormData(); | ||
@@ -50,3 +53,3 @@ Object.keys(directory).forEach(function (key) { | ||
return this._upload(form, options, headers); | ||
return this._upload(form, options); | ||
}; | ||
@@ -53,0 +56,0 @@ |
{ | ||
"name": "@erebos/api-bzz-browser", | ||
"version": "0.5.3", | ||
"version": "0.6.0", | ||
"description": "Bzz API for browser", | ||
@@ -27,7 +27,7 @@ "repository": "git@github.com:MainframeHQ/erebos.git", | ||
"@babel/runtime": "^7.0.0", | ||
"@erebos/api-bzz-base": "^0.5.4" | ||
"@erebos/api-bzz-base": "^0.6.0" | ||
}, | ||
"devDependencies": { | ||
"flow-bin": "^0.88.0" | ||
"flow-bin": "^0.89.0" | ||
} | ||
} |
@@ -8,4 +8,3 @@ import BaseBzz, { DirectoryData, UploadOptions } from '@erebos/api-bzz-base' | ||
options?: UploadOptions, | ||
headers?: Object, | ||
): Promise<hexValue> | ||
} |
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
6467
96
+ Added@erebos/api-bzz-base@0.6.3(transitive)
+ Added@erebos/keccak256@0.6.0(transitive)
- Removed@erebos/api-bzz-base@0.5.5(transitive)
- Removed@types/bn.js@4.11.6(transitive)
- Removed@types/elliptic@6.4.18(transitive)
- Removed@types/node@22.10.5(transitive)
- Removedundici-types@6.20.0(transitive)
Updated@erebos/api-bzz-base@^0.6.0