diff --git a/.gitignore b/.gitignore index 269ef13..ecf45fc 100644 Binary files a/.gitignore and b/.gitignore differ diff --git a/Monitoring.html b/Monitoring.html index 1d079e1..ce80414 100644 --- a/Monitoring.html +++ b/Monitoring.html @@ -44,7 +44,7 @@ }, cycleTime: { value: 3600, - validate: function(v) { + validate: function (v) { var validator = RED.validators.typedInput('cycleTimeType'); if (!validator(v)) return false; if ($("#node-input-cycleTime").typedInput('type') == 'num' && v < 1) return false; @@ -57,7 +57,7 @@ }, maxBufferSize: { value: 100, - validate: function(v) { + validate: function (v) { var validator = RED.validators.typedInput('maxBufferSizeType'); if (!validator(v)) return false; if ($("#node-input-maxBufferSize").typedInput('type') == 'num' && v <= 0) return false; @@ -68,14 +68,27 @@ maxBufferSizeType: { value: "num" }, - /* - maxItemsPerPackage: { - value: 10000, - validate: function(v) { - return v > 0; + delay: { + value: 0, + validate: function (v) { + var validator = RED.validators.typedInput('delayType'); + if (!validator(v)) return false; + if ($("#node-input-delay").typedInput('type') == 'num' && v < 0) return false; + return true; }, required: true - },*/ + }, + delayType: { + value: "num" + }, + priorityMode: { + value: "0", + required: true, + validate: RED.validators.typedInput('priorityModeType') + }, + priorityModeType: { + value: "options" + }, thingsConfigJson: { value: "" } @@ -83,12 +96,12 @@ inputs: 1, outputs: 2, icon: "equipmentcloud.png", - label: function() { + label: function () { return this.name || "Monitoring"; }, inputLabels: "Monitoring v2 Bulk Uploader", outputLabels: ["Response", "Error"], - oneditprepare: function() { + oneditprepare: function () { $("#node-input-customerID").typedInput({ default: 'str', @@ -115,22 +128,59 @@ typeField: $("#node-input-cycleTimeType"), types: ["num", "env", "flow", "global"] }); + if (!$("#node-input-cycleTime").val()) { + $("#node-input-cycleTime").typedInput('value', this._def.defaults.cycleTime.value); + } $("#node-input-maxBufferSize").typedInput({ default: 'num', typeField: $("#node-input-maxBufferSizeType"), types: ["num", "env", "flow", "global"] }); + if (!$("#node-input-maxBufferSize").val()) { + $("#node-input-maxBufferSize").typedInput('value', this._def.defaults.maxBufferSize.value); + } + $("#node-input-delay").typedInput({ + default: 'num', + typeField: $("#node-input-delayType"), + types: ["num", "env", "flow", "global"] + }); + if (!$("#node-input-delay").val()) { + $("#node-input-delay").typedInput('value', this._def.defaults.delay.value); + } + + $("#node-input-priorityMode").typedInput({ + typeField: $("#node-input-priorityModeType"), + types: [{ + value: "num", + options: [{ + value: "0", + label: "First In First Out" + }, + { + value: "1", + label: "Events First" + }, + { + value: "2", + label: "Events Last" + } + ] + }] + }); + if (!$("#node-input-priorityMode").val()) { + $("#node-input-priorityMode").typedInput('value', this._def.defaults.priorityMode.value); + } var configObj = getThingsConfig(); if (configObj != null) { refreshThingSelectionList(configObj); } - $(".credentialInput").change(function() { + $(".credentialInput").change(function () { calcCredentials(); }); - $("#node-input-inputTypeSelection").change(function() { + $("#node-input-inputTypeSelection").change(function () { if (this.value === "file") { $(".customInputField").hide(); $(".fileInputField").show(); @@ -144,8 +194,9 @@ }); // hide credentail field when it depends on environment variables - $("#node-input-clientID,#node-input-clientSecret").on('change', function(type, value) { - if ($("#node-input-clientID").typedInput('type') == 'env' || $("#node-input-clientSecret").typedInput('type') == 'env') { + $("#node-input-clientID,#node-input-clientSecret").on('change', function (type, value) { + if ($("#node-input-clientID").typedInput('type') == 'env' || $( + "#node-input-clientSecret").typedInput('type') == 'env') { $(".clientCredentials").hide(); } else { $(".clientCredentials").show(); @@ -153,12 +204,12 @@ }); //avoid issue when selecting the file with equal name not firing change event - $('#fileSelector').click(function() { + $('#fileSelector').click(function () { //clean input value of file selector (no change event is fired) this.value = null; }); - $("#fileSelector").change(async function() { + $("#fileSelector").change(async function () { readJsonFile(this.files[0], (json) => { $('#node-input-thingsConfigJson').val(JSON.stringify(json)); @@ -178,7 +229,7 @@ //Is fired when a new value is selected - $("#node-input-eqSelection").change(function() { + $("#node-input-eqSelection").change(function () { var configObj = getThingsConfig(); if (configObj) { $('.credentialField').typedInput('type', 'str'); @@ -198,7 +249,7 @@ }); }, - oneditsave: function() { + oneditsave: function () { } }); @@ -246,7 +297,7 @@ function refreshThingSelectionList(configObj) { $("#node-input-eqSelection").empty(); - configObj.things.forEach(function(item, index) { + configObj.things.forEach(function (item, index) { $("#node-input-eqSelection").append(new Option(item.id, item.id)); }); //Write back the last selected value of EQ @@ -310,15 +361,21 @@ +
+ + +
+ +
+ + +
+
- @@ -326,18 +383,25 @@

This node is the easiest way to connect your equipment to the EquipmentCloud® of Kontron AIS GmbH for any Monitoring purposes. The following config parameters can bet set in our Monitoring Node:

- Name
Give the node an individual name (e.g. EquipmentName)

- Authentication
There are 2 different ways for adding the Authentication settings into the node.
The first one is "Custom": You have to login into your EquipmentCloud®, choose "Equipment Configuration" and + Name
Give the node an individual name (e.g. EquipmentName)

+ Authentication
There are 2 different ways for adding the Authentication settings into the node.
The first one is "Custom": You have to login into your EquipmentCloud®, choose "Equipment Configuration" and "Equipment". In the list of available Equipments you will find the REST Service icon behind each equipment. Now choose your equipment and press the REST Service icon for all REST API details. Now you have to copy all values into the relevant input fields.
The second option is "File": You have to login into your EquipmentCloud®, choose "Equipment Configuration" and "Equipment". In the right top corner of the Equipment list, you will find "Download Rest Configuration". A JSON - file will be downloaded. Now you can select the downloaded file at the parameter "Json config". After the upload you have to select the target Equipment from the Dropdown field at parameter "Equipment".

- Cycle Time
This parameters sets the interval for sending values to the EquipmentCloud®. Incoming messages will be stored inside a buffer until the next interval. When the messages are send successfully to the EquipmentCloud® + file will be downloaded. Now you can select the downloaded file at the parameter "Json config". After the upload you have to select the target Equipment from the Dropdown field at parameter "Equipment".

+ Cycle Time
This parameters sets the interval for sending values to the EquipmentCloud®. Incoming messages will be stored inside a buffer until the next interval. When the messages are send successfully to the EquipmentCloud® the buffer will be cleared.

- Max. Buffer Size
You can set a maximum buffer size for storing the messages until the next cycle. If the maximum buffer is reached, older messages will be deleted and new messages will be stored.

When you have configured + Sending Delay
+ The monitoring node automatically sorts all buffered messages in the chronologically correct order before sending them to EquipmentCloud®. This is done using the timestamp attribute in the message. If your process has data or events that are not available until a later point in time, you can also delay the sending of messages. In this case, only messages older than the specified delay time are taken from the buffer during each send cycle.

+ Item Priority
+ This parameter sets the sort order of messages with the same timestamp attribute. This way you can distinguish whether a state change occurred before or after an alarm or a part was produced. The order of events can affects the presentation of data and calculation of KPI values in the EqupmentCloud®. The following options are available for this purpose:

+ Max. Buffer Size
You can set a maximum buffer size for storing the messages until the next cycle. If the maximum buffer is reached, older messages will be deleted and new messages will be stored.

When you have configured your Monitoring node correctly, the node will get a token and will show this as a green point under the node in your flow.

-

Monitoring Data

+

Monitoring Data

The input for the Monitoring node must be a message format based on the REST API of the EquipmentCloud®. The following JSON message is an example for such a message. Please note that you have to be ensure that the correct type for each item (alarm, event, etc.) is selected. @@ -389,7 +453,7 @@

Monitoring Data

}

-

Equipment Configuration

+

Equipment Configuration

You can also dynamically upload the type configuration of the equipment. This allows, e.g., to create an alarm in the EquipmentCloud®, which has not been configured yet. Note that this may affect other equipment of the same type.

@@ -495,7 +559,7 @@ 

Equipment Configuration

}

-

More information

+

More information

If you want to have more information regarding our REST API, please log in to your account and take a look at:
Help Center / Help & Tips / RESTful Service API Explorer / Monitoring API 2.0

diff --git a/Monitoring.js b/Monitoring.js index 708c208..4350adb 100644 --- a/Monitoring.js +++ b/Monitoring.js @@ -53,7 +53,9 @@ module.exports = function (RED) { var defaultSettings = { cycleTime: 3600, maxBufferSize: 100, - maxItemsPerPackage: 10000 + maxItemsPerPackage: 10000, + delay: 0, + priorityMode: Storage.PriorityMode.FIFO }; // if a property is not set in config, take default value Object.keys(defaultSettings).forEach(key => { @@ -71,6 +73,13 @@ module.exports = function (RED) { var clientID = RED.util.evaluateNodeProperty(config.clientID, config.clientIDType, node); var clientSecret = RED.util.evaluateNodeProperty(config.clientSecret, config.clientSecretType, node); var clientCredentials = clientID && clientSecret ? Buffer.from(clientID + ":" + clientSecret).toString("base64") : null; + var maxBufferSize = (RED.util.evaluateNodeProperty(config.maxBufferSize, config.maxBufferSizeType, node) || defaultSettings.maxBufferSize); + maxBufferSize = maxBufferSize > 0 ? maxBufferSize : defaultSettings.maxBufferSize; + var delay = (RED.util.evaluateNodeProperty(config.delay, config.delayType, node) || defaultSettings.delay); + delay = delay >= 0 ? delay : defaultSettings.delay; + var priorityMode = (RED.util.evaluateNodeProperty(config.priorityMode, config.priorityModeType, node) || defaultSettings.priorityMode); + var cycleTime = (RED.util.evaluateNodeProperty(config.cycleTime, config.cycleTimeType, node) || defaultSettings.cycleTime); + cycleTime = cycleTime > 0 ? cycleTime : defaultSettings.cycleTime; if (!(id && customerID && eqID && clientID && clientCredentials)) { handleException(new Error("Not all parameters set!")); @@ -104,7 +113,12 @@ module.exports = function (RED) { var client = new OAuthClient(clientID, clientCredentials, tokenUrl); // set up buffer - var storage = new Storage(id, (RED.util.evaluateNodeProperty(config.maxBufferSize, config.maxBufferSizeType, node) || defaultSettings.maxBufferSize)); + var storage = new Storage( + id, + maxBufferSize, + delay, + priorityMode + ); var storageInitializationInProgress = false; var storageInitialized = false; async function initStorage() { @@ -153,6 +167,7 @@ module.exports = function (RED) { // stop job to send data from buffer to cloud try { clearTimeout(timer); + timer = null; await waitForStorage(); // save close storage await storage.close(); @@ -369,7 +384,7 @@ module.exports = function (RED) { // delete all processed items from storage // Hint: this includes the last processed item although it caused by an error. // This prevents queue processing from being blocked by a single error. - await storage.deleteData(data.firstIndex, data.firstIndex + response.body.result[0].current_item_index); + await storage.deleteData(data.ids.slice(0, response.body.result[0].current_item_index + 1)); // on Precondition fail, do not handle this as an exception // but inform user about the error @@ -416,15 +431,22 @@ module.exports = function (RED) { break; case 404: setNodeStatus(nodeStatus.ERROR); - errorOutput = new Error("Not Found!"); + errorOutput = new Error("Not found!"); break; case 409: setNodeStatus(nodeStatus.ERROR); errorOutput = new Error("Conflict!"); break; + case 500: + setNodeStatus(nodeStatus.ERROR); + errorOutput = new Error("Internal Server Error!"); + break; default: setNodeStatus(nodeStatus.ERROR); - errorOutput = new Error("Unexpected error!"); + // add some info for service logs + errorOutput = new Error("Unexpected error!" + + "\nStatus Code: " + e.response.statusCode + + "\nBody: " + JSON.stringify(e.response.body)); break; } } @@ -517,11 +539,9 @@ module.exports = function (RED) { // set next cycle time // - balance drift - // - note minimum of 1 second for next cycle, so there is no endless transmitting - var nextCycle = Math.max( - (RED.util.evaluateNodeProperty(config.cycleTime, config.cycleTimeType, node) || defaultSettings.cycleTime) * - 1000 - (jobEndDate - jobStartDate), 1000); - timer = setTimeout(async () => transmitData(), nextCycle); + // - minimum of 1 second for next cycle, so there is no endless transmitting + var nextCycle = Math.max(cycleTime * 1000 - (jobEndDate - jobStartDate), 1000); + resetTimerForTransmitData(nextCycle); } // inital timer @@ -538,10 +558,16 @@ module.exports = function (RED) { } catch (e) { handleException(e); // retry authentication with next cycle - timer = setTimeout(() => transmitData(), - (RED.util.evaluateNodeProperty(config.cycleTime, config.cycleTimeType, node) || defaultSettings.cycleTime)); + resetTimerForTransmitData(cycleTime); } }, 1000); + + function resetTimerForTransmitData(timeout) { + // prevent transmitData() resetting the timer again if node was disposed + if (timer) { + timer = setTimeout(() => transmitData(), timeout); + } + } } RED.nodes.registerType("Monitoring", MonitoringNode); }; \ No newline at end of file diff --git a/README.md b/README.md index fb9a537..ed2331e 100644 --- a/README.md +++ b/README.md @@ -19,21 +19,30 @@ After installation you will find the node inside the Node-red palette. ![node_properties](images/node_properties.PNG?raw=true) -**Name** +**Name**: Give the node an individual name (e.g. EquipmentName) -**Authentication** +**Authentication**: There are 2 different ways for adding the Authentication settings into the node. The first one is "Custom": You have to login into your EquipmentCloud®, choose "Equipment Configuration" and "Equipment". In the list of available Equipments you will find the REST Service icon behind each equipment. Now choose your equipment and press the REST Service icon for all REST API details. Now you have to copy all values into the relevant input fields. The second option is "File": You have to login into your EquipmentCloud®, choose "Equipment Configuration" and "Equipment". In the right top corner of the Equipment list, you will find "Download Rest Configuration". A JSON file will be downloaded. Now you can select the downloaded file at the parameter "Json config". After the upload you have to select the target Equipment from the Dropdown field at parameter "Equipment". -**Cycle Time** +**Cycle Time**: This parameters sets the interval for sending values to the EquipmentCloud®. Incoming messages will be stored inside a buffer until the next interval. When the messages are send successfully to the EquipmentCloud® the buffer will be cleared. -**Max. Buffer Size** -You can set a maximum buffer size for storing the messages until the next cycle. If the maximum buffer is reached, older messages will be deleted and new messages will be stored. +**Sending Delay**: +The monitoring node automatically sorts all buffered messages in the chronologically correct order before sending them to EquipmentCloud®. This is done using the *timestamp* attribute in the message. If your process has data or events that are not available until a later point in time, you can also delay the sending of messages. In this case, only messages older than the specified delay time are taken from the buffer during each send cycle. + +**Item Priority**: +This parameter sets the sort order of messages with the same *timestamp* attribute. This way you can distinguish whether a state change occurred before or after an alarm or a part was produced. The order of events can affects the presentation of data and calculation of KPI values in the EqupmentCloud®. The following options are available for this purpose: +- **First In First Out**: The order in which the messages were passed to the node is preserved. +- **Events First**: Events for equipment state change are sent to EquipmentCloud® first. All following alarms and produced parts therefore get the property of the last passed state of the equipment. +- **Events Last**: Events for equipment state change are sent to EquipmentCloud® after the other messages. All alarms and produced parts up to the state change message therefore get the property of the previous equipment state. + +**Max. Buffer Size**: +You can set a maximum buffer size for storing the messages until the next cycle. If the maximum buffer is reached, older messages will be deleted and new messages will be stored. When you have configured your Monitoring node correctly, the node will get a token and will show this as a green point under the node in your flow. diff --git a/Storage.js b/Storage.js index 148cf9e..73b2780 100644 --- a/Storage.js +++ b/Storage.js @@ -31,14 +31,32 @@ module.exports = class Storage { and chaining calls are not working with instance fields in classes */ - constructor(id, maxfileSize) { + // Sort priority for items with equal timestamps + static PriorityMode = { + FIFO: 0, // first in, first out (inserting sortorder) + EventsFirst: 1, // events (state changes) before alarms, units, etc. + EventsLast: 2 // events (state changes) after alarms, units, etc. + }; + + constructor(id, maxfileSize = 100, delay = 0, priorityMode = Storage.PriorityMode.FIFO) { this.id = id; this.db = null; this.filename = id + ".db"; // file watcher settings: this.housekeeperInterval = 10000; - this.maxfileSize = (maxfileSize || 100) * 1024 * 1024; // Size in MB + this.maxfileSize = maxfileSize * 1024 * 1024; // Size in MB this.cleanupFactor = 0.05; + this.delay = delay * 1000 / 86400000; + switch (priorityMode) { + case Storage.PriorityMode.EventsFirst: + this.orderColumn = "is_event DESC, id"; + break; + case Storage.PriorityMode.EventsLast: this.orderColumn = "is_event ASC, id"; + break; + default: + this.orderColumn = "id"; + break; + } } _getDatabase(filename) { @@ -71,13 +89,28 @@ module.exports = class Storage { } async _createTables() { - // drop messages table without specific id column (deprecated) + // upgrade <= v1.1: drop messages table without specific id column (deprecated) var tableDef = await this._getTableDefinition("messages"); if (tableDef && !tableDef.sql.includes("id INTEGER")) { await this.wrapRunPromise("DROP TABLE messages"); } - await this.wrapRunPromise("CREATE TABLE IF NOT EXISTS messages (id INTEGER PRIMARY KEY ASC, data Text)"); + // upgrade <= v1.2: + if (tableDef && !tableDef.sql.includes("timestamp REAL") && !tableDef.sql.includes("is_event INTEGER")) { + // add missing columns + await this.wrapRunPromise("ALTER TABLE messages ADD COLUMN timestamp REAL"); + await this.wrapRunPromise("ALTER TABLE messages ADD COLUMN is_event INTEGER"); + // migrate data + await this.wrapRunPromise("UPDATE messages SET " + + "timestamp = julianday(json_extract(data, '$.timestamp'), 'utc'), " + + "is_event = CASE WHEN json_extract(data, '$.type') = 2 THEN 1 ELSE 0 END;"); + } + // initial: create teables + await this.wrapRunPromise("CREATE TABLE IF NOT EXISTS messages (id INTEGER PRIMARY KEY ASC, timestamp REAL, is_event INTEGER, data Text)"); await this.wrapRunPromise("CREATE TABLE IF NOT EXISTS configMessages (id INTEGER PRIMARY KEY AUTOINCREMENT, category Text, data Text )"); + // initial: create index + await this.wrapRunPromise("CREATE INDEX IF NOT EXISTS idx_messages_events_first ON messages (timestamp, is_event DESC, id)"); + await this.wrapRunPromise("CREATE INDEX IF NOT EXISTS idx_messages_events_last ON messages (timestamp, is_event ASC, id)"); + await this.wrapRunPromise("CREATE INDEX IF NOT EXISTS idx_messages_fifo ON messages (timestamp, id)"); } _getTableDefinition(tablename) { @@ -119,37 +152,50 @@ module.exports = class Storage { var db = this.db; return new Promise((resolve, reject) => { - //"SELECT rowid AS id, data FROM messages, LIMIT 1" var dataArray = []; - var firstIndex = 0; + var idArray = []; + var maxId = 0; + var args = [limit]; + var whereClause = ""; + if (this.delay > 0) { + whereClause = " WHERE timestamp < ?"; + // add filter timestamp value at begin of arguements array + args.unshift(new Date().getTime() / 86400000 + 2440587.5 - this.delay); + } - db.each("SELECT data, id FROM messages LIMIT ?", [limit], (err, row) => { - //Errorhandling - if (err) { - return reject(err); - } - try { - if (firstIndex == 0) { - firstIndex = row.id; + db.each("SELECT data, id FROM messages" + + whereClause + + " ORDER BY timestamp, " + + this.orderColumn + + " LIMIT ?", args, (err, row) => { + //Errorhandling + if (err) { + return reject(err); + } + try { + if (maxId < row.id) { + maxId = row.id; + } + var json = JSON.parse(row.data); + dataArray.push(json); + idArray.push(row.id); + } catch (e) { + return reject(e); } - var json = JSON.parse(row.data); - dataArray.push(json); - } catch (e) { - return reject(e); - } - }, (err) => { - if (err) { - return reject(err); - } + }, (err) => { + if (err) { + return reject(err); + } - const dataWithInformation = { - items: dataArray, - firstIndex: firstIndex, - }; + const dataWithInformation = { + items: dataArray, + ids: idArray, + maxId: maxId + }; - return resolve(dataWithInformation); - }); + return resolve(dataWithInformation); + }); }); } @@ -207,11 +253,12 @@ module.exports = class Storage { this.dataActionCounter++; } - async deleteData(start, end) { - await this.wrapRunPromise("DELETE FROM messages WHERE id BETWEEN $start and $end", { - $start: start, - $end: end - }); + async deleteData(ids) { + var sql = "DELETE FROM messages WHERE id IN ("; + ids.forEach(id => sql += id + ","); + sql = sql.substring(0, sql.length - 1) + ")"; + await this.wrapRunPromise(sql); + // increment data action counter for swap transaction job this.dataActionCounter++; } @@ -240,7 +287,7 @@ module.exports = class Storage { jsons.push(JSON.stringify(chunk[i])); for (var addVal2 of additionalValues) { sql += ",?"; - jsons.push(addVal2.value); + jsons.push(addVal2.value(chunk[i])); } sql += "),(?"; } @@ -285,11 +332,35 @@ module.exports = class Storage { } async storeData(data) { - await this._storeDataInChunks("messages", data); + await this._storeDataInChunks("messages", data, + [ + { + column: "timestamp", + value: function (item) { + // calculate julian date + return (new Date(item.timestamp ?? new Date())).getTime() / 86400000 + 2440587.5; + } + }, + { + column: "is_event", + value: function (item) { + // only item type = 2 is an event + return item.type == 2 ? 1 : 0; + } + } + ]); } async storeConfigData(data, category) { - await this._storeDataInChunks("configMessages", data, [{ column: "category", value: category }]); + await this._storeDataInChunks("configMessages", data, + [ + { + column: "category", + value: function (item) { + return category; + } + } + ]); } _closeDatabase() { @@ -368,10 +439,8 @@ module.exports = class Storage { do { // delete block from storage // calculate block size depending on current item count and cleanup factor - var data = await self.getStorageData(1); - var startIndex = data.firstIndex; - var endIndex = startIndex + Math.ceil(itemCount * self.cleanupFactor); - await self.deleteData(startIndex, endIndex); + var data = await self.getStorageData(Math.ceil(itemCount * self.cleanupFactor)); + await self.deleteData(data.ids); // shrink file size await self._commitTransaction(); await self.wrapRunPromise("VACUUM;"); diff --git a/images/node_properties.PNG b/images/node_properties.PNG index c26d2c4..76a7749 100644 Binary files a/images/node_properties.PNG and b/images/node_properties.PNG differ diff --git a/package.json b/package.json index 6476ff2..13dc8b4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ais_automation/node-red-contrib-eqcloud-monitoring", - "version": "1.2.0", + "version": "1.3.0", "node-red": { "nodes": { "Monitoring": "Monitoring.js" @@ -45,17 +45,17 @@ "DeviceManagement" ], "devDependencies": { - "node-red": "^0.20.6", - "node-red-node-test-helper": "^0.2.2", - "should": "^13.2.3", "eslint": "^5.16.0", "eslint-config-standard": "^12.0.0", "eslint-plugin-import": "^2.17.3", "eslint-plugin-node": "^9.1.0", "eslint-plugin-promise": "^4.1.1", "eslint-plugin-standard": "^4.0.0", - "mocha": "^6.1.4", - "mocha-junit-reporter": "^1.22.0" + "mocha": "^9.0.1", + "mocha-junit-reporter": "^1.22.0", + "node-red": "^1.3.5", + "node-red-node-test-helper": "^0.2.7", + "should": "^13.2.3" }, "scripts": { "test": "mocha --recursive 'test/*_spec.js' --exit"