Comparing version 2.1.0 to 2.2.0
@@ -35,2 +35,6 @@ 'use strict'; | ||
var _packageJson = require('../package.json'); | ||
var _packageJson2 = _interopRequireDefault(_packageJson); | ||
// Patch superagent to support promises | ||
@@ -69,2 +73,4 @@ (0, _superagentAsPromised2['default'])(_superagent2['default']); | ||
options.userAgent = options.userAgent || 'bitstore-cli/v' + _packageJson2['default'].version; | ||
var network = undefined; | ||
@@ -104,3 +110,8 @@ if (options.network === 'testnet') { | ||
var agent = _superagent2['default'][method](options.host + resource); | ||
// TODO: set this as .auth() method on agent object | ||
if (!process.browser) { | ||
// If not in the browser, set the User-Agent. Browsers don't allow | ||
// setting of User-Agent, so we must disable this when run in the | ||
// browser (browserify sets process.browser). | ||
agent.set('User-Agent', options.userAgent); | ||
} | ||
@@ -107,0 +118,0 @@ // TODO: set X-BTC-Pubkey and X-BTC-Signature |
@@ -10,5 +10,9 @@ { | ||
"pretest": "npm run lint", | ||
"prepublish": "npm run build", | ||
"semantic-release": "semantic-release pre", | ||
"cli": "babel-node -- ./src/cli.js" | ||
"cli": "babel-node -- ./src/cli.js", | ||
"preversion": "npm test", | ||
"version:changelog": "conventional-changelog -p angular -i CHANGELOG.md -w && git add CHANGELOG.md && git commit -m \"bump changelog\"", | ||
"version:recommended": "conventional-recommended-bump --preset=angular", | ||
"version:auto": "npm version $(npm run --silent version:recommended) && npm run version:changelog && git push --tags && git push", | ||
"publish:auto": "npm run version:auto && npm publish", | ||
"prepublish": "npm run build" | ||
}, | ||
@@ -51,2 +55,4 @@ "release": {}, | ||
"chai": "^3.3.0", | ||
"conventional-changelog": "^0.5.1", | ||
"conventional-recommended-bump": "0.0.3", | ||
"cz-conventional-changelog": "^1.1.2", | ||
@@ -58,3 +64,3 @@ "eslint": "^1.6.0", | ||
}, | ||
"version": "2.1.0" | ||
"version": "2.2.0" | ||
} |
@@ -19,3 +19,3 @@ # bitstore | ||
`npm install bitstore-client` | ||
`npm install bitstore` | ||
@@ -57,3 +57,3 @@ # Browser Usage | ||
We'll need to provide an instance of a commonBlockchain which will provide functions for signing a transaction, propagating a trasnaction, and looking up a transaction by `txid`. | ||
We'll need to provide an instance of a commonBlockchain which will provide functions for signing a transaction, propagating a transaction, and looking up a transaction by `txid`. | ||
@@ -60,0 +60,0 @@ In this example we're using a testnet version that is provided by `blockcypher-unofficial`. |
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
443458
13680
11