From 2229935d919ef7715079c9927b774be461efd268 Mon Sep 17 00:00:00 2001
From: jweeks16
Date: Tue, 12 Feb 2019 11:16:14 -0500
Subject: [PATCH 001/102] cache templated MQ requests
---
controllers/serviceController.js | 53 ++++++++++++++++++++++++--------
models/mq/MQPair.js | 28 +++++++++++------
2 files changed, 59 insertions(+), 22 deletions(-)
diff --git a/controllers/serviceController.js b/controllers/serviceController.js
index bb9ecf07..7d363fad 100644
--- a/controllers/serviceController.js
+++ b/controllers/serviceController.js
@@ -16,6 +16,7 @@ const YAML = require('yamljs');
const invoke = require('../routes/invoke');
const System = require('../models/common/System');
const systemController = require('./systemController');
+const rrpairController = require('./rrpairController');
const constants = require('../lib/util/constants');
/**
@@ -39,9 +40,6 @@ function canUserEditServiceById(user,serviceId){
}
-
-
-
/**
* Wrapper function for (MQ)Service.create. If req is provided, will also check against current logged in user's permissions first.
* @param {object} serv An object containing the info to create a service
@@ -70,28 +68,41 @@ function createService(serv,req){
}else{
performCreate();
}
+
function performCreate(){
- if(serv.type == "MQ"){
- MQService.create(serv,function(err,service){
+ if (serv.type === 'MQ'){
+ let templates = serv.matchTemplates;
+
+ if (templates && templates.length && templates[0]) {
+ for (let rrpair of serv.rrpairs) {
+ rrpair.templatedRequests = [];
+ for (let template of templates) {
+ if (!template) {
+ break;
+ }
+
+ rrpair.templatedRequests.push(rrpairController.trimRequestData(template, rrpair));
+ }
+ }
+ }
+
+ MQService.create(serv, function(err, service){
if(err)
reject(err);
else
resolve(service);
});
- }else{
- Service.create(serv,function(err,service){
- if(err)
+ }
+ else {
+ Service.create(serv, function(err, service){
+ if (err)
reject(err);
else
resolve(service);
});
}
}
-
-
-
});
-
}
/**
@@ -882,6 +893,7 @@ function updateService(req, res) {
if(service){
service.rrpairs = req.body.rrpairs;
+ service.matchTemplates = req.body.matchTemplates;
service.lastUpdateUser = req.decoded;
//Cache string of reqData + rspData
@@ -914,6 +926,23 @@ function updateService(req, res) {
service.delayMax = req.body.delayMax;
}
}
+ else {
+ let templatedRequests = [];
+ let templates = service.matchTemplates;
+
+ if (templates && templates.length && templates[0]) {
+ for (let rrpair of serv.rrpairs) {
+ for (let template of templates) {
+ if (!template) {
+ break;
+ }
+
+ templatedRequests.push(rrpairController.trimRequestData(template, rrpair));
+ }
+ rrpair.templatedRequests = templatedRequests;
+ }
+ }
+ }
// save updated service in DB
service.save(function (err, newService) {
diff --git a/models/mq/MQPair.js b/models/mq/MQPair.js
index 41106dca..49db04c8 100644
--- a/models/mq/MQPair.js
+++ b/models/mq/MQPair.js
@@ -4,16 +4,20 @@ const constants = require('../../lib/util/constants');
const pairSchema = new mongoose.Schema({
label: String,
+ payloadType: String,
reqData: {
type: mongoose.Schema.Types.Mixed,
validate: {
validator: function (v) {
- try {
- libxmljs.parseXml(v);
- return true;
- } catch (e) {
- return false;
+ if (this.payloadType === 'XML') {
+ try {
+ libxmljs.parseXml(v);
+ return true;
+ } catch (e) {
+ return false;
+ }
}
+ return true;
},
message: constants.MQ_VALID_XML_PAYLOAD_ERR
},
@@ -23,17 +27,21 @@ const pairSchema = new mongoose.Schema({
type: mongoose.Schema.Types.Mixed,
validate: {
validator: function (v) {
- try {
- libxmljs.parseXml(v);
- return true;
- } catch (e) {
- return false;
+ if (this.payloadType === 'XML') {
+ try {
+ libxmljs.parseXml(v);
+ return true;
+ } catch (e) {
+ return false;
+ }
}
+ return true;
},
message: constants.MQ_VALID_XML_PAYLOAD_ERR
},
required: [true, constants.REQUIRED_RESPONSE_PAYLOAD_ERR]
},
+ templatedRequests: [String]
});
module.exports = mongoose.model('MQPair', pairSchema);
\ No newline at end of file
From fa4fd15a9b98bfab28d76fca7874be2b53922416 Mon Sep 17 00:00:00 2001
From: jweeks16
Date: Mon, 18 Feb 2019 09:18:30 -0500
Subject: [PATCH 002/102] expose prometheus metrics
---
Dockerfile | 11 +-
controllers/serviceController.js | 2 +-
package-lock.json | 1031 ++++++++++++++++++++----------
package.json | 4 +-
4 files changed, 691 insertions(+), 357 deletions(-)
diff --git a/Dockerfile b/Dockerfile
index f690b0e7..dea92392 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -2,7 +2,7 @@
FROM node:8-alpine
# expose HTTP
-EXPOSE 8080
+EXPOSE 8080 9209
# install system dependencies
RUN apk update && apk add --no-cache git python py-pip make g++
@@ -12,14 +12,13 @@ RUN mkdir -p /app
COPY . /app
WORKDIR /app
-# install app dependencies (backend)
+# install app dependencies
RUN npm install
-
-# install app depedencies (frontend)
-RUN npm install -g bower
+RUN npm install -g pm2@3.2.9 bower
RUN bower install --allow-root
+RUN pm2 install pm2-prometheus-exporter
-# fix for openshift permission problems
+# fix for k8s permission problems
RUN mkdir /.pm2 && chmod 777 /.pm2 && chmod 777 /app
# start app
diff --git a/controllers/serviceController.js b/controllers/serviceController.js
index 7d363fad..ca88c175 100644
--- a/controllers/serviceController.js
+++ b/controllers/serviceController.js
@@ -931,7 +931,7 @@ function updateService(req, res) {
let templates = service.matchTemplates;
if (templates && templates.length && templates[0]) {
- for (let rrpair of serv.rrpairs) {
+ for (let rrpair of service.rrpairs) {
for (let template of templates) {
if (!template) {
break;
diff --git a/package-lock.json b/package-lock.json
index 7c179585..5da5d6de 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -129,11 +129,12 @@
}
},
"@pm2/agent": {
- "version": "0.5.15",
- "resolved": "https://registry.npmjs.org/@pm2/agent/-/agent-0.5.15.tgz",
- "integrity": "sha512-sb6qHVPXQ8CJWNFHFPvAyMv0Xy1PNcIHTWEdyqBgPhh10iwNXWjw9y6aAESwEEW0/GZ7gOQIYux2QzpsbV/tbw==",
+ "version": "0.5.23",
+ "resolved": "https://registry.npmjs.org/@pm2/agent/-/agent-0.5.23.tgz",
+ "integrity": "sha512-mviwkRt51y3wY161uxiqXc0wyHTjgo+sIkJ/Mh6m400dYAnAGQ12LFlK56EbnQRwPfPog0q6txqncbFpn4L5zA==",
"requires": {
"async": "^2.6.0",
+ "chalk": "^2.3.2",
"eventemitter2": "^5.0.1",
"fclone": "^1.0.11",
"moment": "^2.21.0",
@@ -144,11 +145,46 @@
"ws": "^5.1.0"
}
},
+ "@pm2/agent-node": {
+ "version": "1.1.5",
+ "resolved": "https://registry.npmjs.org/@pm2/agent-node/-/agent-node-1.1.5.tgz",
+ "integrity": "sha512-3mn0i2prHEYowc2mqSSxePFi/Oht+a0vtHDcrMUBeYJavt/8fyx6/B5jL3vrz1wKOZvUWe8xdknGVO8YLq94YA==",
+ "requires": {
+ "debug": "^3.1.0",
+ "eventemitter2": "^5.0.1",
+ "proxy-agent": "^3.0.3",
+ "ws": "^6.0.0"
+ },
+ "dependencies": {
+ "debug": {
+ "version": "3.2.6",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
+ "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
+ "requires": {
+ "ms": "^2.1.1"
+ }
+ },
+ "ms": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
+ "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg=="
+ },
+ "ws": {
+ "version": "6.1.3",
+ "resolved": "https://registry.npmjs.org/ws/-/ws-6.1.3.tgz",
+ "integrity": "sha512-tbSxiT+qJI223AP4iLfQbkbxkwdFcneYinM2+x46Gx2wgvbaOMO36czfdfVUBRTHvzAMRhDd98sA5d/BuWbQdg==",
+ "requires": {
+ "async-limiter": "~1.0.0"
+ }
+ }
+ }
+ },
"@pm2/io": {
- "version": "2.3.11",
- "resolved": "https://registry.npmjs.org/@pm2/io/-/io-2.3.11.tgz",
- "integrity": "sha512-pYJbEyEyzftjm2ckUZOc9Iubuu8FykCar0jJXNIemgI1FSRAFiK7CPdxWQIOQOrnoxcC+oiqbiowH3a0DkNdKw==",
+ "version": "2.4.7",
+ "resolved": "https://registry.npmjs.org/@pm2/io/-/io-2.4.7.tgz",
+ "integrity": "sha512-01IQBBeIFUO6Gs3mVDfoDYcZ3cbaN66gPo6guVQTfhiTv1+ftQlSuZH64dO+41wKbUYgDrXnIvFHR99bnpqj8Q==",
"requires": {
+ "@pm2/agent-node": "^1.0.9",
"async": "^2.6.1",
"debug": "3.1.0",
"deep-metrics": "0.0.2",
@@ -162,11 +198,11 @@
},
"dependencies": {
"async": {
- "version": "2.6.1",
- "resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz",
- "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==",
+ "version": "2.6.2",
+ "resolved": "https://registry.npmjs.org/async/-/async-2.6.2.tgz",
+ "integrity": "sha512-H1qVYh1MYhEEFLsP97cVKqCGo7KfCyTt6uEWqsTBr9SO84oK9Uwbyd/yCW+6rKJLHksBNUVWZDAjfS+Ccx0Bbg==",
"requires": {
- "lodash": "4.17.11"
+ "lodash": "^4.17.11"
}
},
"debug": {
@@ -185,9 +221,9 @@
}
},
"@pm2/js-api": {
- "version": "0.5.26",
- "resolved": "https://registry.npmjs.org/@pm2/js-api/-/js-api-0.5.26.tgz",
- "integrity": "sha512-1QsbrA6jGx70aCclmhJPYLj54Axru6ZFufHwYRx1a3u4OQe43boCQG11N8o3nguECh9owfFgU4S5A0mNcWr9Fw==",
+ "version": "0.5.49",
+ "resolved": "https://registry.npmjs.org/@pm2/js-api/-/js-api-0.5.49.tgz",
+ "integrity": "sha512-H5BP9aAYLadqqKzs8qWisb2Gt9rnWzYfocn42+UKFVSEsDrGpV18dNi8nexIJ3Lm+Z7vraxtQ42K7EQgslJwdA==",
"requires": {
"async": "^2.4.1",
"axios": "^0.16.2",
@@ -206,9 +242,9 @@
"resolved": "https://registry.npmjs.org/ws/-/ws-3.3.3.tgz",
"integrity": "sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA==",
"requires": {
- "async-limiter": "1.0.0",
- "safe-buffer": "5.1.2",
- "ultron": "1.1.1"
+ "async-limiter": "~1.0.0",
+ "safe-buffer": "~5.1.0",
+ "ultron": "~1.1.0"
}
}
}
@@ -310,6 +346,14 @@
"negotiator": "0.6.1"
}
},
+ "agent-base": {
+ "version": "4.2.1",
+ "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.2.1.tgz",
+ "integrity": "sha512-JVwXMr9nHYTUXsBFKUqhJwvlcYU/blreOEUkhNR2eXZIvwd+c+o5V4MgDPKWnMS/56awN3TRzIP+KoPn+roQtg==",
+ "requires": {
+ "es6-promisify": "^5.0.0"
+ }
+ },
"ajv": {
"version": "5.5.2",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz",
@@ -354,6 +398,16 @@
"requires": {
"micromatch": "^3.1.4",
"normalize-path": "^2.1.1"
+ },
+ "dependencies": {
+ "normalize-path": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz",
+ "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=",
+ "requires": {
+ "remove-trailing-separator": "^1.0.1"
+ }
+ }
}
},
"append-field": {
@@ -423,6 +477,11 @@
"resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz",
"integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c="
},
+ "ast-types": {
+ "version": "0.12.2",
+ "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.12.2.tgz",
+ "integrity": "sha512-8c83xDLJM/dLDyXNLiR6afRRm4dPKN6KAnKqytRK3DBJul9lA+atxdQkNDkSVPdTqea5HiRq3lnnOIZ0MBpvdg=="
+ },
"async": {
"version": "2.6.0",
"resolved": "https://registry.npmjs.org/async/-/async-2.6.0.tgz",
@@ -442,9 +501,9 @@
"integrity": "sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg=="
},
"async-listener": {
- "version": "0.6.9",
- "resolved": "https://registry.npmjs.org/async-listener/-/async-listener-0.6.9.tgz",
- "integrity": "sha512-E7Z2/QMs0EPt/o9wpYO/J3hmMCDdr1aVDS3ttlur5D5JlZtxhfuOwi4e7S8zbYIxA5qOOYdxfqGj97XAfdNvkQ==",
+ "version": "0.6.10",
+ "resolved": "https://registry.npmjs.org/async-listener/-/async-listener-0.6.10.tgz",
+ "integrity": "sha512-gpuo6xOyF4D5DE5WvyqZdPA3NGhiT6Qf07l7DCB0wwDEsLvDIbCr6j9S5aj5Ch96dLace5tXVzWBZkxU/c5ohw==",
"requires": {
"semver": "^5.3.0",
"shimmer": "^1.1.0"
@@ -574,9 +633,9 @@
}
},
"binary-extensions": {
- "version": "1.11.0",
- "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.11.0.tgz",
- "integrity": "sha1-RqoXUftqL5PuXmibsQh9SxTGwgU="
+ "version": "1.13.0",
+ "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.0.tgz",
+ "integrity": "sha512-EgmjVLMn22z7eGGv3kcnHwSnJXmFHjISTY9E/S5lIcTD3Oxw05QTcBLNkJFzcb3cNueUdF/IN4U+d78V0zO8Hw=="
},
"bindings": {
"version": "1.3.1",
@@ -826,23 +885,22 @@
"integrity": "sha1-BsIe7RobBq62dVPNxT4jJ0usIpY="
},
"chokidar": {
- "version": "2.0.4",
- "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.0.4.tgz",
- "integrity": "sha512-z9n7yt9rOvIJrMhvDtDictKrkFHeihkNl6uWMmZlmL6tJtX9Cs+87oK+teBx+JIgzvbX3yZHT3eF8vpbDxHJXQ==",
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.1.tgz",
+ "integrity": "sha512-gfw3p2oQV2wEt+8VuMlNsPjCxDxvvgnm/kz+uATu805mWVF8IJN7uz9DN7iBz+RMJISmiVbCOBFs9qBGMjtPfQ==",
"requires": {
"anymatch": "^2.0.0",
- "async-each": "^1.0.0",
- "braces": "^2.3.0",
- "fsevents": "^1.2.2",
+ "async-each": "^1.0.1",
+ "braces": "^2.3.2",
+ "fsevents": "^1.2.7",
"glob-parent": "^3.1.0",
- "inherits": "^2.0.1",
+ "inherits": "^2.0.3",
"is-binary-path": "^1.0.0",
"is-glob": "^4.0.0",
- "lodash.debounce": "^4.0.8",
- "normalize-path": "^2.1.1",
+ "normalize-path": "^3.0.0",
"path-is-absolute": "^1.0.0",
- "readdirp": "^2.0.0",
- "upath": "^1.0.5"
+ "readdirp": "^2.2.1",
+ "upath": "^1.1.0"
}
},
"chownr": {
@@ -983,8 +1041,7 @@
"commander": {
"version": "2.15.1",
"resolved": "http://registry.npmjs.org/commander/-/commander-2.15.1.tgz",
- "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==",
- "dev": true
+ "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag=="
},
"component-emitter": {
"version": "1.2.1",
@@ -1120,9 +1177,9 @@
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
},
"cron": {
- "version": "1.4.1",
- "resolved": "https://registry.npmjs.org/cron/-/cron-1.4.1.tgz",
- "integrity": "sha512-HlglwQUNh6bhgfoDR6aEzyHN2T4bc0XhxJxkNPp+Ry7lK7Noby94pHcngYf634+MtxplwZm8okFgNe+R9PGDjg==",
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/cron/-/cron-1.6.0.tgz",
+ "integrity": "sha512-8OkXbeK3qF42ndzkIkCo3zfCDg2TxGjQiCQqVE+ZFFHa4vAcw0PdBc5i/6aJ9FppLncyKZmDuZdJ9/uuXEYZaw==",
"requires": {
"moment-timezone": "^0.5.x"
}
@@ -1169,6 +1226,26 @@
"resolved": "https://registry.npmjs.org/dasherize/-/dasherize-2.0.0.tgz",
"integrity": "sha1-bYCcnNDPe7iVLYD8hPoT1H3bEwg="
},
+ "data-uri-to-buffer": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-2.0.0.tgz",
+ "integrity": "sha512-YbKCNLPPP4inc0E5If4OaalBc7gpaM2MRv77Pv2VThVComLKfbGYtJcdDCViDyp1Wd4SebhHLz94vp91zbK6bw==",
+ "requires": {
+ "@types/node": "^8.0.7"
+ },
+ "dependencies": {
+ "@types/node": {
+ "version": "8.10.40",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.40.tgz",
+ "integrity": "sha512-RRSjdwz63kS4u7edIwJUn8NqKLLQ6LyqF/X4+4jp38MBT3Vwetewi2N4dgJEshLbDwNgOJXNYoOwzVZUSSLhkQ=="
+ }
+ }
+ },
+ "date-fns": {
+ "version": "1.30.1",
+ "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-1.30.1.tgz",
+ "integrity": "sha512-hBSVCvSmWC+QypYObzwGOd9wqdDpOt+0wl0KbU+R+uuZBS1jN8VsD1ss3irQDknRj5NvxiTF6oj/nDRnN/UQNw=="
+ },
"debug": {
"version": "2.6.9",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
@@ -1194,6 +1271,11 @@
"resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz",
"integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA=="
},
+ "deep-is": {
+ "version": "0.1.3",
+ "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz",
+ "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ="
+ },
"deep-metrics": {
"version": "0.0.2",
"resolved": "https://registry.npmjs.org/deep-metrics/-/deep-metrics-0.0.2.tgz",
@@ -1252,6 +1334,16 @@
}
}
},
+ "degenerator": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/degenerator/-/degenerator-1.0.4.tgz",
+ "integrity": "sha1-/PSQo37OJmRk2cxDGrmMWBnO0JU=",
+ "requires": {
+ "ast-types": "0.x.x",
+ "escodegen": "1.x.x",
+ "esprima": "3.x.x"
+ }
+ },
"delayed-stream": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
@@ -1378,9 +1470,9 @@
"integrity": "sha512-GJCAeDBKfREgkBtgrYSf9hQy9kTb3helv0zGdzqhM7iAkW8FA/ZF97VQDbwFiwIT8MQLLOe5VlPZOEvZAqtUAQ=="
},
"emitter-listener": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/emitter-listener/-/emitter-listener-1.1.1.tgz",
- "integrity": "sha1-6Lu+gkS8jg0LTvcc0UKUx/JBx+w=",
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/emitter-listener/-/emitter-listener-1.1.2.tgz",
+ "integrity": "sha512-Bt1sBAGFHY9DKY+4/2cV6izcKJUf5T7/gkdmkxzX/qv9CcGH8xSwVRW5mtX03SWJtRTWSOpzCuWN9rBFYZepZQ==",
"requires": {
"shimmer": "^1.2.0"
}
@@ -1408,6 +1500,21 @@
"resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.2.1.tgz",
"integrity": "sha1-7FYjOGgDKQkgcXDDlEjiREndH8Q="
},
+ "es6-promisify": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz",
+ "integrity": "sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM=",
+ "requires": {
+ "es6-promise": "^4.0.3"
+ },
+ "dependencies": {
+ "es6-promise": {
+ "version": "4.2.5",
+ "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.5.tgz",
+ "integrity": "sha512-n6wvpdE43VFtJq+lUDYDBFUwV8TZbuGXLV4D6wKafg13ldznKsyEvatubnmUe31zcvelSzOHF+XbaT+Bl9ObDg=="
+ }
+ }
+ },
"escape-html": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
@@ -1423,11 +1530,40 @@
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ="
},
+ "escodegen": {
+ "version": "1.11.0",
+ "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.11.0.tgz",
+ "integrity": "sha512-IeMV45ReixHS53K/OmfKAIztN/igDHzTJUhZM3k1jMhIZWjk45SMwAtBsEXiJp3vSPmTcu6CXn7mDvFHRN66fw==",
+ "requires": {
+ "esprima": "^3.1.3",
+ "estraverse": "^4.2.0",
+ "esutils": "^2.0.2",
+ "optionator": "^0.8.1",
+ "source-map": "~0.6.1"
+ },
+ "dependencies": {
+ "source-map": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+ "optional": true
+ }
+ }
+ },
+ "esprima": {
+ "version": "3.1.3",
+ "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz",
+ "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM="
+ },
+ "estraverse": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz",
+ "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM="
+ },
"esutils": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz",
- "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=",
- "dev": true
+ "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs="
},
"etag": {
"version": "1.7.0",
@@ -1435,9 +1571,9 @@
"integrity": "sha1-A9MLX2fdbmMtKUXTDWZScxo01dg="
},
"event-loop-inspector": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/event-loop-inspector/-/event-loop-inspector-1.2.0.tgz",
- "integrity": "sha512-XTx46fCcwFlfBbXkdSVVRfKNueaSkkzGO4AGeVrWklqH8T6wqibHxuf47K3MMkS+inJeSM3d0jf4NpbHlCHo2A=="
+ "version": "1.2.2",
+ "resolved": "https://registry.npmjs.org/event-loop-inspector/-/event-loop-inspector-1.2.2.tgz",
+ "integrity": "sha512-v7OqIPmO0jqpmSH4Uc6IrY/H6lOidYzrXHE8vPHLDDOfV1Pw+yu+KEIE/AWnoFheWYlunZbxzKpZBAezVlrU9g=="
},
"eventemitter2": {
"version": "5.0.1",
@@ -1829,6 +1965,11 @@
"resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz",
"integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I="
},
+ "fast-levenshtein": {
+ "version": "2.0.6",
+ "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz",
+ "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc="
+ },
"fast-safe-stringify": {
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.6.tgz",
@@ -1844,6 +1985,11 @@
"resolved": "http://registry.npmjs.org/fecha/-/fecha-2.3.3.tgz",
"integrity": "sha512-lUGBnIamTAwk4znq5BcqsDaxSmZ9nDVJaij6NvRt/Tg4R69gERA+otPKbS86ROw9nxVMw2/mp1fnaiWqbs6Sdg=="
},
+ "file-uri-to-path": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
+ "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw=="
+ },
"fill-range": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz",
@@ -1892,9 +2038,9 @@
"integrity": "sha1-dV0+wU1JqG49L8wIvurVwMornAo="
},
"follow-redirects": {
- "version": "1.5.8",
- "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.8.tgz",
- "integrity": "sha512-sy1mXPmv7kLAMKW/8XofG7o9T+6gAjzdZK4AJF6ryqQYUa/hnzgiypoeUecZ53x7XiqKNEpNqLtS97MshW2nxg==",
+ "version": "1.6.1",
+ "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.6.1.tgz",
+ "integrity": "sha512-t2JCjbzxQpWvbhts3l6SH1DKzSrx8a+SsaVf4h6bG4kOXUuPYS/kg2Lr4gQSb7eemaHqJkOThF1BGyjlUkO1GQ==",
"requires": {
"debug": "=3.1.0"
},
@@ -1978,9 +2124,9 @@
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
},
"fsevents": {
- "version": "1.2.4",
- "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.4.tgz",
- "integrity": "sha512-z8H8/diyk76B7q5wg+Ud0+CqzcAF3mBBI/bA5ne5zrRUUIvNkJY//D3BqyH571KuAC4Nr7Rw7CjWX4r0y9DvNg==",
+ "version": "1.2.7",
+ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.7.tgz",
+ "integrity": "sha512-Pxm6sI2MeBD7RdD12RYsqaP0nMiwx8eZBXCa6z2L+mRHm2DYrOYwihmhjpkdjUHwQhslWQjRpEgNq4XvBmaAuw==",
"optional": true,
"requires": {
"nan": "^2.9.2",
@@ -1989,25 +2135,21 @@
"dependencies": {
"abbrev": {
"version": "1.1.1",
- "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
- "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==",
+ "bundled": true,
"optional": true
},
"ansi-regex": {
"version": "2.1.1",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
- "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8="
+ "bundled": true
},
"aproba": {
"version": "1.2.0",
- "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz",
- "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==",
+ "bundled": true,
"optional": true
},
"are-we-there-yet": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz",
- "integrity": "sha1-u13KOCu5TwXhUZQ3PRb9O6HKEQ0=",
+ "version": "1.1.5",
+ "bundled": true,
"optional": true,
"requires": {
"delegates": "^1.0.0",
@@ -2016,109 +2158,92 @@
},
"balanced-match": {
"version": "1.0.0",
- "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
- "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c="
+ "bundled": true
},
"brace-expansion": {
"version": "1.1.11",
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
- "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
+ "bundled": true,
"requires": {
- "balanced-match": "1.0.0",
+ "balanced-match": "^1.0.0",
"concat-map": "0.0.1"
}
},
"chownr": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.0.1.tgz",
- "integrity": "sha1-4qdQQqlVGQi+vSW4Uj1fl2nXkYE=",
+ "version": "1.1.1",
+ "bundled": true,
"optional": true
},
"code-point-at": {
"version": "1.1.0",
- "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
- "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=",
- "optional": true
+ "bundled": true
},
"concat-map": {
"version": "0.0.1",
- "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
- "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
+ "bundled": true
},
"console-control-strings": {
"version": "1.1.0",
- "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz",
- "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=",
- "optional": true
+ "bundled": true
},
"core-util-is": {
"version": "1.0.2",
- "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
- "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
+ "bundled": true,
"optional": true
},
"debug": {
"version": "2.6.9",
- "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
- "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+ "bundled": true,
"optional": true,
"requires": {
"ms": "2.0.0"
}
},
"deep-extend": {
- "version": "0.5.1",
- "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.5.1.tgz",
- "integrity": "sha512-N8vBdOa+DF7zkRrDCsaOXoCs/E2fJfx9B9MrKnnSiHNh4ws7eSys6YQE4KvT1cecKmOASYQBhbKjeuDD9lT81w==",
+ "version": "0.6.0",
+ "bundled": true,
"optional": true
},
"delegates": {
"version": "1.0.0",
- "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz",
- "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=",
+ "bundled": true,
"optional": true
},
"detect-libc": {
"version": "1.0.3",
- "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz",
- "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=",
+ "bundled": true,
"optional": true
},
"fs-minipass": {
"version": "1.2.5",
- "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.5.tgz",
- "integrity": "sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ==",
+ "bundled": true,
"optional": true,
"requires": {
- "minipass": "2.2.4"
+ "minipass": "^2.2.1"
}
},
"fs.realpath": {
"version": "1.0.0",
- "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
- "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
+ "bundled": true,
"optional": true
},
"gauge": {
"version": "2.7.4",
- "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz",
- "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=",
+ "bundled": true,
"optional": true,
"requires": {
- "aproba": "1.2.0",
- "console-control-strings": "1.1.0",
- "has-unicode": "2.0.1",
- "object-assign": "4.1.1",
- "signal-exit": "3.0.2",
- "string-width": "1.0.2",
- "strip-ansi": "3.0.1",
- "wide-align": "1.1.2"
+ "aproba": "^1.0.3",
+ "console-control-strings": "^1.0.0",
+ "has-unicode": "^2.0.0",
+ "object-assign": "^4.1.0",
+ "signal-exit": "^3.0.0",
+ "string-width": "^1.0.1",
+ "strip-ansi": "^3.0.1",
+ "wide-align": "^1.1.0"
}
},
"glob": {
- "version": "7.1.2",
- "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz",
- "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==",
+ "version": "7.1.3",
+ "bundled": true,
"optional": true,
"requires": {
"fs.realpath": "^1.0.0",
@@ -2131,91 +2256,77 @@
},
"has-unicode": {
"version": "2.0.1",
- "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz",
- "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=",
+ "bundled": true,
"optional": true
},
"iconv-lite": {
- "version": "0.4.21",
- "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.21.tgz",
- "integrity": "sha512-En5V9za5mBt2oUA03WGD3TwDv0MKAruqsuxstbMUZaj9W9k/m1CV/9py3l0L5kw9Bln8fdHQmzHSYtvpvTLpKw==",
+ "version": "0.4.24",
+ "bundled": true,
"optional": true,
"requires": {
- "safer-buffer": "^2.1.0"
+ "safer-buffer": ">= 2.1.2 < 3"
}
},
"ignore-walk": {
"version": "3.0.1",
- "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.1.tgz",
- "integrity": "sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ==",
+ "bundled": true,
"optional": true,
"requires": {
- "minimatch": "3.0.4"
+ "minimatch": "^3.0.4"
}
},
"inflight": {
"version": "1.0.6",
- "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
- "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
+ "bundled": true,
"optional": true,
"requires": {
- "once": "1.4.0",
- "wrappy": "1.0.2"
+ "once": "^1.3.0",
+ "wrappy": "1"
}
},
"inherits": {
"version": "2.0.3",
- "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
- "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
- "optional": true
+ "bundled": true
},
"ini": {
"version": "1.3.5",
- "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz",
- "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==",
+ "bundled": true,
"optional": true
},
"is-fullwidth-code-point": {
"version": "1.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
- "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
- "optional": true,
+ "bundled": true,
"requires": {
- "number-is-nan": "1.0.1"
+ "number-is-nan": "^1.0.0"
}
},
"isarray": {
"version": "1.0.0",
- "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
- "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
+ "bundled": true,
"optional": true
},
"minimatch": {
"version": "3.0.4",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
- "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
+ "bundled": true,
"requires": {
- "brace-expansion": "1.1.11"
+ "brace-expansion": "^1.1.7"
}
},
"minimist": {
"version": "0.0.8",
- "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
- "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0="
+ "bundled": true
},
"minipass": {
- "version": "2.2.4",
- "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.2.4.tgz",
- "integrity": "sha512-hzXIWWet/BzWhYs2b+u7dRHlruXhwdgvlTMDKC6Cb1U7ps6Ac6yQlR39xsbjWJE377YTCtKwIXIpJ5oP+j5y8g==",
+ "version": "2.3.5",
+ "bundled": true,
"requires": {
- "safe-buffer": "^5.1.1",
+ "safe-buffer": "^5.1.2",
"yallist": "^3.0.0"
}
},
"minizlib": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.1.0.tgz",
- "integrity": "sha512-4T6Ur/GctZ27nHfpt9THOdRZNgyJ9FZchYO1ceg5S8Q3DNLCKYy44nCZzgCJgcvx2UM8czmqak5BCxJMrq37lA==",
+ "version": "1.2.1",
+ "bundled": true,
"optional": true,
"requires": {
"minipass": "^2.2.1"
@@ -2223,22 +2334,19 @@
},
"mkdirp": {
"version": "0.5.1",
- "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
- "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
+ "bundled": true,
"requires": {
"minimist": "0.0.8"
}
},
"ms": {
"version": "2.0.0",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
- "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
+ "bundled": true,
"optional": true
},
"needle": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/needle/-/needle-2.2.0.tgz",
- "integrity": "sha512-eFagy6c+TYayorXw/qtAdSvaUpEbBsDwDyxYFgLZ0lTojfH7K+OdBqAF7TAFwDokJaGpubpSGG0wO3iC0XPi8w==",
+ "version": "2.2.4",
+ "bundled": true,
"optional": true,
"requires": {
"debug": "^2.1.2",
@@ -2247,18 +2355,17 @@
}
},
"node-pre-gyp": {
- "version": "0.10.0",
- "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.10.0.tgz",
- "integrity": "sha512-G7kEonQLRbcA/mOoFoxvlMrw6Q6dPf92+t/l0DFSMuSlDoWaI9JWIyPwK0jyE1bph//CUEL65/Fz1m2vJbmjQQ==",
+ "version": "0.10.3",
+ "bundled": true,
"optional": true,
"requires": {
"detect-libc": "^1.0.2",
"mkdirp": "^0.5.1",
- "needle": "^2.2.0",
+ "needle": "^2.2.1",
"nopt": "^4.0.1",
"npm-packlist": "^1.1.6",
"npmlog": "^4.0.2",
- "rc": "^1.1.7",
+ "rc": "^1.2.7",
"rimraf": "^2.6.1",
"semver": "^5.3.0",
"tar": "^4"
@@ -2266,24 +2373,21 @@
},
"nopt": {
"version": "4.0.1",
- "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz",
- "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=",
+ "bundled": true,
"optional": true,
"requires": {
- "abbrev": "1.1.1",
- "osenv": "0.1.5"
+ "abbrev": "1",
+ "osenv": "^0.1.4"
}
},
"npm-bundled": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.0.3.tgz",
- "integrity": "sha512-ByQ3oJ/5ETLyglU2+8dBObvhfWXX8dtPZDMePCahptliFX2iIuhyEszyFk401PZUNQH20vvdW5MLjJxkwU80Ow==",
+ "version": "1.0.5",
+ "bundled": true,
"optional": true
},
"npm-packlist": {
- "version": "1.1.10",
- "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.1.10.tgz",
- "integrity": "sha512-AQC0Dyhzn4EiYEfIUjCdMl0JJ61I2ER9ukf/sLxJUcZHfo+VyEfz2rMJgLZSS1v30OxPQe1cN0LZA1xbcaVfWA==",
+ "version": "1.2.0",
+ "bundled": true,
"optional": true,
"requires": {
"ignore-walk": "^3.0.1",
@@ -2292,77 +2396,66 @@
},
"npmlog": {
"version": "4.1.2",
- "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz",
- "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==",
+ "bundled": true,
"optional": true,
"requires": {
- "are-we-there-yet": "1.1.4",
- "console-control-strings": "1.1.0",
- "gauge": "2.7.4",
- "set-blocking": "2.0.0"
+ "are-we-there-yet": "~1.1.2",
+ "console-control-strings": "~1.1.0",
+ "gauge": "~2.7.3",
+ "set-blocking": "~2.0.0"
}
},
"number-is-nan": {
"version": "1.0.1",
- "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz",
- "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=",
- "optional": true
+ "bundled": true
},
"object-assign": {
"version": "4.1.1",
- "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
- "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=",
+ "bundled": true,
"optional": true
},
"once": {
"version": "1.4.0",
- "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
- "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
+ "bundled": true,
"requires": {
- "wrappy": "1.0.2"
+ "wrappy": "1"
}
},
"os-homedir": {
"version": "1.0.2",
- "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
- "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=",
+ "bundled": true,
"optional": true
},
"os-tmpdir": {
"version": "1.0.2",
- "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
- "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=",
+ "bundled": true,
"optional": true
},
"osenv": {
"version": "0.1.5",
- "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz",
- "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==",
+ "bundled": true,
"optional": true,
"requires": {
- "os-homedir": "1.0.2",
- "os-tmpdir": "1.0.2"
+ "os-homedir": "^1.0.0",
+ "os-tmpdir": "^1.0.0"
}
},
"path-is-absolute": {
"version": "1.0.1",
- "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
- "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
+ "bundled": true,
"optional": true
},
"process-nextick-args": {
"version": "2.0.0",
- "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz",
- "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==",
+ "bundled": true,
"optional": true
},
"rc": {
- "version": "1.2.7",
- "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.7.tgz",
- "integrity": "sha512-LdLD8xD4zzLsAT5xyushXDNscEjB7+2ulnl8+r1pnESlYtlJtVSoCMBGr30eDRJ3+2Gq89jK9P9e4tCEH1+ywA==",
+ "version": "1.2.8",
+ "bundled": true,
"optional": true,
"requires": {
- "deep-extend": "^0.5.1",
+ "deep-extend": "^0.6.0",
"ini": "~1.3.0",
"minimist": "^1.2.0",
"strip-json-comments": "~2.0.1"
@@ -2370,144 +2463,125 @@
"dependencies": {
"minimist": {
"version": "1.2.0",
- "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
- "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
+ "bundled": true,
"optional": true
}
}
},
"readable-stream": {
"version": "2.3.6",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
- "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
+ "bundled": true,
"optional": true,
"requires": {
- "core-util-is": "1.0.2",
- "inherits": "2.0.3",
- "isarray": "1.0.0",
- "process-nextick-args": "2.0.0",
- "safe-buffer": "5.1.1",
- "string_decoder": "1.1.1",
- "util-deprecate": "1.0.2"
+ "core-util-is": "~1.0.0",
+ "inherits": "~2.0.3",
+ "isarray": "~1.0.0",
+ "process-nextick-args": "~2.0.0",
+ "safe-buffer": "~5.1.1",
+ "string_decoder": "~1.1.1",
+ "util-deprecate": "~1.0.1"
}
},
"rimraf": {
- "version": "2.6.2",
- "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz",
- "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==",
+ "version": "2.6.3",
+ "bundled": true,
"optional": true,
"requires": {
- "glob": "^7.0.5"
+ "glob": "^7.1.3"
}
},
"safe-buffer": {
- "version": "5.1.1",
- "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz",
- "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg=="
+ "version": "5.1.2",
+ "bundled": true
},
"safer-buffer": {
"version": "2.1.2",
- "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
- "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
+ "bundled": true,
"optional": true
},
"sax": {
"version": "1.2.4",
- "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz",
- "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==",
+ "bundled": true,
"optional": true
},
"semver": {
- "version": "5.5.0",
- "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz",
- "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==",
+ "version": "5.6.0",
+ "bundled": true,
"optional": true
},
"set-blocking": {
"version": "2.0.0",
- "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
- "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=",
+ "bundled": true,
"optional": true
},
"signal-exit": {
"version": "3.0.2",
- "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
- "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=",
+ "bundled": true,
"optional": true
},
"string-width": {
"version": "1.0.2",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
- "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
- "optional": true,
+ "bundled": true,
"requires": {
- "code-point-at": "1.1.0",
- "is-fullwidth-code-point": "1.0.0",
- "strip-ansi": "3.0.1"
+ "code-point-at": "^1.0.0",
+ "is-fullwidth-code-point": "^1.0.0",
+ "strip-ansi": "^3.0.0"
}
},
"string_decoder": {
"version": "1.1.1",
- "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
- "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
+ "bundled": true,
"optional": true,
"requires": {
- "safe-buffer": "5.1.1"
+ "safe-buffer": "~5.1.0"
}
},
"strip-ansi": {
"version": "3.0.1",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
- "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
+ "bundled": true,
"requires": {
- "ansi-regex": "2.1.1"
+ "ansi-regex": "^2.0.0"
}
},
"strip-json-comments": {
"version": "2.0.1",
- "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
- "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=",
+ "bundled": true,
"optional": true
},
"tar": {
- "version": "4.4.1",
- "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.1.tgz",
- "integrity": "sha512-O+v1r9yN4tOsvl90p5HAP4AEqbYhx4036AGMm075fH9F8Qwi3oJ+v4u50FkT/KkvywNGtwkk0zRI+8eYm1X/xg==",
+ "version": "4.4.8",
+ "bundled": true,
"optional": true,
"requires": {
- "chownr": "^1.0.1",
+ "chownr": "^1.1.1",
"fs-minipass": "^1.2.5",
- "minipass": "^2.2.4",
- "minizlib": "^1.1.0",
+ "minipass": "^2.3.4",
+ "minizlib": "^1.1.1",
"mkdirp": "^0.5.0",
- "safe-buffer": "^5.1.1",
+ "safe-buffer": "^5.1.2",
"yallist": "^3.0.2"
}
},
"util-deprecate": {
"version": "1.0.2",
- "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
- "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=",
+ "bundled": true,
"optional": true
},
"wide-align": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.2.tgz",
- "integrity": "sha512-ijDLlyQ7s6x1JgCLur53osjm/UXUYD9+0PbYKrBsYisYXzCxN+HC3mYDNy/dWdmf3AwqwU3CXwDCvsNgGK1S0w==",
+ "version": "1.1.3",
+ "bundled": true,
"optional": true,
"requires": {
- "string-width": "^1.0.2"
+ "string-width": "^1.0.2 || 2"
}
},
"wrappy": {
"version": "1.0.2",
- "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
- "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
+ "bundled": true
},
"yallist": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.2.tgz",
- "integrity": "sha1-hFK0u36Dx8GI2AQcGoN8dz1ti7k="
+ "version": "3.0.3",
+ "bundled": true
}
}
},
@@ -2532,6 +2606,38 @@
}
}
},
+ "ftp": {
+ "version": "0.3.10",
+ "resolved": "https://registry.npmjs.org/ftp/-/ftp-0.3.10.tgz",
+ "integrity": "sha1-kZfYYa2BQvPmPVqDv+TFn3MwiF0=",
+ "requires": {
+ "readable-stream": "1.1.x",
+ "xregexp": "2.0.0"
+ },
+ "dependencies": {
+ "isarray": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
+ "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8="
+ },
+ "readable-stream": {
+ "version": "1.1.14",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
+ "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=",
+ "requires": {
+ "core-util-is": "~1.0.0",
+ "inherits": "~2.0.1",
+ "isarray": "0.0.1",
+ "string_decoder": "~0.10.x"
+ }
+ },
+ "string_decoder": {
+ "version": "0.10.31",
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
+ "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ="
+ }
+ }
+ },
"gauge": {
"version": "2.7.4",
"resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz",
@@ -2559,6 +2665,52 @@
"resolved": "https://registry.npmjs.org/generaterr/-/generaterr-1.5.0.tgz",
"integrity": "sha1-sM62zFFk3yoGEzjMNAqGFTlcUvw="
},
+ "get-uri": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-2.0.3.tgz",
+ "integrity": "sha512-x5j6Ks7FOgLD/GlvjKwgu7wdmMR55iuRHhn8hj/+gA+eSbxQvZ+AEomq+3MgVEZj1vpi738QahGbCCSIDtXtkw==",
+ "requires": {
+ "data-uri-to-buffer": "2",
+ "debug": "4",
+ "extend": "~3.0.2",
+ "file-uri-to-path": "1",
+ "ftp": "~0.3.10",
+ "readable-stream": "3"
+ },
+ "dependencies": {
+ "debug": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
+ "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
+ "requires": {
+ "ms": "^2.1.1"
+ }
+ },
+ "ms": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
+ "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg=="
+ },
+ "readable-stream": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.1.1.tgz",
+ "integrity": "sha512-DkN66hPyqDhnIQ6Jcsvx9bFjhw214O4poMBcIMgPVpQvNy9a0e0Uhg5SqySyDKAmUlwt8LonTBz1ezOnM8pUdA==",
+ "requires": {
+ "inherits": "^2.0.3",
+ "string_decoder": "^1.1.1",
+ "util-deprecate": "^1.0.1"
+ }
+ },
+ "string_decoder": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.2.0.tgz",
+ "integrity": "sha512-6YqyX6ZWEYguAxgZzHGL7SsCeGx3V2TtOTqZz1xSTSWnqsbWwbptafNyvf/ACquZUXV3DANr5BDIwNYe1mN42w==",
+ "requires": {
+ "safe-buffer": "~5.1.0"
+ }
+ }
+ }
+ },
"get-value": {
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz",
@@ -2625,9 +2777,9 @@
"dev": true
},
"graceful-fs": {
- "version": "4.1.11",
- "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz",
- "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg="
+ "version": "4.1.15",
+ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz",
+ "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA=="
},
"growl": {
"version": "1.10.5",
@@ -2769,6 +2921,30 @@
"statuses": ">= 1.3.1 < 2"
}
},
+ "http-proxy-agent": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz",
+ "integrity": "sha512-qwHbBLV7WviBl0rQsOzH6o5lwyOIvwp/BdFnvVxXORldu5TmjFfjzBcWUWS5kWAZhmv+JtiDhSuQCp4sBfbIgg==",
+ "requires": {
+ "agent-base": "4",
+ "debug": "3.1.0"
+ },
+ "dependencies": {
+ "debug": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
+ "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
+ "requires": {
+ "ms": "2.0.0"
+ }
+ },
+ "ms": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
+ "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
+ }
+ }
+ },
"http-signature": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz",
@@ -2784,6 +2960,30 @@
"resolved": "https://registry.npmjs.org/http-string-parser/-/http-string-parser-0.0.6.tgz",
"integrity": "sha1-QIihq6K4kVXOE5GLz7XLvqbE5+k="
},
+ "https-proxy-agent": {
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.1.tgz",
+ "integrity": "sha512-HPCTS1LW51bcyMYbxUIOO4HEOlQ1/1qRaFWcyxvwaqUS9TY88aoEuHUY33kuAh1YhVVaDQhLZsnPd+XNARWZlQ==",
+ "requires": {
+ "agent-base": "^4.1.0",
+ "debug": "^3.1.0"
+ },
+ "dependencies": {
+ "debug": {
+ "version": "3.2.6",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
+ "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
+ "requires": {
+ "ms": "^2.1.1"
+ }
+ },
+ "ms": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
+ "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg=="
+ }
+ }
+ },
"iconv-lite": {
"version": "0.4.13",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.13.tgz",
@@ -2822,9 +3022,14 @@
"integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw=="
},
"interpret": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.1.0.tgz",
- "integrity": "sha1-ftGxQQxqDg94z5XTuEQMY/eLhhQ="
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.2.0.tgz",
+ "integrity": "sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw=="
+ },
+ "ip": {
+ "version": "1.1.5",
+ "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz",
+ "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo="
},
"ipaddr.js": {
"version": "1.8.0",
@@ -2832,9 +3037,9 @@
"integrity": "sha1-6qM9bd16zo9/b+DJygRA5wZzix4="
},
"is": {
- "version": "3.2.1",
- "resolved": "https://registry.npmjs.org/is/-/is-3.2.1.tgz",
- "integrity": "sha1-0Kwq1V63sL7JJqUmb2xmKqqD3KU="
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/is/-/is-3.3.0.tgz",
+ "integrity": "sha512-nW24QBoPcFGGHJGUwnfpI7Yc5CdqWNdsyHQszVE/z2pKHXzh7FZ5GWhJqSyaQ9wMkQnsTx+kAI8bHlCX4tKdbg=="
},
"is-accessor-descriptor": {
"version": "0.1.6",
@@ -3194,6 +3399,15 @@
"verror": "^1.8.1"
}
},
+ "levn": {
+ "version": "0.3.0",
+ "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz",
+ "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=",
+ "requires": {
+ "prelude-ls": "~1.1.2",
+ "type-check": "~0.3.2"
+ }
+ },
"libxmljs": {
"version": "0.19.5",
"resolved": "https://registry.npmjs.org/libxmljs/-/libxmljs-0.19.5.tgz",
@@ -3209,11 +3423,6 @@
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz",
"integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg=="
},
- "lodash.debounce": {
- "version": "4.0.8",
- "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz",
- "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168="
- },
"lodash.findindex": {
"version": "4.6.0",
"resolved": "https://registry.npmjs.org/lodash.findindex/-/lodash.findindex-4.6.0.tgz",
@@ -3530,9 +3739,9 @@
"integrity": "sha1-PCV/mDn8DpP/UxSWMiOeuQeD/2Y="
},
"moment-timezone": {
- "version": "0.5.21",
- "resolved": "https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.5.21.tgz",
- "integrity": "sha512-j96bAh4otsgj3lKydm3K7kdtA3iKf2m6MY2iSYCzCm5a1zmHo1g+aK3068dDEeocLZQIS9kU8bsdQHLqEvgW0A==",
+ "version": "0.5.23",
+ "resolved": "https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.5.23.tgz",
+ "integrity": "sha512-WHFH85DkCfiNMDX5D3X7hpNH3/PUhjTGcD0U1SgfBGZxJ3qUmJh5FdvaFjcClxOvB3rzdfj4oRffbI38jEnC1w==",
"requires": {
"moment": ">= 2.9.0"
}
@@ -3557,9 +3766,9 @@
}
},
"mongoose": {
- "version": "4.13.14",
- "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-4.13.14.tgz",
- "integrity": "sha512-20zynb1fvCO37AP+0iTPGDbt4dJJkzM9fNK5BwKf5n+gFU5YYdXpnhxs9Kf8C+Fe0xY8vpUKV8wA7VGWcmDaFw==",
+ "version": "4.13.18",
+ "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-4.13.18.tgz",
+ "integrity": "sha512-pPZlVID+/9xl0pyBibr7CZbjYKzpJZuw58TdWwIxr3ydO/OUZqhX1kUEAQIzsOJVSsL6GnD1fb54reO35jvLtw==",
"requires": {
"async": "2.6.0",
"bson": "~1.0.4",
@@ -3567,7 +3776,7 @@
"kareem": "1.5.0",
"lodash.get": "4.4.2",
"mongodb": "2.2.34",
- "mpath": "0.3.0",
+ "mpath": "0.5.1",
"mpromise": "0.5.5",
"mquery": "2.3.3",
"ms": "2.0.0",
@@ -3596,9 +3805,9 @@
}
},
"mpath": {
- "version": "0.3.0",
- "resolved": "https://registry.npmjs.org/mpath/-/mpath-0.3.0.tgz",
- "integrity": "sha1-elj3iem1/TyUUgY0FXlg8mvV70Q="
+ "version": "0.5.1",
+ "resolved": "https://registry.npmjs.org/mpath/-/mpath-0.5.1.tgz",
+ "integrity": "sha512-H8OVQ+QEz82sch4wbODFOz+3YQ61FYz/z3eJ5pIdbMEaUzDqA268Wd+Vt4Paw9TJfvDgVKaayC0gBzMIw2jhsg=="
},
"mpromise": {
"version": "0.5.5",
@@ -3616,19 +3825,6 @@
"sliced": "0.0.5"
},
"dependencies": {
- "debug": {
- "version": "2.6.9",
- "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
- "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
- "requires": {
- "ms": "2.0.0"
- }
- },
- "ms": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
- "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
- },
"sliced": {
"version": "0.0.5",
"resolved": "https://registry.npmjs.org/sliced/-/sliced-0.0.5.tgz",
@@ -3662,9 +3858,9 @@
"integrity": "sha512-FiaFwKl864onHFFUV/a2szAl7X0fxVlSKNdhTf+BM8i8goEgYut8u5P9MqQqIYwvaMxjzVESsoEm/2kfkFH1rg=="
},
"mute-stream": {
- "version": "0.0.7",
- "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz",
- "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s="
+ "version": "0.0.8",
+ "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz",
+ "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA=="
},
"mv": {
"version": "2.1.1",
@@ -3726,6 +3922,11 @@
"resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz",
"integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk="
},
+ "netmask": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/netmask/-/netmask-1.0.6.tgz",
+ "integrity": "sha1-ICl+idhvb2QA8lDZ9Pa0wZRfzTU="
+ },
"nocache": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/nocache/-/nocache-2.0.0.tgz",
@@ -3799,12 +4000,9 @@
}
},
"normalize-path": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz",
- "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=",
- "requires": {
- "remove-trailing-separator": "^1.0.1"
- }
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
+ "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA=="
},
"npm-bundled": {
"version": "1.0.5",
@@ -5076,6 +5274,19 @@
"resolved": "https://registry.npmjs.org/one-time/-/one-time-0.0.4.tgz",
"integrity": "sha1-+M33eISCb+Tf+T46nMN7HkSAdC4="
},
+ "optionator": {
+ "version": "0.8.2",
+ "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz",
+ "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=",
+ "requires": {
+ "deep-is": "~0.1.3",
+ "fast-levenshtein": "~2.0.4",
+ "levn": "~0.3.0",
+ "prelude-ls": "~1.1.2",
+ "type-check": "~0.3.2",
+ "wordwrap": "~1.0.0"
+ }
+ },
"os-homedir": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
@@ -5100,6 +5311,48 @@
"resolved": "https://registry.npmjs.org/over/-/over-0.0.5.tgz",
"integrity": "sha1-8phS5w/X4l82DgE6jsRMgq7bVwg="
},
+ "pac-proxy-agent": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-3.0.0.tgz",
+ "integrity": "sha512-AOUX9jES/EkQX2zRz0AW7lSx9jD//hQS8wFXBvcnd/J2Py9KaMJMqV/LPqJssj1tgGufotb2mmopGPR15ODv1Q==",
+ "requires": {
+ "agent-base": "^4.2.0",
+ "debug": "^3.1.0",
+ "get-uri": "^2.0.0",
+ "http-proxy-agent": "^2.1.0",
+ "https-proxy-agent": "^2.2.1",
+ "pac-resolver": "^3.0.0",
+ "raw-body": "^2.2.0",
+ "socks-proxy-agent": "^4.0.1"
+ },
+ "dependencies": {
+ "debug": {
+ "version": "3.2.6",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
+ "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
+ "requires": {
+ "ms": "^2.1.1"
+ }
+ },
+ "ms": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
+ "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg=="
+ }
+ }
+ },
+ "pac-resolver": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/pac-resolver/-/pac-resolver-3.0.0.tgz",
+ "integrity": "sha512-tcc38bsjuE3XZ5+4vP96OfhOugrX+JcnpUbhfuc4LuXBLQhoTthOstZeoQJBDnQUDYzYmdImKsbz0xSl1/9qeA==",
+ "requires": {
+ "co": "^4.6.0",
+ "degenerator": "^1.0.4",
+ "ip": "^1.1.5",
+ "netmask": "^1.0.6",
+ "thunkify": "^2.1.2"
+ }
+ },
"pako": {
"version": "0.2.9",
"resolved": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz",
@@ -5219,13 +5472,13 @@
"integrity": "sha512-TuvHS8AOIZNAlE77WUDiR4rySV/VMptyMfcfeoMgs4P8apaZM3JrnbzBiixKUv+XR6i+BXrQh8WAnjaSPFO65Q=="
},
"pm2": {
- "version": "3.1.2",
- "resolved": "https://registry.npmjs.org/pm2/-/pm2-3.1.2.tgz",
- "integrity": "sha512-soWONPRVWDLlu+krjYMm6crYAbm0uai8q8xCWSsvq2ANbR+TgyPPN8DmaodfDJRwE5WSBXd5K8mXTIYQ26WjQQ==",
+ "version": "3.2.9",
+ "resolved": "https://registry.npmjs.org/pm2/-/pm2-3.2.9.tgz",
+ "integrity": "sha512-dlNIwmbsRe+Ttculrjj776ILtP5rjDsykxCOhpZB+ioCsnOmRUGJHrWCdmoOjcyHgA5tvE/X0s9M1J/hYsRKGQ==",
"requires": {
- "@pm2/agent": "^0.5.11",
- "@pm2/io": "~2.3.11",
- "@pm2/js-api": "^0.5.15",
+ "@pm2/agent": "^0.5.22",
+ "@pm2/io": "~2.4.2",
+ "@pm2/js-api": "^0.5.43",
"async": "^2.6.1",
"blessed": "^0.1.81",
"chalk": "^2.4.1",
@@ -5233,6 +5486,7 @@
"cli-table-redemption": "^1.0.0",
"commander": "2.15.1",
"cron": "^1.3",
+ "date-fns": "^1.29.0",
"debug": "^3.1",
"eventemitter2": "5.0.1",
"fclone": "1.0.11",
@@ -5244,7 +5498,7 @@
"pidusage": "^2.0.14",
"pm2-axon": "3.3.0",
"pm2-axon-rpc": "^0.5.1",
- "pm2-deploy": "^0.3.9",
+ "pm2-deploy": "^0.4.0",
"pm2-multimeter": "^0.1.2",
"promptly": "^2",
"semver": "^5.5",
@@ -5257,22 +5511,17 @@
},
"dependencies": {
"async": {
- "version": "2.6.1",
- "resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz",
- "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==",
+ "version": "2.6.2",
+ "resolved": "https://registry.npmjs.org/async/-/async-2.6.2.tgz",
+ "integrity": "sha512-H1qVYh1MYhEEFLsP97cVKqCGo7KfCyTt6uEWqsTBr9SO84oK9Uwbyd/yCW+6rKJLHksBNUVWZDAjfS+Ccx0Bbg==",
"requires": {
- "lodash": "4.17.11"
+ "lodash": "^4.17.11"
}
},
- "commander": {
- "version": "2.15.1",
- "resolved": "http://registry.npmjs.org/commander/-/commander-2.15.1.tgz",
- "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag=="
- },
"debug": {
- "version": "3.2.5",
- "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.5.tgz",
- "integrity": "sha512-D61LaDQPQkxJ5AUM2mbSJRbPkNs/TmdmOeLAi1hgDkpDfIfetSrjmWhccwtuResSwMbACjx/xXQofvM9CE/aeg==",
+ "version": "3.2.6",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
+ "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
"requires": {
"ms": "^2.1.1"
}
@@ -5301,9 +5550,9 @@
},
"dependencies": {
"debug": {
- "version": "3.2.5",
- "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.5.tgz",
- "integrity": "sha512-D61LaDQPQkxJ5AUM2mbSJRbPkNs/TmdmOeLAi1hgDkpDfIfetSrjmWhccwtuResSwMbACjx/xXQofvM9CE/aeg==",
+ "version": "3.2.6",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
+ "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
"requires": {
"ms": "^2.1.1"
}
@@ -5324,9 +5573,9 @@
},
"dependencies": {
"debug": {
- "version": "3.2.5",
- "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.5.tgz",
- "integrity": "sha512-D61LaDQPQkxJ5AUM2mbSJRbPkNs/TmdmOeLAi1hgDkpDfIfetSrjmWhccwtuResSwMbACjx/xXQofvM9CE/aeg==",
+ "version": "3.2.6",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
+ "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
"requires": {
"ms": "^2.1.1"
}
@@ -5339,9 +5588,9 @@
}
},
"pm2-deploy": {
- "version": "0.3.10",
- "resolved": "https://registry.npmjs.org/pm2-deploy/-/pm2-deploy-0.3.10.tgz",
- "integrity": "sha512-WagPKsX+LDCe8wLCL5nzu8RQvVUQ5GlFdJRVYCL0ogFnHfYRym91qNU4PkNSWSq11pdvG8la7DTjdW6FWXc8lw==",
+ "version": "0.4.0",
+ "resolved": "https://registry.npmjs.org/pm2-deploy/-/pm2-deploy-0.4.0.tgz",
+ "integrity": "sha512-3BdCghcGwMKwl3ffHZhc+j5JY5dldH9nq8m/I9W5wehJuSRZIyO96VOgKTMv3hYp7Yk5E+2lRGm8WFNlp65vOA==",
"requires": {
"async": "^2.6",
"tv4": "^1.3"
@@ -5365,6 +5614,11 @@
"resolved": "https://registry.npmjs.org/precond/-/precond-0.2.3.tgz",
"integrity": "sha1-qpWRvKokkj8eD0hJ0kD0fvwQdaw="
},
+ "prelude-ls": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz",
+ "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ="
+ },
"pretty-data": {
"version": "0.40.0",
"resolved": "https://registry.npmjs.org/pretty-data/-/pretty-data-0.40.0.tgz",
@@ -5397,6 +5651,41 @@
"ipaddr.js": "1.8.0"
}
},
+ "proxy-agent": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-3.0.3.tgz",
+ "integrity": "sha512-PXVVVuH9tiQuxQltFJVSnXWuDtNr+8aNBP6XVDDCDiUuDN8eRCm+ii4/mFWmXWEA0w8jjJSlePa4LXlM4jIzNA==",
+ "requires": {
+ "agent-base": "^4.2.0",
+ "debug": "^3.1.0",
+ "http-proxy-agent": "^2.1.0",
+ "https-proxy-agent": "^2.2.1",
+ "lru-cache": "^4.1.2",
+ "pac-proxy-agent": "^3.0.0",
+ "proxy-from-env": "^1.0.0",
+ "socks-proxy-agent": "^4.0.1"
+ },
+ "dependencies": {
+ "debug": {
+ "version": "3.2.6",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
+ "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
+ "requires": {
+ "ms": "^2.1.1"
+ }
+ },
+ "ms": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
+ "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg=="
+ }
+ }
+ },
+ "proxy-from-env": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.0.0.tgz",
+ "integrity": "sha1-M8UDmPcOp+uW0h97gXYwpVeRx+4="
+ },
"pseudomap": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz",
@@ -5639,11 +5928,11 @@
}
},
"resolve": {
- "version": "1.8.1",
- "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.8.1.tgz",
- "integrity": "sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA==",
+ "version": "1.10.0",
+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.10.0.tgz",
+ "integrity": "sha512-3sUr9aq5OfSg2S9pNtPA9hL1FVEAjvfOC4leW0SNf/mpnaakz2a9femSd6LqAww2RaFctwyf1lCqnTHuF1rxDg==",
"requires": {
- "path-parse": "^1.0.5"
+ "path-parse": "^1.0.6"
}
},
"resolve-from": {
@@ -5824,9 +6113,9 @@
"integrity": "sha1-gaVSFB7BBLiOic44MQOtXGZWTQg="
},
"shelljs": {
- "version": "0.8.2",
- "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.2.tgz",
- "integrity": "sha512-pRXeNrCA2Wd9itwhvLp5LZQvPJ0wU6bcjaTMywHHGX5XWhVN2nzSu7WV0q+oUY7mGK3mgSkDDzP3MgjqdyIgbQ==",
+ "version": "0.8.3",
+ "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.3.tgz",
+ "integrity": "sha512-fc0BKlAWiLpwZljmOvAOTE/gXawtCoNrP5oaY7KIaQbbyHeQVg01pSEuEGvGh3HEdBU4baCD7wQBwADmM/7f7A==",
"requires": {
"glob": "^7.0.0",
"interpret": "^1.0.0",
@@ -5838,20 +6127,20 @@
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz",
"integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==",
"requires": {
- "fs.realpath": "1.0.0",
- "inflight": "1.0.6",
- "inherits": "2.0.3",
- "minimatch": "3.0.4",
- "once": "1.4.0",
- "path-is-absolute": "1.0.1"
+ "fs.realpath": "^1.0.0",
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^3.0.4",
+ "once": "^1.3.0",
+ "path-is-absolute": "^1.0.0"
}
}
}
},
"shimmer": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/shimmer/-/shimmer-1.2.0.tgz",
- "integrity": "sha512-xTCx2vohXC2EWWDqY/zb4+5Mu28D+HYNSOuFzsyRDRvI/e1ICb69afwaUwfjr+25ZXldbOLyp+iDUZHq8UnTag=="
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/shimmer/-/shimmer-1.2.1.tgz",
+ "integrity": "sha512-sQTKC1Re/rM6XyFM6fIAGHRPVGvyXfgzIDvzoq608vM+jeyVD0Tu1E6Np0Kc2zAIFWIj963V2800iF/9LPieQw=="
},
"signal-exit": {
"version": "3.0.2",
@@ -5902,6 +6191,11 @@
"resolved": "https://registry.npmjs.org/sliced/-/sliced-1.0.1.tgz",
"integrity": "sha1-CzpmK10Ewxd7GSa+qCsD+Dei70E="
},
+ "smart-buffer": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.0.2.tgz",
+ "integrity": "sha512-JDhEpTKzXusOqXZ0BUIdH+CjFdO/CR3tLlf5CN34IypI+xMmXW1uB16OOY8z3cICbJlDAVJzNbwBhNO0wt9OAw=="
+ },
"snapdragon": {
"version": "0.8.2",
"resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz",
@@ -6112,6 +6406,24 @@
}
}
},
+ "socks": {
+ "version": "2.2.3",
+ "resolved": "https://registry.npmjs.org/socks/-/socks-2.2.3.tgz",
+ "integrity": "sha512-+2r83WaRT3PXYoO/1z+RDEBE7Z2f9YcdQnJ0K/ncXXbV5gJ6wYfNAebYFYiiUjM6E4JyXnPY8cimwyvFYHVUUA==",
+ "requires": {
+ "ip": "^1.1.5",
+ "smart-buffer": "4.0.2"
+ }
+ },
+ "socks-proxy-agent": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-4.0.1.tgz",
+ "integrity": "sha512-Kezx6/VBguXOsEe5oU3lXYyKMi4+gva72TwJ7pQY5JfqUx2nMk7NXA6z/mpNqIlfQjWYVfeuNvQjexiTaTn6Nw==",
+ "requires": {
+ "agent-base": "~4.2.0",
+ "socks": "~2.2.0"
+ }
+ },
"sorted-array-functions": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/sorted-array-functions/-/sorted-array-functions-1.2.0.tgz",
@@ -6135,9 +6447,9 @@
}
},
"source-map-support": {
- "version": "0.5.9",
- "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.9.tgz",
- "integrity": "sha512-gR6Rw4MvUlYy83vP0vxoVNzM6t8MUXqNuRsuBmBHQDu1Fh6X015FrLdgoDKcNdkwGubozq0P4N0Q37UyFVr1EA==",
+ "version": "0.5.10",
+ "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.10.tgz",
+ "integrity": "sha512-YfQ3tQFTK/yzlGJuX8pTwa4tifQj4QS2Mj7UegOu8jAz59MqIiMGPXxQhVQiIMNzayuUSF/jEuVnfFF5JqybmQ==",
"requires": {
"buffer-from": "^1.0.0",
"source-map": "^0.6.0"
@@ -6385,6 +6697,11 @@
"resolved": "https://registry.npmjs.org/text-hex/-/text-hex-1.0.0.tgz",
"integrity": "sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg=="
},
+ "thunkify": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/thunkify/-/thunkify-2.1.2.tgz",
+ "integrity": "sha1-+qDp0jDFGsyVyhOjYawFyn4EVT0="
+ },
"to-fast-properties": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz",
@@ -6478,6 +6795,14 @@
"integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=",
"optional": true
},
+ "type-check": {
+ "version": "0.3.2",
+ "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz",
+ "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=",
+ "requires": {
+ "prelude-ls": "~1.1.2"
+ }
+ },
"type-is": {
"version": "1.6.16",
"resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.16.tgz",
@@ -6893,6 +7218,11 @@
}
}
},
+ "wordwrap": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz",
+ "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus="
+ },
"wrappy": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
@@ -6944,6 +7274,11 @@
"resolved": "https://registry.npmjs.org/xpath.js/-/xpath.js-1.1.0.tgz",
"integrity": "sha512-jg+qkfS4K8E7965sqaUl8mRngXiKb3WZGfONgE18pr03FUQiuSV6G+Ej4tS55B+rIQSFEIw3phdVAQ4pPqNWfQ=="
},
+ "xregexp": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/xregexp/-/xregexp-2.0.0.tgz",
+ "integrity": "sha1-UqY+VsoLhKfzpfPWGHLxJq16WUM="
+ },
"xtend": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz",
diff --git a/package.json b/package.json
index b2c0063d..c2844861 100644
--- a/package.json
+++ b/package.json
@@ -27,7 +27,7 @@
"jsonwebtoken": "^8.4.0",
"libxmljs": "^0.19.5",
"lodash": "^4.17.11",
- "mongoose": "^4.5.8",
+ "mongoose": "^4.13.17",
"morgan": "^1.9.1",
"multer": "^1.3.1",
"node-dir": "^0.1.17",
@@ -36,7 +36,7 @@
"passport-ldapauth": "^2.0.0",
"passport-local": "^1.0.0",
"passport-local-mongoose": "^5.0.0",
- "pm2": "3.1.2",
+ "pm2": "^3.2.9",
"pretty-data": "^0.40.0",
"request": "^2.88.0",
"soap": "^0.24.0",
From 4f7238e6e07bd9c65a10b41da2ecd843cf1bb720 Mon Sep 17 00:00:00 2001
From: jweeks16
Date: Mon, 18 Feb 2019 11:37:35 -0500
Subject: [PATCH 003/102] expose rest api to match mq requests, getting started
---
app.js | 4 +++-
lib/util/index.js | 4 ++--
routes/virtual.js | 36 ++++++++++++++++++++++++++++++------
3 files changed, 35 insertions(+), 9 deletions(-)
diff --git a/app.js b/app.js
index 76665662..3db9713d 100644
--- a/app.js
+++ b/app.js
@@ -137,9 +137,11 @@ function init() {
// register SOAP / REST virts from DB
virtual.registerAllRRPairsForAllServices();
+ virtual.registerAllMQServices();
+
app.use('/api/services', api);
app.use('/virtual', virtual.router);
- app.use('/virtual',invoke.router);
+ app.use('/virtual', invoke.router);
// initialize recording routers
const recorder = require('./routes/recording');
diff --git a/lib/util/index.js b/lib/util/index.js
index f0c58897..e0c692e9 100644
--- a/lib/util/index.js
+++ b/lib/util/index.js
@@ -162,7 +162,7 @@ if (!Object.entries)
global.logEvent = function(path, label, msg) {
- debug(path, label, msg);
+ //debug(path, label, msg);
let event = {};
event.path = path;
@@ -170,7 +170,7 @@ global.logEvent = function(path, label, msg) {
event.msg = msg;
logger.info(event);
-}
+};
global.escapeRegExp = function(string) {
return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string
diff --git a/routes/virtual.js b/routes/virtual.js
index 7d31210b..a39307d7 100644
--- a/routes/virtual.js
+++ b/routes/virtual.js
@@ -3,6 +3,7 @@ const router = express.Router();
const xml2js = require('xml2js');
const debug = require('debug')('matching');
const Service = require('../models/http/Service');
+const MQService = require('../models/mq/MQService');
const removeRoute = require('../lib/remove-route');
const invoke = require('./invoke');
const matchTemplateController = require('../controllers/matchTemplateController');
@@ -212,14 +213,13 @@ function registerRRPair(service, rrpair) {
}
else if (!rrpair.resStatus && rrpair.resData) {
//Give .send a buffer instead of a string so it won't yell at us about content-types
- let resString = typeof rrpair.resData == "object" ? JSON.stringify(rrpair.resData) : rrpair.resdata;
+ let resString = typeof rrpair.resData == "object" ? JSON.stringify(rrpair.resData) : rrpair.resData;
//Handle template mapping
if(templateOptions){
resString = matchTemplateController.applyTemplateOptionsToResponse(resString,templateOptions);
}
-
resp.send(new Buffer(resString));
}
else if (rrpair.resStatus && !rrpair.resData) {
@@ -300,7 +300,7 @@ function registerRRPair(service, rrpair) {
// register all RR pairs for all SOAP / REST services from db
function registerAllRRPairsForAllServices() {
- Service.find({ $or: [{ type:'SOAP' }, { type:'REST' }] }, function(err, services) {
+ Service.find({}, function(err, services) {
if (err) {
debug('Error registering services: ' + err);
return;
@@ -309,9 +309,8 @@ function registerAllRRPairsForAllServices() {
try {
services.forEach(function(service){
if (service.running) {
- service.rrpairs.forEach(function(rrpair){
- registerRRPair(service, rrpair);
- });
+ registerService(service);
+
if(service.liveInvocation && service.liveInvocation.enabled){
invoke.registerServiceInvoke(service);
}
@@ -353,7 +352,30 @@ function deregisterService(service) {
});
}
+function registerAllMQServices() {
+ MQService.find({}, function(err, mqservices) {
+ if (err) {
+ debug('Error registering services: ' + err);
+ return;
+ }
+ mqservices.forEach(function(mqservice) {
+ if (mqservice.running) {
+ registerMQService(mqservice);
+ }
+ });
+ });
+}
+
+function registerMQService(mqserv) {
+ mqserv.basePath = '/mq';
+
+ mqserv.rrpairs.forEach(function(rrpair){
+ rrpair.verb = 'POST';
+ rrpair.payloadType = 'XML';
+ registerRRPair(mqserv, rrpair);
+ });
+}
module.exports = {
router: router,
@@ -361,5 +383,7 @@ module.exports = {
registerRRPair: registerRRPair,
deregisterRRPair: deregisterRRPair,
deregisterService: deregisterService,
+ registerMQService: registerMQService,
+ registerAllMQServices: registerAllMQServices,
registerAllRRPairsForAllServices: registerAllRRPairsForAllServices
};
From 7b6746236ac21e8fc2578232e483037a65b14b06 Mon Sep 17 00:00:00 2001
From: jweeks16
Date: Tue, 19 Feb 2019 11:31:50 -0500
Subject: [PATCH 004/102] filter on queue manager / request queue
---
models/common/System.js | 5 +++-
models/mq/MQInfo.js | 23 +----------------
models/mq/MQService.js | 1 -
routes/virtual.js | 56 +++++++++++++++++++++++++++++++++++++----
4 files changed, 56 insertions(+), 29 deletions(-)
diff --git a/models/common/System.js b/models/common/System.js
index a80971f6..3de10386 100644
--- a/models/common/System.js
+++ b/models/common/System.js
@@ -1,6 +1,8 @@
const mongoose = require('mongoose');
const constants = require('../../lib/util/constants');
+const MQInfo = require('../mq/MQInfo');
+
const sutSchema = new mongoose.Schema({
name: {
type : String,
@@ -9,7 +11,8 @@ const sutSchema = new mongoose.Schema({
members: {
type : Array,
default : []
- }
+ },
+ mqInfo: MQInfo.schema
});
module.exports = mongoose.model('SUT', sutSchema);
diff --git a/models/mq/MQInfo.js b/models/mq/MQInfo.js
index eb7d67aa..1549fea4 100644
--- a/models/mq/MQInfo.js
+++ b/models/mq/MQInfo.js
@@ -1,29 +1,8 @@
const mongoose = require('mongoose');
-const queueSchema = new mongoose.Schema({
- reqQueue: String,
- resQueue: String
-});
-
const infoSchema = new mongoose.Schema({
- hostname: String,
- port: {
- // force integer only
- type: Number,
- default: 200,
- get: function(v) { return Math.round(v); },
- set: function(v) { return Math.round(v); }
- },
manager: String,
- channel: String,
- transport: {
- type: Number,
- default: 200,
- get: function(v) { return Math.round(v); },
- set: function(v) { return Math.round(v); }
- },
- username: String,
- queues: [queueSchema]
+ reqQueue: String
});
module.exports = mongoose.model('MQInfo', infoSchema);
\ No newline at end of file
diff --git a/models/mq/MQService.js b/models/mq/MQService.js
index ead2750b..5caf316e 100644
--- a/models/mq/MQService.js
+++ b/models/mq/MQService.js
@@ -23,7 +23,6 @@ const mqSchema = new mongoose.Schema({
required: [true, constants.REQUIRED_SERVICE_TYPE_ERR]
},
matchTemplates: [mongoose.Schema.Types.Mixed],
- connInfo: MQInfo.schema,
rrpairs: {
type: [MQPair.schema],
required: [true, constants.REQUIRED_RRPAIRS_ERR]
diff --git a/routes/virtual.js b/routes/virtual.js
index a39307d7..2a3f9b1b 100644
--- a/routes/virtual.js
+++ b/routes/virtual.js
@@ -4,6 +4,7 @@ const xml2js = require('xml2js');
const debug = require('debug')('matching');
const Service = require('../models/http/Service');
const MQService = require('../models/mq/MQService');
+const System = require('../models/common/System');
const removeRoute = require('../lib/remove-route');
const invoke = require('./invoke');
const matchTemplateController = require('../controllers/matchTemplateController');
@@ -368,12 +369,56 @@ function registerAllMQServices() {
}
function registerMQService(mqserv) {
- mqserv.basePath = '/mq';
+ System.find({ 'name' : mqserv.sut.name }, function(err, systems) {
+ if (err) {
+ debug('Error registering MQ service: ' + err);
+ return;
+ }
+
+ if (!systems.length || !systems[0]) {
+ debug('System not found: ' + mqserv.sut.name );
+ return;
+ }
+
+ let mqinfo = systems[0].mqInfo;
+
+ if (!mqinfo) {
+ debug('System does not have MQ info: ' + mqserv.sut.name );
+ return;
+ }
+
+ mqserv.basePath = `/mq/${mqinfo.manager}/${mqinfo.reqQueue}`;
+
+ mqserv.rrpairs.forEach(function(rrpair){
+ rrpair.verb = 'POST';
+ rrpair.payloadType = 'XML';
+ registerRRPair(mqserv, rrpair);
+ });
+ });
+}
+
+function deregisterMQService(mqserv) {
+ System.find({ 'name' : mqserv.sut.name }, function(err, systems) {
+ if (err) {
+ debug('Error deregistering MQ service: ' + err);
+ return;
+ }
+
+ if (!systems.length || !systems[0]) {
+ debug('System not found: ' + mqserv.sut.name );
+ return;
+ }
+
+ let mqinfo = systems[0].mqInfo;
+
+ if (!mqinfo) {
+ debug('System does not have MQ info: ' + mqserv.sut.name );
+ return;
+ }
+
+ mqserv.basePath = `/mq/${mqinfo.manager}/${mqinfo.reqQueue}`;
- mqserv.rrpairs.forEach(function(rrpair){
- rrpair.verb = 'POST';
- rrpair.payloadType = 'XML';
- registerRRPair(mqserv, rrpair);
+ deregisterService(mqserv);
});
}
@@ -384,6 +429,7 @@ module.exports = {
deregisterRRPair: deregisterRRPair,
deregisterService: deregisterService,
registerMQService: registerMQService,
+ deregisterMQService: deregisterMQService,
registerAllMQServices: registerAllMQServices,
registerAllRRPairsForAllServices: registerAllRRPairsForAllServices
};
From da4dd6d14228ab93ab0dd31ae777183397110c86 Mon Sep 17 00:00:00 2001
From: jweeks16
Date: Wed, 20 Feb 2019 11:07:02 -0500
Subject: [PATCH 005/102] sync state for MQ services
---
app.js | 22 ++--
controllers/serviceController.js | 166 +++++++++++++++++--------------
models/common/System.js | 5 +-
models/mq/MQService.js | 1 +
routes/virtual.js | 62 ++++--------
5 files changed, 125 insertions(+), 131 deletions(-)
diff --git a/app.js b/app.js
index 3db9713d..87570dff 100644
--- a/app.js
+++ b/app.js
@@ -159,13 +159,21 @@ function init() {
const action = msg.action;
debug(action);
- virtual.deregisterService(service);
- invoke.deregisterServiceInvoke(service);
- if (action === 'register') {
- virtual.registerService(service);
-
- if(service.liveInvocation && service.liveInvocation.enabled){
- invoke.registerServiceInvoke(service);
+ if (service.type !== 'MQ') {
+ virtual.deregisterService(service);
+ invoke.deregisterServiceInvoke(service);
+ if (action === 'register') {
+ virtual.registerService(service);
+
+ if(service.liveInvocation && service.liveInvocation.enabled){
+ invoke.registerServiceInvoke(service);
+ }
+ }
+ }
+ else {
+ virtual.deregisterMQService(service);
+ if (action === 'register') {
+ virtual.registerMQService(service);
}
}
}else if(msg.recorder){
diff --git a/controllers/serviceController.js b/controllers/serviceController.js
index 50422417..4bb59525 100644
--- a/controllers/serviceController.js
+++ b/controllers/serviceController.js
@@ -658,9 +658,14 @@ function syncWorkers(service, action) {
invoke.deregisterServiceInvoke(service);
if (action === 'register') {
- virtual.registerService(service);
- if(service.liveInvocation && service.liveInvocation.enabled){
- invoke.registerServiceInvoke(service);
+ if (service.type !== 'MQ') {
+ virtual.registerService(service);
+ if(service.liveInvocation && service.liveInvocation.enabled){
+ invoke.registerServiceInvoke(service);
+ }
+ }
+ else {
+ virtual.registerMQService(service);
}
}
else {
@@ -718,11 +723,14 @@ function addService(req, res) {
}
if (type === 'MQ') {
- serv.connInfo = req.body.connInfo;
+ if (req.body.mqInfo) {
+ serv.mqInfo = req.body.mqInfo;
+ }
createService(serv,req).then(
function(service){
res.json(service);
+ syncWorkers(service, 'register');
},
// handler for db call
function(err) {
@@ -855,7 +863,7 @@ function addServiceAsDraft(req, res) {
}
if (type === 'MQ') {
- serv.connInfo = req.body.connInfo;
+ serv.mqInfo = req.body.mqInfo;
let draftservice = {mqservice:serv};
DraftService.create(draftservice, function(err, service) {
if (err) {
@@ -946,6 +954,10 @@ function updateService(req, res) {
rrpair.templatedRequests = templatedRequests;
}
}
+
+ if (req.body.mqInfo) {
+ service.mqInfo = req.body.mqInfo;
+ }
}
// save updated service in DB
@@ -956,9 +968,7 @@ function updateService(req, res) {
}
res.json(newService);
- if (service.type !== 'MQ') {
- syncWorkers(newService, 'register');
- }
+ syncWorkers(newService, 'register');
});
}else{
const query = { $or: [ { 'service._id': req.params.id }, { 'mqservice._id': req.params.id } ] };
@@ -980,80 +990,80 @@ function updateService(req, res) {
}
- function updateServiceAsDraft(req, res) {
- const query = { $or: [ { 'service._id': req.params.id }, { 'mqservice._id': req.params.id } ] };
- DraftService.findOne(query, function(err, draftservice) {
- if (err) {
- handleError(err, res, 500);
- return;
- }
- // if (draftservice.service) {
- console.log('Inside updateServiceAsDraft: ' + draftservice);
+function updateServiceAsDraft(req, res) {
+ const query = { $or: [ { 'service._id': req.params.id }, { 'mqservice._id': req.params.id } ] };
+ DraftService.findOne(query, function(err, draftservice) {
+ if (err) {
+ handleError(err, res, 500);
+ return;
+ }
+ // if (draftservice.service) {
+ console.log('Inside updateServiceAsDraft: ' + draftservice);
- if(draftservice.service){
- // don't let consumer alter name, base path, etc.
- draftservice.service.rrpairs = req.body.rrpairs;
- draftservice.service.lastUpdateUser = req.decoded;
-
- //Cache string of reqData + rspData
- if(draftservice.service.rrpairs){
- draftservice.service.rrpairs.forEach(function(rrpair){
- if(rrpair.reqData)
- rrpair.reqDataString = typeof rrpair.reqData == "string" ? rrpair.reqData : JSON.stringify(rrpair.reqData);
- if(rrpair.resData)
- rrpair.resDataString = typeof rrpair.resData == "string" ? rrpair.resData : JSON.stringify(rrpair.resData);
- });
- }
- if(req.body.liveInvocation){
- draftservice.service.liveInvocation = req.body.liveInvocation;
- }
- if (req.body.matchTemplates) {
- draftservice.service.matchTemplates = req.body.matchTemplates;
- }
-
- const delay = req.body.delay;
- if (delay || delay === 0) {
- draftservice.service.delay = req.body.delay;
- }
+ if(draftservice.service){
+ // don't let consumer alter name, base path, etc.
+ draftservice.service.rrpairs = req.body.rrpairs;
+ draftservice.service.lastUpdateUser = req.decoded;
- const delayMax = req.body.delayMax;
- if (delayMax || delayMax === 0) {
- draftservice.service.delayMax = req.body.delayMax;
- }
-
- }else {
- draftservice.mqservice.rrpairs = req.body.rrpairs;
- draftservice.mqservice.lastUpdateUser = req.decoded;
-
- //Cache string of reqData + rspData
- if(draftservice.mqservice.rrpairs){
- draftservice.mqservice.rrpairs.forEach(function(rrpair){
- if(rrpair.reqData)
- rrpair.reqDataString = typeof rrpair.reqData == "string" ? rrpair.reqData : JSON.stringify(rrpair.reqData);
- if(rrpair.resData)
- rrpair.resDataString = typeof rrpair.resData == "string" ? rrpair.resData : JSON.stringify(rrpair.resData);
- });
- }
- if(req.body.liveInvocation){
- draftservice.mqservice.liveInvocation = req.body.liveInvocation;
- }
- if (req.body.matchTemplates) {
- draftservice.mqservice.matchTemplates = req.body.matchTemplates;
- }
-
- }
+ //Cache string of reqData + rspData
+ if(draftservice.service.rrpairs){
+ draftservice.service.rrpairs.forEach(function(rrpair){
+ if(rrpair.reqData)
+ rrpair.reqDataString = typeof rrpair.reqData == "string" ? rrpair.reqData : JSON.stringify(rrpair.reqData);
+ if(rrpair.resData)
+ rrpair.resDataString = typeof rrpair.resData == "string" ? rrpair.resData : JSON.stringify(rrpair.resData);
+ });
+ }
+ if(req.body.liveInvocation){
+ draftservice.service.liveInvocation = req.body.liveInvocation;
+ }
+ if (req.body.matchTemplates) {
+ draftservice.service.matchTemplates = req.body.matchTemplates;
+ }
+
+ const delay = req.body.delay;
+ if (delay || delay === 0) {
+ draftservice.service.delay = req.body.delay;
+ }
- // save updated service in DB
- draftservice.save(function (err, newService) {
- if (err) {
- handleError(err, res, 500);
- return;
- }
- res.json(newService);
+ const delayMax = req.body.delayMax;
+ if (delayMax || delayMax === 0) {
+ draftservice.service.delayMax = req.body.delayMax;
+ }
+
+ }else {
+ draftservice.mqservice.rrpairs = req.body.rrpairs;
+ draftservice.mqservice.lastUpdateUser = req.decoded;
+
+ //Cache string of reqData + rspData
+ if(draftservice.mqservice.rrpairs){
+ draftservice.mqservice.rrpairs.forEach(function(rrpair){
+ if(rrpair.reqData)
+ rrpair.reqDataString = typeof rrpair.reqData == "string" ? rrpair.reqData : JSON.stringify(rrpair.reqData);
+ if(rrpair.resData)
+ rrpair.resDataString = typeof rrpair.resData == "string" ? rrpair.resData : JSON.stringify(rrpair.resData);
});
- });
+ }
+ if(req.body.liveInvocation){
+ draftservice.mqservice.liveInvocation = req.body.liveInvocation;
+ }
+ if (req.body.matchTemplates) {
+ draftservice.mqservice.matchTemplates = req.body.matchTemplates;
+ }
+
}
+ // save updated service in DB
+ draftservice.save(function (err, newService) {
+ if (err) {
+ handleError(err, res, 500);
+ return;
+ }
+ res.json(newService);
+ });
+ });
+}
+
function toggleService(req, res) {
Service.findById(req.params.id, function (err, service) {
if (err) {
@@ -1090,6 +1100,7 @@ function toggleService(req, res) {
}
res.json({'message': 'toggled', 'service': mqService });
+ syncWorkers(mqService, 'register');
});
});
}
@@ -1134,6 +1145,7 @@ function deleteService(req, res) {
}
});
res.json({ 'message' : 'deleted', 'id' : mqService._id });
+ syncWorkers(mqService, 'register');
});
}
});
@@ -1178,7 +1190,7 @@ function restoreService(req, res) {
running: false,
matchTemplates: archive.mqservice.matchTemplates,
rrpairs: archive.mqservice.rrpairs,
- connInfo: archive.mqservice.connInfo
+ mqInfo: archive.mqservice.mqInfo
};
createService(newMQService,req).then( function(serv) {},function (err) {
if (err) {
diff --git a/models/common/System.js b/models/common/System.js
index 3de10386..a80971f6 100644
--- a/models/common/System.js
+++ b/models/common/System.js
@@ -1,8 +1,6 @@
const mongoose = require('mongoose');
const constants = require('../../lib/util/constants');
-const MQInfo = require('../mq/MQInfo');
-
const sutSchema = new mongoose.Schema({
name: {
type : String,
@@ -11,8 +9,7 @@ const sutSchema = new mongoose.Schema({
members: {
type : Array,
default : []
- },
- mqInfo: MQInfo.schema
+ }
});
module.exports = mongoose.model('SUT', sutSchema);
diff --git a/models/mq/MQService.js b/models/mq/MQService.js
index 5caf316e..891a0041 100644
--- a/models/mq/MQService.js
+++ b/models/mq/MQService.js
@@ -22,6 +22,7 @@ const mqSchema = new mongoose.Schema({
type: String,
required: [true, constants.REQUIRED_SERVICE_TYPE_ERR]
},
+ mqInfo: MQInfo.schema,
matchTemplates: [mongoose.Schema.Types.Mixed],
rrpairs: {
type: [MQPair.schema],
diff --git a/routes/virtual.js b/routes/virtual.js
index bca8a7bd..3c8e12cd 100644
--- a/routes/virtual.js
+++ b/routes/virtual.js
@@ -1,7 +1,7 @@
const express = require('express');
const router = express.Router();
const xml2js = require('xml2js');
-const debug = require('debug')('matching');
+const debug = require('debug')('default');
const Service = require('../models/http/Service');
const MQService = require('../models/mq/MQService');
const System = require('../models/common/System');
@@ -156,7 +156,7 @@ function registerRRPair(service, rrpair) {
if (rrpair.queries) {
// try the next rr pair if no queries were sent
if (!req.query) {
- debug("expected queries in request");
+ logEvent(path, label, "expected queries in request");
return false;
}
let matchedQueries = true;
@@ -370,57 +370,33 @@ function registerAllMQServices() {
}
function registerMQService(mqserv) {
- System.find({ 'name' : mqserv.sut.name }, function(err, systems) {
- if (err) {
- debug('Error registering MQ service: ' + err);
- return;
- }
-
- if (!systems.length || !systems[0]) {
- debug('System not found: ' + mqserv.sut.name );
- return;
- }
+ let mqinfo = mqserv.mqInfo;
- let mqinfo = systems[0].mqInfo;
+ if (!mqinfo) {
+ debug('Service does not have MQ info: ' + mqserv.name);
+ return;
+ }
- if (!mqinfo) {
- debug('System does not have MQ info: ' + mqserv.sut.name );
- return;
- }
+ mqserv.basePath = `/mq/${mqinfo.manager}/${mqinfo.reqQueue}`;
- mqserv.basePath = `/mq/${mqinfo.manager}/${mqinfo.reqQueue}`;
-
- mqserv.rrpairs.forEach(function(rrpair){
- rrpair.verb = 'POST';
- rrpair.payloadType = 'XML';
- registerRRPair(mqserv, rrpair);
- });
+ mqserv.rrpairs.forEach(function(rrpair){
+ rrpair.verb = 'POST';
+ rrpair.payloadType = 'XML';
+ registerRRPair(mqserv, rrpair);
});
}
function deregisterMQService(mqserv) {
- System.find({ 'name' : mqserv.sut.name }, function(err, systems) {
- if (err) {
- debug('Error deregistering MQ service: ' + err);
- return;
- }
-
- if (!systems.length || !systems[0]) {
- debug('System not found: ' + mqserv.sut.name );
- return;
- }
+ let mqinfo = mqserv.mqInfo;
- let mqinfo = systems[0].mqInfo;
+ if (!mqinfo) {
+ debug('Service does not have MQ info: ' + mqserv.name);
+ return;
+ }
- if (!mqinfo) {
- debug('System does not have MQ info: ' + mqserv.sut.name );
- return;
- }
+ mqserv.basePath = `/mq/${mqinfo.manager}/${mqinfo.reqQueue}`;
- mqserv.basePath = `/mq/${mqinfo.manager}/${mqinfo.reqQueue}`;
-
- deregisterService(mqserv);
- });
+ deregisterService(mqserv);
}
module.exports = {
From 9aa456703d0ac73e3a5ab56a6bcb60266e75ff85 Mon Sep 17 00:00:00 2001
From: jweeks16
Date: Fri, 1 Mar 2019 09:48:09 -0500
Subject: [PATCH 006/102] failover to default values for request queue / queue
manager
---
routes/virtual.js | 30 ++++++++++++++++++++++++++++--
1 file changed, 28 insertions(+), 2 deletions(-)
diff --git a/routes/virtual.js b/routes/virtual.js
index caa27f2d..790466bf 100644
--- a/routes/virtual.js
+++ b/routes/virtual.js
@@ -374,7 +374,21 @@ function registerMQService(mqserv) {
if (!mqinfo) {
debug('Service does not have MQ info: ' + mqserv.name);
- return;
+
+ const defaultManager = process.env.DEFAULT_QUEUE_MANAGER;
+ const defaultQueue = process.env.DEFAULT_REQUEST_QUEUE;
+
+ if (!defaultManager || ! defaultQueue) {
+ debug('No default queue manager / request queue is configured');
+ return;
+ }
+
+ debug('Setting queue manager / request queue to default values: ' + defaultManager + '.' + defaultQueue);
+
+ mqInfo = {
+ manager: defaultManager,
+ reqQueue: defaultQueue
+ };
}
mqserv.basePath = `/mq/${mqinfo.manager}/${mqinfo.reqQueue}`;
@@ -391,7 +405,19 @@ function deregisterMQService(mqserv) {
if (!mqinfo) {
debug('Service does not have MQ info: ' + mqserv.name);
- return;
+
+
+ if (!defaultManager || ! defaultQueue) {
+ debug('No default queue manager / request queue is configured');
+ return;
+ }
+
+ debug('Setting queue manager / request queue to default values: ' + defaultManager + '.' + defaultQueue);
+
+ mqInfo = {
+ manager: defaultManager,
+ reqQueue: defaultQueue
+ };
}
mqserv.basePath = `/mq/${mqinfo.manager}/${mqinfo.reqQueue}`;
From 8a792a58e0adee2631baea7a07b1fa995ff7163b Mon Sep 17 00:00:00 2001
From: jweeks16
Date: Fri, 1 Mar 2019 10:03:16 -0500
Subject: [PATCH 007/102] add API route to expose MQ info
---
app.js | 3 +++
controllers/mqInfoController.js | 11 +++++++++++
routes/mqInfo.js | 7 +++++++
3 files changed, 21 insertions(+)
create mode 100644 controllers/mqInfoController.js
create mode 100644 routes/mqInfo.js
diff --git a/app.js b/app.js
index 87570dff..5e206e8e 100644
--- a/app.js
+++ b/app.js
@@ -213,6 +213,9 @@ function init() {
const users = require('./routes/users');
app.use('/api/users', users);
+ const mqinfo = require('./routes/mqInfo');
+ app.use('/api/mqinfo', mqinfo);
+
// handle no match responses
app.use(/\/((?!recording).)*/,function(req, res, next) {
if (!req.msgContainer) {
diff --git a/controllers/mqInfoController.js b/controllers/mqInfoController.js
new file mode 100644
index 00000000..199e1b91
--- /dev/null
+++ b/controllers/mqInfoController.js
@@ -0,0 +1,11 @@
+const request = require('request');
+const MQInfo = require('../models/mq/MQInfo');
+const mockiatoJmsUri = process.env.MOCKIATO_JMS_URI;
+
+function getMQInfo(req, res) {
+ res.json('STUB');
+}
+
+module.exports = {
+ getMQInfo: getMQInfo
+};
\ No newline at end of file
diff --git a/routes/mqInfo.js b/routes/mqInfo.js
new file mode 100644
index 00000000..a033a635
--- /dev/null
+++ b/routes/mqInfo.js
@@ -0,0 +1,7 @@
+const mqCtrl = require('../controllers/mqInfoController');
+const express = require('express');
+const router = express.Router();
+
+router.get('/', mqCtrl.getMQInfo);
+
+module.exports = router;
\ No newline at end of file
From 426c09602fbac0d95216d7a17f65d76a9942773c Mon Sep 17 00:00:00 2001
From: jweeks16
Date: Fri, 1 Mar 2019 10:07:40 -0500
Subject: [PATCH 008/102] add delay fields to MQ service schema
---
models/mq/MQService.js | 27 ++++++++++++++++++++++++++-
1 file changed, 26 insertions(+), 1 deletion(-)
diff --git a/models/mq/MQService.js b/models/mq/MQService.js
index 891a0041..a7a79186 100644
--- a/models/mq/MQService.js
+++ b/models/mq/MQService.js
@@ -35,13 +35,38 @@ const mqSchema = new mongoose.Schema({
lastUpdateUser:{
type: User.schema
},
+ delay: {
+ // force integer only
+ type: Number,
+ default: 0,
+ validate: {
+ validator: function (v) {
+ if (Number.isInteger(v) && v >= 0)
+ return true;
+ else return false;
+ },
+ message: '{VALUE}'+constants.NOT_VALID_INTEGER+'({PATH}).'
+ }
+ },
+ delayMax: {
+ // force integer only
+ type: Number,
+ default: 0,
+ validate: {
+ validator: function (v) {
+ if (Number.isInteger(v) && v >= 0)
+ return true;
+ else return false;
+ },
+ message: '{VALUE}'+constants.NOT_VALID_INTEGER+'({PATH}).'
+ }
+ },
txnCount: {
type: Number,
default: 0,
get: function(v) { return Math.round(v); },
set: function(v) { return Math.round(v); }
},
-
},{timestamps:{createdAt:'createdAt',updatedAt:'updatedAt'}});
mqSchema.set('usePushEach', true);
From 2a3d5c62f98c01efdf2a1e70537fe7c361f5cd69 Mon Sep 17 00:00:00 2001
From: jweeks16
Date: Fri, 1 Mar 2019 12:29:07 -0500
Subject: [PATCH 009/102] add API route to expose MQ info, contd
---
controllers/mqInfoController.js | 27 ++++++++++++++++++-
public/partials/modals/templateHelpModal.html | 1 -
2 files changed, 26 insertions(+), 2 deletions(-)
diff --git a/controllers/mqInfoController.js b/controllers/mqInfoController.js
index 199e1b91..56a2c9c5 100644
--- a/controllers/mqInfoController.js
+++ b/controllers/mqInfoController.js
@@ -1,9 +1,34 @@
const request = require('request');
const MQInfo = require('../models/mq/MQInfo');
+const debug = require('debug')('default');
const mockiatoJmsUri = process.env.MOCKIATO_JMS_URI;
function getMQInfo(req, res) {
- res.json('STUB');
+ if (!mockiatoJmsUri) {
+ debug('MOCKIATO_JMS_URI not set');
+ handleError('Could not retrieve MQ info', res, 500);
+ return;
+ }
+
+ request(mockiatoJmsUri + '/env', function(err, resp, body) {
+ if (err) {
+ debug(err);
+ handleError('Could not retrieve MQ info', res, 500);
+ return;
+ }
+
+ let data = parseInfo(body);
+
+ res.json(data);
+ });
+}
+
+function parseInfo(body) {
+ let data = JSON.parse(body);
+ let info = data['applicationConfig: [classpath:/application.yml]'];
+ let final = unflattenObject(info);
+
+ return final.mockiato.mq;
}
module.exports = {
diff --git a/public/partials/modals/templateHelpModal.html b/public/partials/modals/templateHelpModal.html
index e5b5c2e9..0fd140ed 100644
--- a/public/partials/modals/templateHelpModal.html
+++ b/public/partials/modals/templateHelpModal.html
@@ -47,7 +47,6 @@ Template structure
Conditions
-NOTE: Conditions will only work with SOAP and REST services, NOT MQ.
Conditions are tests that Mockiato can apply to specific fields during matching- for instance, Mockiato can use the 'any' condition to test only that a field is present, but not test its value, or the 'lt' condition to test that a field's value is less than a given value. This is done by filling the value of a field with a 'condition string'. This string can contain one or more conditions, separated by a semicolon, ";". The argument passed to the condition is seperated by a colon, ":". A field is only considered matched if ALL conditions provided are matched.
From a25b3dec662065155cde62a0ca232361078646f4 Mon Sep 17 00:00:00 2001
From: jweeks16
Date: Fri, 1 Mar 2019 12:38:21 -0500
Subject: [PATCH 010/102] remove unused import
---
controllers/mqInfoController.js | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/controllers/mqInfoController.js b/controllers/mqInfoController.js
index 56a2c9c5..8dbda566 100644
--- a/controllers/mqInfoController.js
+++ b/controllers/mqInfoController.js
@@ -1,6 +1,5 @@
const request = require('request');
-const MQInfo = require('../models/mq/MQInfo');
-const debug = require('debug')('default');
+const debug = require('debug')('default');
const mockiatoJmsUri = process.env.MOCKIATO_JMS_URI;
function getMQInfo(req, res) {
From ad343dbef03c627101ebb9a7207c298dabb93bdd Mon Sep 17 00:00:00 2001
From: jweeks16
Date: Mon, 4 Mar 2019 13:25:32 -0500
Subject: [PATCH 011/102] failover to default values for queue manager /
request queue, contd
---
controllers/mqInfoController.js | 13 +++++++++----
routes/virtual.js | 12 +++++++-----
2 files changed, 16 insertions(+), 9 deletions(-)
diff --git a/controllers/mqInfoController.js b/controllers/mqInfoController.js
index 8dbda566..772ce655 100644
--- a/controllers/mqInfoController.js
+++ b/controllers/mqInfoController.js
@@ -23,11 +23,16 @@ function getMQInfo(req, res) {
}
function parseInfo(body) {
- let data = JSON.parse(body);
- let info = data['applicationConfig: [classpath:/application.yml]'];
- let final = unflattenObject(info);
+ let obj = JSON.parse(body);
+ let info = unflattenObject(obj['applicationConfig: [classpath:/application.yml]']);
+ let final = info.mockiato.mq;
- return final.mockiato.mq;
+ final.defaults = {
+ manager: process.env.DEFAULT_QUEUE_MANAGER,
+ reqQueue: process.env.DEFAULT_REQUEST_QUEUE
+ };
+
+ return final;
}
module.exports = {
diff --git a/routes/virtual.js b/routes/virtual.js
index 790466bf..3de78146 100644
--- a/routes/virtual.js
+++ b/routes/virtual.js
@@ -383,9 +383,9 @@ function registerMQService(mqserv) {
return;
}
- debug('Setting queue manager / request queue to default values: ' + defaultManager + '.' + defaultQueue);
+ debug('Setting queue manager / request queue to default values: ' + defaultManager + '/' + defaultQueue);
- mqInfo = {
+ mqinfo = {
manager: defaultManager,
reqQueue: defaultQueue
};
@@ -405,16 +405,18 @@ function deregisterMQService(mqserv) {
if (!mqinfo) {
debug('Service does not have MQ info: ' + mqserv.name);
-
+ const defaultManager = process.env.DEFAULT_QUEUE_MANAGER;
+ const defaultQueue = process.env.DEFAULT_REQUEST_QUEUE;
+
if (!defaultManager || ! defaultQueue) {
debug('No default queue manager / request queue is configured');
return;
}
- debug('Setting queue manager / request queue to default values: ' + defaultManager + '.' + defaultQueue);
+ debug('Setting queue manager / request queue to default values: ' + defaultManager + '/' + defaultQueue);
- mqInfo = {
+ mqinfo = {
manager: defaultManager,
reqQueue: defaultQueue
};
From 8dd8bd6f749a648418013f4742d19dfa077ccf29 Mon Sep 17 00:00:00 2001
From: jweeks16
Date: Mon, 4 Mar 2019 13:42:19 -0500
Subject: [PATCH 012/102] implement txn counts for MQ services
---
public/js/app/controllers.js | 10 ++++++----
public/js/app/factories.js | 20 ++++++++++++++++++++
routes/invoke.js | 8 +++++++-
3 files changed, 33 insertions(+), 5 deletions(-)
diff --git a/public/js/app/controllers.js b/public/js/app/controllers.js
index e1bfdc9a..e4e5fc9d 100644
--- a/public/js/app/controllers.js
+++ b/public/js/app/controllers.js
@@ -27,8 +27,8 @@ var ctrl = angular.module("mockapp.controllers", ['mockapp.services', 'mockapp.f
};
}])
- .controller("myMenuAppController", ['$scope', 'apiHistoryService', 'sutService', 'authService', 'suggestionsService', 'helperFactory', 'ctrlConstants','modalService',
- function ($scope, apiHistoryService, sutService, authService, suggestionsService, helperFactory, ctrlConstants,modalService) {
+ .controller("myMenuAppController", ['$scope', 'apiHistoryService', 'sutService', 'authService', 'suggestionsService', 'helperFactory', 'ctrlConstants','modalService', 'mqInfoFactory',
+ function ($scope, apiHistoryService, sutService, authService, suggestionsService, helperFactory, ctrlConstants, modalService, mqInfoFactory) {
$scope.myUser = authService.getUserInfo().username;
$scope.sutlist = sutService.getGroupsByUser($scope.myUser);
$scope.servicevo = {};
@@ -50,6 +50,7 @@ var ctrl = angular.module("mockapp.controllers", ['mockapp.services', 'mockapp.f
$scope.statusCodes = suggestionsService.getStatusCodes();
$scope.possibleHeaders = suggestionsService.getPossibleHeaders();
+ $scope.mqServers = mqInfoFactory.getMQInfo().servers;
$scope.addFailStatus = function () {
$scope.servicevo.failStatuses.push({ val: '' });
@@ -1321,11 +1322,12 @@ var ctrl = angular.module("mockapp.controllers", ['mockapp.services', 'mockapp.f
});
$scope.pollForRRPairs();
}])
- .controller("updateController", ['$scope', '$q', '$http', '$routeParams', 'apiHistoryService', 'feedbackService', 'suggestionsService', 'helperFactory', 'ctrlConstants', 'sutService', 'authService', "$location",'modalService',
- function ($scope, $q, $http, $routeParams, apiHistoryService, feedbackService, suggestionsService, helperFactory, ctrlConstants, sutService, authService, $location,modalService) {
+ .controller("updateController", ['$scope', '$q', '$http', '$routeParams', 'apiHistoryService', 'feedbackService', 'suggestionsService', 'helperFactory', 'ctrlConstants', 'sutService', 'authService', "$location",'modalService', 'mqInfoFactory',
+ function ($scope, $q, $http, $routeParams, apiHistoryService, feedbackService, suggestionsService, helperFactory, ctrlConstants, sutService, authService, $location, modalService, mqInfoFactory) {
$scope.statusCodes = suggestionsService.getStatusCodes();
$scope.possibleHeaders = suggestionsService.getPossibleHeaders();
+ $scope.mqServers = mqInfoFactory.getMQInfo().servers;
this.getService = function () {
apiHistoryService.getServiceById($routeParams.id)
diff --git a/public/js/app/factories.js b/public/js/app/factories.js
index 21ffcd26..bffb20d5 100644
--- a/public/js/app/factories.js
+++ b/public/js/app/factories.js
@@ -187,6 +187,26 @@ fact.factory('statusCodesFactory', ['$http', function($http) {
};
}]);
+fact.factory('mqInfoFactory', ['$http', function($http) {
+ return {
+ getMQInfo: function() {
+ var mqInfo = {};
+
+ $http.get('/api/mqinfo')
+
+ .then(function(response) {
+ mqInfo = response.data;
+ })
+
+ .catch(function(err) {
+ console.log(err);
+ });
+
+ return mqInfo;
+ }
+ };
+}]);
+
//Below function is complex one. Any change will break Duplicate Req check. - Pradeep
fact.factory('helperFactory', [function () {
return {
diff --git a/routes/invoke.js b/routes/invoke.js
index 1831dd1b..9d06dc73 100644
--- a/routes/invoke.js
+++ b/routes/invoke.js
@@ -3,6 +3,7 @@ const router = express.Router();
const removeRoute = require('../lib/remove-route');
const requestNode = require('request');
const Service = require('../models/http/Service');
+const MQService = require('../models/mq/MQService');
const timeBetweenTransactionUpdates = process.env.MOCKIATO_TRANSACTON_UPDATE_TIME || 5000;
var transactions = {};
@@ -26,7 +27,12 @@ function saveTransactonCounts(){
var myTransactions = transactions;
transactions = {};
for(let id in myTransactions){
- Service.findByIdAndUpdate(id,{$inc:{txnCount:myTransactions[id]}}).exec();
+ let q = {$inc:{txnCount:myTransactions[id]}};
+ Service.findByIdAndUpdate(id, q, function(err, serv) {
+ if (!serv) {
+ MQService.findByIdAndUpdate(id,q).exec();
+ }
+ });
}
setTimeout(saveTransactonCounts,timeBetweenTransactionUpdates);
}
From ed4bf67f5c399bdab139ce3023882e129037357a Mon Sep 17 00:00:00 2001
From: Legeyt
Date: Fri, 8 Mar 2019 12:15:02 -0600
Subject: [PATCH 013/102] Added 404 for deleting an unknown service
---
controllers/serviceController.js | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/controllers/serviceController.js b/controllers/serviceController.js
index 8903178a..f21bc4b1 100644
--- a/controllers/serviceController.js
+++ b/controllers/serviceController.js
@@ -1437,8 +1437,11 @@ function deleteDraftService(req, res) {
handleError(err, res, 500);
return;
}
- if(draft.service) res.json({ 'message' : 'deleted', 'id' : draft.service._id });
- else if(draft.mqservice) res.json({ 'message' : 'deleted', 'id' : draft.mqservice._id });
+ if(draft && draft.service) res.json({ 'message' : 'deleted', 'id' : draft.service._id });
+ else if(draft && draft.mqservice) res.json({ 'message' : 'deleted', 'id' : draft.mqservice._id });
+ else{
+ handleError({error:"Draft service not found"},res,404);
+ }
});
}
From 23e8fb9f734f7fd25d1992c83a7ab2e3adfa0758 Mon Sep 17 00:00:00 2001
From: Legeyt
Date: Fri, 8 Mar 2019 12:24:46 -0600
Subject: [PATCH 014/102] Added 404's for other deletes
---
controllers/serviceController.js | 27 +++++++++++++++++----------
1 file changed, 17 insertions(+), 10 deletions(-)
diff --git a/controllers/serviceController.js b/controllers/serviceController.js
index f21bc4b1..f15b5a8e 100644
--- a/controllers/serviceController.js
+++ b/controllers/serviceController.js
@@ -1095,14 +1095,18 @@ function deleteService(req, res) {
else {
MQService.findOneAndRemove({ _id: req.params.id }, function(error, mqService) {
if (error) debug(error);
- mqService.running=false;
- let archive = {mqservice:mqService};
- Archive.create(archive, function (err, callback) {
- if (err) {
- handleError(err, res, 500);
- }
- });
- res.json({ 'message' : 'deleted', 'id' : mqService._id });
+ if(mqService){
+ mqService.running=false;
+ let archive = {mqservice:mqService};
+ Archive.create(archive, function (err, callback) {
+ if (err) {
+ handleError(err, res, 500);
+ }
+ });
+ res.json({ 'message' : 'deleted', 'id' : mqService._id });
+ }else{
+ handleError({error:"Service not found"},res,404);
+ }
});
}
});
@@ -1423,8 +1427,11 @@ function permanentDeleteService(req, res) {
handleError(err, res, 500);
return;
}
- if(archive.service) res.json({ 'message' : 'deleted', 'id' : archive.service._id });
- else if(archive.mqservice) res.json({ 'message' : 'deleted', 'id' : archive.mqservice._id });
+ if(archive && archive.service) res.json({ 'message' : 'deleted', 'id' : archive.service._id });
+ else if(archive && archive.mqservice) res.json({ 'message' : 'deleted', 'id' : archive.mqservice._id });
+ else{
+ handleError({error:"Archive service not found"},res,404);
+ }
});
}
From 186a25c68c9503149d5bb695287c07001bc48667 Mon Sep 17 00:00:00 2001
From: Legeyt
Date: Fri, 8 Mar 2019 13:02:26 -0600
Subject: [PATCH 015/102] Added 404 to getArchive if service does not exist.
---
controllers/serviceController.js | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/controllers/serviceController.js b/controllers/serviceController.js
index f15b5a8e..837f9a64 100644
--- a/controllers/serviceController.js
+++ b/controllers/serviceController.js
@@ -361,8 +361,10 @@ function getArchiveServiceInfo(req, res) {
return;
}
- if (services) {
+ if (services && services.length) {
return res.json(services[0]);
+ }else{
+ handleError({error:"Archive service not found"},res,404);
}
});
}
From c34b435a072c02dfc76788f93f47e9166ac53c16 Mon Sep 17 00:00:00 2001
From: Legeyt
Date: Fri, 8 Mar 2019 13:07:06 -0600
Subject: [PATCH 016/102] Added draft tests
---
tests/test-draft.js | 107 +++++++++++++++++++++++++++++++++++++-------
1 file changed, 90 insertions(+), 17 deletions(-)
diff --git a/tests/test-draft.js b/tests/test-draft.js
index bda4eafa..c1ae90b2 100644
--- a/tests/test-draft.js
+++ b/tests/test-draft.js
@@ -7,8 +7,9 @@ const www = require('../bin/www');
-let id;
+let id, draftId;
let token = '?token=';
+let draftService;
const service = require("./resources/Draft/Draft_Test_Service.json");
const testReq = require("./resources/Draft/draft_test-req.json");
@@ -59,26 +60,85 @@ describe('Search and Get Tests', function() {
.expect(200)
.end(done);
});
- it('Creates the tested service', function(done) {
+
+
+
+ });
+
+ describe('Draft and Archive',function(){
+ it('Creates the draft service', function(done) {
request
- .post('/api/services' + token)
+ .post('/api/services/draftservice' + token)
+ .send(service)
+ .expect(200)
+ .expect(function(res){
+ draftId = res.body.service._id;
+ })
+ .end(done);
+ });
+ it('Updates the draft service',function(done){
+ request
+ .put('/api/services/draftservice/' + draftId + token)
.send(service)
+ .expect(200,done);
+ });
+ it('Gets the draft service', function(done) {
+ request
+ .get('/api/services/draft/' + draftId)
+
+ .expect(200)
+ .expect(function(res){
+ draftService = res.body.service;
+ draftService.basePath = draftService.basePath.slice(1 + mockGroup.name.length);
+ })
+ .end(done);
+ });
+ it('Gets the draft service via user',function(done){
+ request
+ .get('/api/services/user/' + mockUser.username + '/draft')
+ .expect(200)
+ .expect(function(res){
+ if(!Array.isArray(res.body) || res.body.length <= 0){
+ throw new Error("No results returned.");
+ }
+
+ })
+ .end(done);
+ });
+
+ it('Gets the draft service via sut',function(done){
+ request
+ .get('/api/services/sut/' + mockGroup.name + '/draft')
+ .expect(200)
+ .expect(function(res){
+ if(!Array.isArray(res.body) || res.body.length <= 0){
+ throw new Error("No results returned.");
+ }
+ })
+ .end(done);
+ });
+ it('Publishes draft service',function(done){
+ request
+ .post('/api/services' + token)
+ .send(draftService)
.expect(200)
.expect(function(res){
id = res.body._id;
})
.end(done);
+
});
- it('Ensures the service works',function(done){
+ it('Deletes the draft service',function(done){
+ request
+ .delete('/api/services/draft/' + draftId + token)
+ .expect(200,done);
+ });
+ it('Ensures the service works',function(done){
request
.post('/virtual/' + mockGroup.name + service.basePath)
.send(testReq)
.expect(200,done);
});
-
- });
-
- describe('Draft and Archive',function(){
it('Archives the service',function(done){
request
.delete('/api/services/' + id + token)
@@ -137,7 +197,7 @@ describe('Search and Get Tests', function() {
})
.end(done);
});
- /*it('Starts the service',function(done){
+ it('Starts the service',function(done){
request
.post('/api/services/' + id + '/toggle' + token)
.expect(200)
@@ -148,16 +208,29 @@ describe('Search and Get Tests', function() {
.post('/virtual/' + mockGroup.name + service.basePath)
.send(testReq)
.expect(200,done);
- });*/
- });
-
- describe('Cleanup', function() {
- /*it('Deletes the service', function(done) {
+ });
+ it('Archives the service',function(done){
request
.delete('/api/services/' + id + token)
- .expect(200)
- .end(done);
- });*/
+ .expect(function(res){
+ id = res.body.id;
+ console.log(res.body);
+ })
+ .expect(200,done);
+ });
+ it('Permanently deletes the service',function(done){
+ request
+ .delete('/api/services/archive/' + id + token)
+ .expect(200,done);
+ });
+ it('Ensures the service is permanently deleted',function(done){
+ request
+ .get('/api/services/archive/' + id)
+ .expect(404,done);
+ });
+ });
+
+ describe('Cleanup', function() {
it('Deletes group', function(done) {
request
.delete('/api/systems/' + mockGroup.name + token)
From 54f1dcfa5872c0a4a184a57ce95ff11f078a5a7b Mon Sep 17 00:00:00 2001
From: Legeyt
Date: Fri, 8 Mar 2019 14:00:54 -0600
Subject: [PATCH 017/102] Fixd case sensitivity issue
---
controllers/serviceController.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/controllers/serviceController.js b/controllers/serviceController.js
index 837f9a64..79a6779f 100644
--- a/controllers/serviceController.js
+++ b/controllers/serviceController.js
@@ -63,7 +63,7 @@ function createService(serv,req){
serv.sut = system; //Make sure service has full system info, including proper ID!
performCreate();
}else{
- reject(new Error(constants.USER_NOT_AUTHORIZED_ERR));
+ reject(constants.USER_NOT_AUTHORIZED_ERR);
}
});
@@ -1232,7 +1232,7 @@ function specUpload(req, res) {
}
function publishExtractedRRPairs(req, res) {
- const type = req.query.type;
+ const type = req.query.type.toUpperCase();
const base = req.query.url;
const name = req.query.name;
const sut = { name: req.query.group };
From 102df73c7917a243031ce800369da8b4d0634baf Mon Sep 17 00:00:00 2001
From: Legeyt
Date: Fri, 8 Mar 2019 14:01:07 -0600
Subject: [PATCH 018/102] Removed trace
---
tests/test-draft.js | 1 -
1 file changed, 1 deletion(-)
diff --git a/tests/test-draft.js b/tests/test-draft.js
index c1ae90b2..b07f385f 100644
--- a/tests/test-draft.js
+++ b/tests/test-draft.js
@@ -214,7 +214,6 @@ describe('Search and Get Tests', function() {
.delete('/api/services/' + id + token)
.expect(function(res){
id = res.body.id;
- console.log(res.body);
})
.expect(200,done);
});
From a56b2748d28800380be4d5ca29dfd755b5a5129a Mon Sep 17 00:00:00 2001
From: Legeyt
Date: Mon, 11 Mar 2019 09:55:10 -0500
Subject: [PATCH 019/102] Bulk upload test start
---
tests/test-bulk.js | 110 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 110 insertions(+)
create mode 100644 tests/test-bulk.js
diff --git a/tests/test-bulk.js b/tests/test-bulk.js
new file mode 100644
index 00000000..505346e8
--- /dev/null
+++ b/tests/test-bulk.js
@@ -0,0 +1,110 @@
+const app = require('../app');
+const request = require('supertest').agent(app);
+const fs = require('fs');
+const test = require('./test-recorder.js');
+
+
+
+
+let id, filename;
+let token = '?token=';
+
+const bulkZip = fs.readFileSync("./tests/resources/bulk/bulk.zip");
+
+
+const mockUser = {
+ username: getRandomString(),
+ mail: getRandomString() + '@noreply.com',
+ password: getRandomString()
+}
+
+const mockGroup = {
+ name: getRandomString()
+};
+
+function getRandomString() {
+ return Math.random().toString(36).substring(2, 15);
+}
+
+
+
+describe('Bulk Upload Tests', function() {
+ this.timeout(15000);
+
+
+ describe('Setup', function() {
+ it('Registers User', function(done) {
+ request
+ .post('/register')
+ .send(mockUser)
+ .expect(302)
+ .end(done);
+ });
+ it('Gets the token', function(done) {
+ request
+ .post('/api/login')
+ .send({ username: mockUser.username, password: mockUser.password })
+ .expect(200)
+ .expect(function(res) {
+ token = token + res.body.token;
+ }).end(done);
+ });
+ it('Creates a group', function(done) {
+ request
+ .post('/api/systems' + token)
+ .send(mockGroup)
+ .expect(200)
+ .end(done);
+ });
+
+
+
+ });
+
+ describe('Bulk upload',function(){
+ it('Sends zip to application',function(done){
+ request
+ .post('/api/services/fromPairs/upload' + token)
+ .attach('zipFile','./tests/resources/bulk/bulk.zip')
+ .expect(200)
+ .expect(function(res){
+ filename = res.body;
+ console.log('/api/services/fromPairs/publish?type=REST&group=' + mockGroup.name + '&uploaded_file_name_id=' + filename + '&url=eligibility/v1&name=TestName&' + token.slice(1));
+ })
+ .end(done);
+ });
+ it('Publishes the service',function(done){
+ setTimeout(function(){
+ request
+ .post('/api/services/fromPairs/publish?type=REST&group=' + mockGroup.name + '&uploaded_file_name_id=' + filename + '&url=eligibility/v1&name=TestName&' + token.slice(1))
+ .expect(200)
+ .expect(function(res){
+ console.log(res.body);
+ id = res.body._id;
+ })
+ .end(done);
+ },1000);
+ });
+
+ });
+
+
+ describe('Cleanup', function() {
+ /*it('Deletes group', function(done) {
+ request
+ .delete('/api/systems/' + mockGroup.name + token)
+ .expect(200)
+ .end(done);
+ });*/
+ /*it('Deletes user', function(done) {
+ request
+ .delete('/api/users/' + mockUser.username + token)
+ .expect(200)
+ .end(done);
+ });*/
+
+ });
+
+
+});
+
From 3dc8d2e24186dbe41d33482dea1a612df9fc7d40 Mon Sep 17 00:00:00 2001
From: Legeyt
Date: Mon, 11 Mar 2019 10:00:00 -0500
Subject: [PATCH 020/102] Removed unused utilities
---
lib/util/index.js | 55 -----------------------------------------------
1 file changed, 55 deletions(-)
diff --git a/lib/util/index.js b/lib/util/index.js
index f0c58897..d1fcea03 100644
--- a/lib/util/index.js
+++ b/lib/util/index.js
@@ -66,61 +66,6 @@ global.flattenObject = (function (isArray, wrapped) {
}
}(Array.isArray, Object));
-global.unflattenObject = function(table) {
- var result = {};
-
- for (var path in table) {
- var cursor = result, length = path.length, property = "", index = 0;
-
- while (index < length) {
- var char = path.charAt(index);
-
- if (char === "[") {
- var start = index + 1,
- end = path.indexOf("]", start),
- cursor = cursor[property] = cursor[property] || [],
- property = path.slice(start, end),
- index = end + 1;
- } else {
- var cursor = cursor[property] = cursor[property] || {},
- start = char === "." ? index + 1 : index,
- bracket = path.indexOf("[", start),
- dot = path.indexOf(".", start);
-
- if (bracket < 0 && dot < 0) var end = index = length;
- else if (bracket < 0) var end = index = dot;
- else if (dot < 0) var end = index = bracket;
- else var end = index = bracket < dot ? bracket : dot;
-
- var property = path.slice(start, end);
- }
- }
-
- cursor[property] = table[path];
- }
-
- return result[""];
-};
-
-// function to read all files in directory
-global.readFiles = function(dirname, onFileContent, onError) {
- fs.readdir(dirname, function(err, filenames) {
- if (err) {
- onError(err);
- return;
- }
- filenames.forEach(function(filename) {
- fs.readFile(dirname + filename, 'utf-8', function(err, content) {
- if (err) {
- onError(err);
- return;
- }
- onFileContent(filename, content);
- });
- });
- });
-};
-
global.tokenMiddleware = function(req, res, next) {
res.set('Content-Type', 'application/json');
if (req.method === 'GET') return next();
From bd303b11ceeca038b682a1192929d475f4458515 Mon Sep 17 00:00:00 2001
From: jweeks16
Date: Tue, 12 Mar 2019 10:14:40 -0400
Subject: [PATCH 021/102] UI components to select MQ manager / request queue
---
public/js/app/controllers.js | 34 +++++++++++++++++++++++++++++++--
public/js/app/factories.js | 14 +-------------
public/js/app/services.js | 1 +
public/partials/addapiform.html | 14 +++++++++++++-
public/partials/updateForm.html | 9 +++++++++
5 files changed, 56 insertions(+), 16 deletions(-)
diff --git a/public/js/app/controllers.js b/public/js/app/controllers.js
index e4e5fc9d..ceaa7b84 100644
--- a/public/js/app/controllers.js
+++ b/public/js/app/controllers.js
@@ -50,7 +50,30 @@ var ctrl = angular.module("mockapp.controllers", ['mockapp.services', 'mockapp.f
$scope.statusCodes = suggestionsService.getStatusCodes();
$scope.possibleHeaders = suggestionsService.getPossibleHeaders();
- $scope.mqServers = mqInfoFactory.getMQInfo().servers;
+
+ mqInfoFactory.getMQInfo()
+ .then(function(response) {
+ var mqServers = [];
+ var servers = response.data.servers;
+
+ var c = 0;
+ servers.forEach(function(server) {
+ server.queues.forEach(function(queuePair) {
+ mqServers.push({
+ id: c++,
+ manager: server.manager,
+ reqQueue: queuePair.reqQueue
+ });
+ });
+ });
+
+ console.log(mqServers);
+ $scope.mqServers = mqServers;
+ })
+
+ .catch(function(err) {
+ console.log(err);
+ });
$scope.addFailStatus = function () {
$scope.servicevo.failStatuses.push({ val: '' });
@@ -1327,7 +1350,14 @@ var ctrl = angular.module("mockapp.controllers", ['mockapp.services', 'mockapp.f
$scope.statusCodes = suggestionsService.getStatusCodes();
$scope.possibleHeaders = suggestionsService.getPossibleHeaders();
- $scope.mqServers = mqInfoFactory.getMQInfo().servers;
+ mqInfoFactory.getMQInfo()
+ .then(function(response) {
+ $scope.mqServers = response.data.servers;
+ })
+
+ .catch(function(err) {
+ console.log(err);
+ });
this.getService = function () {
apiHistoryService.getServiceById($routeParams.id)
diff --git a/public/js/app/factories.js b/public/js/app/factories.js
index bffb20d5..6c63cf92 100644
--- a/public/js/app/factories.js
+++ b/public/js/app/factories.js
@@ -190,19 +190,7 @@ fact.factory('statusCodesFactory', ['$http', function($http) {
fact.factory('mqInfoFactory', ['$http', function($http) {
return {
getMQInfo: function() {
- var mqInfo = {};
-
- $http.get('/api/mqinfo')
-
- .then(function(response) {
- mqInfo = response.data;
- })
-
- .catch(function(err) {
- console.log(err);
- });
-
- return mqInfo;
+ return $http.get('/api/mqinfo');
}
};
}]);
diff --git a/public/js/app/services.js b/public/js/app/services.js
index 1b81da4f..f886110b 100644
--- a/public/js/app/services.js
+++ b/public/js/app/services.js
@@ -382,6 +382,7 @@ var serv = angular.module('mockapp.services',['mockapp.factories'])
var servData = {
sut: { name: servicevo.sut.name },
+ mqInfo: servicevo.mqInfo,
name: servicevo.name,
basePath: '/' + servicevo.basePath,
type: servicevo.type,
diff --git a/public/partials/addapiform.html b/public/partials/addapiform.html
index 89811e88..dd558aaa 100644
--- a/public/partials/addapiform.html
+++ b/public/partials/addapiform.html
@@ -31,6 +31,15 @@ Mock a REST, SOAP or MQ Service
+
+
-
+
+
Name:
From 63940d50a84c274b651f297586590bae77be993d Mon Sep 17 00:00:00 2001
From: Legeyt
Date: Tue, 12 Mar 2019 13:30:13 -0500
Subject: [PATCH 022/102] Added header force test, bulk tests
---
tests/test-bulk.js | 26 ++++++++++++++++++--------
tests/test-invoke.js | 11 +++++++++++
2 files changed, 29 insertions(+), 8 deletions(-)
diff --git a/tests/test-bulk.js b/tests/test-bulk.js
index 505346e8..50fb36a6 100644
--- a/tests/test-bulk.js
+++ b/tests/test-bulk.js
@@ -10,7 +10,7 @@ let id, filename;
let token = '?token=';
const bulkZip = fs.readFileSync("./tests/resources/bulk/bulk.zip");
-
+const req = require("./resources/bulk/bulk_post.json");
const mockUser = {
username: getRandomString(),
@@ -69,8 +69,7 @@ describe('Bulk Upload Tests', function() {
.expect(200)
.expect(function(res){
filename = res.body;
- console.log('/api/services/fromPairs/publish?type=REST&group=' + mockGroup.name + '&uploaded_file_name_id=' + filename + '&url=eligibility/v1&name=TestName&' + token.slice(1));
- })
+ })
.end(done);
});
it('Publishes the service',function(done){
@@ -79,29 +78,40 @@ describe('Bulk Upload Tests', function() {
.post('/api/services/fromPairs/publish?type=REST&group=' + mockGroup.name + '&uploaded_file_name_id=' + filename + '&url=eligibility/v1&name=TestName&' + token.slice(1))
.expect(200)
.expect(function(res){
- console.log(res.body);
id = res.body._id;
})
.end(done);
},1000);
});
+ it('Tests the get request',function(done){
+ request
+ .get('/virtual/' + mockGroup.name + '/eligibility/v1/details/465039173')
+ .expect(200,done);
+ });
+ it('Tests the post request',function(done){
+ request
+ .post('/virtual/' + mockGroup.name + '/eligibility/v1/search')
+ .set('content-type','application/json')
+ .send(req)
+ .expect(200,done);
+ });
});
describe('Cleanup', function() {
- /*it('Deletes group', function(done) {
+ it('Deletes group', function(done) {
request
.delete('/api/systems/' + mockGroup.name + token)
.expect(200)
.end(done);
- });*/
- /*it('Deletes user', function(done) {
+ });
+ it('Deletes user', function(done) {
request
.delete('/api/users/' + mockUser.username + token)
.expect(200)
.end(done);
- });*/
+ });
});
diff --git a/tests/test-invoke.js b/tests/test-invoke.js
index e51ab82e..5a7a1a14 100644
--- a/tests/test-invoke.js
+++ b/tests/test-invoke.js
@@ -95,6 +95,17 @@ describe('Live Invocation Tests', function() {
.expect('_mockiato-is-live-backend','true')
.end(done);
+ });
+ it('Tests header forcing no-invoke',function(done){
+ request
+ .post('/virtual/' + mockGroup.name + service.basePath)
+ .set('content-type','application/json')
+ .set('_mockiato-use-live','false')
+ .send(requests[0])
+ .expect(200)
+ .expect('_mockiato-is-live-backend','false')
+ .end(done);
+
});
it('Tests failover on status code',function(done){
request
From 492fddc1e2d40fbf2fdbbea06d40e00d95d01dcb Mon Sep 17 00:00:00 2001
From: Legeyt
Date: Tue, 12 Mar 2019 13:33:21 -0500
Subject: [PATCH 023/102] Test data updates to cover more code
---
tests/resources/Draft/Draft_Test_Service.json | 4 +---
.../Recorder/Record_Test_Base_Service.json | 4 ++--
tests/resources/bulk/bulk.zip | Bin 4025 -> 4000 bytes
tests/resources/bulk/bulk_post.json | 12 ++++++++++++
4 files changed, 15 insertions(+), 5 deletions(-)
create mode 100644 tests/resources/bulk/bulk_post.json
diff --git a/tests/resources/Draft/Draft_Test_Service.json b/tests/resources/Draft/Draft_Test_Service.json
index 688da767..aeed19cb 100644
--- a/tests/resources/Draft/Draft_Test_Service.json
+++ b/tests/resources/Draft/Draft_Test_Service.json
@@ -30,6 +30,7 @@
"reqHeaders": {
"Content-Type": "application/json"
},
+ "label":"DraftRsp",
"reqData": {
"test": "one",
"test2:": true,
@@ -38,9 +39,6 @@
"innerTest:": "testo",
"innterTest2:": "testooo"
}
- },
- "resHeaders": {
- "Content-Type": "application/json"
},
"resData": {
"response": "This is a virtual response"
diff --git a/tests/resources/Recorder/Record_Test_Base_Service.json b/tests/resources/Recorder/Record_Test_Base_Service.json
index 93c4bf03..470f16ac 100644
--- a/tests/resources/Recorder/Record_Test_Base_Service.json
+++ b/tests/resources/Recorder/Record_Test_Base_Service.json
@@ -29,8 +29,8 @@
},
"running": true,
"txnCount": 0,
- "delayMax": 0,
- "delay": 0,
+ "delayMax": 200,
+ "delay": 100,
"rrpairs": [
{
"verb": "POST",
diff --git a/tests/resources/bulk/bulk.zip b/tests/resources/bulk/bulk.zip
index 42b67fd9cb5fc550a0b8e46a38ae2706755430e4..1f1cf45843d6551acc3030fb40490dc378c3de53 100644
GIT binary patch
delta 368
zcmdlfzd&9*z?+#xgn@~HgJD`wwx8o)`xFTV1_rT-;uaI*WLVB-{3ny7>8w1^C3V5#>
zc6_*Ntew+$|GVLzo2L3t@*F;dYU{gBeETJg`=dya9c%5}Mt1WRF8eMrNq=Hq{vhC_
z%c{-AC)SwR-#$41jBMfVT@S+qODw|{tJf`AtbI{`E?;gzPxA$-&DV5QEA#vh{P0Z5
zW~$}*R;9b**u0es--}C27H_!tYGKl@$9v}f?cknsL?sU7#mPGS5}P-1b29Owcysaz
zULUpxT0Z|}Z%mfrlLPyAvJIaUW8%bay~*|bJZukcwE6wJF?l+loC0bXFfeE{r~pF)
o1QdXHGS}pNT)LAv_;}a^ep!0}^@#A>FxE~Et<8
delta 412
zcmZ1=zf)d1z?+#xgn@~HgJG8&qi@D7hMnpR3=FD3tUdW4ubxP8Id9+v|Fb83&ikA?
zb5dvJ6@B9?6a8dawgXjf%-7@M%k1S1*+@x|P
zTlYxtiA<3#sZ4S)%awk*8Lv4}F4OF+s=V^tImOLUe{-1YjY^MveYC6E@xqdbFLhQj
z-}T(>%d66x{~F$iOrB}=r-c2%UeD{pmXJ85Y`NxSMm{-tkT(-dztp|tWMJ^u00s(!3ecY*
zpa8@Lz#vkeoXRK6c44AGF;Gh#pPT|}fS_wx#5H+6m+s{EygY0IO_S17mQVi8XTvm&
R8z`zaIiBB|Z9Ol@bO7^kk_7+&
diff --git a/tests/resources/bulk/bulk_post.json b/tests/resources/bulk/bulk_post.json
new file mode 100644
index 00000000..6c96100e
--- /dev/null
+++ b/tests/resources/bulk/bulk_post.json
@@ -0,0 +1,12 @@
+
+
+{
+ "andParams": {
+ "firstName" : "Emmett",
+ "lastName" : "Smith",
+ "socialSecurityNumber" : "158-69-5844",
+ "birthDate" : "1984-12-01",
+ "identifier" : "8744287",
+ "active": true
+ }
+}
From 978f1cfe78bd4136cb1818155f58738be76cd466 Mon Sep 17 00:00:00 2001
From: Legeyt
Date: Tue, 12 Mar 2019 14:07:03 -0500
Subject: [PATCH 024/102] Added group get + update tests
---
tests/test.js | 20 +++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)
diff --git a/tests/test.js b/tests/test.js
index 7c11d621..2086fa43 100644
--- a/tests/test.js
+++ b/tests/test.js
@@ -9,6 +9,7 @@ const www = require('../bin/www');
let id = '';
let token = '?token=';
+let group;
const resource = '/api/services';
const oasService = './api-docs.yml';
@@ -105,7 +106,24 @@ describe('API tests', function() {
.end(done);
});
});
-
+ describe('Get group and update',function(){
+ it('Gets the group',function(done){
+ request
+ .get('/api/systems/' + mockGroup.name)
+ .expect(200)
+ .expect(function(rsp){
+ group = rsp.body;
+ })
+ .end(done);
+ });
+ it('Updates the group',function(done){
+ request
+ .put('/api/systems/' + mockGroup.name + token)
+ .send(group)
+ .expect(200)
+ .end(done);
+ });
+ });
describe('Create REST service', function() {
it('Responds with the new service', function(done) {
request
From b7d980947112683ff2a529cbd09fcb38f8ffd536 Mon Sep 17 00:00:00 2001
From: Legeyt
Date: Tue, 12 Mar 2019 14:14:20 -0500
Subject: [PATCH 025/102] Added cleanup
---
tests/test-bulk.js | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/tests/test-bulk.js b/tests/test-bulk.js
index 50fb36a6..b4dbcc00 100644
--- a/tests/test-bulk.js
+++ b/tests/test-bulk.js
@@ -100,6 +100,12 @@ describe('Bulk Upload Tests', function() {
describe('Cleanup', function() {
+ it('Deletes the service',function(done){
+ request
+ .delete('/api/services/' + id + token)
+ .expect(200)
+ .end(done);
+ });
it('Deletes group', function(done) {
request
.delete('/api/systems/' + mockGroup.name + token)
From e33cfdcd121a798cd0ad733c6ab246d06f437a44 Mon Sep 17 00:00:00 2001
From: Legeyt
Date: Tue, 12 Mar 2019 14:23:42 -0500
Subject: [PATCH 026/102] Added 404 for toggleService
---
controllers/serviceController.js | 20 ++++++++++++--------
1 file changed, 12 insertions(+), 8 deletions(-)
diff --git a/controllers/serviceController.js b/controllers/serviceController.js
index 79a6779f..918c1c0a 100644
--- a/controllers/serviceController.js
+++ b/controllers/serviceController.js
@@ -1052,16 +1052,20 @@ function toggleService(req, res) {
handleError(error, res, 500);
return;
}
-
- mqService.running = !mqService.running;
- mqService.save(function(e2, mqService) {
- if (e2) {
- handleError(e2, res, 500);
- return;
- }
+ if(mqService){
+ mqService.running = !mqService.running;
+ mqService.save(function(e2, mqService) {
+ if (e2) {
+ handleError(e2, res, 500);
+ return;
+ }
res.json({'message': 'toggled', 'service': mqService });
- });
+
+
+ });
+ }
+ handleError("Service not Found",res,404);
});
}
});
From d771c18cbe940bba099cff22c66c484fc9026357 Mon Sep 17 00:00:00 2001
From: Legeyt
Date: Tue, 12 Mar 2019 14:28:35 -0500
Subject: [PATCH 027/102] Trace for debug
---
tests/test-draft.js | 1 +
1 file changed, 1 insertion(+)
diff --git a/tests/test-draft.js b/tests/test-draft.js
index b07f385f..fdb8a4cf 100644
--- a/tests/test-draft.js
+++ b/tests/test-draft.js
@@ -194,6 +194,7 @@ describe('Search and Get Tests', function() {
.expect(200)
.expect(function(rsp){
id = rsp.body.id;
+ console.log("id:" + id);
})
.end(done);
});
From 8dc1c0ffb54093b17335c798ef46d60d998cdf02 Mon Sep 17 00:00:00 2001
From: Legeyt
Date: Tue, 12 Mar 2019 14:42:49 -0500
Subject: [PATCH 028/102] Added delay to draft test
---
tests/test-draft.js | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/tests/test-draft.js b/tests/test-draft.js
index fdb8a4cf..3a8ecf87 100644
--- a/tests/test-draft.js
+++ b/tests/test-draft.js
@@ -126,7 +126,6 @@ describe('Search and Get Tests', function() {
id = res.body._id;
})
.end(done);
-
});
it('Deletes the draft service',function(done){
request
@@ -194,15 +193,16 @@ describe('Search and Get Tests', function() {
.expect(200)
.expect(function(rsp){
id = rsp.body.id;
- console.log("id:" + id);
})
.end(done);
});
it('Starts the service',function(done){
- request
- .post('/api/services/' + id + '/toggle' + token)
- .expect(200)
- .end(done);
+ setTimeout(function(){
+ request
+ .post('/api/services/' + id + '/toggle' + token)
+ .expect(200)
+ .end(done);
+ },2000);
});
it('Ensures the service works',function(done){
request
From f02b36b94a95d0aef82ed95007921e98cc23b5e9 Mon Sep 17 00:00:00 2001
From: Legeyt
Date: Tue, 12 Mar 2019 14:47:17 -0500
Subject: [PATCH 029/102] Restore archived service now responds only after
restore is done
---
controllers/serviceController.js | 5 +++--
tests/test-draft.js | 10 ++++------
2 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/controllers/serviceController.js b/controllers/serviceController.js
index 918c1c0a..cd705b55 100644
--- a/controllers/serviceController.js
+++ b/controllers/serviceController.js
@@ -1145,9 +1145,10 @@ function restoreService(req, res) {
function (err) {
if (err) {
handleError(err, res, 500);
- }
+ }else
+ res.json({ 'message' : 'restored', 'id' : archive.service._id });
});
- res.json({ 'message' : 'restored', 'id' : archive.service._id });
+
}
else {
let newMQService = {
diff --git a/tests/test-draft.js b/tests/test-draft.js
index 3a8ecf87..0a397d97 100644
--- a/tests/test-draft.js
+++ b/tests/test-draft.js
@@ -197,12 +197,10 @@ describe('Search and Get Tests', function() {
.end(done);
});
it('Starts the service',function(done){
- setTimeout(function(){
- request
- .post('/api/services/' + id + '/toggle' + token)
- .expect(200)
- .end(done);
- },2000);
+ request
+ .post('/api/services/' + id + '/toggle' + token)
+ .expect(200)
+ .end(done);
});
it('Ensures the service works',function(done){
request
From 9ee00c83f73ff7757f9c19c2b0d68854ba0a9044 Mon Sep 17 00:00:00 2001
From: Legeyt
Date: Tue, 12 Mar 2019 14:53:09 -0500
Subject: [PATCH 030/102] respose fix
---
controllers/serviceController.js | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/controllers/serviceController.js b/controllers/serviceController.js
index cd705b55..45aa5cfc 100644
--- a/controllers/serviceController.js
+++ b/controllers/serviceController.js
@@ -1141,16 +1141,18 @@ function restoreService(req, res) {
rrpairs: archive.service.rrpairs,
lastUpdateUser: archive.service.lastUpdateUser
};
- createService(newService,req).then(function(service){},
+ createService(newService,req).then(function(service){
+ res.json({ 'message' : 'restored', 'id' : archive.service._id });
+ },
function (err) {
if (err) {
handleError(err, res, 500);
- }else
- res.json({ 'message' : 'restored', 'id' : archive.service._id });
+ }
+
});
}
- else {
+ else if(archive.mqservice){
let newMQService = {
sut: archive.mqservice.sut,
user: archive.mqservice.user,
@@ -1161,12 +1163,16 @@ function restoreService(req, res) {
rrpairs: archive.mqservice.rrpairs,
connInfo: archive.mqservice.connInfo
};
- createService(newMQService,req).then( function(serv) {},function (err) {
+ createService(newMQService,req).then( function(serv) {
+ res.json({ 'message' : 'restored', 'id' : archive.mqservice._id });
+ },function (err) {
if (err) {
handleError(err, res, 500);
}
});
- res.json({ 'message' : 'restored', 'id' : archive.mqservice._id });
+
+ }else{
+ handleError("Archive service malformed or not present.",res,404);
}
});
}
From 717c2748b7c4f50c173ece159d473fb2237b279e Mon Sep 17 00:00:00 2001
From: Swati
Date: Wed, 13 Mar 2019 20:17:34 +0530
Subject: [PATCH 031/102] Updating request payload for GET
---
public/js/app/services.js | 4 ++--
public/partials/addapiform.html | 9 ++++++++-
public/partials/updateForm.html | 2 +-
3 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/public/js/app/services.js b/public/js/app/services.js
index 2895e743..36634504 100644
--- a/public/js/app/services.js
+++ b/public/js/app/services.js
@@ -348,7 +348,7 @@ var serv = angular.module('mockapp.services',['mockapp.factories'])
}
// only save request data for non-GETs
- if (rr.method !== 'GET') {
+ if (reqPayload) {
rr.reqData = reqPayload;
}
rr.resData = resPayload;
@@ -575,7 +575,7 @@ var serv = angular.module('mockapp.services',['mockapp.factories'])
}
// only save request data for non-GETs
- if (rr.method !== 'GET') {
+ if (reqPayload) {
rr.reqData = reqPayload;
}
rr.resData = resPayload;
diff --git a/public/partials/addapiform.html b/public/partials/addapiform.html
index 359e55c0..8caaea31 100644
--- a/public/partials/addapiform.html
+++ b/public/partials/addapiform.html
@@ -354,7 +354,14 @@ Request / Response Pair
-
@@ -375,7 +376,7 @@ Request / Response Pair
-