From f175966816a0e55b706dd674f7b62f95b75ebaf3 Mon Sep 17 00:00:00 2001 From: Brad Chase Date: Fri, 5 May 2017 14:59:15 -0400 Subject: [PATCH] Make http server dev only --- npm-shrinkwrap.json | 42 ----------------------- package.json | 2 +- scripts/http.js | 6 ++-- src/index.js | 4 +-- test/integration/http-integration-test.js | 2 +- 5 files changed, 6 insertions(+), 50 deletions(-) diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index e0450eeb..e2e6c0cd 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -42,11 +42,6 @@ "from": "cipher-base@>=1.0.1 <2.0.0", "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.2.tgz" }, - "commander": { - "version": "1.3.2", - "from": "commander@1.3.2", - "resolved": "https://registry.npmjs.org/commander/-/commander-1.3.2.tgz" - }, "core-js": { "version": "2.4.0", "from": "core-js@>=2.4.0 <3.0.0", @@ -84,11 +79,6 @@ "from": "extend@>=3.0.0 <4.0.0", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.0.tgz" }, - "eyes": { - "version": "0.1.8", - "from": "eyes@0.1.8", - "resolved": "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz" - }, "hash.js": { "version": "1.0.3", "from": "hash.js@>=1.0.3 <2.0.0", @@ -104,38 +94,11 @@ "from": "inherits@>=2.0.1 <3.0.0", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz" }, - "jayson": { - "version": "1.2.2", - "from": "jayson@>=1.2.2 <2.0.0", - "resolved": "https://registry.npmjs.org/jayson/-/jayson-1.2.2.tgz", - "dependencies": { - "lodash": { - "version": "3.6.0", - "from": "lodash@3.6.0", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-3.6.0.tgz" - } - } - }, - "jsonparse": { - "version": "1.0.0", - "from": "jsonparse@>=1.0.0 <1.1.0", - "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.0.0.tgz" - }, "jsonschema": { "version": "1.1.1", "from": "jsonschema@latest", "resolved": "https://registry.npmjs.org/jsonschema/-/jsonschema-1.1.1.tgz" }, - "JSONStream": { - "version": "1.0.3", - "from": "JSONStream@1.0.3", - "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.0.3.tgz" - }, - "keypress": { - "version": "0.1.0", - "from": "keypress@>=0.1.0 <0.2.0", - "resolved": "https://registry.npmjs.org/keypress/-/keypress-0.1.0.tgz" - }, "lodash": { "version": "3.10.1", "from": "lodash@>=3.1.0 <4.0.0", @@ -220,11 +183,6 @@ "from": "sha.js@>=2.3.6 <3.0.0", "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.5.tgz" }, - "through": { - "version": "2.3.8", - "from": "through@>=2.2.7 <3.0.0", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz" - }, "ultron": { "version": "1.0.2", "from": "ultron@>=1.0.0 <1.1.0", diff --git a/package.json b/package.json index 75c5d3b8..2d86286c 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,6 @@ "babel-runtime": "^6.3.19", "bignumber.js": "^2.0.3", "https-proxy-agent": "^1.0.0", - "jayson": "^1.2.2", "jsonschema": "^1.1.1", "lodash": "^3.1.0", "ripple-address-codec": "^2.0.1", @@ -51,6 +50,7 @@ "gulp-uglify": "^1.1.0", "http-server": "^0.8.5", "istanbul": "^1.1.0-alpha.1", + "jayson": "^1.2.2", "json-loader": "^0.5.2", "json-schema-to-markdown-table": "^0.4.0", "mocha": "^2.1.0", diff --git a/scripts/http.js b/scripts/http.js index 1edd8038..9e281d38 100644 --- a/scripts/http.js +++ b/scripts/http.js @@ -1,6 +1,6 @@ -'use strict'; - -const createHTTPServer = require('../src/index').createHTTPServer; +'use strict'; + +const createHTTPServer = require('../src/http').createHTTPServer; const port = 5990; const serverUrl = 'wss://s1.ripple.com'; diff --git a/src/index.js b/src/index.js index cb6abe2c..081de235 100644 --- a/src/index.js +++ b/src/index.js @@ -3,7 +3,5 @@ module.exports = { RippleAPI: require('./api').RippleAPI, // Broadcast api is experimental - RippleAPIBroadcast: require('./broadcast').RippleAPIBroadcast, - // HTTP server is experimental - createHTTPServer: require('./http').createHTTPServer + RippleAPIBroadcast: require('./broadcast').RippleAPIBroadcast } diff --git a/test/integration/http-integration-test.js b/test/integration/http-integration-test.js index 55fc797c..3c1b7657 100644 --- a/test/integration/http-integration-test.js +++ b/test/integration/http-integration-test.js @@ -5,7 +5,7 @@ const _ = require('lodash'); const jayson = require('jayson'); const RippleAPI = require('../../src').RippleAPI; -const createHTTPServer = require('../../src/index').createHTTPServer; +const createHTTPServer = require('../../src/http').createHTTPServer; const {payTo, ledgerAccept} = require('./utils'); const apiFixtures = require('../fixtures');