@erebos/api-bzz-browser
Advanced tools
Comparing version 0.8.1 to 0.9.0
@@ -6,3 +6,6 @@ "use strict"; | ||
exports.__esModule = true; | ||
exports.default = void 0; | ||
var _exportNames = { | ||
Bzz: true | ||
}; | ||
exports.Bzz = void 0; | ||
@@ -15,4 +18,10 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); | ||
var _apiBzzBase = _interopRequireDefault(require("@erebos/api-bzz-base")); | ||
var _apiBzzBase = require("@erebos/api-bzz-base"); | ||
Object.keys(_apiBzzBase).forEach(function (key) { | ||
if (key === "default" || key === "__esModule") return; | ||
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; | ||
exports[key] = _apiBzzBase[key]; | ||
}); | ||
/* eslint-env browser */ | ||
@@ -25,11 +34,7 @@ var Bzz = | ||
function Bzz(config) { | ||
var _this; | ||
var url = config.url, | ||
cfg = (0, _objectWithoutPropertiesLoose2.default)(config, ["url"]); | ||
_this = _BaseBzz.call(this, (0, _extends2.default)({}, cfg, { | ||
return _BaseBzz.call(this, window.fetch.bind(window), (0, _extends2.default)({}, cfg, { | ||
url: new URL(url).href | ||
})) || this; | ||
_this._fetch = window.fetch.bind(window); | ||
return _this; | ||
} | ||
@@ -61,8 +66,8 @@ | ||
return this._upload(form, options); | ||
return this.uploadBody(form, options); | ||
}; | ||
return Bzz; | ||
}(_apiBzzBase.default); | ||
}(_apiBzzBase.BaseBzz); | ||
exports.default = Bzz; | ||
exports.Bzz = Bzz; |
@@ -6,5 +6,5 @@ import _extends from "@babel/runtime/helpers/esm/extends"; | ||
/* eslint-env browser */ | ||
import BaseBzz from '@erebos/api-bzz-base'; | ||
var Bzz = | ||
import { BaseBzz } from '@erebos/api-bzz-base'; | ||
export * from '@erebos/api-bzz-base'; | ||
export var Bzz = | ||
/*#__PURE__*/ | ||
@@ -15,12 +15,8 @@ function (_BaseBzz) { | ||
function Bzz(config) { | ||
var _this; | ||
var url = config.url, | ||
cfg = _objectWithoutPropertiesLoose(config, ["url"]); | ||
_this = _BaseBzz.call(this, _extends({}, cfg, { | ||
return _BaseBzz.call(this, window.fetch.bind(window), _extends({}, cfg, { | ||
url: new URL(url).href | ||
})) || this; | ||
_this._fetch = window.fetch.bind(window); | ||
return _this; | ||
} | ||
@@ -52,8 +48,6 @@ | ||
return this._upload(form, options); | ||
return this.uploadBody(form, options); | ||
}; | ||
return Bzz; | ||
}(BaseBzz); | ||
export { Bzz as default }; | ||
}(BaseBzz); |
{ | ||
"name": "@erebos/api-bzz-browser", | ||
"version": "0.8.1", | ||
"version": "0.9.0", | ||
"description": "Bzz API for browser", | ||
@@ -17,17 +17,18 @@ "repository": "git@github.com:MainframeHQ/erebos.git", | ||
"scripts": { | ||
"clean": "del cjs esm", | ||
"build:cjs": "BABEL_ENV='browser-cjs' babel src --out-dir cjs", | ||
"build:esm": "BABEL_ENV='browser-esm' babel src --out-dir esm", | ||
"clean": "del cjs esm types", | ||
"test:types": "tsc --noEmit -p tsconfig.build.json", | ||
"build:cjs": "BABEL_ENV='browser-cjs' babel src --out-dir cjs --extensions \".ts\"", | ||
"build:esm": "BABEL_ENV='browser-esm' babel src --out-dir esm --extensions \".ts\"", | ||
"build:js": "yarn build:cjs && yarn build:esm", | ||
"build:flow": "flow-copy-source src cjs && flow-copy-source src esm", | ||
"build": "yarn clean && yarn build:js && yarn build:flow", | ||
"build:types": "tsc --emitDeclarationOnly -p tsconfig.build.json", | ||
"build": "yarn test:types && yarn clean && yarn build:js && yarn build:types", | ||
"prepublishOnly": "yarn build" | ||
}, | ||
"dependencies": { | ||
"@babel/runtime": "^7.4.5", | ||
"@erebos/api-bzz-base": "^0.8.1" | ||
"@babel/runtime": "^7.5.5", | ||
"@erebos/api-bzz-base": "^0.9.0" | ||
}, | ||
"devDependencies": { | ||
"flow-bin": "^0.101.0" | ||
"typescript": "3.5.2" | ||
} | ||
} |
@@ -1,9 +0,7 @@ | ||
import BaseBzz, { DirectoryData, UploadOptions } from '@erebos/api-bzz-base' | ||
import { hexValue } from '@erebos/hex' | ||
export default class Bzz extends BaseBzz<Response> { | ||
uploadDirectory( | ||
directory: DirectoryData, | ||
options?: UploadOptions, | ||
): Promise<hexValue> | ||
import { BaseBzz, BzzConfig, DirectoryData, UploadOptions } from '@erebos/api-bzz-base'; | ||
import { hexValue } from '@erebos/hex'; | ||
export * from '@erebos/api-bzz-base'; | ||
export declare class Bzz extends BaseBzz<Response> { | ||
constructor(config: BzzConfig); | ||
uploadDirectory(directory: DirectoryData, options?: UploadOptions): Promise<hexValue>; | ||
} |
97
4797
5
+ Added@erebos/api-bzz-base@0.9.0(transitive)
+ Added@erebos/hex@0.9.0(transitive)
+ Added@erebos/keccak256@0.9.0(transitive)
- Removed@erebos/api-bzz-base@0.8.1(transitive)
- Removed@erebos/hex@0.7.0(transitive)
- Removed@erebos/keccak256@0.7.0(transitive)
Updated@babel/runtime@^7.5.5
Updated@erebos/api-bzz-base@^0.9.0