From 4fbec2a67559a72fb5dcb1ee74a64d261d34cf7e Mon Sep 17 00:00:00 2001 From: Sean Canton Date: Wed, 13 Sep 2017 16:23:23 -0700 Subject: [PATCH 01/42] add matrix-protos --- lib/service/manager.js | 2 +- package-lock.json | 5209 ++++++++++++++++++++++++++++++++++++++++ package.json | 1 + 3 files changed, 5211 insertions(+), 1 deletion(-) create mode 100644 package-lock.json diff --git a/lib/service/manager.js b/lib/service/manager.js index 4b2de941..f11dc090 100644 --- a/lib/service/manager.js +++ b/lib/service/manager.js @@ -270,7 +270,7 @@ function startApp(name, cb) { return (v.indexOf('--debug') > -1 || v.indexOf('-debug-brk') > -1); }); - // don't node debug because it stderrs (kills apps) + // don't node debug because stderr (kills apps) process.env.DEBUG = 'false'; //Check for app folder existance, expect the unexpected (╯°□°)╯︵ ┻━┻ diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 00000000..f1634d23 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,5209 @@ +{ + "name": "matrix-os", + "version": "0.14.3", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@protobufjs/aspromise": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", + "integrity": "sha1-m4sMxmPWaafY9vXQiToU00jzD78=" + }, + "@protobufjs/base64": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", + "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==" + }, + "@protobufjs/codegen": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", + "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==" + }, + "@protobufjs/eventemitter": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", + "integrity": "sha1-NVy8mLr61ZePntCV85diHx0Ga3A=" + }, + "@protobufjs/fetch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", + "integrity": "sha1-upn7WYYUr2VwDBYZ/wbUVLDYTEU=", + "requires": { + "@protobufjs/aspromise": "1.1.2", + "@protobufjs/inquire": "1.1.0" + } + }, + "@protobufjs/float": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", + "integrity": "sha1-Xp4avctz/Ap8uLKR33jIy9l7h9E=" + }, + "@protobufjs/inquire": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", + "integrity": "sha1-/yAOPnzyQp4tyvwRQIKOjMY48Ik=" + }, + "@protobufjs/path": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", + "integrity": "sha1-bMKyDFya1q0NzP0hynZz2Nf79o0=" + }, + "@protobufjs/pool": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", + "integrity": "sha1-Cf0V8tbTq/qbZbw2ZQbWrXhG/1Q=" + }, + "@protobufjs/utf8": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", + "integrity": "sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA=" + }, + "@types/long": { + "version": "3.0.32", + "resolved": "https://registry.npmjs.org/@types/long/-/long-3.0.32.tgz", + "integrity": "sha512-ZXyOOm83p7X8p3s0IYM3VeueNmHpkk/yMlP8CLeOnEcu6hIwPH7YjZBvhQkR0ZFS2DqZAxKtJ/M5fcuv3OU5BA==" + }, + "@types/node": { + "version": "7.0.43", + "resolved": "https://registry.npmjs.org/@types/node/-/node-7.0.43.tgz", + "integrity": "sha512-7scYwwfHNppXvH/9JzakbVxk0o0QUILVk1Lv64GRaxwPuGpnF1QBiwdvhDpLcymb8BpomQL3KYoWKq3wUdDMhQ==" + }, + "abbrev": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.0.tgz", + "integrity": "sha1-0FVMIlZjbi9W58LlrRg/hZQo2B8=" + }, + "accessory": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/accessory/-/accessory-1.1.0.tgz", + "integrity": "sha1-eDPpg5oy3tdtJgIfNqQXB6Ug9ZM=", + "requires": { + "ap": "0.2.0", + "balanced-match": "0.2.1", + "dot-parts": "1.0.1" + }, + "dependencies": { + "balanced-match": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.2.1.tgz", + "integrity": "sha1-e8ZYtL7WHu5CStdPdfXD4sTfPMc=" + } + } + }, + "acorn": { + "version": "4.0.13", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz", + "integrity": "sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c=" + }, + "after": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/after/-/after-0.8.2.tgz", + "integrity": "sha1-/ts5T58OAqqXaOcCvaI7UF+ufh8=" + }, + "ajv": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz", + "integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=", + "requires": { + "co": "4.6.0", + "json-stable-stringify": "1.0.1" + } + }, + "amdefine": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", + "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=" + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" + }, + "ap": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/ap/-/ap-0.2.0.tgz", + "integrity": "sha1-rglCYAspkS8NKxTsYMRejzMLYRA=" + }, + "argparse": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.9.tgz", + "integrity": "sha1-c9g7wmP4bpf4zE9rrhsOkKfSLIY=", + "requires": { + "sprintf-js": "1.0.3" + } + }, + "arguejs": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/arguejs/-/arguejs-0.2.3.tgz", + "integrity": "sha1-tvk59f4OPNHz+T4qqSYkJL8xKvc=" + }, + "arraybuffer.slice": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.6.tgz", + "integrity": "sha1-8zshWfBTKj8xB6JywMz70a0peco=" + }, + "asap": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", + "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=" + }, + "ascli": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ascli/-/ascli-1.0.1.tgz", + "integrity": "sha1-vPpZdKYvGOgcq660lzKrSoj5Brw=", + "requires": { + "colour": "0.7.1", + "optjs": "3.2.2" + } + }, + "asn1": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", + "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=" + }, + "asn1.js": { + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.9.1.tgz", + "integrity": "sha1-SLokC0WpKA6UdImQull9IWYX/UA=", + "requires": { + "bn.js": "4.11.8", + "inherits": "2.0.3", + "minimalistic-assert": "1.0.0" + } + }, + "assert": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/assert/-/assert-1.1.2.tgz", + "integrity": "sha1-raoExGu1jG3R8pTaPrJuYijrbkQ=", + "requires": { + "util": "0.10.3" + } + }, + "assert-plus": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz", + "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=" + }, + "assertion-error": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.0.2.tgz", + "integrity": "sha1-E8pRXYYgbaC6xm6DTdOX2HWBCUw=" + }, + "ast-types": { + "version": "0.8.15", + "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.8.15.tgz", + "integrity": "sha1-ju8IJ/BN/w7IhXupJavj/qYZTlI=" + }, + "astw": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/astw/-/astw-2.2.0.tgz", + "integrity": "sha1-e9QXhNMkk5h66yOba04cV6hzuRc=", + "requires": { + "acorn": "4.0.13" + } + }, + "async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=" + }, + "async-waterfall": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/async-waterfall/-/async-waterfall-0.1.5.tgz", + "integrity": "sha1-OYvUiw6sXUD/vkAP6eN6U7qWba4=" + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + }, + "aws-sign2": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz", + "integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8=" + }, + "aws4": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.6.0.tgz", + "integrity": "sha1-g+9cqGCysy5KDe7e6MdxudtXRx4=" + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + }, + "base62": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/base62/-/base62-0.1.1.tgz", + "integrity": "sha1-e0F0wvlESXU7EcJlHAg9qEGnsIQ=" + }, + "Base64": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/Base64/-/Base64-0.2.1.tgz", + "integrity": "sha1-ujpCMHCOGGcFBl5mur3Uw1z2ACg=" + }, + "base64-arraybuffer": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.5.tgz", + "integrity": "sha1-c5JncZI7Whl0etZmqlzUv5xunOg=" + }, + "base64-js": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-0.0.7.tgz", + "integrity": "sha1-VEANyR1pbOwyqKR5AvlxUi/uj0g=" + }, + "base64url": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/base64url/-/base64url-2.0.0.tgz", + "integrity": "sha1-6sFuA+oUOO/5Qj1puqNiYu0fcLs=" + }, + "bcrypt-pbkdf": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz", + "integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=", + "optional": true, + "requires": { + "tweetnacl": "0.14.5" + } + }, + "better-assert": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/better-assert/-/better-assert-1.0.2.tgz", + "integrity": "sha1-QIZrnhueC1W0gYlDEeaPr/rrxSI=", + "requires": { + "callsite": "1.0.0" + } + }, + "binary": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/binary/-/binary-0.3.0.tgz", + "integrity": "sha1-n2BVO8XOjDOG87VTz/R0Yq3sqnk=", + "requires": { + "buffers": "0.1.1", + "chainsaw": "0.1.0" + } + }, + "binary-search-tree": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/binary-search-tree/-/binary-search-tree-0.2.5.tgz", + "integrity": "sha1-fbs7IQ/coIJFDa0jNMMErzm9x4Q=", + "requires": { + "underscore": "1.4.4" + } + }, + "bindings": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.2.1.tgz", + "integrity": "sha1-FK1hE4EtLTfXLme0ystLtyZQXxE=" + }, + "bleno": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/bleno/-/bleno-0.4.2.tgz", + "integrity": "sha1-IesK10O850eU45L0ph4TsHOT26o=", + "requires": { + "bplist-parser": "0.0.6", + "debug": "2.6.8", + "xpc-connection": "0.1.4" + } + }, + "blob": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/blob/-/blob-0.0.4.tgz", + "integrity": "sha1-vPEwUspURj8w+fx+lbmkdjCpSSE=" + }, + "block-stream": { + "version": "0.0.9", + "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz", + "integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=", + "requires": { + "inherits": "2.0.3" + } + }, + "bluebird": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.0.tgz", + "integrity": "sha1-eRQg1/VR7qKJdFOop3ZT+WYG1nw=" + }, + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==" + }, + "boom": { + "version": "2.10.1", + "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", + "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=", + "requires": { + "hoek": "2.16.3" + } + }, + "bplist-parser": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.0.6.tgz", + "integrity": "sha1-ONo0cYF9+dRKs4kuJ3B7u9daEbk=", + "optional": true + }, + "brace-expansion": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", + "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=", + "requires": { + "balanced-match": "1.0.0", + "concat-map": "0.0.1" + } + }, + "brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" + }, + "browser-pack": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/browser-pack/-/browser-pack-3.2.0.tgz", + "integrity": "sha1-+qHLxBSHsazEdH43PhFIrf/Q4tk=", + "requires": { + "combine-source-map": "0.3.0", + "concat-stream": "1.4.10", + "defined": "0.0.0", + "JSONStream": "0.8.4", + "through2": "0.5.1", + "umd": "2.1.0" + }, + "dependencies": { + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } + }, + "through2": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.5.1.tgz", + "integrity": "sha1-390BLrnHAOIyP9M084rGIqs3Lac=", + "requires": { + "readable-stream": "1.0.34", + "xtend": "3.0.0" + } + }, + "xtend": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-3.0.0.tgz", + "integrity": "sha1-XM50B7r2Qsunvs2laBEcST9ZZlo=" + } + } + }, + "browser-resolve": { + "version": "1.11.2", + "resolved": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-1.11.2.tgz", + "integrity": "sha1-j/CbCixCFxihBRwmCzLkj0QpOM4=", + "requires": { + "resolve": "1.1.7" + }, + "dependencies": { + "resolve": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", + "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=" + } + } + }, + "browserify": { + "version": "6.3.4", + "resolved": "https://registry.npmjs.org/browserify/-/browserify-6.3.4.tgz", + "integrity": "sha1-V7XRlcxWgTnpcTAuXNnVjdr7VNg=", + "requires": { + "assert": "1.1.2", + "browser-pack": "3.2.0", + "browser-resolve": "1.11.2", + "browserify-zlib": "0.1.4", + "buffer": "2.8.2", + "builtins": "0.0.7", + "commondir": "0.0.1", + "concat-stream": "1.4.10", + "console-browserify": "1.1.0", + "constants-browserify": "0.0.1", + "crypto-browserify": "3.11.1", + "deep-equal": "0.2.2", + "defined": "0.0.0", + "deps-sort": "1.3.9", + "domain-browser": "1.1.7", + "duplexer2": "0.0.2", + "events": "1.0.2", + "glob": "4.5.3", + "http-browserify": "1.7.0", + "https-browserify": "0.0.1", + "inherits": "2.0.3", + "insert-module-globals": "6.6.3", + "isarray": "0.0.1", + "JSONStream": "0.8.4", + "labeled-stream-splicer": "1.0.2", + "module-deps": "3.9.1", + "os-browserify": "0.1.2", + "parents": "0.0.3", + "path-browserify": "0.0.0", + "process": "0.8.0", + "punycode": "1.2.4", + "querystring-es3": "0.2.1", + "readable-stream": "1.1.14", + "resolve": "0.7.4", + "shallow-copy": "0.0.1", + "shasum": "1.0.2", + "shell-quote": "0.0.1", + "stream-browserify": "1.0.0", + "string_decoder": "0.10.31", + "subarg": "1.0.0", + "syntax-error": "1.3.0", + "through2": "1.1.1", + "timers-browserify": "1.4.2", + "tty-browserify": "0.0.0", + "umd": "2.1.0", + "url": "0.10.3", + "util": "0.10.3", + "vm-browserify": "0.0.4", + "xtend": "3.0.0" + }, + "dependencies": { + "glob": { + "version": "4.5.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-4.5.3.tgz", + "integrity": "sha1-xstz0yJsHv7wTePFbQEvAzd+4V8=", + "requires": { + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "2.0.10", + "once": "1.4.0" + } + }, + "minimatch": { + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz", + "integrity": "sha1-jQh8OcazjAAbl/ynzm0OHoCvusc=", + "requires": { + "brace-expansion": "1.1.8" + } + }, + "punycode": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.2.4.tgz", + "integrity": "sha1-VACKyXKux0F13vnLpt9/qdORh0A=" + }, + "xtend": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-3.0.0.tgz", + "integrity": "sha1-XM50B7r2Qsunvs2laBEcST9ZZlo=" + } + } + }, + "browserify-aes": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.0.8.tgz", + "integrity": "sha512-WYCMOT/PtGTlpOKFht0YJFYcPy6pLCR98CtWfzK13zoynLlBMvAdEMSRGmgnJCw2M2j/5qxBkinZQFobieM8dQ==", + "requires": { + "buffer-xor": "1.0.3", + "cipher-base": "1.0.4", + "create-hash": "1.1.3", + "evp_bytestokey": "1.0.3", + "inherits": "2.0.3", + "safe-buffer": "5.1.1" + } + }, + "browserify-cipher": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.0.tgz", + "integrity": "sha1-mYgkSHS/XtTijalWZtzWasj8Njo=", + "requires": { + "browserify-aes": "1.0.8", + "browserify-des": "1.0.0", + "evp_bytestokey": "1.0.3" + } + }, + "browserify-des": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.0.tgz", + "integrity": "sha1-2qJ3cXRwki7S/hhZQRihdUOXId0=", + "requires": { + "cipher-base": "1.0.4", + "des.js": "1.0.0", + "inherits": "2.0.3" + } + }, + "browserify-rsa": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", + "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", + "requires": { + "bn.js": "4.11.8", + "randombytes": "2.0.5" + } + }, + "browserify-shim": { + "version": "3.8.14", + "resolved": "https://registry.npmjs.org/browserify-shim/-/browserify-shim-3.8.14.tgz", + "integrity": "sha1-vxBXAmky0yU8de991xTzuHft7Gs=", + "requires": { + "exposify": "0.5.0", + "mothership": "0.2.0", + "rename-function-calls": "0.1.1", + "resolve": "0.6.3", + "through": "2.3.8" + }, + "dependencies": { + "resolve": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-0.6.3.tgz", + "integrity": "sha1-3ZV5gufnNt699TtYpN2RdUV13UY=" + } + } + }, + "browserify-sign": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.4.tgz", + "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=", + "requires": { + "bn.js": "4.11.8", + "browserify-rsa": "4.0.1", + "create-hash": "1.1.3", + "create-hmac": "1.1.6", + "elliptic": "6.4.0", + "inherits": "2.0.3", + "parse-asn1": "5.1.0" + } + }, + "browserify-zlib": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.1.4.tgz", + "integrity": "sha1-uzX4pRn2AOD6a4SFJByXnQFB+y0=", + "requires": { + "pako": "0.2.9" + } + }, + "buffer": { + "version": "2.8.2", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-2.8.2.tgz", + "integrity": "sha1-1zwhTAM0OE3CmwTuD/X1Unx5dOc=", + "requires": { + "base64-js": "0.0.7", + "ieee754": "1.1.8", + "is-array": "1.0.1" + } + }, + "buffer-equal-constant-time": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", + "integrity": "sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk=" + }, + "buffer-xor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=" + }, + "buffers": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/buffers/-/buffers-0.1.1.tgz", + "integrity": "sha1-skV5w77U1tOWru5tmorn9Ugqt7s=" + }, + "builtin-status-codes": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-1.0.0.tgz", + "integrity": "sha1-MGN+4mKXisBxdOFtf4LwrQbgha0=" + }, + "builtins": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/builtins/-/builtins-0.0.7.tgz", + "integrity": "sha1-NVIZzWzxjb58Acx/0tznZc/cVJo=" + }, + "bytebuffer": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/bytebuffer/-/bytebuffer-5.0.1.tgz", + "integrity": "sha1-WC7qSxqHO20CCkjVjfhfC7ps/d0=", + "requires": { + "long": "3.2.0" + } + }, + "callsite": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz", + "integrity": "sha1-KAOY5dZkvXQDi28JBRU+borxvCA=" + }, + "camelcase": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", + "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=" + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" + }, + "chai": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/chai/-/chai-3.5.0.tgz", + "integrity": "sha1-TQJjewZ/6Vi9v906QOxW/vc3Mkc=", + "requires": { + "assertion-error": "1.0.2", + "deep-eql": "0.1.3", + "type-detect": "1.0.0" + } + }, + "chainsaw": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/chainsaw/-/chainsaw-0.1.0.tgz", + "integrity": "sha1-XqtQsor+WAdNDVgpE4iCi15fvJg=", + "requires": { + "traverse": "0.3.9" + } + }, + "charenc": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/charenc/-/charenc-0.0.2.tgz", + "integrity": "sha1-wKHS86cJLgN3S/qD8UwPxXkKhmc=" + }, + "cipher-base": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "requires": { + "inherits": "2.0.3", + "safe-buffer": "5.1.1" + } + }, + "cliui": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", + "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "requires": { + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wrap-ansi": "2.1.0" + } + }, + "co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" + }, + "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=" + }, + "colors": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz", + "integrity": "sha1-FopHAXVran9RoSzgyXv6KMCE7WM=" + }, + "colour": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/colour/-/colour-0.7.1.tgz", + "integrity": "sha1-nLFpkX7F0SwHNtPoaFdG3xyt93g=" + }, + "combine-source-map": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.3.0.tgz", + "integrity": "sha1-2edPWT2c1DgHMSy12EbUUe+qnrc=", + "requires": { + "convert-source-map": "0.3.5", + "inline-source-map": "0.3.1", + "source-map": "0.1.43" + } + }, + "combined-stream": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz", + "integrity": "sha1-k4NwpXtKUd6ix3wV1cX9+JUWQAk=", + "requires": { + "delayed-stream": "1.0.0" + } + }, + "commander": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.11.0.tgz", + "integrity": "sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ==" + }, + "commondir": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-0.0.1.tgz", + "integrity": "sha1-ifAP3NUbUZxXhzP+xWPmptp/W+I=" + }, + "complex.js": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/complex.js/-/complex.js-2.0.4.tgz", + "integrity": "sha512-Syl95HpxUTS0QjwNxencZsKukgh1zdS9uXeXX2Us0pHaqBR6kiZZi0AkZ9VpZFwHJyVIUVzI4EumjWdXP3fy6w==" + }, + "component-emitter": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", + "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=" + }, + "component-inherit": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/component-inherit/-/component-inherit-0.0.3.tgz", + "integrity": "sha1-ZF/ErfWLcrZJ1crmUTVhnbJv8UM=" + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "concat-stream": { + "version": "1.4.10", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.4.10.tgz", + "integrity": "sha1-rMO79WAsuMyYDGrIQPp9hgPj7zY=", + "requires": { + "inherits": "2.0.3", + "readable-stream": "1.1.14", + "typedarray": "0.0.6" + } + }, + "config-chain": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.11.tgz", + "integrity": "sha1-q6CXR9++TD5w52am5BWG4YWfxvI=", + "requires": { + "ini": "1.3.4", + "proto-list": "1.2.4" + } + }, + "console-browserify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", + "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", + "requires": { + "date-now": "0.1.4" + } + }, + "constants-browserify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-0.0.1.tgz", + "integrity": "sha1-kld9tSe6bEzwpFaNhLwDH0QeIfI=" + }, + "convert-source-map": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-0.3.5.tgz", + "integrity": "sha1-8dgClQr33SYxof6+BZZVDIarMZA=" + }, + "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=" + }, + "create-ecdh": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.0.tgz", + "integrity": "sha1-iIxyNZbN92EvZJgjPuvXo1MBc30=", + "requires": { + "bn.js": "4.11.8", + "elliptic": "6.4.0" + } + }, + "create-hash": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.1.3.tgz", + "integrity": "sha1-YGBCrIuSYnUPSDyt2rD1gZFy2P0=", + "requires": { + "cipher-base": "1.0.4", + "inherits": "2.0.3", + "ripemd160": "2.0.1", + "sha.js": "2.4.8" + } + }, + "create-hmac": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.6.tgz", + "integrity": "sha1-rLniIaThe9sHbpBlfEK5PjcmzwY=", + "requires": { + "cipher-base": "1.0.4", + "create-hash": "1.1.3", + "inherits": "2.0.3", + "ripemd160": "2.0.1", + "safe-buffer": "5.1.1", + "sha.js": "2.4.8" + } + }, + "crypt": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/crypt/-/crypt-0.0.2.tgz", + "integrity": "sha1-iNf/fsDfuG9xPch7u0LQRNPmxBs=" + }, + "cryptiles": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", + "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=", + "requires": { + "boom": "2.10.1" + } + }, + "crypto-browserify": { + "version": "3.11.1", + "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.11.1.tgz", + "integrity": "sha512-Na7ZlwCOqoaW5RwUK1WpXws2kv8mNhWdTlzob0UXulk6G9BDbyiJaGTYBIX61Ozn9l1EPPJpICZb4DaOpT9NlQ==", + "requires": { + "browserify-cipher": "1.0.0", + "browserify-sign": "4.0.4", + "create-ecdh": "4.0.0", + "create-hash": "1.1.3", + "create-hmac": "1.1.6", + "diffie-hellman": "5.0.2", + "inherits": "2.0.3", + "pbkdf2": "3.0.13", + "public-encrypt": "4.0.0", + "randombytes": "2.0.5" + } + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "requires": { + "assert-plus": "1.0.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + } + } + }, + "date-now": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", + "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=" + }, + "debug": { + "version": "2.6.8", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz", + "integrity": "sha1-5zFTHKLt4n0YgiJCfaF4IdaP9Pw=", + "requires": { + "ms": "2.0.0" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" + }, + "decimal.js": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-7.2.3.tgz", + "integrity": "sha512-AoFI37QS0S87Ft0r3Bdz4q9xSpm1Paa9lSeKLXgMPk/u/+QPIM5Gy4DHcZQS1seqPJH4gHLauPGn347z0HbsrA==" + }, + "deep-eql": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-0.1.3.tgz", + "integrity": "sha1-71WKyrjeJSBs1xOQbXTlaTDrafI=", + "requires": { + "type-detect": "0.1.1" + }, + "dependencies": { + "type-detect": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-0.1.1.tgz", + "integrity": "sha1-C6XsKohWQORw6k6FBZcZANrFiCI=" + } + } + }, + "deep-equal": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-0.2.2.tgz", + "integrity": "sha1-hLdFiW80xoTpjyzg5Cq69Du6AX0=" + }, + "defined": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/defined/-/defined-0.0.0.tgz", + "integrity": "sha1-817qfXBekzuvE7LwOz+D2SFAOz4=" + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" + }, + "deps-sort": { + "version": "1.3.9", + "resolved": "https://registry.npmjs.org/deps-sort/-/deps-sort-1.3.9.tgz", + "integrity": "sha1-Kd//U+F7Nq7K51MK27v2IsLtGnE=", + "requires": { + "JSONStream": "1.3.1", + "shasum": "1.0.2", + "subarg": "1.0.0", + "through2": "1.1.1" + }, + "dependencies": { + "jsonparse": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", + "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=" + }, + "JSONStream": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.1.tgz", + "integrity": "sha1-cH92HgHa6eFvG8+TcDt4xwlmV5o=", + "requires": { + "jsonparse": "1.3.1", + "through": "2.3.8" + } + } + } + }, + "des.js": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz", + "integrity": "sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=", + "requires": { + "inherits": "2.0.3", + "minimalistic-assert": "1.0.0" + } + }, + "detective": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/detective/-/detective-4.5.0.tgz", + "integrity": "sha1-blqMaybmx6JUsca210kNmOyR7dE=", + "requires": { + "acorn": "4.0.13", + "defined": "1.0.0" + }, + "dependencies": { + "defined": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", + "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=" + } + } + }, + "df": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/df/-/df-1.1.1.tgz", + "integrity": "sha1-Zdl+h6bA/j7ZyRTz3L4SBaC5aTo=" + }, + "diff": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-1.4.0.tgz", + "integrity": "sha1-fyjS657nsVqX79ic5j3P2qPMur8=" + }, + "diffie-hellman": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.2.tgz", + "integrity": "sha1-tYNXOScM/ias9jIJn97SoH8gnl4=", + "requires": { + "bn.js": "4.11.8", + "miller-rabin": "4.0.0", + "randombytes": "2.0.5" + } + }, + "domain-browser": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.1.7.tgz", + "integrity": "sha1-hnqksJP6oF8d4IwG9NeyH9+GmLw=" + }, + "dot-parts": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dot-parts/-/dot-parts-1.0.1.tgz", + "integrity": "sha1-iEvXvPwwgv+tL+XbU+SU2PPgdD8=" + }, + "duplexer": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz", + "integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=" + }, + "duplexer2": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.0.2.tgz", + "integrity": "sha1-xhTc9n4vsUmVqRcR5aYX6KYKMds=", + "requires": { + "readable-stream": "1.1.14" + } + }, + "eachr": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/eachr/-/eachr-3.2.0.tgz", + "integrity": "sha1-LDXkPqCGUW95l8+At6pk1VpKRIQ=", + "requires": { + "editions": "1.3.3", + "typechecker": "4.4.1" + } + }, + "ecc-jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", + "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", + "optional": true, + "requires": { + "jsbn": "0.1.1" + } + }, + "ecdsa-sig-formatter": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.9.tgz", + "integrity": "sha1-S8kmJ07Dtau1AW5+HWCSGsJisqE=", + "requires": { + "base64url": "2.0.0", + "safe-buffer": "5.1.1" + } + }, + "editions": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/editions/-/editions-1.3.3.tgz", + "integrity": "sha1-CQcQG92iD6w8vjNMJ8vQaI3Jmls=" + }, + "editorconfig": { + "version": "0.13.3", + "resolved": "https://registry.npmjs.org/editorconfig/-/editorconfig-0.13.3.tgz", + "integrity": "sha512-WkjsUNVCu+ITKDj73QDvi0trvpdDWdkDyHybDGSXPfekLCqwmpD7CP7iPbvBgosNuLcI96XTDwNa75JyFl7tEQ==", + "requires": { + "bluebird": "3.5.0", + "commander": "2.11.0", + "lru-cache": "3.2.0", + "semver": "5.4.1", + "sigmund": "1.0.1" + } + }, + "elliptic": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.0.tgz", + "integrity": "sha1-ysmvh2LIWDYYcAPI3+GT5eLq5d8=", + "requires": { + "bn.js": "4.11.8", + "brorand": "1.1.0", + "hash.js": "1.1.3", + "hmac-drbg": "1.0.1", + "inherits": "2.0.3", + "minimalistic-assert": "1.0.0", + "minimalistic-crypto-utils": "1.0.1" + } + }, + "engine.io-client": { + "version": "1.8.4", + "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-1.8.4.tgz", + "integrity": "sha1-n+hd7iWFPKa6viW9KtaHEIY+kcI=", + "requires": { + "component-emitter": "1.2.1", + "component-inherit": "0.0.3", + "debug": "2.3.3", + "engine.io-parser": "1.3.2", + "has-cors": "1.1.0", + "indexof": "0.0.1", + "parsejson": "0.0.3", + "parseqs": "0.0.5", + "parseuri": "0.0.5", + "ws": "1.1.2", + "xmlhttprequest-ssl": "1.5.3", + "yeast": "0.1.2" + }, + "dependencies": { + "debug": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.3.3.tgz", + "integrity": "sha1-QMRT5n5uE8kB3ewxeviYbNqe/4w=", + "requires": { + "ms": "0.7.2" + } + }, + "ms": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.2.tgz", + "integrity": "sha1-riXPJRKziFodldfwN4aNhDESR2U=" + } + } + }, + "engine.io-parser": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-1.3.2.tgz", + "integrity": "sha1-k3sHnwAH0Ik+xW1GyyILjLQ1Igo=", + "requires": { + "after": "0.8.2", + "arraybuffer.slice": "0.0.6", + "base64-arraybuffer": "0.1.5", + "blob": "0.0.4", + "has-binary": "0.1.7", + "wtf-8": "1.0.0" + } + }, + "es3ify": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/es3ify/-/es3ify-0.1.4.tgz", + "integrity": "sha1-rZ+l3xrjTz8x4SEbWBiy1RB439E=", + "requires": { + "esprima-fb": "3001.1.0-dev-harmony-fb", + "jstransform": "3.0.0", + "through": "2.3.8" + }, + "dependencies": { + "esprima-fb": { + "version": "3001.1.0-dev-harmony-fb", + "resolved": "https://registry.npmjs.org/esprima-fb/-/esprima-fb-3001.0001.0000-dev-harmony-fb.tgz", + "integrity": "sha1-t303q8046gt3Qmu4vCkizmtCZBE=" + } + } + }, + "escape-string-regexp": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.2.tgz", + "integrity": "sha1-Tbwv5nTnGUnK8/smlc5/LcHZqNE=" + }, + "escodegen": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.1.0.tgz", + "integrity": "sha1-xmOSP24gqtSNDA+knzHG1PSTYM8=", + "requires": { + "esprima": "1.0.4", + "estraverse": "1.5.1", + "esutils": "1.0.0", + "source-map": "0.1.43" + }, + "dependencies": { + "esprima": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-1.0.4.tgz", + "integrity": "sha1-n1V+CPw7TSbs6d00+Pv0drYlha0=" + } + } + }, + "esmangle-evaluator": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/esmangle-evaluator/-/esmangle-evaluator-1.0.1.tgz", + "integrity": "sha1-Yg2GbvSGGzMR91dm1SqFcrs8YzY=" + }, + "esprima": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.0.tgz", + "integrity": "sha512-oftTcaMu/EGrEIu904mWteKIv8vMuOgGYo7EhVJJN00R/EED9DCua/xxHRdYnKtcECzVg7xOWhflvJMnqcFZjw==" + }, + "estraverse": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.5.1.tgz", + "integrity": "sha1-hno+jlip+EYYr7bC3bzZFrfLr3E=" + }, + "esutils": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-1.0.0.tgz", + "integrity": "sha1-gVHTWOIMisx/t0XnRywAJf5JZXA=" + }, + "event-stream": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/event-stream/-/event-stream-0.5.3.tgz", + "integrity": "sha1-t3uTCfcQet3+q2PwwOr9jbC9jBw=", + "requires": { + "optimist": "0.2.8" + }, + "dependencies": { + "optimist": { + "version": "0.2.8", + "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.2.8.tgz", + "integrity": "sha1-6YGrfiaLRXlIWTtVZ0wJmoFcrDE=", + "requires": { + "wordwrap": "0.0.3" + } + } + } + }, + "events": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/events/-/events-1.0.2.tgz", + "integrity": "sha1-dYSdz+k9EPsFfDAFWv29UdBqjiQ=" + }, + "evp_bytestokey": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "requires": { + "md5.js": "1.3.4", + "safe-buffer": "5.1.1" + } + }, + "exposify": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/exposify/-/exposify-0.5.0.tgz", + "integrity": "sha1-+S0AlMJls/VT4fpFagOhiD0QWcw=", + "requires": { + "globo": "1.1.0", + "map-obj": "1.0.1", + "replace-requires": "1.0.4", + "through2": "0.4.2", + "transformify": "0.1.2" + }, + "dependencies": { + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } + }, + "through2": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.4.2.tgz", + "integrity": "sha1-2/WGYDEVHsg1K7bE22SiKSqEC5s=", + "requires": { + "readable-stream": "1.0.34", + "xtend": "2.1.2" + } + }, + "xtend": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz", + "integrity": "sha1-bv7MKk2tjmlixJAbM3znuoe10os=", + "requires": { + "object-keys": "0.4.0" + } + } + } + }, + "extend": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", + "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=" + }, + "extract-opts": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/extract-opts/-/extract-opts-3.3.1.tgz", + "integrity": "sha1-WrvtyYwNUgLjJ4cn+Rktfghsa+E=", + "requires": { + "eachr": "3.2.0", + "editions": "1.3.3", + "typechecker": "4.4.1" + } + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" + }, + "falafel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/falafel/-/falafel-1.2.0.tgz", + "integrity": "sha1-wY0k71CRF0pJfzGM0ksCaiXN2rQ=", + "requires": { + "acorn": "1.2.2", + "foreach": "2.0.5", + "isarray": "0.0.1", + "object-keys": "1.0.11" + }, + "dependencies": { + "acorn": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-1.2.2.tgz", + "integrity": "sha1-yM4n3grMdtiW0rH6099YjZ6C8BQ=" + }, + "object-keys": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.11.tgz", + "integrity": "sha1-xUYBd4rVYPEULODgG8yotW0TQm0=" + } + } + }, + "find-parent-dir": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/find-parent-dir/-/find-parent-dir-0.3.0.tgz", + "integrity": "sha1-M8RLQpqysvBkYpnF+fcY83b/jVQ=" + }, + "firebase": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/firebase/-/firebase-2.4.2.tgz", + "integrity": "sha1-ThEZ7AOWylYdinrL/xYw/qxsCjE=", + "requires": { + "faye-websocket": "0.9.3" + }, + "dependencies": { + "faye-websocket": { + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.9.3.tgz", + "integrity": "sha1-SCpQWw3wrmJrlphm0710DNuWLoM=", + "requires": { + "websocket-driver": "0.5.2" + }, + "dependencies": { + "websocket-driver": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.5.2.tgz", + "integrity": "sha1-jHyF2gcTtAYFVrTXHAF3XuEmnrk=", + "requires": { + "websocket-extensions": "0.1.1" + }, + "dependencies": { + "websocket-extensions": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.1.tgz", + "integrity": "sha1-domUmcGEtu91Q3fC27DNbLVdKec=" + } + } + } + } + } + } + }, + "firebase-auto-ids": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/firebase-auto-ids/-/firebase-auto-ids-1.1.0.tgz", + "integrity": "sha1-N4/7hZCIjDfrLdi3BGWa0PSfkGE=" + }, + "foreach": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", + "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=" + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" + }, + "form-data": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz", + "integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=", + "requires": { + "asynckit": "0.4.0", + "combined-stream": "1.0.5", + "mime-types": "2.1.17" + } + }, + "formatio": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/formatio/-/formatio-1.1.1.tgz", + "integrity": "sha1-XtPM1jZVEJc4NGXZlhmRAOhhYek=", + "requires": { + "samsam": "1.1.2" + } + }, + "fraction.js": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.0.2.tgz", + "integrity": "sha512-OswcigOSil3vYXgrPSx4NCaSyPikXqVNYN/4CyhS0ucVOJ4GVYr6KQQLLcAudvS/4bBOzxqJ3XIsFaaMjl98ZQ==" + }, + "from": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/from/-/from-0.1.7.tgz", + "integrity": "sha1-g8YK/Fi5xWmXAH7Rp2izqzA6RP4=" + }, + "fs-extra": { + "version": "0.30.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.30.0.tgz", + "integrity": "sha1-8jP/zAjU2n1DLapEl3aYnbHfk/A=", + "requires": { + "graceful-fs": "4.1.11", + "jsonfile": "2.4.0", + "klaw": "1.3.1", + "path-is-absolute": "1.0.1", + "rimraf": "2.6.1" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "fstream": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz", + "integrity": "sha1-XB+x8RdHcRTwYyoOtLcbPLD9MXE=", + "requires": { + "graceful-fs": "4.1.11", + "inherits": "2.0.3", + "mkdirp": "0.5.1", + "rimraf": "2.6.1" + } + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, + "geo-distance": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/geo-distance/-/geo-distance-0.1.2.tgz", + "integrity": "sha1-V4/oNDjVlP/6f0z7la+8OQryDEs=" + }, + "getmac": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/getmac/-/getmac-1.2.1.tgz", + "integrity": "sha1-DQlf0GJ4UAQ+rB3PoLEgu9wUJtE=", + "requires": { + "extract-opts": "3.3.1" + } + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "requires": { + "assert-plus": "1.0.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + } + } + }, + "glob": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "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" + } + }, + "globo": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/globo/-/globo-1.1.0.tgz", + "integrity": "sha1-DSYJiVXepCLrIAGxBImLChAcqvM=", + "requires": { + "accessory": "1.1.0", + "is-defined": "1.0.0", + "ternary": "1.0.0" + } + }, + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" + }, + "growl": { + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.9.2.tgz", + "integrity": "sha1-Dqd0NxXbjY3ixe3hd14bRayFwC8=" + }, + "grpc": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/grpc/-/grpc-1.6.0.tgz", + "integrity": "sha1-LWN9HligPFMOvJvC3WwTXCTBIs8=", + "requires": { + "arguejs": "0.2.3", + "lodash": "4.17.4", + "nan": "2.7.0", + "node-pre-gyp": "0.6.36", + "protobufjs": "5.0.2" + }, + "dependencies": { + "abbrev": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.0.tgz", + "integrity": "sha1-0FVMIlZjbi9W58LlrRg/hZQo2B8=" + }, + "ajv": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz", + "integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=", + "requires": { + "co": "4.6.0", + "json-stable-stringify": "1.0.1" + } + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" + }, + "aproba": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.1.2.tgz", + "integrity": "sha512-ZpYajIfO0j2cOFTO955KUMIKNmj6zhX8kVztMAxFsDaMwz+9Z9SV0uou2pC9HJqcfpffOsjnbrDMvkNy+9RXPw==" + }, + "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=", + "requires": { + "delegates": "1.0.0", + "readable-stream": "2.3.3" + } + }, + "asn1": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", + "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=" + }, + "assert-plus": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz", + "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=" + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + }, + "aws-sign2": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz", + "integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8=" + }, + "aws4": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.6.0.tgz", + "integrity": "sha1-g+9cqGCysy5KDe7e6MdxudtXRx4=" + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + }, + "bcrypt-pbkdf": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz", + "integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=", + "optional": true, + "requires": { + "tweetnacl": "0.14.5" + } + }, + "block-stream": { + "version": "0.0.9", + "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz", + "integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=", + "requires": { + "inherits": "2.0.3" + } + }, + "boom": { + "version": "2.10.1", + "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", + "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=", + "requires": { + "hoek": "2.16.3" + } + }, + "brace-expansion": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", + "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=", + "requires": { + "balanced-match": "1.0.0", + "concat-map": "0.0.1" + } + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" + }, + "co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" + }, + "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=" + }, + "combined-stream": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz", + "integrity": "sha1-k4NwpXtKUd6ix3wV1cX9+JUWQAk=", + "requires": { + "delayed-stream": "1.0.0" + } + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "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=" + }, + "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=" + }, + "cryptiles": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", + "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=", + "requires": { + "boom": "2.10.1" + } + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "requires": { + "assert-plus": "1.0.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + } + } + }, + "debug": { + "version": "2.6.8", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz", + "integrity": "sha1-5zFTHKLt4n0YgiJCfaF4IdaP9Pw=", + "requires": { + "ms": "2.0.0" + } + }, + "deep-extend": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.4.2.tgz", + "integrity": "sha1-SLaZwn4zS/ifEIkr5DL25MfTSn8=" + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" + }, + "delegates": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=" + }, + "ecc-jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", + "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", + "optional": true, + "requires": { + "jsbn": "0.1.1" + } + }, + "extend": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", + "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=" + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" + }, + "form-data": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz", + "integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=", + "requires": { + "asynckit": "0.4.0", + "combined-stream": "1.0.5", + "mime-types": "2.1.16" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "fstream": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz", + "integrity": "sha1-XB+x8RdHcRTwYyoOtLcbPLD9MXE=", + "requires": { + "graceful-fs": "4.1.11", + "inherits": "2.0.3", + "mkdirp": "0.5.1", + "rimraf": "2.6.1" + } + }, + "fstream-ignore": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/fstream-ignore/-/fstream-ignore-1.0.5.tgz", + "integrity": "sha1-nDHa40dnAY/h0kmyTa2mfQktoQU=", + "requires": { + "fstream": "1.0.11", + "inherits": "2.0.3", + "minimatch": "3.0.4" + } + }, + "gauge": { + "version": "2.7.4", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", + "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", + "requires": { + "aproba": "1.1.2", + "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" + } + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "requires": { + "assert-plus": "1.0.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + } + } + }, + "glob": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "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" + } + }, + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" + }, + "har-schema": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-1.0.5.tgz", + "integrity": "sha1-0mMTX0MwfALGAq/I/pWXDAFRNp4=" + }, + "har-validator": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-4.2.1.tgz", + "integrity": "sha1-M0gdDxu/9gDdID11gSpqX7oALio=", + "requires": { + "ajv": "4.11.8", + "har-schema": "1.0.5" + } + }, + "has-unicode": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=" + }, + "hawk": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz", + "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=", + "requires": { + "boom": "2.10.1", + "cryptiles": "2.0.5", + "hoek": "2.16.3", + "sntp": "1.0.9" + } + }, + "hoek": { + "version": "2.16.3", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", + "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=" + }, + "http-signature": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz", + "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=", + "requires": { + "assert-plus": "0.2.0", + "jsprim": "1.4.1", + "sshpk": "1.13.1" + } + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "requires": { + "once": "1.4.0", + "wrappy": "1.0.2" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + }, + "ini": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.4.tgz", + "integrity": "sha1-BTfLedr1m1mhpRff9wbIbsA5Fi4=" + }, + "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=", + "requires": { + "number-is-nan": "1.0.1" + } + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "optional": true + }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" + }, + "json-stable-stringify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", + "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", + "requires": { + "jsonify": "0.0.0" + } + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" + }, + "jsonify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", + "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=" + }, + "jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + } + } + }, + "mime-db": { + "version": "1.29.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.29.0.tgz", + "integrity": "sha1-SNJtI1WJZRcErFkWygYAGRQmaHg=" + }, + "mime-types": { + "version": "2.1.16", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.16.tgz", + "integrity": "sha1-K4WKUuXs1RbbiXrCvodIeDBpjiM=", + "requires": { + "mime-db": "1.29.0" + } + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "requires": { + "brace-expansion": "1.1.8" + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "requires": { + "minimist": "0.0.8" + }, + "dependencies": { + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" + } + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "node-pre-gyp": { + "version": "0.6.36", + "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.6.36.tgz", + "integrity": "sha1-22BBEst04NR3VU6bUFsXq936t4Y=", + "requires": { + "mkdirp": "0.5.1", + "nopt": "4.0.1", + "npmlog": "4.1.2", + "rc": "1.2.1", + "request": "2.81.0", + "rimraf": "2.6.1", + "semver": "5.4.1", + "tar": "2.2.1", + "tar-pack": "3.4.0" + } + }, + "nopt": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz", + "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=", + "requires": { + "abbrev": "1.1.0", + "osenv": "0.1.4" + } + }, + "npmlog": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", + "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", + "requires": { + "are-we-there-yet": "1.1.4", + "console-control-strings": "1.1.0", + "gauge": "2.7.4", + "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=" + }, + "oauth-sign": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", + "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=" + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1.0.2" + } + }, + "os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" + }, + "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=" + }, + "osenv": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.4.tgz", + "integrity": "sha1-Qv5tWVPfBsgGS+bxdsPQWqqjRkQ=", + "requires": { + "os-homedir": "1.0.2", + "os-tmpdir": "1.0.2" + } + }, + "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=" + }, + "performance-now": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-0.2.0.tgz", + "integrity": "sha1-M+8wxcd9TqIcWlOGnZG1bY8lVeU=" + }, + "process-nextick-args": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=" + }, + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" + }, + "qs": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz", + "integrity": "sha1-E+JtKK1rD/qpExLNO/cI7TUecjM=" + }, + "rc": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.1.tgz", + "integrity": "sha1-LgPo5C7kULjLPc5lvhv4l04d/ZU=", + "requires": { + "deep-extend": "0.4.2", + "ini": "1.3.4", + "minimist": "1.2.0", + "strip-json-comments": "2.0.1" + } + }, + "readable-stream": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", + "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "safe-buffer": "5.1.1", + "string_decoder": "1.0.3", + "util-deprecate": "1.0.2" + } + }, + "request": { + "version": "2.81.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.81.0.tgz", + "integrity": "sha1-xpKJRqDgbF+Nb4qTM0af/aRimKA=", + "requires": { + "aws-sign2": "0.6.0", + "aws4": "1.6.0", + "caseless": "0.12.0", + "combined-stream": "1.0.5", + "extend": "3.0.1", + "forever-agent": "0.6.1", + "form-data": "2.1.4", + "har-validator": "4.2.1", + "hawk": "3.1.3", + "http-signature": "1.1.1", + "is-typedarray": "1.0.0", + "isstream": "0.1.2", + "json-stringify-safe": "5.0.1", + "mime-types": "2.1.16", + "oauth-sign": "0.8.2", + "performance-now": "0.2.0", + "qs": "6.4.0", + "safe-buffer": "5.1.1", + "stringstream": "0.0.5", + "tough-cookie": "2.3.2", + "tunnel-agent": "0.6.0", + "uuid": "3.1.0" + } + }, + "rimraf": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.1.tgz", + "integrity": "sha1-wjOOxkPfeht/5cVPqG9XQopV8z0=", + "requires": { + "glob": "7.1.2" + } + }, + "safe-buffer": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" + }, + "semver": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", + "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==" + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" + }, + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" + }, + "sntp": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", + "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=", + "requires": { + "hoek": "2.16.3" + } + }, + "sshpk": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.13.1.tgz", + "integrity": "sha1-US322mKHFEMW3EwY/hzx2UBzm+M=", + "requires": { + "asn1": "0.2.3", + "assert-plus": "1.0.0", + "bcrypt-pbkdf": "1.0.1", + "dashdash": "1.14.1", + "ecc-jsbn": "0.1.1", + "getpass": "0.1.7", + "jsbn": "0.1.1", + "tweetnacl": "0.14.5" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + } + } + }, + "string_decoder": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "requires": { + "safe-buffer": "5.1.1" + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } + }, + "stringstream": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", + "integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg=" + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "requires": { + "ansi-regex": "2.1.1" + } + }, + "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=" + }, + "tar": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz", + "integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=", + "requires": { + "block-stream": "0.0.9", + "fstream": "1.0.11", + "inherits": "2.0.3" + } + }, + "tar-pack": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/tar-pack/-/tar-pack-3.4.0.tgz", + "integrity": "sha1-I74tf2cagzk3bL2wuP4/3r8xeYQ=", + "requires": { + "debug": "2.6.8", + "fstream": "1.0.11", + "fstream-ignore": "1.0.5", + "once": "1.4.0", + "readable-stream": "2.3.3", + "rimraf": "2.6.1", + "tar": "2.2.1", + "uid-number": "0.0.6" + } + }, + "tough-cookie": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.2.tgz", + "integrity": "sha1-8IH3bkyFcg5sN6X6ztc3FQ2EByo=", + "requires": { + "punycode": "1.4.1" + } + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "requires": { + "safe-buffer": "5.1.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "optional": true + }, + "uid-number": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/uid-number/-/uid-number-0.0.6.tgz", + "integrity": "sha1-DqEOgDXo61uOREnwbaHHMGY7qoE=" + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "uuid": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.1.0.tgz", + "integrity": "sha512-DIWtzUkw04M4k3bf1IcpS2tngXEL26YUD2M0tMDUpnUrz2hgzUBlD55a4FjdLGPvfHxS6uluGWvaVEqgBcVa+g==" + }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "requires": { + "assert-plus": "1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "1.3.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + } + } + }, + "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==", + "requires": { + "string-width": "1.0.2" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + } + } + }, + "har-schema": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-1.0.5.tgz", + "integrity": "sha1-0mMTX0MwfALGAq/I/pWXDAFRNp4=" + }, + "har-validator": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-4.2.1.tgz", + "integrity": "sha1-M0gdDxu/9gDdID11gSpqX7oALio=", + "requires": { + "ajv": "4.11.8", + "har-schema": "1.0.5" + } + }, + "has": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.1.tgz", + "integrity": "sha1-hGFzP1OLCDfJNh45qauelwTcLyg=", + "requires": { + "function-bind": "1.1.1" + } + }, + "has-binary": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/has-binary/-/has-binary-0.1.7.tgz", + "integrity": "sha1-aOYesWIQyVRaClzOBqhzkS/h5ow=", + "requires": { + "isarray": "0.0.1" + } + }, + "has-cors": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-cors/-/has-cors-1.1.0.tgz", + "integrity": "sha1-XkdHk/fqmEPRu5nCPu9J/xJv/zk=" + }, + "has-require": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/has-require/-/has-require-1.2.2.tgz", + "integrity": "sha1-khZ1qxMNvZdo/I2o8ajiQt+kF3Q=", + "requires": { + "escape-string-regexp": "1.0.5" + }, + "dependencies": { + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" + } + } + }, + "hash-base": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-2.0.2.tgz", + "integrity": "sha1-ZuodhW206KVHDK32/OI65SRO8uE=", + "requires": { + "inherits": "2.0.3" + } + }, + "hash.js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", + "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", + "requires": { + "inherits": "2.0.3", + "minimalistic-assert": "1.0.0" + } + }, + "hawk": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz", + "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=", + "requires": { + "boom": "2.10.1", + "cryptiles": "2.0.5", + "hoek": "2.16.3", + "sntp": "1.0.9" + } + }, + "hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "requires": { + "hash.js": "1.1.3", + "minimalistic-assert": "1.0.0", + "minimalistic-crypto-utils": "1.0.1" + } + }, + "hoek": { + "version": "2.16.3", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", + "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=" + }, + "htmlescape": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/htmlescape/-/htmlescape-1.1.1.tgz", + "integrity": "sha1-OgPtwiFLyjtmQko+eVk0lQnLA1E=" + }, + "http-browserify": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/http-browserify/-/http-browserify-1.7.0.tgz", + "integrity": "sha1-M3la3nLfiKz7/TZ3PO/tp2RzWyA=", + "requires": { + "Base64": "0.2.1", + "inherits": "2.0.3" + } + }, + "http-signature": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz", + "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=", + "requires": { + "assert-plus": "0.2.0", + "jsprim": "1.4.1", + "sshpk": "1.13.1" + } + }, + "https-browserify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-0.0.1.tgz", + "integrity": "sha1-P5E2XKvmC3ftDruiS0VOPgnZWoI=" + }, + "iconv-lite": { + "version": "0.4.18", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.18.tgz", + "integrity": "sha512-sr1ZQph3UwHTR0XftSbK85OvBbxe/abLGzEnPENCQwmHf7sck8Oyu4ob3LgBxWWxRoM+QszeUyl7jbqapu2TqA==" + }, + "ieee754": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.8.tgz", + "integrity": "sha1-vjPUCsEO8ZJnAfbwii2G+/0a0+Q=" + }, + "immediate": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", + "integrity": "sha1-nbHb0Pr43m++D13V5Wu2BigN5ps=" + }, + "indexof": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", + "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=" + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "requires": { + "once": "1.4.0", + "wrappy": "1.0.2" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + }, + "ini": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.4.tgz", + "integrity": "sha1-BTfLedr1m1mhpRff9wbIbsA5Fi4=" + }, + "inline-process-browser": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/inline-process-browser/-/inline-process-browser-1.0.0.tgz", + "integrity": "sha1-RqYbFT3TybFiSxoAYm7bT39BTyI=", + "requires": { + "falafel": "1.2.0", + "through2": "0.6.5" + }, + "dependencies": { + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } + }, + "through2": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", + "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", + "requires": { + "readable-stream": "1.0.34", + "xtend": "4.0.1" + } + } + } + }, + "inline-source-map": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/inline-source-map/-/inline-source-map-0.3.1.tgz", + "integrity": "sha1-pSi1FOaJ/OkNswiehw2S9Sestes=", + "requires": { + "source-map": "0.3.0" + }, + "dependencies": { + "source-map": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.3.0.tgz", + "integrity": "sha1-hYb7mloAXltQHiHNGLbyG0V60fk=", + "requires": { + "amdefine": "1.0.1" + } + } + } + }, + "insert-module-globals": { + "version": "6.6.3", + "resolved": "https://registry.npmjs.org/insert-module-globals/-/insert-module-globals-6.6.3.tgz", + "integrity": "sha1-IGOOKaMPntHKLjqCX7wsulJG3fw=", + "requires": { + "combine-source-map": "0.6.1", + "concat-stream": "1.4.10", + "is-buffer": "1.1.5", + "JSONStream": "1.3.1", + "lexical-scope": "1.2.0", + "process": "0.11.10", + "through2": "1.1.1", + "xtend": "4.0.1" + }, + "dependencies": { + "combine-source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.6.1.tgz", + "integrity": "sha1-m0oJwxYDPXaODxHgKfonMOB5rZY=", + "requires": { + "convert-source-map": "1.1.3", + "inline-source-map": "0.5.0", + "lodash.memoize": "3.0.4", + "source-map": "0.4.4" + } + }, + "convert-source-map": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.1.3.tgz", + "integrity": "sha1-SCnId+n+SbMWHzvzZziI4gRpmGA=" + }, + "inline-source-map": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/inline-source-map/-/inline-source-map-0.5.0.tgz", + "integrity": "sha1-Skxd2OT7Xps82mDIIt+tyu5m4K8=", + "requires": { + "source-map": "0.4.4" + } + }, + "jsonparse": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", + "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=" + }, + "JSONStream": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.1.tgz", + "integrity": "sha1-cH92HgHa6eFvG8+TcDt4xwlmV5o=", + "requires": { + "jsonparse": "1.3.1", + "through": "2.3.8" + } + }, + "process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=" + }, + "source-map": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", + "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", + "requires": { + "amdefine": "1.0.1" + } + } + } + }, + "invert-kv": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=" + }, + "is-array": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-array/-/is-array-1.0.1.tgz", + "integrity": "sha1-6YUMwsyGDDvAl36EzPDdRkWEJ5o=" + }, + "is-buffer": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.5.tgz", + "integrity": "sha1-Hzsm72E7IUuIy8ojzGwB2Hlh7sw=" + }, + "is-defined": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-defined/-/is-defined-1.0.0.tgz", + "integrity": "sha1-HwfKZ9Vx9ZTEsUQVpF9774j5K/U=" + }, + "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=", + "requires": { + "number-is-nan": "1.0.1" + } + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" + }, + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" + }, + "jade": { + "version": "0.26.3", + "resolved": "https://registry.npmjs.org/jade/-/jade-0.26.3.tgz", + "integrity": "sha1-jxDXl32NefL2/4YqgbBRPMslaGw=", + "requires": { + "commander": "0.6.1", + "mkdirp": "0.3.0" + }, + "dependencies": { + "commander": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-0.6.1.tgz", + "integrity": "sha1-+mihT2qUXVTbvlDYzbMyDp47GgY=" + }, + "mkdirp": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.0.tgz", + "integrity": "sha1-G79asbqCevI1dRQ0kEJkVfSB/h4=" + } + } + }, + "javascript-natural-sort": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/javascript-natural-sort/-/javascript-natural-sort-0.7.1.tgz", + "integrity": "sha1-+eIwPUUH9tdDVac2ZNFED7Wg71k=" + }, + "js-beautify": { + "version": "1.6.14", + "resolved": "https://registry.npmjs.org/js-beautify/-/js-beautify-1.6.14.tgz", + "integrity": "sha1-07j3Mi0CuSd9WL0jgmTDJ+WARM0=", + "requires": { + "config-chain": "1.1.11", + "editorconfig": "0.13.3", + "mkdirp": "0.5.1", + "nopt": "3.0.6" + } + }, + "js-yaml": { + "version": "3.9.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.9.1.tgz", + "integrity": "sha512-CbcG379L1e+mWBnLvHWWeLs8GyV/EMw862uLI3c+GxVyDHWZcjZinwuBd3iW2pgxgIlksW/1vNJa4to+RvDOww==", + "requires": { + "argparse": "1.0.9", + "esprima": "4.0.0" + } + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "optional": true + }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" + }, + "json-stable-stringify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", + "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", + "requires": { + "jsonify": "0.0.0" + } + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" + }, + "jsonfile": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", + "integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=", + "requires": { + "graceful-fs": "4.1.11" + } + }, + "jsonify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", + "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=" + }, + "jsonparse": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-0.0.5.tgz", + "integrity": "sha1-MwVCrT8KZUZlt3jz6y2an6UHrGQ=" + }, + "JSONStream": { + "version": "0.8.4", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-0.8.4.tgz", + "integrity": "sha1-kWV9/m/4V0gwZhMrRhi2Lo9Ih70=", + "requires": { + "jsonparse": "0.0.5", + "through": "2.3.8" + } + }, + "jsonwebtoken": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-5.7.0.tgz", + "integrity": "sha1-HJD5qGzlt0j1+XnBK3BAK0r83bQ=", + "requires": { + "jws": "3.1.4", + "ms": "0.7.3", + "xtend": "4.0.1" + }, + "dependencies": { + "ms": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.3.tgz", + "integrity": "sha1-cIFVpeROM/X9D8U+gdDUCpG+H/8=" + } + } + }, + "jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + } + } + }, + "jstransform": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/jstransform/-/jstransform-3.0.0.tgz", + "integrity": "sha1-olkats7o2XvzvoMNv6IxO4fNZAs=", + "requires": { + "base62": "0.1.1", + "esprima-fb": "3001.1.0-dev-harmony-fb", + "source-map": "0.1.31" + }, + "dependencies": { + "esprima-fb": { + "version": "3001.1.0-dev-harmony-fb", + "resolved": "https://registry.npmjs.org/esprima-fb/-/esprima-fb-3001.0001.0000-dev-harmony-fb.tgz", + "integrity": "sha1-t303q8046gt3Qmu4vCkizmtCZBE=" + }, + "source-map": { + "version": "0.1.31", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.31.tgz", + "integrity": "sha1-n3BNDWnZ4TioG63267T94z0VHGE=", + "requires": { + "amdefine": "1.0.1" + } + } + } + }, + "jwa": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.1.5.tgz", + "integrity": "sha1-oFUs4CIHQs1S4VN3SjKQXDDnVuU=", + "requires": { + "base64url": "2.0.0", + "buffer-equal-constant-time": "1.0.1", + "ecdsa-sig-formatter": "1.0.9", + "safe-buffer": "5.1.1" + } + }, + "jws": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/jws/-/jws-3.1.4.tgz", + "integrity": "sha1-+ei5M46KhHJ31kRLFGT2GIDgUKI=", + "requires": { + "base64url": "2.0.0", + "jwa": "1.1.5", + "safe-buffer": "5.1.1" + } + }, + "klaw": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz", + "integrity": "sha1-QIhDO0azsbolnXh4XY6W9zugJDk=", + "requires": { + "graceful-fs": "4.1.11" + } + }, + "labeled-stream-splicer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/labeled-stream-splicer/-/labeled-stream-splicer-1.0.2.tgz", + "integrity": "sha1-RhUzFTd4SYHo/SZOHzpDTE4N3WU=", + "requires": { + "inherits": "2.0.3", + "isarray": "0.0.1", + "stream-splicer": "1.3.2" + } + }, + "lcid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "requires": { + "invert-kv": "1.0.0" + } + }, + "lexical-scope": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/lexical-scope/-/lexical-scope-1.2.0.tgz", + "integrity": "sha1-/Ope3HBKSzqHls3KQZw6CvryLfQ=", + "requires": { + "astw": "2.2.0" + } + }, + "lie": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/lie/-/lie-3.0.2.tgz", + "integrity": "sha1-/9oh17uibzd8rYZdNkmy/Izjn+o=", + "requires": { + "es3ify": "0.1.4", + "immediate": "3.0.6", + "inline-process-browser": "1.0.0", + "unreachable-branch-transform": "0.3.0" + } + }, + "line-by-line": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/line-by-line/-/line-by-line-0.1.5.tgz", + "integrity": "sha1-GcRbWfCoBjLDC1xDpkf+Faq5BcI=" + }, + "localforage": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/localforage/-/localforage-1.5.0.tgz", + "integrity": "sha1-a5lOGbVmEfqF3zmS3zl6xKtm6BU=", + "requires": { + "lie": "3.0.2" + } + }, + "lodash": { + "version": "4.17.4", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", + "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=" + }, + "lodash.memoize": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-3.0.4.tgz", + "integrity": "sha1-LcvSwofLwKVcxCMovQxzYVDVPj8=" + }, + "lolex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/lolex/-/lolex-1.3.2.tgz", + "integrity": "sha1-fD2mL/yzDw9agKJWbKJORdigHzE=" + }, + "long": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/long/-/long-3.2.0.tgz", + "integrity": "sha1-2CG3E4yhy1gcFymQ7xTbIAtcR0s=" + }, + "long-stack-traces": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/long-stack-traces/-/long-stack-traces-0.1.2.tgz", + "integrity": "sha1-YCK1Dum7x0tcvXz+6q5BZeGlRuw=" + }, + "lru-cache": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-3.2.0.tgz", + "integrity": "sha1-cXibO39Tmb7IVl3aOKow0qCX7+4=", + "requires": { + "pseudomap": "1.0.2" + } + }, + "map-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=" + }, + "map-stream": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.1.0.tgz", + "integrity": "sha1-5WqpTEyAVaFkBKBnS3jyFffI4ZQ=" + }, + "match-stream": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/match-stream/-/match-stream-0.0.2.tgz", + "integrity": "sha1-mesFAJOzTf+t5CG5rAtBCpz6F88=", + "requires": { + "buffers": "0.1.1", + "readable-stream": "1.0.34" + }, + "dependencies": { + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } + } + } + }, + "mathjs": { + "version": "3.16.3", + "resolved": "https://registry.npmjs.org/mathjs/-/mathjs-3.16.3.tgz", + "integrity": "sha512-lb7Q0+4RCFdAJk/+01nDpRuQfoPm2EXmAy9LSa8nXzAQjeTqeLELdsQsRlMBDvJ53KXC7IOTHdhBOwZd7Q6FjQ==", + "requires": { + "complex.js": "2.0.4", + "decimal.js": "7.2.3", + "fraction.js": "4.0.2", + "javascript-natural-sort": "0.7.1", + "seed-random": "2.2.0", + "tiny-emitter": "2.0.0", + "typed-function": "0.10.5" + } + }, + "matrix-app-config-helper": { + "version": "https://github.com/matrix-io/matrix-app-config-helper/tarball/master", + "integrity": "sha1-T1qhwk/Ww0ctpE9R9d627pxNqcQ=", + "requires": { + "async": "1.5.2", + "colors": "1.1.2", + "debug": "2.6.8", + "js-yaml": "3.9.1", + "lodash": "4.17.4" + } + }, + "matrix-eventfilter": { + "version": "https://github.com/matrix-io/matrix-eventfilter/tarball/master", + "integrity": "sha1-ia2nZuTk2XJHbu+A9r5TkjpOwVE=", + "requires": { + "geo-distance": "0.1.2", + "lodash": "3.10.1", + "mocha": "2.5.3", + "request": "2.81.0", + "should": "6.0.3" + }, + "dependencies": { + "lodash": { + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz", + "integrity": "sha1-W/Rejkm6QYnhfUgnid/RW9FAt7Y=" + }, + "should": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/should/-/should-6.0.3.tgz", + "integrity": "sha1-2u4weGpVdmL7x3TACNfFh5Htsdk=", + "requires": { + "should-equal": "0.3.1", + "should-format": "0.0.7", + "should-type": "0.0.4" + } + } + } + }, + "matrix-firebase": { + "version": "https://github.com/matrix-io/matrix-firebase/tarball/master", + "integrity": "sha1-nCZhR3vwF/c/8GD7zlWzN7oU1Vg=", + "requires": { + "async": "2.5.0", + "colors": "1.1.2", + "debug": "2.6.8", + "firebase": "3.9.0", + "jsonwebtoken": "5.7.0", + "lodash": "4.17.4", + "mockfirebase": "0.12.0", + "request": "2.81.0", + "uuid": "2.0.3" + }, + "dependencies": { + "async": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/async/-/async-2.5.0.tgz", + "integrity": "sha512-e+lJAJeNWuPCNyxZKOBdaJGyLGHugXVQtrAwtuAe2vhxTYxFTKE73p8JuTmdH0qdQZtDvI4dhJwjZc5zsfIsYw==", + "requires": { + "lodash": "4.17.4" + } + }, + "firebase": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/firebase/-/firebase-3.9.0.tgz", + "integrity": "sha1-xCN/UPWO6yUIGxg51svxdfj37Zs=", + "requires": { + "dom-storage": "2.0.2", + "faye-websocket": "0.9.3", + "jsonwebtoken": "7.4.0", + "promise-polyfill": "6.0.2", + "xmlhttprequest": "1.8.0" + }, + "dependencies": { + "base64url": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/base64url/-/base64url-2.0.0.tgz", + "integrity": "sha1-6sFuA+oUOO/5Qj1puqNiYu0fcLs=" + }, + "buffer-equal-constant-time": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", + "integrity": "sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk=" + }, + "dom-storage": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/dom-storage/-/dom-storage-2.0.2.tgz", + "integrity": "sha1-7RfL9oq9EOCu+BgnE+KXxeS1ALA=" + }, + "ecdsa-sig-formatter": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.9.tgz", + "integrity": "sha1-S8kmJ07Dtau1AW5+HWCSGsJisqE=", + "requires": { + "base64url": "2.0.0", + "safe-buffer": "5.0.1" + } + }, + "faye-websocket": { + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.9.3.tgz", + "integrity": "sha1-SCpQWw3wrmJrlphm0710DNuWLoM=", + "requires": { + "websocket-driver": "0.6.5" + } + }, + "hoek": { + "version": "2.16.3", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", + "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=" + }, + "isemail": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/isemail/-/isemail-1.2.0.tgz", + "integrity": "sha1-vgPfjMPineTSxd9lASY/H6RZXpo=" + }, + "joi": { + "version": "6.10.1", + "resolved": "https://registry.npmjs.org/joi/-/joi-6.10.1.tgz", + "integrity": "sha1-TVDDGAeRIgAP5fFq8f+OGRe3fgY=", + "requires": { + "hoek": "2.16.3", + "isemail": "1.2.0", + "moment": "2.18.1", + "topo": "1.1.0" + } + }, + "jsonwebtoken": { + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-7.4.0.tgz", + "integrity": "sha1-UVvyu6Bw7GFbrZf9LpRQJ+tHaUY=", + "requires": { + "joi": "6.10.1", + "jws": "3.1.4", + "lodash.once": "4.1.1", + "ms": "0.7.3", + "xtend": "4.0.1" + } + }, + "jwa": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.1.5.tgz", + "integrity": "sha1-oFUs4CIHQs1S4VN3SjKQXDDnVuU=", + "requires": { + "base64url": "2.0.0", + "buffer-equal-constant-time": "1.0.1", + "ecdsa-sig-formatter": "1.0.9", + "safe-buffer": "5.0.1" + } + }, + "jws": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/jws/-/jws-3.1.4.tgz", + "integrity": "sha1-+ei5M46KhHJ31kRLFGT2GIDgUKI=", + "requires": { + "base64url": "2.0.0", + "jwa": "1.1.5", + "safe-buffer": "5.0.1" + } + }, + "lodash.once": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", + "integrity": "sha1-DdOXEhPHxW34gJd9UEyI+0cal6w=" + }, + "moment": { + "version": "2.18.1", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.18.1.tgz", + "integrity": "sha1-w2GT3Tzhwu7SrbfIAtu8d6gbHA8=" + }, + "ms": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.3.tgz", + "integrity": "sha1-cIFVpeROM/X9D8U+gdDUCpG+H/8=" + }, + "promise-polyfill": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/promise-polyfill/-/promise-polyfill-6.0.2.tgz", + "integrity": "sha1-2chtPcTcLfkBboiUbe/Wm0m0EWI=" + }, + "safe-buffer": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.0.1.tgz", + "integrity": "sha1-0mPKVGls2KMGtcplUekt5XkY++c=" + }, + "topo": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/topo/-/topo-1.1.0.tgz", + "integrity": "sha1-6ddRYV0buH3IZdsYL6HKCl71NtU=", + "requires": { + "hoek": "2.16.3" + } + }, + "websocket-driver": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.6.5.tgz", + "integrity": "sha1-XLJVbOuF9Dc8bYI4qmkchFThOjY=", + "requires": { + "websocket-extensions": "0.1.1" + } + }, + "websocket-extensions": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.1.tgz", + "integrity": "sha1-domUmcGEtu91Q3fC27DNbLVdKec=" + }, + "xmlhttprequest": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz", + "integrity": "sha1-Z/4HXFwk/vOfnWX197f+dRcZaPw=" + }, + "xtend": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" + } + } + }, + "uuid": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.3.tgz", + "integrity": "sha1-Z+LoY3lyFVMN/zGOW/nc6/1Hsho=" + } + } + }, + "matrix-node-sdk": { + "version": "https://github.com/matrix-io/matrix-node-sdk/tarball/master", + "integrity": "sha1-zqSUc98Vs7vZMuxm2mODurvJNUg=", + "requires": { + "async": "0.7.0", + "async-waterfall": "0.1.5", + "browserify": "11.2.0", + "colors": "1.1.2", + "debug": "2.6.8", + "engine.io-client": "1.8.4", + "form-data": "0.1.4", + "getmac": "1.2.1", + "lodash": "4.17.4", + "long-stack-traces": "0.1.2", + "mime": "1.4.0", + "mocha": "2.5.3", + "moment": "2.5.1", + "nedb": "https://github.com/matrix-io/nedb/tarball/master", + "node-uuid": "1.4.8", + "path-to-regexp": "0.2.5", + "properties-parser": "0.1.1", + "ps-tree": "0.0.3", + "q": "1.5.0", + "request": "2.81.0", + "xunit-file": "0.0.6" + }, + "dependencies": { + "assert": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/assert/-/assert-1.3.0.tgz", + "integrity": "sha1-A5OaYiWCqBLMICMgoLmlbJuBWEk=", + "requires": { + "util": "0.10.3" + } + }, + "async": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/async/-/async-0.7.0.tgz", + "integrity": "sha1-RCng5i9d4KVPN0WMSfC4l+tSraU=" + }, + "base64-js": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-0.0.8.tgz", + "integrity": "sha1-EQHpVE9KdrG8OybUUsqW16NeeXg=" + }, + "browser-pack": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/browser-pack/-/browser-pack-5.0.1.tgz", + "integrity": "sha1-QZdxmyDG4KqglFHFER5T77b7wY0=", + "requires": { + "combine-source-map": "0.6.1", + "defined": "1.0.0", + "JSONStream": "1.3.1", + "through2": "1.1.1", + "umd": "3.0.1" + } + }, + "browserify": { + "version": "11.2.0", + "resolved": "https://registry.npmjs.org/browserify/-/browserify-11.2.0.tgz", + "integrity": "sha1-oRu53SCdeVcrgT9+7q+Cil9cDk4=", + "requires": { + "assert": "1.3.0", + "browser-pack": "5.0.1", + "browser-resolve": "1.11.2", + "browserify-zlib": "0.1.4", + "buffer": "3.6.0", + "builtins": "0.0.7", + "commondir": "0.0.1", + "concat-stream": "1.4.10", + "console-browserify": "1.1.0", + "constants-browserify": "0.0.1", + "crypto-browserify": "3.11.1", + "defined": "1.0.0", + "deps-sort": "1.3.9", + "domain-browser": "1.1.7", + "duplexer2": "0.0.2", + "events": "1.0.2", + "glob": "4.5.3", + "has": "1.0.1", + "htmlescape": "1.1.1", + "https-browserify": "0.0.1", + "inherits": "2.0.3", + "insert-module-globals": "6.6.3", + "isarray": "0.0.1", + "JSONStream": "1.3.1", + "labeled-stream-splicer": "1.0.2", + "module-deps": "3.9.1", + "os-browserify": "0.1.2", + "parents": "1.0.1", + "path-browserify": "0.0.0", + "process": "0.11.10", + "punycode": "1.4.1", + "querystring-es3": "0.2.1", + "read-only-stream": "1.1.1", + "readable-stream": "2.3.3", + "resolve": "1.4.0", + "shasum": "1.0.2", + "shell-quote": "0.0.1", + "stream-browserify": "2.0.1", + "stream-http": "1.7.1", + "string_decoder": "0.10.31", + "subarg": "1.0.0", + "syntax-error": "1.3.0", + "through2": "1.1.1", + "timers-browserify": "1.4.2", + "tty-browserify": "0.0.0", + "url": "0.10.3", + "util": "0.10.3", + "vm-browserify": "0.0.4", + "xtend": "4.0.1" + } + }, + "buffer": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-3.6.0.tgz", + "integrity": "sha1-pyyTb3e5a/UvX357RnGAYoVR3vs=", + "requires": { + "base64-js": "0.0.8", + "ieee754": "1.1.8", + "isarray": "1.0.0" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + } + } + }, + "combine-source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.6.1.tgz", + "integrity": "sha1-m0oJwxYDPXaODxHgKfonMOB5rZY=", + "requires": { + "convert-source-map": "1.1.3", + "inline-source-map": "0.5.0", + "lodash.memoize": "3.0.4", + "source-map": "0.4.4" + } + }, + "combined-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-0.0.7.tgz", + "integrity": "sha1-ATfmV7qlp1QcV6w3rF/AfXO03B8=", + "requires": { + "delayed-stream": "0.0.5" + } + }, + "convert-source-map": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.1.3.tgz", + "integrity": "sha1-SCnId+n+SbMWHzvzZziI4gRpmGA=" + }, + "defined": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", + "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=" + }, + "delayed-stream": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-0.0.5.tgz", + "integrity": "sha1-1LH0OpPoKW3+AmlPRoC8N6MTxz8=" + }, + "form-data": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-0.1.4.tgz", + "integrity": "sha1-kavXiKupcCsaq/qLwBAxoqyeOxI=", + "requires": { + "async": "0.9.2", + "combined-stream": "0.0.7", + "mime": "1.2.11" + }, + "dependencies": { + "async": { + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz", + "integrity": "sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0=" + }, + "mime": { + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.2.11.tgz", + "integrity": "sha1-WCA+7Ybjpe8XrtK32evUfwpg3RA=" + } + } + }, + "glob": { + "version": "4.5.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-4.5.3.tgz", + "integrity": "sha1-xstz0yJsHv7wTePFbQEvAzd+4V8=", + "requires": { + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "2.0.10", + "once": "1.4.0" + } + }, + "inline-source-map": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/inline-source-map/-/inline-source-map-0.5.0.tgz", + "integrity": "sha1-Skxd2OT7Xps82mDIIt+tyu5m4K8=", + "requires": { + "source-map": "0.4.4" + } + }, + "jsonparse": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", + "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=" + }, + "JSONStream": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.1.tgz", + "integrity": "sha1-cH92HgHa6eFvG8+TcDt4xwlmV5o=", + "requires": { + "jsonparse": "1.3.1", + "through": "2.3.8" + } + }, + "minimatch": { + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz", + "integrity": "sha1-jQh8OcazjAAbl/ynzm0OHoCvusc=", + "requires": { + "brace-expansion": "1.1.8" + } + }, + "node-uuid": { + "version": "1.4.8", + "resolved": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.8.tgz", + "integrity": "sha1-sEDrCSOWivq/jTL7HxfxFn/auQc=" + }, + "parents": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parents/-/parents-1.0.1.tgz", + "integrity": "sha1-/t1NK/GTp3dF/nHjcdc8MwfZx1E=", + "requires": { + "path-platform": "0.11.15" + } + }, + "process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=" + }, + "ps-tree": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/ps-tree/-/ps-tree-0.0.3.tgz", + "integrity": "sha1-2/jXUqf+Ivp9WGNWiUmWEOknbdw=", + "requires": { + "event-stream": "0.5.3" + } + }, + "readable-stream": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", + "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "safe-buffer": "5.1.1", + "string_decoder": "1.0.3", + "util-deprecate": "1.0.2" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "string_decoder": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "requires": { + "safe-buffer": "5.1.1" + } + } + } + }, + "resolve": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.4.0.tgz", + "integrity": "sha512-aW7sVKPufyHqOmyyLzg/J+8606v5nevBgaliIlV7nUpVMsDnoBGV/cbSLNjZAg9q0Cfd/+easKVKQ8vOu8fn1Q==", + "requires": { + "path-parse": "1.0.5" + } + }, + "source-map": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", + "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", + "requires": { + "amdefine": "1.0.1" + } + }, + "stream-browserify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz", + "integrity": "sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds=", + "requires": { + "inherits": "2.0.3", + "readable-stream": "2.3.3" + } + }, + "umd": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/umd/-/umd-3.0.1.tgz", + "integrity": "sha1-iuVW4RAR9jwllnCKiDclnwGz1g4=" + } + } + }, + "matrix-protos": { + "version": "0.0.14", + "resolved": "https://registry.npmjs.org/matrix-protos/-/matrix-protos-0.0.14.tgz", + "integrity": "sha1-7K25YrRnHq5/AzIqAhv8gYOg6qE=", + "requires": { + "protobufjs": "6.8.0" + }, + "dependencies": { + "protobufjs": { + "version": "6.8.0", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.8.0.tgz", + "integrity": "sha512-47Y49f5JN5Qsbxas2TyI2zFO8j9GpQAQm5thf54fr2O8qcP/jkIXYxmYx1hN2WQFAhESU1xpVn5NWVDBB8WFnw==", + "requires": { + "@protobufjs/aspromise": "1.1.2", + "@protobufjs/base64": "1.1.2", + "@protobufjs/codegen": "2.0.4", + "@protobufjs/eventemitter": "1.1.0", + "@protobufjs/fetch": "1.1.0", + "@protobufjs/float": "1.0.2", + "@protobufjs/inquire": "1.1.0", + "@protobufjs/path": "1.1.2", + "@protobufjs/pool": "1.1.0", + "@protobufjs/utf8": "1.1.0", + "@types/long": "3.0.32", + "@types/node": "7.0.43", + "long": "3.2.0" + } + } + } + }, + "MD5": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/MD5/-/MD5-1.2.2.tgz", + "integrity": "sha1-2QPI7FuiI80rgEMoJIgdBLuYQcA=", + "requires": { + "charenc": "0.0.2", + "crypt": "0.0.2" + } + }, + "md5.js": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.4.tgz", + "integrity": "sha1-6b296UogpawYsENA/Fdk1bCdkB0=", + "requires": { + "hash-base": "3.0.4", + "inherits": "2.0.3" + }, + "dependencies": { + "hash-base": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", + "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", + "requires": { + "inherits": "2.0.3", + "safe-buffer": "5.1.1" + } + } + } + }, + "mic": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/mic/-/mic-2.1.2.tgz", + "integrity": "sha1-8DQoOBeY/4iakEBaAxgVHbBUpO0=" + }, + "miller-rabin": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.0.tgz", + "integrity": "sha1-SmL7HUKTPAVYOYL0xxb2+55sbT0=", + "requires": { + "bn.js": "4.11.8", + "brorand": "1.1.0" + } + }, + "mime": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.0.tgz", + "integrity": "sha512-n9ChLv77+QQEapYz8lV+rIZAW3HhAPW2CXnzb1GN5uMkuczshwvkW7XPsbzU0ZQN3sP47Er2KVkp2p3KyqZKSQ==" + }, + "mime-db": { + "version": "1.30.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.30.0.tgz", + "integrity": "sha1-dMZD2i3Z1qRTmZY0ZbJtXKfXHwE=" + }, + "mime-types": { + "version": "2.1.17", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.17.tgz", + "integrity": "sha1-Cdejk/A+mVp5+K+Fe3Cp4KsWVXo=", + "requires": { + "mime-db": "1.30.0" + } + }, + "minimalistic-assert": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.0.tgz", + "integrity": "sha1-cCvi3aazf0g2vLP121ZkG2Sh09M=" + }, + "minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=" + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "requires": { + "brace-expansion": "1.1.8" + } + }, + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "requires": { + "minimist": "0.0.8" + } + }, + "mocha": { + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-2.5.3.tgz", + "integrity": "sha1-FhvlvetJZ3HrmzV0UFC2IrWu/Fg=", + "requires": { + "commander": "2.3.0", + "debug": "2.2.0", + "diff": "1.4.0", + "escape-string-regexp": "1.0.2", + "glob": "3.2.11", + "growl": "1.9.2", + "jade": "0.26.3", + "mkdirp": "0.5.1", + "supports-color": "1.2.0", + "to-iso-string": "0.0.2" + }, + "dependencies": { + "commander": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.3.0.tgz", + "integrity": "sha1-/UMOiJgy7DU7ms0d4hfBHLPu+HM=" + }, + "debug": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz", + "integrity": "sha1-+HBX6ZWxofauaklgZkE3vFbwOdo=", + "requires": { + "ms": "0.7.1" + } + }, + "glob": { + "version": "3.2.11", + "resolved": "https://registry.npmjs.org/glob/-/glob-3.2.11.tgz", + "integrity": "sha1-Spc/Y1uRkPcV0QmH1cAP0oFevj0=", + "requires": { + "inherits": "2.0.3", + "minimatch": "0.3.0" + } + }, + "lru-cache": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz", + "integrity": "sha1-bUUk6LlV+V1PW1iFHOId1y+06VI=" + }, + "minimatch": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.3.0.tgz", + "integrity": "sha1-J12O2qxPG7MyZHIInnlJyDlGmd0=", + "requires": { + "lru-cache": "2.7.3", + "sigmund": "1.0.1" + } + }, + "ms": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz", + "integrity": "sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg=" + } + } + }, + "mockfirebase": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/mockfirebase/-/mockfirebase-0.12.0.tgz", + "integrity": "sha1-chLO10WH9iJTaHsGU3HqqgVWfhs=", + "requires": { + "browserify": "6.3.4", + "browserify-shim": "3.8.14", + "firebase-auto-ids": "1.1.0", + "lodash": "2.4.2", + "MD5": "1.2.2" + }, + "dependencies": { + "lodash": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-2.4.2.tgz", + "integrity": "sha1-+t2DS5aDBz2hebPq5tnA0VBT9z4=" + } + } + }, + "module-deps": { + "version": "3.9.1", + "resolved": "https://registry.npmjs.org/module-deps/-/module-deps-3.9.1.tgz", + "integrity": "sha1-6nXK+RmQkNJbDVUStaysuW5/h/M=", + "requires": { + "browser-resolve": "1.11.2", + "concat-stream": "1.4.10", + "defined": "1.0.0", + "detective": "4.5.0", + "duplexer2": "0.0.2", + "inherits": "2.0.3", + "JSONStream": "1.3.1", + "parents": "1.0.1", + "readable-stream": "1.1.14", + "resolve": "1.4.0", + "stream-combiner2": "1.0.2", + "subarg": "1.0.0", + "through2": "1.1.1", + "xtend": "4.0.1" + }, + "dependencies": { + "defined": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", + "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=" + }, + "jsonparse": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", + "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=" + }, + "JSONStream": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.1.tgz", + "integrity": "sha1-cH92HgHa6eFvG8+TcDt4xwlmV5o=", + "requires": { + "jsonparse": "1.3.1", + "through": "2.3.8" + } + }, + "parents": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parents/-/parents-1.0.1.tgz", + "integrity": "sha1-/t1NK/GTp3dF/nHjcdc8MwfZx1E=", + "requires": { + "path-platform": "0.11.15" + } + }, + "resolve": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.4.0.tgz", + "integrity": "sha512-aW7sVKPufyHqOmyyLzg/J+8606v5nevBgaliIlV7nUpVMsDnoBGV/cbSLNjZAg9q0Cfd/+easKVKQ8vOu8fn1Q==", + "requires": { + "path-parse": "1.0.5" + } + } + } + }, + "moment": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.5.1.tgz", + "integrity": "sha1-cUajkAUzBkynmdXnkvTkgO4Ogrw=" + }, + "mothership": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/mothership/-/mothership-0.2.0.tgz", + "integrity": "sha1-k9SKL7w+UOKl/I7VhvW8RMZfmpk=", + "requires": { + "find-parent-dir": "0.3.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "mv": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/mv/-/mv-2.1.1.tgz", + "integrity": "sha1-rmzg1vbV4KT32JN5jQPB6pVZtqI=", + "requires": { + "mkdirp": "0.5.1", + "ncp": "2.0.0", + "rimraf": "2.4.5" + }, + "dependencies": { + "glob": { + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/glob/-/glob-6.0.4.tgz", + "integrity": "sha1-DwiGD2oVUSey+t1PnOJLGqtuTSI=", + "requires": { + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + }, + "rimraf": { + "version": "2.4.5", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.4.5.tgz", + "integrity": "sha1-7nEM5dk6j9uFb7Xqj/Di11k0sto=", + "requires": { + "glob": "6.0.4" + } + } + } + }, + "nan": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.7.0.tgz", + "integrity": "sha1-2Vv3IeyHfgjbJ27T/G63j5CDrUY=" + }, + "natives": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/natives/-/natives-1.1.0.tgz", + "integrity": "sha1-6f+EFBimsux6SV6TmYT3jxY+bjE=" + }, + "ncp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ncp/-/ncp-2.0.0.tgz", + "integrity": "sha1-GVoh1sRuNh0vsSgbo4uR6d9727M=" + }, + "nedb": { + "version": "https://github.com/matrix-io/nedb/tarball/master", + "integrity": "sha1-XsMIaDSbQ2RjZp4OjZZCc5JuCNY=", + "requires": { + "async": "0.2.10", + "binary-search-tree": "0.2.5", + "localforage": "1.5.0", + "mkdirp": "0.5.1", + "underscore": "1.4.4" + }, + "dependencies": { + "async": { + "version": "0.2.10", + "resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz", + "integrity": "sha1-trvgsGdLnXGXCMo43owjfLUmw9E=" + } + } + }, + "needle": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/needle/-/needle-1.1.2.tgz", + "integrity": "sha1-0oQaElv9dP77MMA0QQQ2kGHD4To=", + "requires": { + "debug": "2.6.8", + "iconv-lite": "0.4.18" + } + }, + "network": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/network/-/network-0.3.2.tgz", + "integrity": "sha1-fZhbMqzwn45EFAp9VPzBt+E4sFM=", + "requires": { + "async": "1.5.2", + "needle": "1.1.2", + "wmic": "0.1.0" + } + }, + "nopt": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", + "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", + "requires": { + "abbrev": "1.1.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=" + }, + "oauth-sign": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", + "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=" + }, + "object-keys": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz", + "integrity": "sha1-KKaq50KN0sOpLz2V8hM13SBOAzY=" + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1.0.2" + } + }, + "optimist": { + "version": "0.3.7", + "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.3.7.tgz", + "integrity": "sha1-yQlBrVnkJzMokjB00s8ufLxuwNk=", + "requires": { + "wordwrap": "0.0.3" + } + }, + "options": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/options/-/options-0.0.6.tgz", + "integrity": "sha1-7CLTEoBrtT5zF3Pnza788cZDEo8=" + }, + "optjs": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/optjs/-/optjs-3.2.2.tgz", + "integrity": "sha1-aabOicRCpEQDFBrS+bNwvVu29O4=" + }, + "os-browserify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.1.2.tgz", + "integrity": "sha1-ScoCk+CxlZCl9d4Qx/JlphfY/lQ=" + }, + "os-locale": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", + "requires": { + "lcid": "1.0.0" + } + }, + "over": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/over/-/over-0.0.5.tgz", + "integrity": "sha1-8phS5w/X4l82DgE6jsRMgq7bVwg=" + }, + "pako": { + "version": "0.2.9", + "resolved": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz", + "integrity": "sha1-8/dSL073gjSNqBYbrZ7P1Rv4OnU=" + }, + "parents": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/parents/-/parents-0.0.3.tgz", + "integrity": "sha1-+iEvAk2fpjGNu2tM5nbIvkk7nEM=", + "requires": { + "path-platform": "0.0.1" + }, + "dependencies": { + "path-platform": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/path-platform/-/path-platform-0.0.1.tgz", + "integrity": "sha1-tVhdfDxGPYmqAGDYZhHPGv1hfio=" + } + } + }, + "parse-asn1": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.0.tgz", + "integrity": "sha1-N8T5t+06tlx0gXtfJICTf7+XxxI=", + "requires": { + "asn1.js": "4.9.1", + "browserify-aes": "1.0.8", + "create-hash": "1.1.3", + "evp_bytestokey": "1.0.3", + "pbkdf2": "3.0.13" + } + }, + "parsejson": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/parsejson/-/parsejson-0.0.3.tgz", + "integrity": "sha1-q343WfIJ7OmUN5c/fQ8fZK4OZKs=", + "requires": { + "better-assert": "1.0.2" + } + }, + "parseqs": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/parseqs/-/parseqs-0.0.5.tgz", + "integrity": "sha1-1SCKNzjkZ2bikbouoXNoSSGouJ0=", + "requires": { + "better-assert": "1.0.2" + } + }, + "parseuri": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/parseuri/-/parseuri-0.0.5.tgz", + "integrity": "sha1-gCBKUNTbt3m/3G6+J3jZDkvOMgo=", + "requires": { + "better-assert": "1.0.2" + } + }, + "patch-text": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/patch-text/-/patch-text-1.0.2.tgz", + "integrity": "sha1-S/NuZeUXM9bpjwz2LgkDTaoDSKw=" + }, + "path-browserify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz", + "integrity": "sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo=" + }, + "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=" + }, + "path-parse": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz", + "integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=" + }, + "path-platform": { + "version": "0.11.15", + "resolved": "https://registry.npmjs.org/path-platform/-/path-platform-0.11.15.tgz", + "integrity": "sha1-6GQhf3TDaFDwhSt43Hv31KVyG/I=" + }, + "path-to-regexp": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.2.5.tgz", + "integrity": "sha1-C0JpkeOH/ExnXeI1V/NYcV62b7A=" + }, + "pause-stream": { + "version": "0.0.11", + "resolved": "https://registry.npmjs.org/pause-stream/-/pause-stream-0.0.11.tgz", + "integrity": "sha1-/lo0sMvOErWqaitAPuLnO2AvFEU=", + "requires": { + "through": "2.3.8" + } + }, + "pbkdf2": { + "version": "3.0.13", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.13.tgz", + "integrity": "sha512-+dCHxDH+djNtjgWmvVC/my3SYBAKpKNqKSjLkp+GtWWYe4XPE+e/PSD2aCanlEZZnqPk2uekTKNC/ccbwd2X2Q==", + "requires": { + "create-hash": "1.1.3", + "create-hmac": "1.1.6", + "ripemd160": "2.0.1", + "safe-buffer": "5.1.1", + "sha.js": "2.4.8" + } + }, + "performance-now": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-0.2.0.tgz", + "integrity": "sha1-M+8wxcd9TqIcWlOGnZG1bY8lVeU=" + }, + "pi-wifi": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/pi-wifi/-/pi-wifi-1.2.0.tgz", + "integrity": "sha1-hxrt3Pjd0huhlLGBHPSiksCMWmA=", + "requires": { + "async": "2.5.0", + "wireless-tools": "0.19.0" + }, + "dependencies": { + "async": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/async/-/async-2.5.0.tgz", + "integrity": "sha512-e+lJAJeNWuPCNyxZKOBdaJGyLGHugXVQtrAwtuAe2vhxTYxFTKE73p8JuTmdH0qdQZtDvI4dhJwjZc5zsfIsYw==", + "requires": { + "lodash": "4.17.4" + } + } + } + }, + "portfinder": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-0.4.0.tgz", + "integrity": "sha1-o/+t/6/k+5jgYBqF7aJ8J86Eyh4=", + "requires": { + "async": "0.9.0", + "mkdirp": "0.5.1" + }, + "dependencies": { + "async": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/async/-/async-0.9.0.tgz", + "integrity": "sha1-rDYTsdqb7RtHUQu0ZRuJMeRxRsc=" + } + } + }, + "private": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/private/-/private-0.1.7.tgz", + "integrity": "sha1-aM5eih7woju1cMwoU3tTMqumPvE=" + }, + "process": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/process/-/process-0.8.0.tgz", + "integrity": "sha1-e7r3GH/m3tP9W+DLYQP7qcrLl5g=" + }, + "process-nextick-args": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=" + }, + "promise": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", + "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", + "requires": { + "asap": "2.0.6" + } + }, + "properties-parser": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/properties-parser/-/properties-parser-0.1.1.tgz", + "integrity": "sha1-OsGkJEKqYpBN1xQnFafKT7CMVCw=" + }, + "proto-list": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz", + "integrity": "sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk=" + }, + "protobufjs": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-5.0.2.tgz", + "integrity": "sha1-WXSNfc8D0tsiwT2p/rAk4Wq4DJE=", + "requires": { + "ascli": "1.0.1", + "bytebuffer": "5.0.1", + "glob": "7.1.2", + "yargs": "3.32.0" + } + }, + "ps-tree": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/ps-tree/-/ps-tree-1.1.0.tgz", + "integrity": "sha1-tCGyQUDWID8e08dplrRCewjowBQ=", + "requires": { + "event-stream": "3.3.4" + }, + "dependencies": { + "event-stream": { + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/event-stream/-/event-stream-3.3.4.tgz", + "integrity": "sha1-SrTJoPWlTbkzi0w02Gv86PSzVXE=", + "requires": { + "duplexer": "0.1.1", + "from": "0.1.7", + "map-stream": "0.1.0", + "pause-stream": "0.0.11", + "split": "0.3.3", + "stream-combiner": "0.0.4", + "through": "2.3.8" + } + } + } + }, + "pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" + }, + "public-encrypt": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.0.tgz", + "integrity": "sha1-OfaZ86RlYN1eusvKaTyvfGXBjMY=", + "requires": { + "bn.js": "4.11.8", + "browserify-rsa": "4.0.1", + "create-hash": "1.1.3", + "parse-asn1": "5.1.0", + "randombytes": "2.0.5" + } + }, + "pullstream": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/pullstream/-/pullstream-0.4.1.tgz", + "integrity": "sha1-1vs79a7Wl+gxFQ6xACwlo/iuExQ=", + "requires": { + "over": "0.0.5", + "readable-stream": "1.0.34", + "setimmediate": "1.0.5", + "slice-stream": "1.0.0" + }, + "dependencies": { + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } + } + } + }, + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" + }, + "q": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/q/-/q-1.5.0.tgz", + "integrity": "sha1-3QG6ydBtMObyGa7LglPunr3DCPE=" + }, + "qs": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz", + "integrity": "sha1-E+JtKK1rD/qpExLNO/cI7TUecjM=" + }, + "querystring": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=" + }, + "querystring-es3": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", + "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=" + }, + "randombytes": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.5.tgz", + "integrity": "sha512-8T7Zn1AhMsQ/HI1SjcCfT/t4ii3eAqco3yOcSzS4mozsOz69lHLsoMXmF9nZgnFanYscnSlUSgs8uZyKzpE6kg==", + "requires": { + "safe-buffer": "5.1.1" + } + }, + "read-only-stream": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/read-only-stream/-/read-only-stream-1.1.1.tgz", + "integrity": "sha1-Xad8eZ7ROI0++IoYRxu1kk+KC6E=", + "requires": { + "readable-stream": "1.1.14", + "readable-wrap": "1.0.0" + } + }, + "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.2", + "inherits": "2.0.3", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } + }, + "readable-wrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/readable-wrap/-/readable-wrap-1.0.0.tgz", + "integrity": "sha1-O1ohHGMeEjA6VJkcgGwX564ga/8=", + "requires": { + "readable-stream": "1.1.14" + } + }, + "recast": { + "version": "0.10.43", + "resolved": "https://registry.npmjs.org/recast/-/recast-0.10.43.tgz", + "integrity": "sha1-uV1Q9tYHYaX2JS4V2AZ4FoSRzn8=", + "requires": { + "ast-types": "0.8.15", + "esprima-fb": "15001.1001.0-dev-harmony-fb", + "private": "0.1.7", + "source-map": "0.5.7" + }, + "dependencies": { + "esprima-fb": { + "version": "15001.1001.0-dev-harmony-fb", + "resolved": "https://registry.npmjs.org/esprima-fb/-/esprima-fb-15001.1001.0-dev-harmony-fb.tgz", + "integrity": "sha1-Q761fsJujPI3092LM+QlM1d/Jlk=" + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" + } + } + }, + "rename-function-calls": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/rename-function-calls/-/rename-function-calls-0.1.1.tgz", + "integrity": "sha1-f4M2nAB6MAf2q+MDPM+BaGoQjgE=", + "requires": { + "detective": "3.1.0" + }, + "dependencies": { + "detective": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/detective/-/detective-3.1.0.tgz", + "integrity": "sha1-d3gkRKt1K4jKG+Lp0KA5Xx2iXu0=", + "requires": { + "escodegen": "1.1.0", + "esprima-fb": "3001.1.0-dev-harmony-fb" + } + }, + "esprima-fb": { + "version": "3001.1.0-dev-harmony-fb", + "resolved": "https://registry.npmjs.org/esprima-fb/-/esprima-fb-3001.0001.0000-dev-harmony-fb.tgz", + "integrity": "sha1-t303q8046gt3Qmu4vCkizmtCZBE=" + } + } + }, + "replace-requires": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/replace-requires/-/replace-requires-1.0.4.tgz", + "integrity": "sha1-AUtzMLa54lV7cQQ7ZvsCZgw79mc=", + "requires": { + "detective": "4.5.0", + "has-require": "1.2.2", + "patch-text": "1.0.2", + "xtend": "4.0.1" + } + }, + "request": { + "version": "2.81.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.81.0.tgz", + "integrity": "sha1-xpKJRqDgbF+Nb4qTM0af/aRimKA=", + "requires": { + "aws-sign2": "0.6.0", + "aws4": "1.6.0", + "caseless": "0.12.0", + "combined-stream": "1.0.5", + "extend": "3.0.1", + "forever-agent": "0.6.1", + "form-data": "2.1.4", + "har-validator": "4.2.1", + "hawk": "3.1.3", + "http-signature": "1.1.1", + "is-typedarray": "1.0.0", + "isstream": "0.1.2", + "json-stringify-safe": "5.0.1", + "mime-types": "2.1.17", + "oauth-sign": "0.8.2", + "performance-now": "0.2.0", + "qs": "6.4.0", + "safe-buffer": "5.1.1", + "stringstream": "0.0.5", + "tough-cookie": "2.3.2", + "tunnel-agent": "0.6.0", + "uuid": "3.1.0" + } + }, + "resolve": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-0.7.4.tgz", + "integrity": "sha1-OVqe+ehz+/4SvRRAi9kbuTYAPWk=" + }, + "rfile": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/rfile/-/rfile-1.0.0.tgz", + "integrity": "sha1-WXCM+Qyh50xUw8/Fw2/bmBBDUmE=", + "requires": { + "callsite": "1.0.0", + "resolve": "0.3.1" + }, + "dependencies": { + "resolve": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-0.3.1.tgz", + "integrity": "sha1-NMY0R8ZkxwWY0cmxJvxDsqJDEKQ=" + } + } + }, + "rimraf": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.1.tgz", + "integrity": "sha1-wjOOxkPfeht/5cVPqG9XQopV8z0=", + "requires": { + "glob": "7.1.2" + } + }, + "ripemd160": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.1.tgz", + "integrity": "sha1-D0WEKVxTo2KK9+bXmsohzlfRxuc=", + "requires": { + "hash-base": "2.0.2", + "inherits": "2.0.3" + } + }, + "ruglify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/ruglify/-/ruglify-1.0.0.tgz", + "integrity": "sha1-3Ikw4qlUSidDAcyZcldMDQmGtnU=", + "requires": { + "rfile": "1.0.0", + "uglify-js": "2.2.5" + }, + "dependencies": { + "uglify-js": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.2.5.tgz", + "integrity": "sha1-puAqcNg5eSuXgEiLe4sYTAlcmcc=", + "requires": { + "optimist": "0.3.7", + "source-map": "0.1.43" + } + } + } + }, + "safe-buffer": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" + }, + "samsam": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/samsam/-/samsam-1.1.2.tgz", + "integrity": "sha1-vsEf3IOp/aBjQBIQ5AF2wwJNFWc=" + }, + "seed-random": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/seed-random/-/seed-random-2.2.0.tgz", + "integrity": "sha1-KpsZ4lCoFwmSMaW5mk2vgLf77VQ=" + }, + "semver": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", + "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==" + }, + "setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=" + }, + "sha.js": { + "version": "2.4.8", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.8.tgz", + "integrity": "sha1-NwaMLEdra69ALRSknGf1l5IfY08=", + "requires": { + "inherits": "2.0.3" + } + }, + "shallow-copy": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/shallow-copy/-/shallow-copy-0.0.1.tgz", + "integrity": "sha1-QV9CcC1z2BAzApLMXuhurhoRoXA=" + }, + "shasum": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/shasum/-/shasum-1.0.2.tgz", + "integrity": "sha1-5wEjENj0F/TetXEhUOVni4euVl8=", + "requires": { + "json-stable-stringify": "0.0.1", + "sha.js": "2.4.8" + }, + "dependencies": { + "json-stable-stringify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-0.0.1.tgz", + "integrity": "sha1-YRwj6BTbN1Un34URk9tZ3Sryf0U=", + "requires": { + "jsonify": "0.0.0" + } + } + } + }, + "shell-quote": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-0.0.1.tgz", + "integrity": "sha1-GkEZbzwDM8SCMjWT1ohuzxU92YY=" + }, + "should": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/should/-/should-7.1.1.tgz", + "integrity": "sha1-ZGTEi298Hh8YrASDV4+i3VXCxuA=", + "requires": { + "should-equal": "0.5.0", + "should-format": "0.3.1", + "should-type": "0.2.0" + }, + "dependencies": { + "should-equal": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/should-equal/-/should-equal-0.5.0.tgz", + "integrity": "sha1-x5fxNfMGf+tp6+zbMGscP+IbPm8=", + "requires": { + "should-type": "0.2.0" + } + }, + "should-format": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/should-format/-/should-format-0.3.1.tgz", + "integrity": "sha1-LLt4JGFnCs5CkrKx7EaNuM+Z4zA=", + "requires": { + "should-type": "0.2.0" + } + }, + "should-type": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/should-type/-/should-type-0.2.0.tgz", + "integrity": "sha1-ZwfvlVKdmJ3MCY/gdTqx+RNrt/Y=" + } + } + }, + "should-equal": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/should-equal/-/should-equal-0.3.1.tgz", + "integrity": "sha1-vY6pemdI45+tR2o75v1y68LnK/A=", + "requires": { + "should-type": "0.0.4" + } + }, + "should-format": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/should-format/-/should-format-0.0.7.tgz", + "integrity": "sha1-Hi74a9kdqcLgQSM1tWq6vZov3hI=", + "requires": { + "should-type": "0.0.4" + } + }, + "should-type": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/should-type/-/should-type-0.0.4.tgz", + "integrity": "sha1-ATKgVBemEmhmQmrPEW8e1WI6XNA=" + }, + "sigmund": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz", + "integrity": "sha1-P/IfGYytIXX587eBhT/ZTQ0ZtZA=" + }, + "sinon": { + "version": "1.17.7", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-1.17.7.tgz", + "integrity": "sha1-RUKk9JugxFwF6y6d2dID4rjv4L8=", + "requires": { + "formatio": "1.1.1", + "lolex": "1.3.2", + "samsam": "1.1.2", + "util": "0.10.3" + } + }, + "sleep": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/sleep/-/sleep-5.1.1.tgz", + "integrity": "sha1-h4+h1E0I7rDyb7IBjvhinrGjq5Q=", + "requires": { + "nan": "2.7.0" + } + }, + "slice-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slice-stream/-/slice-stream-1.0.0.tgz", + "integrity": "sha1-WzO9ZvATsaf4ZGCwPUY97DmtPqA=", + "requires": { + "readable-stream": "1.0.34" + }, + "dependencies": { + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } + } + } + }, + "sntp": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", + "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=", + "requires": { + "hoek": "2.16.3" + } + }, + "source-map": { + "version": "0.1.43", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.43.tgz", + "integrity": "sha1-wkvBRspRfBRx9drL4lcbK3+eM0Y=", + "requires": { + "amdefine": "1.0.1" + } + }, + "split": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/split/-/split-0.3.3.tgz", + "integrity": "sha1-zQ7qXmOiEd//frDwkcQTPi0N0o8=", + "requires": { + "through": "2.3.8" + } + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" + }, + "sshpk": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.13.1.tgz", + "integrity": "sha1-US322mKHFEMW3EwY/hzx2UBzm+M=", + "requires": { + "asn1": "0.2.3", + "assert-plus": "1.0.0", + "bcrypt-pbkdf": "1.0.1", + "dashdash": "1.14.1", + "ecc-jsbn": "0.1.1", + "getpass": "0.1.7", + "jsbn": "0.1.1", + "tweetnacl": "0.14.5" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + } + } + }, + "stream-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-1.0.0.tgz", + "integrity": "sha1-v5tKv7QrJ011FHnkTg/yZWtvEZM=", + "requires": { + "inherits": "2.0.3", + "readable-stream": "1.1.14" + } + }, + "stream-combiner": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/stream-combiner/-/stream-combiner-0.0.4.tgz", + "integrity": "sha1-TV5DPBhSYd3mI8o/RMWGvPXErRQ=", + "requires": { + "duplexer": "0.1.1" + } + }, + "stream-combiner2": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/stream-combiner2/-/stream-combiner2-1.0.2.tgz", + "integrity": "sha1-unKmtQy/q/qVD8i8h2BL0B62BnE=", + "requires": { + "duplexer2": "0.0.2", + "through2": "0.5.1" + }, + "dependencies": { + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } + }, + "through2": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.5.1.tgz", + "integrity": "sha1-390BLrnHAOIyP9M084rGIqs3Lac=", + "requires": { + "readable-stream": "1.0.34", + "xtend": "3.0.0" + } + }, + "xtend": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-3.0.0.tgz", + "integrity": "sha1-XM50B7r2Qsunvs2laBEcST9ZZlo=" + } + } + }, + "stream-http": { + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-1.7.1.tgz", + "integrity": "sha1-09Km4Uw2o4udr7GZrue7xXBRmXg=", + "requires": { + "builtin-status-codes": "1.0.0", + "foreach": "2.0.5", + "indexof": "0.0.1", + "inherits": "2.0.3", + "object-keys": "1.0.11", + "xtend": "4.0.1" + }, + "dependencies": { + "object-keys": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.11.tgz", + "integrity": "sha1-xUYBd4rVYPEULODgG8yotW0TQm0=" + } + } + }, + "stream-splicer": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/stream-splicer/-/stream-splicer-1.3.2.tgz", + "integrity": "sha1-PARBvhW5v04iYnXm3IOWR0VUZmE=", + "requires": { + "indexof": "0.0.1", + "inherits": "2.0.3", + "isarray": "0.0.1", + "readable-stream": "1.1.14", + "readable-wrap": "1.0.0", + "through2": "1.1.1" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } + }, + "stringstream": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", + "integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg=" + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "requires": { + "ansi-regex": "2.1.1" + } + }, + "subarg": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/subarg/-/subarg-1.0.0.tgz", + "integrity": "sha1-9izxdYHplrSPyWVpn1TAauJouNI=", + "requires": { + "minimist": "1.2.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + } + } + }, + "supports-color": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-1.2.0.tgz", + "integrity": "sha1-/x7R5hFp0Gs88tWI4YixjYhH4X4=" + }, + "syntax-error": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/syntax-error/-/syntax-error-1.3.0.tgz", + "integrity": "sha1-HtkmbE1AvnXcVb+bsct3Biu5bKE=", + "requires": { + "acorn": "4.0.13" + } + }, + "tar": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz", + "integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=", + "requires": { + "block-stream": "0.0.9", + "fstream": "1.0.11", + "inherits": "2.0.3" + } + }, + "ternary": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/ternary/-/ternary-1.0.0.tgz", + "integrity": "sha1-RXAnJWCMlJnUapYQ6bDkn/JveJ4=" + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" + }, + "through2": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/through2/-/through2-1.1.1.tgz", + "integrity": "sha1-CEfLxESfNAVXTb3M2buEG4OsNUU=", + "requires": { + "readable-stream": "1.1.14", + "xtend": "4.0.1" + } + }, + "time": { + "version": "0.11.4", + "resolved": "https://registry.npmjs.org/time/-/time-0.11.4.tgz", + "integrity": "sha1-7DyJR9f6SI87GXi4EQpoGG9dNA8=", + "requires": { + "bindings": "1.2.1", + "debug": "2.6.8", + "nan": "2.7.0" + } + }, + "timers-browserify": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-1.4.2.tgz", + "integrity": "sha1-ycWLV1voQHN1y14kYtrO50NZ9B0=", + "requires": { + "process": "0.11.10" + }, + "dependencies": { + "process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=" + } + } + }, + "tiny-emitter": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/tiny-emitter/-/tiny-emitter-2.0.0.tgz", + "integrity": "sha1-utMnrbGAS0KiMa+nQVMr2ITNCa0=" + }, + "tinycolor2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.4.1.tgz", + "integrity": "sha1-9PrTM0R7wLB9TcjpIJ2POaisd+g=" + }, + "to-iso-string": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/to-iso-string/-/to-iso-string-0.0.2.tgz", + "integrity": "sha1-TcGeZk38y+Jb2NtQiwDG2hWCVdE=" + }, + "tough-cookie": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.2.tgz", + "integrity": "sha1-8IH3bkyFcg5sN6X6ztc3FQ2EByo=", + "requires": { + "punycode": "1.4.1" + } + }, + "transformify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/transformify/-/transformify-0.1.2.tgz", + "integrity": "sha1-mk9CoVRDPdcnuAV1Qoo8nlSJ6/E=", + "requires": { + "readable-stream": "1.1.14" + } + }, + "traverse": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.3.9.tgz", + "integrity": "sha1-cXuPIgzAu3tE5AUUwisui7xw2Lk=" + }, + "tree-kill": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.1.0.tgz", + "integrity": "sha1-yWPc8DciiS7FnLpWnpQLcZVNFyk=" + }, + "tty-browserify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", + "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=" + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "requires": { + "safe-buffer": "5.1.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "optional": true + }, + "type-detect": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-1.0.0.tgz", + "integrity": "sha1-diIXzAbbJY7EiQihKY6LlRIejqI=" + }, + "typechecker": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/typechecker/-/typechecker-4.4.1.tgz", + "integrity": "sha1-+XuV9RsDhBchLWd9RaNz7nvO1+Y=", + "requires": { + "editions": "1.3.3" + } + }, + "typed-function": { + "version": "0.10.5", + "resolved": "https://registry.npmjs.org/typed-function/-/typed-function-0.10.5.tgz", + "integrity": "sha1-Lg8Yq9BlIZ+raUpEamXG0ZgYMsA=" + }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" + }, + "uglify-js": { + "version": "2.4.24", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.4.24.tgz", + "integrity": "sha1-+tV1XB4Vd2WLsG/5q25UjJW+vW4=", + "requires": { + "async": "0.2.10", + "source-map": "0.1.34", + "uglify-to-browserify": "1.0.2", + "yargs": "3.5.4" + }, + "dependencies": { + "async": { + "version": "0.2.10", + "resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz", + "integrity": "sha1-trvgsGdLnXGXCMo43owjfLUmw9E=" + }, + "camelcase": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", + "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=" + }, + "source-map": { + "version": "0.1.34", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.34.tgz", + "integrity": "sha1-p8/omux7FoLDsZjQrPtH19CQVms=", + "requires": { + "amdefine": "1.0.1" + } + }, + "window-size": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", + "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=" + }, + "wordwrap": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", + "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=" + }, + "yargs": { + "version": "3.5.4", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.5.4.tgz", + "integrity": "sha1-2K/49mXpTDS9JZvevRv68N3TU2E=", + "requires": { + "camelcase": "1.2.1", + "decamelize": "1.2.0", + "window-size": "0.1.0", + "wordwrap": "0.0.2" + } + } + } + }, + "uglify-to-browserify": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", + "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=" + }, + "ultron": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.0.2.tgz", + "integrity": "sha1-rOEWq1V80Zc4ak6I9GhTeMiy5Po=" + }, + "umd": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/umd/-/umd-2.1.0.tgz", + "integrity": "sha1-SmMHt2LxfwLSAbX6FU5nM5bCY88=", + "requires": { + "rfile": "1.0.0", + "ruglify": "1.0.0", + "through": "2.3.8", + "uglify-js": "2.4.24" + } + }, + "underscore": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.4.4.tgz", + "integrity": "sha1-YaajIBBiKvoHljvzJSA88SI51gQ=" + }, + "unreachable-branch-transform": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/unreachable-branch-transform/-/unreachable-branch-transform-0.3.0.tgz", + "integrity": "sha1-2ZzExudG0mSSiEW2EdtUsPNHTKo=", + "requires": { + "esmangle-evaluator": "1.0.1", + "recast": "0.10.43", + "through2": "0.6.5" + }, + "dependencies": { + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } + }, + "through2": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", + "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", + "requires": { + "readable-stream": "1.0.34", + "xtend": "4.0.1" + } + } + } + }, + "unzip2": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/unzip2/-/unzip2-0.2.5.tgz", + "integrity": "sha1-TveleaeMFcUfVQ9qBT2xlBSciZI=", + "requires": { + "binary": "0.3.0", + "fstream": "0.1.31", + "match-stream": "0.0.2", + "pullstream": "0.4.1", + "readable-stream": "1.0.34", + "setimmediate": "1.0.5" + }, + "dependencies": { + "fstream": { + "version": "0.1.31", + "resolved": "https://registry.npmjs.org/fstream/-/fstream-0.1.31.tgz", + "integrity": "sha1-czfwWPu7vvqMn1YaKMqwhJICyYg=", + "requires": { + "graceful-fs": "3.0.11", + "inherits": "2.0.3", + "mkdirp": "0.5.1", + "rimraf": "2.6.1" + } + }, + "graceful-fs": { + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-3.0.11.tgz", + "integrity": "sha1-dhPHeKGv6mLyXGMKCG1/Osu92Bg=", + "requires": { + "natives": "1.1.0" + } + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } + } + } + }, + "url": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/url/-/url-0.10.3.tgz", + "integrity": "sha1-Ah5NnHcF8hu/N9A861h2dAJ3TGQ=", + "requires": { + "punycode": "1.3.2", + "querystring": "0.2.0" + }, + "dependencies": { + "punycode": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=" + } + } + }, + "util": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", + "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", + "requires": { + "inherits": "2.0.1" + }, + "dependencies": { + "inherits": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", + "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=" + } + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "uuid": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.1.0.tgz", + "integrity": "sha512-DIWtzUkw04M4k3bf1IcpS2tngXEL26YUD2M0tMDUpnUrz2hgzUBlD55a4FjdLGPvfHxS6uluGWvaVEqgBcVa+g==" + }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "requires": { + "assert-plus": "1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "1.3.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + } + } + }, + "vm-browserify": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz", + "integrity": "sha1-XX6kW7755Kb/ZflUOOCofDV9WnM=", + "requires": { + "indexof": "0.0.1" + } + }, + "window-size": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.4.tgz", + "integrity": "sha1-+OGqHuWlPsW/FR/6CXQqatdpeHY=" + }, + "wireless-tools": { + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/wireless-tools/-/wireless-tools-0.19.0.tgz", + "integrity": "sha1-Z/tzzTcfLZujue8lNACjH4x4SxE=" + }, + "wmic": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/wmic/-/wmic-0.1.0.tgz", + "integrity": "sha1-eLQasR0VTLgSgZ4SkWdNrVXY4dc=", + "requires": { + "async": "2.5.0", + "iconv-lite": "0.4.18" + }, + "dependencies": { + "async": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/async/-/async-2.5.0.tgz", + "integrity": "sha512-e+lJAJeNWuPCNyxZKOBdaJGyLGHugXVQtrAwtuAe2vhxTYxFTKE73p8JuTmdH0qdQZtDvI4dhJwjZc5zsfIsYw==", + "requires": { + "lodash": "4.17.4" + } + } + } + }, + "wordwrap": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", + "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=" + }, + "wrap-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "requires": { + "string-width": "1.0.2", + "strip-ansi": "3.0.1" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "ws": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-1.1.2.tgz", + "integrity": "sha1-iiRPoFJAHgjJiGz0SoUYnh/UBn8=", + "requires": { + "options": "0.0.6", + "ultron": "1.0.2" + } + }, + "wtf-8": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wtf-8/-/wtf-8-1.0.0.tgz", + "integrity": "sha1-OS2LotDxw00e4tYw8V0O+2jhBIo=" + }, + "xmlhttprequest-ssl": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.3.tgz", + "integrity": "sha1-GFqIjATspGw+QHDZn3tJ3jUomS0=" + }, + "xpc-connection": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/xpc-connection/-/xpc-connection-0.1.4.tgz", + "integrity": "sha1-3Nf6oq7Gt6bhjMXdrQQvejTHcVY=", + "optional": true, + "requires": { + "nan": "2.7.0" + } + }, + "xtend": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" + }, + "xunit-file": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/xunit-file/-/xunit-file-0.0.6.tgz", + "integrity": "sha1-+pAfF+J0bGjoC0GWLAqqsos4VaM=" + }, + "y18n": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", + "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=" + }, + "yargs": { + "version": "3.32.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.32.0.tgz", + "integrity": "sha1-AwiOnr+edWtpdRYR0qXvWRSCyZU=", + "requires": { + "camelcase": "2.1.1", + "cliui": "3.2.0", + "decamelize": "1.2.0", + "os-locale": "1.4.0", + "string-width": "1.0.2", + "window-size": "0.1.4", + "y18n": "3.2.1" + } + }, + "yeast": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/yeast/-/yeast-0.1.2.tgz", + "integrity": "sha1-AI4G2AlDIMNy28L47XagymyKxBk=" + }, + "zmq": { + "version": "2.15.3", + "resolved": "https://registry.npmjs.org/zmq/-/zmq-2.15.3.tgz", + "integrity": "sha1-Zsbegsw2sJc0uCBwN3ZJCm+75iQ=", + "requires": { + "bindings": "1.2.1", + "nan": "2.3.5" + }, + "dependencies": { + "nan": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.3.5.tgz", + "integrity": "sha1-gioNwmYpDOTNOhIoLKPn42Rmigg=" + } + } + } + } +} diff --git a/package.json b/package.json index 3beef2dd..2d4a0712 100644 --- a/package.json +++ b/package.json @@ -57,6 +57,7 @@ "matrix-eventfilter": "https://github.com/matrix-io/matrix-eventfilter/tarball/master", "matrix-firebase": "https://github.com/matrix-io/matrix-firebase/tarball/master", "matrix-node-sdk": "https://github.com/matrix-io/matrix-node-sdk/tarball/master", + "matrix-protos": "0.0.14", "mic": "^2.1.1", "mocha": "^2.4.5", "mv": "^2.1.1", From 20dca9b4feae4ad4ff1de3cb93d9cca739f3e008 Mon Sep 17 00:00:00 2001 From: Sean Canton Date: Thu, 14 Sep 2017 11:17:56 -0700 Subject: [PATCH 02/42] initial pro --- lib/service/grpc.js | 76 ++++++++++++++++++++------- lib/service/protobuf.js | 114 +++++++++++++++++++++++++--------------- package.json | 3 +- 3 files changed, 131 insertions(+), 62 deletions(-) diff --git a/lib/service/grpc.js b/lib/service/grpc.js index a9dd812e..71bff9cd 100644 --- a/lib/service/grpc.js +++ b/lib/service/grpc.js @@ -1,28 +1,66 @@ -// We use GRPC to communicate with the MALOS and external services -var grpc = require('grpc'); -var debug = debugLog('grpc'); +const protos = require('matrix-protos'); +module.exports = protos; -const fs = require('fs') -const protosPath = __dirname + '/../../proto'; -var files = fs.readdirSync(protosPath); -_.each(files, function(f){ - // initialize container for this directory - module.exports[f] = {}; +var debug = debugLog('grpc') - if ( fs.statSync(protosPath + '/' + f ).isDirectory() ){ - var ps = fs.readdirSync(protosPath + '/' + f ); +// var protobuf = require('protobufjs'); +const Protos = require('matrix-protos').matrix_io; - _.each(ps, function(p){ - if ( p.indexOf('.proto') > -1 ){ - var exp = grpc.load(protosPath + '/' + f + '/' + p ); - if ( _.has(exp, 'admobilize_vision')){ - module.exports[f][p.slice(0, -6)] = exp.admobilize_vision; - debug('GRPC:>', f, ':', p.slice(0, -6)); +let pExport = {}; +for (let p in Protos) { + // for keeping track of latest version when iterating + let latestV = 0; + for (let pv in Protos[p]) { + // version integer + let vInt = pv.replace(/\D/g, ''); + + if (vInt > latestV) { + latestV = vInt; + } + + // automatically load newest protos available + if (vInt === latestV) { + let fns = [], others = []; + + for (let pi in Protos[p][pv]) { + if (!_.isNull(pi.match(/get|store|delete|service|!Response$|!Request$/gi))) { + // others.push(pi); + fns.push(pi); } } - }) + pExport[p] = Protos[p]['v' + latestV]; + + if (fns.length > 0) { + debug('GRPC ::', p, 'v' + latestV) + // debug('↳'.yellow, others.concat(fns).join(' ').grey) + } + } } -}) +} + +module.exports = pExport; + +// const protosPath = __dirname + '/../../proto'; +// var files = fs.readdirSync(protosPath); +// _.each(files, function(f){ +// // initialize container for this directory +// module.exports[f] = {}; + +// if ( fs.statSync(protosPath + '/' + f ).isDirectory() ){ +// var ps = fs.readdirSync(protosPath + '/' + f ); + +// _.each(ps, function(p){ +// if ( p.indexOf('.proto') > -1 ){ +// var exp = grpc.load(protosPath + '/' + f + '/' + p ); +// if ( _.has(exp, 'admobilize_vision')){ +// module.exports[f][p.slice(0, -6)] = exp.admobilize_vision; +// debug('GRPC:>', f, ':', p.slice(0, -6)); + +// } +// } +// }) +// } +// }) diff --git a/lib/service/protobuf.js b/lib/service/protobuf.js index 71f78d0a..3819192a 100644 --- a/lib/service/protobuf.js +++ b/lib/service/protobuf.js @@ -1,52 +1,82 @@ var debug = debugLog('proto') -var protobuf = require('protobufjs'); -const fs = require('fs') -const protosPath = __dirname + '/../../proto'; -// monkey patch protobuf to add enum strings -var decode = protobuf.Reflect.Message.Field.prototype.decode; -protobuf.Reflect.Message.Field.prototype.decode = function () { - var value = decode.apply(this, arguments); - if (protobuf.TYPES["enum"] === this.type) { - var values = this.resolvedType.children; - for (var i=0; i latestV) { + latestV = vInt; + } + + // automatically load newest protos available + if (vInt === latestV) { + + + pExport[p] = Protos[p]['v' + latestV]; + + debug('Protobuf ::', p, 'v' + latestV) } - // add nested enums - } else if (protobuf.TYPES["message"] === this.type ){ - _.each(this.resolvedType.children, function(c){ - var parent = c.name; - if (protobuf.TYPES["enum"] === c.type) { - var values = c.resolvedType.children; - for (var i=0; i -1 ){ - debug( f, ':', p) - // make sure we don't overwrite - module.exports[f] = _.merge({}, module.exports[f]); - // must build later - module.exports[f][p.slice(0, -6)] = protobuf.loadProtoFile(protosPath + '/' + f + '/' + p); - } - }) - } -}) +// _.each(files, function (f) { + +// if (fs.statSync(protosPath + '/' + f).isDirectory()) { + +// var ps = fs.readdirSync(protosPath + '/' + f); + +// _.each(ps, function (p) { +// if (p.indexOf('.proto') > -1) { +// debug(f, ':', p) +// // make sure we don't overwrite +// module.exports[f] = _.merge({}, module.exports[f]); +// // must build later +// module.exports[f][p.slice(0, -6)] = protobuf.loadProtoFile(protosPath + '/' + f + '/' + p); +// } +// }) +// } +// }) diff --git a/package.json b/package.json index 2d4a0712..f269aa68 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "debug": "DEBUG=*,-engine*,-needle,-*led,-gatt,-bleno,-Component,-bt-characteristic,-hci NODE_ENV=dev node index.js", "debugger": "DEBUG=*,-engine*,-needle,-*led,-gatt,-bleno,-Component,-bt-characteristic,-hci NODE_ENV=dev node --debug index.js", "debug-test": "DEBUG=*,-engine*,-Component*,-gatt,-bleno,-bt-characteristic,-hci node test/_runner.js", + "debug-watch": "NODE_ENV=dev nodemon index.js", "local-debug": "DEBUG=*,-engine*,-Component* NODE_ENV=local node index.js", "local": "NODE_ENV=local node index.js", "start": "nodemon --watch lib --watch config", @@ -83,4 +84,4 @@ "engines": { "node": ">=0.12.7 <=6.5" } -} +} \ No newline at end of file From 3f706da0c6f302ff63cde3131c0c97d8d1744c97 Mon Sep 17 00:00:00 2001 From: Sean Canton Date: Thu, 14 Sep 2017 14:05:11 -0700 Subject: [PATCH 03/42] drivers load matrix proto :) --- lib/device/drivers/accelerometer.js | 20 ++-- lib/device/drivers/altitude.js | 20 ++-- lib/device/drivers/detection.js | 31 +++-- lib/device/drivers/gesture.js | 32 +++--- lib/device/drivers/gpio.js | 16 ++- lib/device/drivers/gyroscope.js | 22 ++-- lib/device/drivers/humidity.js | 22 ++-- lib/device/drivers/ir.js | 27 ++--- lib/device/drivers/led.js | 123 ++++++++++---------- lib/device/drivers/magnetometer.js | 20 ++-- lib/device/drivers/mic.js | 1 - lib/device/drivers/pressure.js | 16 +-- lib/device/drivers/recognition.js | 40 +++---- lib/device/drivers/temperature.js | 18 +-- lib/device/drivers/uv.js | 21 ++-- lib/device/drivers/zigbee.js | 170 ++++++++++++++-------------- 16 files changed, 291 insertions(+), 308 deletions(-) diff --git a/lib/device/drivers/accelerometer.js b/lib/device/drivers/accelerometer.js index 0f5c469a..af05fcdb 100644 --- a/lib/device/drivers/accelerometer.js +++ b/lib/device/drivers/accelerometer.js @@ -1,20 +1,18 @@ -var protoBuilder, matrixMalosBuilder; +var protoBuilder, DeviceDriver; var debug = debugLog('accelerometer') module.exports = { commands: ['accelerometer'], // init runs automatically, wait for app to request component creation - init: function() { - protoBuilder = Matrix.service.protobuf.malos.driver - // Parse matrix_malos package (namespace). - matrixMalosBuilder = protoBuilder.build('matrix_malos') + init: function () { + DeviceDriver = Matrix.service.protobuf.malos.driver }, - read: function(buffer) { - var a = new matrixMalosBuilder.Imu.decode(buffer) + read: function (buffer) { + var a = new DeviceDriver.Imu.decode(buffer) return { x: a.accel_x, y: a.accel_y, z: a.accel_z }; }, - prepare: function(options, cb) { + prepare: function (options, cb) { if (_.isFunction(options)) { cb = options; options = {}; @@ -35,15 +33,15 @@ module.exports = { } // map options to protobuf config - var driverConfigProto = new matrixMalosBuilder.DriverConfig - // 2 seconds between updates. + var driverConfigProto = new DeviceDriver.DriverConfig + // 2 seconds between updates. driverConfigProto.delay_between_updates = options.refresh; // Stop sending updates 6 seconds after pings. driverConfigProto.timeout_after_last_ping = options.timeout; debug('gyro start') cb(driverConfigProto.encode().toBuffer()); }, - ping: function() { + ping: function () { if (_.has(Matrix.components, 'accelerometer')) { Matrix.components.accelerometer.ping(); } else { diff --git a/lib/device/drivers/altitude.js b/lib/device/drivers/altitude.js index e2e1c677..a5381282 100644 --- a/lib/device/drivers/altitude.js +++ b/lib/device/drivers/altitude.js @@ -1,20 +1,18 @@ -var protoBuilder, matrixMalosBuilder; +var DeviceDriver; var debug = debugLog('altitude'); module.exports = { // init runs automatically, wait for app to request component creation - init: function() { - protoBuilder = Matrix.service.protobuf.malos.driver; - // Parse matrix_malos package (namespace). - matrixMalosBuilder = protoBuilder.build('matrix_malos'); + init: function () { + DeviceDriver = Matrix.service.protobuf.malos.driver; }, - read: function(buffer) { + read: function (buffer) { return { - value: new matrixMalosBuilder.Pressure.decode(buffer).altitude + value: new DeviceDriver.Pressure.decode(buffer).altitude }; }, - prepare: function(options, cb) { + prepare: function (options, cb) { if (_.isFunction(options)) { cb = options; options = {}; @@ -35,15 +33,15 @@ module.exports = { } // map options to protobuf config - var driverConfigProto = new matrixMalosBuilder.DriverConfig; - // 2 seconds between updates. + var driverConfigProto = new DeviceDriver.DriverConfig; + // 2 seconds between updates. driverConfigProto.delay_between_updates = options.refresh; // Stop sending updates 6 seconds after pings. driverConfigProto.timeout_after_last_ping = options.timeout; debug('altitude start'); cb(driverConfigProto.encode().toBuffer()); }, - ping: function() { + ping: function () { if (_.has(Matrix.components, 'altitude')) { Matrix.components.altitude.ping(); } else { diff --git a/lib/device/drivers/detection.js b/lib/device/drivers/detection.js index 526f8064..b13159df 100644 --- a/lib/device/drivers/detection.js +++ b/lib/device/drivers/detection.js @@ -1,25 +1,20 @@ -var protoBuilder, protoVisionBuilder, matrixVisionMalosBuilder, matrixMalosBuilder; +var DeviceDriver, VisionDriver, matrixVisionMalosBuilder, matrixMalosBuilder; var debug = debugLog('detection'); module.exports = { commands: ['face', 'demographics'], // init runs automatically, wait for app to request component creation - init: function() { - protoVisionBuilder = Matrix.service.protobuf.vision.vision; - // Parse matrix_malos package (namespace). - matrixVisionMalosBuilder = protoVisionBuilder.build('admobilize_vision'); - - protoBuilder = Matrix.service.protobuf.malos.driver; - // Parse matrix_malos package (namespace). - matrixMalosBuilder = protoBuilder.build('matrix_malos'); + init: function () { + VisionDriver = Matrix.service.protobuf.vision.vision; + DeviceDriver = Matrix.service.protobuf.malos.driver; }, // not technically async, needs for facial_recognition - read: function(buffer) { + read: function (buffer) { debug('read>', new matrixVisionMalosBuilder.VisionResult.decode(buffer).toRaw()); var detect = new matrixVisionMalosBuilder.VisionResult.decode(buffer).toRaw(); - _.each(detect.vision_event, function(v) { + _.each(detect.vision_event, function (v) { debug('>v_e', v.tag, v.tracking_id); if (v.tag === 'TRACKING_START') { Matrix.service.track.add(v.tracking_id); @@ -38,12 +33,12 @@ module.exports = { // image_small: d.image_small.toString() }; - if (_.has(d, 'tracking_id')){ + if (_.has(d, 'tracking_id')) { o.trackId = parseInt(d.tracking_id, 10); } if (_.has(d, 'facial_recognition')) { - o.demographics = _.reduce(d.facial_recognition, function(r, v, k) { + o.demographics = _.reduce(d.facial_recognition, function (r, v, k) { // translate from { tag: 'EMOTION', emotion: 'HAPPY' to { emotion: 'happy' } var tag = v.tag.toLowerCase(); if (_.has(v, tag)) { @@ -64,7 +59,7 @@ module.exports = { return o; }); }, - prepare: function(options, cb) { + prepare: function (options, cb) { if (_.isFunction(options)) { cb = options; options = {}; @@ -86,7 +81,7 @@ module.exports = { // map options to protobuf config var driverConfigProto = new matrixMalosBuilder.DriverConfig; - // 2 seconds between updates. + // 2 seconds between updates. driverConfigProto.set_delay_between_updates(0.05); // Stop sending updates 6 seconds after pings. // driverConfigProto.timeout_after_last_ping = options.timeout; @@ -102,18 +97,18 @@ module.exports = { debug('config>', driverConfigProto); cb(driverConfigProto.encode().toBuffer()); }, - ping: function() { + ping: function () { if (_.has(Matrix.components, 'detection')) { Matrix.components.detection.ping(); } else { console.log('Detection available, not activated.'); } }, - error: function(err) { + error: function (err) { console.error('Face', err); }, - config: function(options) { + config: function (options) { debug('config detection>', options); diff --git a/lib/device/drivers/gesture.js b/lib/device/drivers/gesture.js index 3e2f6aae..e95ba9cf 100644 --- a/lib/device/drivers/gesture.js +++ b/lib/device/drivers/gesture.js @@ -1,27 +1,23 @@ -var protoBuilder, protoVisionBuilder, matrixVisionMalosBuilder, matrixMalosBuilder; +var protoBuilder, VisionDriver, matrixVisionMalosBuilder, matrixMalosBuilder; var debug = debugLog('gesture') module.exports = { commands: ['palm', 'thumb-up', 'fist', 'pinch'], // init runs automatically, wait for app to request component creation - init: function() { - protoVisionBuilder = Matrix.service.protobuf.vision.vision; - // Parse matrix_malos package (namespace). - matrixVisionMalosBuilder = protoVisionBuilder.build('admobilize_vision') - - protoBuilder = Matrix.service.protobuf.malos.driver; - // Parse matrix_malos package (namespace). - matrixMalosBuilder = protoBuilder.build('matrix_malos') + init: function () { + VisionDriver = Matrix.service.protobuf.vision.vision; + + DeviceDriver = Matrix.service.protobuf.malos.driver; }, // not technically async, but needs to be this way to support recog being under service - read: function(buffer) { + read: function (buffer) { debug('-read>', new matrixVisionMalosBuilder.VisionResult.decode(buffer).toRaw()); var detect = new matrixVisionMalosBuilder.VisionResult.decode(buffer).toRaw(); // unlike other sensors, this one is a collection - return _.map(detect.rect_detection, function(d) { + return _.map(detect.rect_detection, function (d) { return { location: d.location, tag: d.tag @@ -31,7 +27,7 @@ module.exports = { // Prepare is done after init. To Prepare the connection by adding a configuration - prepare: function(options, cb) { + prepare: function (options, cb) { if (!_.has(options, 'enumName')) { return console.error('gesture>prepare has no enum name to specify algo') @@ -49,10 +45,10 @@ module.exports = { } var config = new matrixMalosBuilder.DriverConfig - // Generic configuration. - // Almost 0 delay between updates. 200ms. + // Generic configuration. + // Almost 0 delay between updates. 200ms. config.set_delay_between_updates(0.25) - // Driver specific configuration. + // Driver specific configuration. config.malos_eye_config = new matrixMalosBuilder.MalosEyeConfig @@ -70,7 +66,7 @@ module.exports = { }, // pings are executed by heartbeats - ping: function() { + ping: function () { if (_.has(Matrix.components, 'gesture')) { Matrix.components.gesture.ping(); } else { @@ -78,13 +74,13 @@ module.exports = { console.error('Components:', Matrix.components); } }, - error: function(err) { + error: function (err) { console.error('Face', err); }, // gesture as enum PALM // TODO: support options, handle arrays - config: function(options) { + config: function (options) { debug('configure options>', options); diff --git a/lib/device/drivers/gpio.js b/lib/device/drivers/gpio.js index 8ed480d6..8e38741b 100644 --- a/lib/device/drivers/gpio.js +++ b/lib/device/drivers/gpio.js @@ -1,4 +1,4 @@ -var protoBuilder, matrixMalosBuilder; +var DeviceDriver, matrixMalosBuilder; var debug = debugLog('gpio') var pinAmount = 16; @@ -6,12 +6,10 @@ var pinAmount = 16; module.exports = { commands: ['gpio'], // init runs automatically, wait for app to request component creation - init: function() { - protoBuilder = Matrix.service.protobuf.malos.driver - // Parse matrix_malos package (namespace). - matrixMalosBuilder = protoBuilder.build('matrix_malos') + init: function () { + DeviceDriver = Matrix.service.protobuf.malos.driver }, - read: function(buffer) { + read: function (buffer) { var buffer = new matrixMalosBuilder.GpioParams.decode(buffer); return { pin: buffer.pin, //set_pin @@ -20,7 +18,7 @@ module.exports = { values: buffer.values } }, - send: function(options) { + send: function (options) { }, /** @@ -31,7 +29,7 @@ module.exports = { * @return {[type]} [description] */ - prepare: function(options, cb) { + prepare: function (options, cb) { debug('prepare=>', options); var pin = parseInt(options.pin); var value = parseInt(options.value); @@ -70,7 +68,7 @@ module.exports = { cb(new Error('Need to provide params')); } }, - ping: function() { + ping: function () { if (_.has(Matrix.components, 'gpio')) { Matrix.components.gpio.ping(); } else { diff --git a/lib/device/drivers/gyroscope.js b/lib/device/drivers/gyroscope.js index e09459ff..72c319d7 100644 --- a/lib/device/drivers/gyroscope.js +++ b/lib/device/drivers/gyroscope.js @@ -1,17 +1,17 @@ -var protoBuilder, matrixMalosBuilder; +var DeviceDriver, matrixMalosBuilder; var debug = debugLog('gyroscope'); module.exports = { commands: ['gyroscope'], // init runs automatically, wait for app to request component creation - init: function() { - protoBuilder = Matrix.service.protobuf.malos.driver; - // Parse matrix_malos package (namespace). - matrixMalosBuilder = protoBuilder.build('matrix_malos'); + init: function () { + DeviceDriver = Matrix.service.protobuf.malos.driver; + // Parse matrix_malos package (namespace). + SenseDriver = Matrix.service.protobuf.malos.sense; }, - read: function(buffer) { - var g = new matrixMalosBuilder.Imu.decode(buffer); + read: function (buffer) { + var g = new SenseDriver.Imu.decode(buffer); return { // orientation values sent with gyro yaw: g.yaw, @@ -22,7 +22,7 @@ module.exports = { z: g.gyro_z }; }, - prepare: function(options, cb) { + prepare: function (options, cb) { if (_.isFunction(options)) { cb = options; options = {}; @@ -43,15 +43,15 @@ module.exports = { } // map options to protobuf config - var driverConfigProto = new matrixMalosBuilder.DriverConfig; - // 2 seconds between updates. + var driverConfigProto = new DeviceDriver.DriverConfig; + // 2 seconds between updates. driverConfigProto.delay_between_updates = options.refresh; // Stop sending updates 6 seconds after pings. driverConfigProto.timeout_after_last_ping = options.timeout; debug('gyro start'); cb(driverConfigProto.encode().toBuffer()); }, - ping: function() { + ping: function () { if (_.has(Matrix.components, 'gyroscope')) { Matrix.components.gyroscope.ping(); } else { diff --git a/lib/device/drivers/humidity.js b/lib/device/drivers/humidity.js index d7ed16f4..5b3a9f1f 100644 --- a/lib/device/drivers/humidity.js +++ b/lib/device/drivers/humidity.js @@ -1,19 +1,19 @@ -var protoBuilder, matrixMalosBuilder; +var DeviceDriver, SenseDriver; var debug = debugLog('humidity') module.exports = { commands: ['humidity'], // init runs automatically, wait for app to request component creation - init: function() { - protoBuilder = Matrix.service.protobuf.malos.driver - // Parse matrix_malos package (namespace). - matrixMalosBuilder = protoBuilder.build('matrix_malos') + init: function () { + DeviceDriver = Matrix.service.protobuf.malos.driver + // Parse matrix_malos package (namespace). + SenseDriver = Matrix.service.protobuf.malos.sense; }, - read: function(buffer) { - return { value: new matrixMalosBuilder.Humidity.decode(buffer).humidity } + read: function (buffer) { + return { value: new SenseDriver.Humidity.decode(buffer).humidity } }, - prepare: function(options, cb) { + prepare: function (options, cb) { if (_.isFunction(options)) { cb = options; options = {}; @@ -34,15 +34,15 @@ module.exports = { } // map options to protobuf config - var driverConfigProto = new matrixMalosBuilder.DriverConfig - // 2 seconds between updates. + var driverConfigProto = new DeviceDriver.DriverConfig + // 2 seconds between updates. driverConfigProto.delay_between_updates = options.refresh; // Stop sending updates 6 seconds after pings. driverConfigProto.timeout_after_last_ping = options.timeout; debug('humidity start') cb(driverConfigProto.encode().toBuffer()); }, - ping: function() { + ping: function () { if (_.has(Matrix.components, 'humidity')) { Matrix.components.humidity.ping(); } else { diff --git a/lib/device/drivers/ir.js b/lib/device/drivers/ir.js index 365c3aee..f1016c8b 100644 --- a/lib/device/drivers/ir.js +++ b/lib/device/drivers/ir.js @@ -1,25 +1,26 @@ -var protoBuilder, matrixMalosBuilder; +var DeviceDriver, SenseDriver; var debug = debugLog('ir'); module.exports = { - init: function() { - protoBuilder = Matrix.service.protobuf.malos.driver; - // Parse matrix_malos package (namespace). - matrixMalosBuilder = protoBuilder.build('matrix_malos'); + init: function () { + DeviceDriver = Matrix.service.protobuf.malos.driver; + // Parse matrix_malos package (namespace). + + SenseDriver = Matrix.service.protobuf.malos.sense; }, - read: function(buffer) { + read: function (buffer) { return { - value: new matrixMalosBuilder.LircParams.decode(buffer).pressure + value: new SenseDriver.LircParams.decode(buffer).pressure }; }, - send: function(message) { - var msgProto = new matrixMalosBuilder.LircParams(); + send: function (message) { + var msgProto = new SenseDriver.LircParams(); msg.proto.device = ''; msg.proto.command = ''; Matrix.components.ir.send(msg.encode().toBuffer()); }, - prepare: function(options, cb) { + prepare: function (options, cb) { if (_.isFunction(options)) { cb = options; options = {}; @@ -40,15 +41,15 @@ module.exports = { } // map options to protobuf config - var driverConfigProto = new matrixMalosBuilder.DriverConfig; - // 2 seconds between updates. + var driverConfigProto = new DeviceDriver.DriverConfig; + // 2 seconds between updates. driverConfigProto.delay_between_updates = options.refresh; // Stop sending updates 6 seconds after pings. driverConfigProto.timeout_after_last_ping = options.timeout; debug('ir start'); cb(driverConfigProto.encode().toBuffer()); }, - ping: function() { + ping: function () { if (_.has(Matrix.components, 'ir')) { Matrix.components.ir.ping(); } else { diff --git a/lib/device/drivers/led.js b/lib/device/drivers/led.js index 3e96a097..d3d22fba 100644 --- a/lib/device/drivers/led.js +++ b/lib/device/drivers/led.js @@ -1,4 +1,4 @@ -var builder, matrixMalosBuilder, component; +var builder, IoDriver, component; var loaderInt; @@ -8,11 +8,11 @@ function stopLoader() { } function clear() { - var config = new matrixMalosBuilder.DriverConfig; - config.image = new matrixMalosBuilder.EverloopImage; + var config = new DeviceDriver.DriverConfig; + config.image = new IoDriver.EverloopImage; for (var i = 0; i < 35; i++) { - var led = new matrixMalosBuilder.LedValue; + var led = new IoDriver.LedValue; led.setRed(0); led.setGreen(0); led.setBlue(0); @@ -25,12 +25,13 @@ function clear() { module.exports = { // runs init automatically. setup component here for loader - init: function() { - builder = Matrix.service.protobuf.malos.driver; - matrixMalosBuilder = builder.build('matrix_malos'); + init: function () { + DeviceDriver = Matrix.service.protobuf.malos.driver; + IoDriver = Matrix.service.protobuf.malos.io; var options = { name: 'led' }; + //registers component at boot so we can do lights on start var mqs = Matrix.service.zeromq.registerComponent(Matrix.device.drivers[options.name]); // put connections in options for component @@ -40,18 +41,18 @@ module.exports = { component = new Matrix.service.component(options); }, - send: function(colors) { - Matrix.device.drivers.led.prepare(colors, function(colorProto) { + send: function (colors) { + Matrix.device.drivers.led.prepare(colors, function (colorProto) { component.print(colorProto); }); }, - prepare: function(colors, cb) { - var config = new matrixMalosBuilder.DriverConfig; - config.image = new matrixMalosBuilder.EverloopImage; + prepare: function (colors, cb) { + var config = new DeviceDriver.DriverConfig; + config.image = new IoDriver.EverloopImage; for (var i = 0; i < 35; i++) { - var led = new matrixMalosBuilder.LedValue; + var led = new IoDriver.LedValue; if (i < colors.length) { var c = colors[i]; if (!_.has(c, 'w')) { @@ -73,11 +74,11 @@ module.exports = { cb(config.encode().toBuffer()); }, - sendProto: function(colorsProto) { + sendProto: function (colorsProto) { component.print(colorsProto.encode().toBuffer()); }, clear: clear, - bleLoader: function() { + bleLoader: function () { stopLoader(); clear(); //Blue fast breathing effect @@ -85,15 +86,15 @@ module.exports = { var counter = 0; var ledArray; var intensity; //This changes over time - var config = new matrixMalosBuilder.DriverConfig; - config.image = new matrixMalosBuilder.EverloopImage; + var config = new DeviceDriver.DriverConfig; + config.image = new IoDriver.EverloopImage; - loaderInt = setInterval(function() { + loaderInt = setInterval(function () { intensity = Math.abs(Math.sin(counter)); ledArray = []; for (var i = 0; i < 35; i++) { - var led = new matrixMalosBuilder.LedValue; + var led = new IoDriver.LedValue; var color = Math.floor((255 * intensity) / dimFactor); led.setBlue(color); ledArray.push(led); @@ -103,7 +104,7 @@ module.exports = { counter += 1 / 20; }, 25); }, - bleConnection: function() { + bleConnection: function () { stopLoader(); clear(); //Cyan fast breathing effect @@ -111,15 +112,15 @@ module.exports = { var counter = 0; var ledArray; var intensity; //This changes over time - var config = new matrixMalosBuilder.DriverConfig; - config.image = new matrixMalosBuilder.EverloopImage; + var config = new DeviceDriver.DriverConfig; + config.image = new IoDriver.EverloopImage; - loaderInt = setInterval(function() { + loaderInt = setInterval(function () { intensity = Math.abs(Math.sin(counter)); ledArray = []; for (var i = 0; i < 35; i++) { - var led = new matrixMalosBuilder.LedValue; + var led = new IoDriver.LedValue; var color = Math.floor((255 * intensity) / dimFactor); led.setGreen(color); ledArray.push(led); @@ -129,19 +130,19 @@ module.exports = { counter += 1 / 10; }, 50); }, - loader: function() { + loader: function () { stopLoader(); clear(); var int = 0; var l = 5; - loaderInt = setInterval(function() { - var config = new matrixMalosBuilder.DriverConfig; - config.image = new matrixMalosBuilder.EverloopImage; + loaderInt = setInterval(function () { + var config = new DeviceDriver.DriverConfig; + config.image = new IoDriver.EverloopImage; var dimFactor = 0; for (var i = 0; i < 35; i++) { - var led = new matrixMalosBuilder.LedValue; + var led = new IoDriver.LedValue; led.setRed(0); led.setGreen(0); @@ -169,21 +170,21 @@ module.exports = { }, 10); }, - throbber: function() { + throbber: function () { var fadeIn = true; var bright = 1; - loaderInt = setInterval(function() { - var config = new matrixMalosBuilder.DriverConfig; - config.image = new matrixMalosBuilder.EverloopImage; + loaderInt = setInterval(function () { + var config = new DeviceDriver.DriverConfig; + config.image = new IoDriver.EverloopImage; bright = (fadeIn) ? bright + 1 : bright - 1; fadeIn = (bright >= 75 || bright <= 1) ? !fadeIn : fadeIn; for (var i = 0; i < 35; i++) { - var led = new matrixMalosBuilder.LedValue; + var led = new IoDriver.LedValue; led.setRed(0); led.setGreen(0); @@ -197,10 +198,10 @@ module.exports = { component.print(config.encode().toBuffer()); }, 10); }, - loader2: function() { + loader2: function () { // Boom constructor - var Boom = function() { + var Boom = function () { var self = this; this.start = Math.floor(Math.random() * 35); this.baseColor = [ @@ -213,13 +214,13 @@ module.exports = { this.speed = 1.25 || Math.round(Math.random() * 5); this.particles = 10 || Math.round(Math.random() * 10); - this.particleWeight = _.map(Array(10), function() { return Math.random() * 100; }); + this.particleWeight = _.map(Array(10), function () { return Math.random() * 100; }); - this.t = function(tick) { - var config = new matrixMalosBuilder.DriverConfig; - config.image = new matrixMalosBuilder.EverloopImage; + this.t = function (tick) { + var config = new DeviceDriver.DriverConfig; + config.image = new IoDriver.EverloopImage; self.spread = []; for (var i = 0; i < this.particles; i++) { @@ -234,7 +235,7 @@ module.exports = { // figure out light matrix for (var i = 0; i < 35; i++) { - var led = new matrixMalosBuilder.LedValue; + var led = new IoDriver.LedValue; led.setRed(0); led.setGreen(0); led.setBlue(0); @@ -269,7 +270,7 @@ module.exports = { var b2 = new Boom(); var tick = 1; - loaderInt = setInterval(function() { + loaderInt = setInterval(function () { b.t(tick++); // if ( tick > 20 ){ // b1.t(tick - 20); @@ -280,7 +281,7 @@ module.exports = { }, 20); }, - loader3: function() { + loader3: function () { stopLoader(); clear(); var colors = [ @@ -325,12 +326,12 @@ module.exports = { var counter = 0; const dimFactor = 10; //1 - 255, use 1 for full blinding powah - var config = new matrixMalosBuilder.DriverConfig; - config.image = new matrixMalosBuilder.EverloopImage; + var config = new DeviceDriver.DriverConfig; + config.image = new IoDriver.EverloopImage; //Set base black color array for (var i = 0; i < 35; i++) { - var led = new matrixMalosBuilder.LedValue; + var led = new IoDriver.LedValue; led.setRed(0); led.setGreen(0); led.setBlue(0); @@ -338,9 +339,9 @@ module.exports = { colorFill[i] = led; } - loaderInt = setInterval(function() { + loaderInt = setInterval(function () { if (counter < 35) { //Transfer colors over - var led = new matrixMalosBuilder.LedValue; + var led = new IoDriver.LedValue; led.setRed(Math.floor(colors[counter].r / dimFactor)); led.setGreen(Math.floor(colors[counter].g / dimFactor)); led.setBlue(Math.floor(colors[counter].b / dimFactor)); @@ -356,14 +357,14 @@ module.exports = { }, stopLoader: stopLoader, - error: function() { + error: function () { stopLoader(); clear(); - var config = new matrixMalosBuilder.DriverConfig; - config.image = new matrixMalosBuilder.EverloopImage; + var config = new DeviceDriver.DriverConfig; + config.image = new IoDriver.EverloopImage; for (var i = 0; i < 35; i++) { - var led = new matrixMalosBuilder.LedValue; + var led = new IoDriver.LedValue; led.setRed(127); led.setGreen(0); @@ -391,15 +392,15 @@ module.exports = { var counter = 0; var ledArray; var intensity; //This changes over time - var config = new matrixMalosBuilder.DriverConfig; - config.image = new matrixMalosBuilder.EverloopImage; + var config = new DeviceDriver.DriverConfig; + config.image = new IoDriver.EverloopImage; loaderInt = setInterval(function () { intensity = Math.abs(Math.sin(counter)); ledArray = []; for (var i = 0; i < 35; i++) { - var led = new matrixMalosBuilder.LedValue; + var led = new IoDriver.LedValue; var color = Math.floor((255 * intensity) / dimFactor); led.setRed(color); ledArray.push(led); @@ -417,18 +418,18 @@ module.exports = { cb(); }, seconds * 1000); }, - ping: function() { + ping: function () { var intensity = 1; var up = true; var o = 0; - var int = setInterval(function() { - var config = new matrixMalosBuilder.DriverConfig; - config.image = new matrixMalosBuilder.EverloopImage; + var int = setInterval(function () { + var config = new DeviceDriver.DriverConfig; + config.image = new IoDriver.EverloopImage; for (var i = 0; i < 35; i++) { - var led = new matrixMalosBuilder.LedValue; + var led = new IoDriver.LedValue; led.setRed(Math.round(intensity / 4)); led.setGreen(Math.round(intensity / 3)); led.setBlue(intensity); @@ -454,7 +455,7 @@ module.exports = { if (up === false && intensity <= 1) { clearInterval(int); - process.nextTick(function() { + process.nextTick(function () { Matrix.device.drivers.led.clear(); }); } diff --git a/lib/device/drivers/magnetometer.js b/lib/device/drivers/magnetometer.js index 28cf7f78..c129fdf0 100644 --- a/lib/device/drivers/magnetometer.js +++ b/lib/device/drivers/magnetometer.js @@ -1,20 +1,20 @@ -var protoBuilder, matrixMalosBuilder; +var DeviceDriver, SenseDriver; var debug = debugLog('magnetometer'); module.exports = { commands: ['magnetometer'], // init runs automatically, wait for app to request component creation - init: function() { - protoBuilder = Matrix.service.protobuf.malos.driver; - // Parse matrix_malos package (namespace). - matrixMalosBuilder = protoBuilder.build('matrix_malos'); + init: function () { + DeviceDriver = Matrix.service.protobuf.malos.driver; + // Parse matrix_malos package (namespace). + SenseDriver = Matrix.service.protobuf.malos.sense; }, - read: function(buffer) { - var m = new matrixMalosBuilder.Imu.decode(buffer); + read: function (buffer) { + var m = new SenseDriver.Imu.decode(buffer); return { x: m.mag_x, y: m.mag_y, z: m.mag_z }; }, - prepare: function(options, cb) { + prepare: function (options, cb) { if (_.isFunction(options)) { cb = options; options = {}; @@ -35,7 +35,7 @@ module.exports = { } // map options to protobuf config - var driverConfigProto = new matrixMalosBuilder.DriverConfig; + var driverConfigProto = new DeviceDriver.DriverConfig; // 2 seconds between updates. driverConfigProto.delay_between_updates = options.refresh; // Stop sending updates 6 seconds after pings. @@ -43,7 +43,7 @@ module.exports = { debug('gyro start'); cb(driverConfigProto.encode().toBuffer()); }, - ping: function() { + ping: function () { if (_.has(Matrix.components, 'magnetometer')) { Matrix.components.magnetometer.ping(); } else { diff --git a/lib/device/drivers/mic.js b/lib/device/drivers/mic.js index 8b1974b2..6abc787d 100644 --- a/lib/device/drivers/mic.js +++ b/lib/device/drivers/mic.js @@ -9,7 +9,6 @@ var mic = require('mic'); module.exports = { init: function() { protoBuilder = Matrix.service.protobuf.malos.driver; - matrixMalosBuilder = protoBuilder.build('matrix_malos'); }, read: function(spl) { debug('-read>', spl); diff --git a/lib/device/drivers/pressure.js b/lib/device/drivers/pressure.js index 3693e855..81549b14 100644 --- a/lib/device/drivers/pressure.js +++ b/lib/device/drivers/pressure.js @@ -1,21 +1,21 @@ -var protoBuilder, matrixMalosBuilder; +var DeviceDriver, SenseDriver; var debug = debugLog('pressure'); module.exports = { commands: ['pressure'], // init runs automatically, wait for app to request component creation - init: function() { - protoBuilder = Matrix.service.protobuf.malos.driver; + init: function () { + DeviceDriver = Matrix.service.protobuf.malos.driver; // Parse matrix_malos package (namespace). - matrixMalosBuilder = protoBuilder.build('matrix_malos'); + SenseDriver = Matrix.service.protobuf.malos.sense; }, - read: function(buffer) { + read: function (buffer) { return { value: new matrixMalosBuilder.Pressure.decode(buffer).pressure }; }, - prepare: function(options, cb) { + prepare: function (options, cb) { if (_.isFunction(options)) { cb = options; options = {}; @@ -36,7 +36,7 @@ module.exports = { } // map options to protobuf config - var driverConfigProto = new matrixMalosBuilder.DriverConfig; + var driverConfigProto = new SenseDriver.DriverConfig; // 2 seconds between updates. driverConfigProto.delay_between_updates = options.refresh; // Stop sending updates 6 seconds after pings. @@ -44,7 +44,7 @@ module.exports = { debug('pressure start'); cb(driverConfigProto.encode().toBuffer()); }, - ping: function() { + ping: function () { if (_.has(Matrix.components, 'pressure')) { Matrix.components.pressure.ping(); } else { diff --git a/lib/device/drivers/recognition.js b/lib/device/drivers/recognition.js index 016c845d..7381ac02 100644 --- a/lib/device/drivers/recognition.js +++ b/lib/device/drivers/recognition.js @@ -1,6 +1,6 @@ // Unlike other drivers, this will use RPC directly -var matrixVision, matrixMalos, matrixRPC, matrixRecognition, matrixRecognitionService, +var VisionDriver, DeviceDriver, RecognitionRPC, RecognitionDriver, RecognitionService, RecognitionService, protoVisionBuilder, protoMalosBuilder; @@ -58,7 +58,7 @@ function startRecognitionService() { var credentials = grpc.credentials.createSsl(); if (_.isUndefined(RecognitionService)) { - RecognitionService = new matrixRPC.RecognitionService( + RecognitionService = new RecognitionRPC.RecognitionService( HOST_ADDRESS, credentials ); debug('RecognitionService:'.blue, HOST_ADDRESS, credentials); @@ -124,15 +124,11 @@ function getDescriptors(options, cb) { module.exports = { commands: ['recognition'], init: function () { - var protoVisionBuilder = Matrix.service.protobuf.vision.vision; - var protoRecognitionBuilder = Matrix.service.protobuf.vision.recognition; - var protoRecognitionServiceBuilder = Matrix.service.protobuf.vision.recognition_service; - matrixVision = protoVisionBuilder.build('admobilize_vision'); - matrixRecognitionService = protoRecognitionServiceBuilder.build('admobilize_vision'); - matrixRecognition = protoRecognitionBuilder.build('admobilize_vision'); - protoMalosBuilder = Matrix.service.protobuf.malos.driver; - matrixMalos = protoMalosBuilder.build('matrix_malos'); - matrixRPC = Matrix.service.grpc.vision.recognition_service; + VisionDriver = Matrix.service.protobuf.vision.vision; + RecognitionService = Matrix.service.protobuf.vision.recognition_service; + RecognitionDriver = Matrix.service.protobuf.vision.recognition; + RecognitionRPC = Matrix.service.grpc.vision.recognition_service; + DeviceDriver = Matrix.service.protobuf.malos.driver; var env = process.env.NODE_ENV; @@ -151,11 +147,11 @@ module.exports = { // configure malos first prepare: function (component, cb) { var options = component.options; - var driverConfig = new matrixMalos.DriverConfig; + var driverConfig = new DeviceDriver.DriverConfig; driverConfig.set_delay_between_updates(0.05); driverConfig.set_timeout_after_last_ping(15); - driverConfig.malos_eye_config = new matrixMalos.MalosEyeConfig; - var cameraConfig = new matrixMalos.CameraConfig; + driverConfig.malos_eye_config = new DeviceDriver.MalosEyeConfig; + var cameraConfig = new DeviceDriver.CameraConfig; cameraConfig.set_camera_id(0); cameraConfig.set_width(800); cameraConfig.set_height(600); @@ -220,13 +216,13 @@ module.exports = { startRecognitionService(); // setup malos_eye_ - var eyeConfig = new matrixMalos.DriverConfig; - eyeConfig.malos_eye_config = new matrixMalos.MalosEyeConfig; + var eyeConfig = new DeviceDriver.DriverConfig; + eyeConfig.malos_eye_config = new DeviceDriver.MalosEyeConfig; // FIXME: We should only need FACE_DESCRIPTOR here. @resolved? eyeConfig.malos_eye_config.object_to_detect.push( - matrixMalos.EnumMalosEyeDetectionType.FACE_DEMOGRAPHICS); + DeviceDriver.EnumMalosEyeDetectionType.FACE_DEMOGRAPHICS); eyeConfig.malos_eye_config.object_to_detect.push( - matrixMalos.EnumMalosEyeDetectionType.FACE_DESCRIPTOR); + DeviceDriver.EnumMalosEyeDetectionType.FACE_DESCRIPTOR); Matrix.components.recognition.config(eyeConfig.encode().toBuffer()); @@ -257,7 +253,7 @@ module.exports = { read: function (buffer, cb) { // debug('read>', buffer); if (_.isUndefined(buffer) || mode === 0) { return; } - var result = new matrixVision.VisionResult.decode(buffer); + var result = new VisionDriver.VisionResult.decode(buffer); // debug('>read', result) @@ -297,7 +293,7 @@ module.exports = { debug('>face_recog', recog.tag, tId); var descriptors = _.map(Matrix.service.track.getDescriptors(tId), function (d) { - var feature = new matrixRPC.FeatureDescriptor(); + var feature = new RecognitionRPC.FeatureDescriptor(); feature.tags = trainingTags; feature.data = d; return feature; @@ -325,9 +321,9 @@ module.exports = { debug('recog', recog); var features = []; - var featureList = new matrixRPC.FeatureDescriptorList(); + var featureList = new RecognitionRPC.FeatureDescriptorList(); - var feature = new matrixRPC.FeatureDescriptor(); + var feature = new RecognitionRPC.FeatureDescriptor(); feature.data = recog.face_descriptor; feature.tags = recognizeTags; features.push(feature); diff --git a/lib/device/drivers/temperature.js b/lib/device/drivers/temperature.js index 6ae4420c..6d00e283 100644 --- a/lib/device/drivers/temperature.js +++ b/lib/device/drivers/temperature.js @@ -1,19 +1,19 @@ -var protoBuilder, matrixMalosBuilder; +var DeviceDriver, SenseDriver; var debug = debugLog('temperature'); module.exports = { commands: ['temperature'], // init runs automatically, wait for app to request component creation - init: function() { - protoBuilder = Matrix.service.protobuf.malos.driver; + init: function () { + DeviceDriver = Matrix.service.protobuf.malos.driver; // Parse matrix_malos package (namespace). - matrixMalosBuilder = protoBuilder.build('matrix_malos'); + SenseDriver = Matrix.service.protobuf.malos.sense; }, - read: function(buffer) { - return { value: new matrixMalosBuilder.Humidity.decode(buffer).temperature }; + read: function (buffer) { + return { value: new SenseDriver.Humidity.decode(buffer).temperature }; }, - prepare: function(options, cb) { + prepare: function (options, cb) { if (_.isFunction(options)) { cb = options; options = {}; @@ -34,7 +34,7 @@ module.exports = { } // map options to protobuf config - var driverConfigProto = new matrixMalosBuilder.DriverConfig; + var driverConfigProto = new DeviceDriver.DriverConfig; // 2 seconds between updates. driverConfigProto.delay_between_updates = options.refresh; // Stop sending updates 6 seconds after pings. @@ -42,7 +42,7 @@ module.exports = { debug('temperature start'); cb(driverConfigProto.encode().toBuffer()); }, - ping: function() { + ping: function () { if (_.has(Matrix.components, 'temperature')) { Matrix.components.temperature.ping(); } else { diff --git a/lib/device/drivers/uv.js b/lib/device/drivers/uv.js index 9737d904..7626acec 100644 --- a/lib/device/drivers/uv.js +++ b/lib/device/drivers/uv.js @@ -1,22 +1,23 @@ -var protoBuilder, matrixMalosBuilder; +var DeviceDriver, matrixMalosBuilder; var debug = debugLog('uv'); module.exports = { commands: ['uv'], // init runs automatically, wait for app to request component creation - init: function() { - protoBuilder = Matrix.service.protobuf.malos.driver; + init: function () { + DeviceDriver = Matrix.service.protobuf.malos.driver; // Parse matrix_malos package (namespace). - matrixMalosBuilder = protoBuilder.build('matrix_malos'); + + SenseDriver = Matrix.service.protobuf.malos.sense; }, - read: function(buffer) { + read: function (buffer) { return { - value: new matrixMalosBuilder.UV.decode(buffer).uv_index, - risk: new matrixMalosBuilder.UV.decode(buffer).oms_risk + value: new SenseDriver.UV.decode(buffer).uv_index, + risk: new SenseDriver.UV.decode(buffer).oms_risk }; }, - prepare: function(options, cb) { + prepare: function (options, cb) { if (_.isFunction(options)) { cb = options; options = {}; @@ -37,7 +38,7 @@ module.exports = { } // map options to protobuf config - var driverConfigProto = new matrixMalosBuilder.DriverConfig; + var driverConfigProto = new SenseDriver.DriverConfig; // 2 seconds between updates. driverConfigProto.delay_between_updates = options.refresh; // Stop sending updates 6 seconds after pings. @@ -45,7 +46,7 @@ module.exports = { debug('uv start'); cb(driverConfigProto.encode().toBuffer()); }, - ping: function() { + ping: function () { if (_.has(Matrix.components, 'uv')) { Matrix.components.uv.ping(); } else { diff --git a/lib/device/drivers/zigbee.js b/lib/device/drivers/zigbee.js index 39b032cd..3ce09767 100644 --- a/lib/device/drivers/zigbee.js +++ b/lib/device/drivers/zigbee.js @@ -1,4 +1,4 @@ -var protoBuilder, matrixMalosBuilder, driverConfig, ZB, Cmd; +var DeviceDriver, ZigbeeDriver, driverConfig, ZB, Cmd; var debug = debugLog('zigbee'); @@ -17,25 +17,25 @@ var enums = { }; function lookForBulbs(nodes) { - var onoffs = _.filter(nodes, function(n) { - return _.find(n.endpoints, function(e) { - return _.find(e.clusters, function(c) { + var onoffs = _.filter(nodes, function (n) { + return _.find(n.endpoints, function (e) { + return _.find(e.clusters, function (c) { return (c.cluster_id === 6); }); }); }); - var levels = _.filter(nodes, function(n) { - return _.find(n.endpoints, function(e) { - return _.find(e.clusters, function(c) { + var levels = _.filter(nodes, function (n) { + return _.find(n.endpoints, function (e) { + return _.find(e.clusters, function (c) { return (c.cluster_id === 8); }); }); }); - var colors = _.filter(nodes, function(n) { - return _.find(n.endpoints, function(e) { - return _.find(e.clusters, function(c) { + var colors = _.filter(nodes, function (n) { + return _.find(n.endpoints, function (e) { + return _.find(e.clusters, function (c) { return (c.cluster_id === 768); }); }); @@ -43,7 +43,7 @@ function lookForBulbs(nodes) { var onoffIds = _.map(onoffs, 'node_id'); - var onoffEndpoints = _.map(onoffs, function(n) { + var onoffEndpoints = _.map(onoffs, function (n) { return _.map(n.endpoints, 'endpoint_index'); })[0]; var levelIds = _.map(levels, 'node_id'); @@ -59,49 +59,49 @@ function lookForBulbs(nodes) { module.exports = { // init runs automatically, wait for app to request component creation - init: function() { + init: function () { - protoBuilder = Matrix.service.protobuf.malos.driver; + DeviceDriver = Matrix.service.protobuf.malos.driver; // Parse matrix_malos package (namespace). - matrixMalosBuilder = protoBuilder.build('matrix_malos'); + ZigbeeDriver = Matrix.service.protobuf.malos.comm; // Command Constructor - ZB = function() { + ZB = function () { // start from fresh object var self = this; - self.config = new matrixMalosBuilder.DriverConfig; + self.config = new DeviceDriver.DriverConfig; var cmds = {}; - cmds.msg = new matrixMalosBuilder.ZigBeeMsg; - cmds.net = new matrixMalosBuilder.ZigBeeMsg.NetworkMgmtCmd; - cmds.zcl = new matrixMalosBuilder.ZigBeeMsg.ZCLCmd; - cmds.id = new matrixMalosBuilder.ZigBeeMsg.ZCLCmd.IdentifyCmd; - cmds.onoff = new matrixMalosBuilder.ZigBeeMsg.ZCLCmd.OnOffCmd; - cmds.level = new matrixMalosBuilder.ZigBeeMsg.ZCLCmd.LevelCmd; - cmds.colorcontrol = new matrixMalosBuilder.ZigBeeMsg.ZCLCmd.ColorControlCmd; + cmds.msg = new ZigbeeDriver.ZigBeeMsg; + cmds.net = new ZigbeeDriver.ZigBeeMsg.NetworkMgmtCmd; + cmds.zcl = new ZigbeeDriver.ZigBeeMsg.ZCLCmd; + cmds.id = new ZigbeeDriver.ZigBeeMsg.ZCLCmd.IdentifyCmd; + cmds.onoff = new ZigbeeDriver.ZigBeeMsg.ZCLCmd.OnOffCmd; + cmds.level = new ZigbeeDriver.ZigBeeMsg.ZCLCmd.LevelCmd; + cmds.colorcontrol = new ZigbeeDriver.ZigBeeMsg.ZCLCmd.ColorControlCmd; var params = {}; - params.movetohue = new matrixMalosBuilder.ZigBeeMsg.ZCLCmd.ColorControlCmd.MoveToHueCmdParams; - params.movetolevel = new matrixMalosBuilder.ZigBeeMsg.ZCLCmd.LevelCmd.MoveToLevelCmdParams; - params.movelevel = new matrixMalosBuilder.ZigBeeMsg.ZCLCmd.LevelCmd.MoveCmdParams; - params.movetohueandsat = new matrixMalosBuilder.ZigBeeMsg.ZCLCmd.ColorControlCmd.MoveToHueAndSatCmdParams; - params.movetosat = new matrixMalosBuilder.ZigBeeMsg.ZCLCmd.ColorControlCmd.MoveToHueCmdParams; - params.permitJoin = new matrixMalosBuilder.ZigBeeMsg.NetworkMgmtCmd.PermitJoinParams; + params.movetohue = new ZigbeeDriver.ZigBeeMsg.ZCLCmd.ColorControlCmd.MoveToHueCmdParams; + params.movetolevel = new ZigbeeDriver.ZigBeeMsg.ZCLCmd.LevelCmd.MoveToLevelCmdParams; + params.movelevel = new ZigbeeDriver.ZigBeeMsg.ZCLCmd.LevelCmd.MoveCmdParams; + params.movetohueandsat = new ZigbeeDriver.ZigBeeMsg.ZCLCmd.ColorControlCmd.MoveToHueAndSatCmdParams; + params.movetosat = new ZigbeeDriver.ZigBeeMsg.ZCLCmd.ColorControlCmd.MoveToHueCmdParams; + params.permitJoin = new ZigbeeDriver.ZigBeeMsg.NetworkMgmtCmd.PermitJoinParams; // enums need to be referenced outside of ZB - enums.netStatus = matrixMalosBuilder.ZigBeeMsg.NetworkMgmtCmd.NetworkStatus.Status; - enums.netTypes = matrixMalosBuilder.ZigBeeMsg.NetworkMgmtCmd.NetworkMgmtCmdTypes; - enums.zbCmdTypes = matrixMalosBuilder.ZigBeeMsg.ZigBeeCmdType; - enums.idCmdTypes = matrixMalosBuilder.ZigBeeMsg.ZCLCmd.IdentifyCmd.ZCLIdentifyCmdType; - enums.mdTypes = matrixMalosBuilder.ZigBeeMsg.ZigBeeCmdType; - enums.onoff = matrixMalosBuilder.ZigBeeMsg.ZCLCmd.OnOffCmd.ZCLOnOffCmdType; - enums.level = matrixMalosBuilder.ZigBeeMsg.ZCLCmd.LevelCmd.ZCLLevelCmdType; - enums.zclCmdTypes = matrixMalosBuilder.ZigBeeMsg.ZCLCmd.ZCLCmdType; + enums.netStatus = ZigbeeDriver.ZigBeeMsg.NetworkMgmtCmd.NetworkStatus.Status; + enums.netTypes = ZigbeeDriver.ZigBeeMsg.NetworkMgmtCmd.NetworkMgmtCmdTypes; + enums.zbCmdTypes = ZigbeeDriver.ZigBeeMsg.ZigBeeCmdType; + enums.idCmdTypes = ZigbeeDriver.ZigBeeMsg.ZCLCmd.IdentifyCmd.ZCLIdentifyCmdType; + enums.mdTypes = ZigbeeDriver.ZigBeeMsg.ZigBeeCmdType; + enums.onoff = ZigbeeDriver.ZigBeeMsg.ZCLCmd.OnOffCmd.ZCLOnOffCmdType; + enums.level = ZigbeeDriver.ZigBeeMsg.ZCLCmd.LevelCmd.ZCLLevelCmdType; + enums.zclCmdTypes = ZigbeeDriver.ZigBeeMsg.ZCLCmd.ZCLCmdType; self.errors = []; // indicate a device. takes index for now. use object later - self.device = function(i) { + self.device = function (i) { var i = i || 0; var bulbs = Array.from(knownBulbs); if (bulbs.length === 0) { @@ -120,7 +120,7 @@ module.exports = { var config = self.config; // LEVEL 1 - self.init = function(timeout, delay) { + self.init = function (timeout, delay) { config.timeout_after_last_ping = timeout || 15; config.delay_between_updates = delay || 1; __send(); @@ -128,28 +128,28 @@ module.exports = { // Private Methods - // LEVEL 1 Assignments - const __send = function() { + const __send = function () { config.zigbee_message = cmds.msg; if (activated && self.errors.length === 0) { - debug(require('util').inspect(config, { depth: null })); - Matrix.components.zigbee.print(config.encode().toBuffer()); - } else if (self.errors.length > 0) { - console.error('Zigbee Command Errors:\n'.red, '->', self.errors.join('\n -> '.red)); - } else { - console.error('Zigbee Command Print Failed due to Component Inactivation'); - } - // reset command state + debug(require('util').inspect(config, { depth: null })); + Matrix.components.zigbee.print(config.encode().toBuffer()); + } else if (self.errors.length > 0) { + console.error('Zigbee Command Errors:\n'.red, '->', self.errors.join('\n -> '.red)); + } else { + console.error('Zigbee Command Print Failed due to Component Inactivation'); + } + // reset command state Cmd = new ZB(); }; - // - // LEVEL 2 Assignments - const __net = function() { + // + // LEVEL 2 Assignments + const __net = function () { cmds.msg.network_mgmt_cmd = cmds.net; cmds.msg.type = enums.zbCmdTypes.NETWORK_MGMT; __send(); }; - const __zcl = function() { + const __zcl = function () { if (_.isUndefined(cmds.zcl.node_id) || _.isUndefined(cmds.zcl.endpoint_index)) { self.errors.push('No Node ID and/or Endpoint ID set'); } @@ -160,36 +160,36 @@ module.exports = { // LEVEL 3 ZCL Assignments - const __onoff = function() { + const __onoff = function () { cmds.zcl.type = enums.zclCmdTypes.ON_OFF; cmds.zcl.onoff_cmd = cmds.onoff; __zcl(); }; - const __level = function() { + const __level = function () { cmds.zcl.type = enums.zclCmdTypes.LEVEL; cmds.zcl.level_cmd = cmds.level; __zcl(); }; - const __color = function() { + const __color = function () { cmds.zcl.type = enums.zclCmdTypes.COLOR_CONTROL; cmds.zcl.colorcontrol_cmd = cmds.colorcontrol; __zcl(); }; - self.on = function() { + self.on = function () { cmds.onoff.type = enums.onoff.ON; __onoff(); }; - self.off = function() { + self.off = function () { cmds.onoff.type = enums.onoff.OFF; __onoff(); }; - self.toggle = function() { + self.toggle = function () { cmds.onoff.type = enums.onoff.TOGGLE; __onoff(); }; @@ -200,7 +200,7 @@ module.exports = { * @param {int32} level what level to target * @param {int32} time how long to take in seconds */ - self.movetolevel = function(level, time) { + self.movetolevel = function (level, time) { params.movetolevel.level = level; params.movetolevel.transition_time = time; cmds.level.move_to_level_params = params.movetolevel; @@ -213,7 +213,7 @@ module.exports = { * @param {boolean} up true = fade in false = fade out * @param {int32} rate how many units per second 1-255 */ - self.movelevel = function(up, rate) { + self.movelevel = function (up, rate) { params.movelevel.mode = (up) ? 0 : 1; params.movelevel.rate = rate; cmds.level.move_params = params.movelevel; @@ -228,7 +228,7 @@ module.exports = { * @param {[type]} time [description] * @return {[type]} [description] */ - self.movetohue = function(hue, time) { + self.movetohue = function (hue, time) { params.movetohue.hue = hue; params.movetohue.direction = 0; params.movetohue.transition_time = time; @@ -237,47 +237,47 @@ module.exports = { }; // TODO - self.movetosat = function() {}; - self.movetohueandsat = function() {}; + self.movetosat = function () { }; + self.movetohueandsat = function () { }; - self.check = function() { + self.check = function () { cmds.net.type = enums.netTypes.IS_PROXY_ACTIVE; __net(); }; - self.reset = function() { + self.reset = function () { cmds.net.set_type(enums.netTypes.RESET_PROXY); __net(); }; - self.status = function() { + self.status = function () { cmds.net.set_type(enums.netTypes.NETWORK_STATUS); __net(); }; - self.permitJoin = function() { + self.permitJoin = function () { cmds.net.set_type(enums.netTypes.PERMIT_JOIN); params.permitJoin.time = 60; cmds.net.permit_join_params = params.permitJoin; __net(); }; - self.discovery = function() { + self.discovery = function () { cmds.net.type = enums.netTypes.DISCOVERY_INFO; __net(); }; - self.create = function() { + self.create = function () { cmds.net.type = enums.netTypes.CREATE_NWK; __net(); }; - self.leave = function() { + self.leave = function () { cmds.net.type = enums.netTypes.LEAVE_NWK; __net(); }; - self.askLeave = function(node) { + self.askLeave = function (node) { if (_.isUndefined(node)) { self.errors.push('No Node Defined to Ask To Leave'); } @@ -297,7 +297,7 @@ module.exports = { // Need to have activation script independent of /drivers // Maybe this is the next step for all drivers? - activate: function() { + activate: function () { if (!activated) { // fetches the zero mq connections in a keyed object { config, update, ping... } @@ -319,17 +319,17 @@ module.exports = { debug('activate done'); // todo, move this to heartbeat - setInterval(function() { c.ping(''); }, 1000); + setInterval(function () { c.ping(''); }, 1000); } }, // Figure out how to decode different zb messages and route them back into the application. // Will have to handle again elsewhere. - read: function(buffer) { + read: function (buffer) { console.log('.read>', buffer); - var zbMsg = new matrixMalosBuilder.ZigBeeMsg.decode(buffer); + var zbMsg = new ZigbeeDriver.ZigBeeMsg.decode(buffer); debug(require('util').inspect(zbMsg, { depth: null })); - // type switch - first level + // type switch - first level if (zbMsg.type === enums.zbCmdTypes.ZCL) { /// } else if (enums.zbCmdTypes.NETWORK_MGMT) { @@ -355,10 +355,10 @@ module.exports = { debug('STATUS:', status); if (status === 'JOINED_NETWORK') { // NetCmd.permitJoin(); - } else if (status === 'JOINING_NETWORK') {} else if (status === 'NO_NETWORK') { + } else if (status === 'JOINING_NETWORK') { } else if (status === 'NO_NETWORK') { debug('No ZigBee Network'.red); Cmd.create(); - } else if (status === 'JOINED_NETWORK_NO_PARENT') {} else if (status === 'LEAVING_NETWORK') {} + } else if (status === 'JOINED_NETWORK_NO_PARENT') { } else if (status === 'LEAVING_NETWORK') { } //# end networks status } else if (netCmdType === 'DISCOVERY_INFO') { @@ -381,7 +381,7 @@ module.exports = { }, // components.send pushes proto through prepare - prepare: function(options, cb) { + prepare: function (options, cb) { if (_.isFunction(options)) { cb = options; options = {}; @@ -413,18 +413,18 @@ module.exports = { debug('prepare->', config); cb(config.base.encode().toBuffer()); }, - ping: function() { + ping: function () { if (_.has(Matrix.components, 'zigbee')) { Matrix.components.zigbee.ping(); } else { console.log('Zigbee available, not activated.'); } }, - error: function(err) { + error: function (err) { console.error('Error', err.toString()); }, cmd: Cmd, - spin: function() { + spin: function () { Cmd.movehue(); }, @@ -433,7 +433,7 @@ module.exports = { * @param {event} d { type: 'zigbee-light-cmd', cmd: 'toggle' } */ - lightHandler: function(d) { + lightHandler: function (d) { debug(d); var p = d.payload; if (['on', 'off', 'toggle'].indexOf(d.cmd) === 0) { @@ -458,7 +458,7 @@ module.exports = { } }, - netHandler: function(d) { + netHandler: function (d) { debug(d); if (d.cmd === 'discover') { Cmd.permitJoin(); @@ -469,7 +469,7 @@ module.exports = { } }, //tmp - toggle: function() { + toggle: function () { Cmd.device().toggle(); } }; \ No newline at end of file From c4033d81efb8ba20423b2a0a1d6f957ec81dcc51 Mon Sep 17 00:00:00 2001 From: Sean Canton Date: Thu, 14 Sep 2017 17:13:43 -0700 Subject: [PATCH 04/42] mos ascii reached --- lib/device/drivers/led.js | 140 +++++++++++++++++------------------ lib/device/drivers/zigbee.js | 4 +- lib/device/malos.js | 6 +- 3 files changed, 76 insertions(+), 74 deletions(-) diff --git a/lib/device/drivers/led.js b/lib/device/drivers/led.js index d3d22fba..a14ad24a 100644 --- a/lib/device/drivers/led.js +++ b/lib/device/drivers/led.js @@ -1,4 +1,4 @@ -var builder, IoDriver, component; +var DeviceDriver, IoDriver, component; var loaderInt; @@ -13,18 +13,18 @@ function clear() { for (var i = 0; i < 35; i++) { var led = new IoDriver.LedValue; - led.setRed(0); - led.setGreen(0); - led.setBlue(0); - led.setWhite(0); + led.red = 0; + led.green = 0; + led.blue = 0; + led.white = 0; config.image.led.push(led); } - component.print(config.encode().toBuffer()); + component.print(DeviceDriver.DriverConfig.encode(config).finish()); } module.exports = { - // runs init automatically. setup component here for loader + // runs init automatically. up = component here for loader init: function () { DeviceDriver = Matrix.service.protobuf.malos.driver; IoDriver = Matrix.service.protobuf.malos.io; @@ -58,21 +58,21 @@ module.exports = { if (!_.has(c, 'w')) { c.w = 0; } - led.setRed(c.r); - led.setGreen(c.g); - led.setBlue(c.b); - led.setWhite(c.w); + led.red = c.r; + led.green = c.g; + led.blue = c.b; + led.white = c.w; } else { // blanks - led.setRed(0); - led.setGreen(0); - led.setBlue(0); - led.setWhite(0); + led.red = 0; + led.green = 0; + led.blue = 0; + led.white = 0; } config.image.led.push(led); } - cb(config.encode().toBuffer()); + cb(DeviceDriver.DriverConfig.encode(config).finish()); }, sendProto: function (colorsProto) { component.print(colorsProto.encode().toBuffer()); @@ -96,11 +96,11 @@ module.exports = { for (var i = 0; i < 35; i++) { var led = new IoDriver.LedValue; var color = Math.floor((255 * intensity) / dimFactor); - led.setBlue(color); + led.blue = color; ledArray.push(led); } config.image.led = ledArray; - component.print(config.encode().toBuffer()); + component.print(DeviceDriver.DriverConfig.encode(config).finish()); counter += 1 / 20; }, 25); }, @@ -122,11 +122,11 @@ module.exports = { for (var i = 0; i < 35; i++) { var led = new IoDriver.LedValue; var color = Math.floor((255 * intensity) / dimFactor); - led.setGreen(color); + led.green = color; ledArray.push(led); } config.image.led = ledArray; - component.print(config.encode().toBuffer()); + component.print(DeviceDriver.DriverConfig.encode(config).finish()); counter += 1 / 10; }, 50); }, @@ -144,19 +144,19 @@ module.exports = { for (var i = 0; i < 35; i++) { var led = new IoDriver.LedValue; - led.setRed(0); - led.setGreen(0); - led.setBlue(0); - led.setWhite(0); + led.red = 0; + led.green = 0; + led.blue = 0; + led.white = 0; if (int === i) { - led.setRed(255 - i * 6); - led.setGreen(64 + i * 6); - led.setBlue(i * 6); + led.red = 255 - i * 6; + led.green = 64 + i * 6; + led.blue = i * 6; } else if (i > int && i <= int + l && dimFactor < 1) { - led.setRed(Math.round((255 - i * 6) * dimFactor)); - led.setGreen(Math.round((64 + i * 6) * dimFactor)); - led.setBlue(Math.round((i * 6) * dimFactor)); + led.red = Math.round((255 - i * 6) * dimFactor); + led.green = Math.round((64 + i * 6) * dimFactor); + led.blue = Math.round((i * 6) * dimFactor); dimFactor += 0.2; } @@ -166,7 +166,7 @@ module.exports = { l = (int % 17 === 0) ? 5 : l; int = (int < 35) ? int + 1 : 0; - component.print(config.encode().toBuffer()); + component.print(DeviceDriver.DriverConfig.encode(config).finish()); }, 10); }, @@ -186,16 +186,16 @@ module.exports = { for (var i = 0; i < 35; i++) { var led = new IoDriver.LedValue; - led.setRed(0); - led.setGreen(0); - led.setBlue(bright); - led.setWhite(0); + led.red = 0; + led.green = 0; + led.blue = bright; + led.white = 0; config.image.led.push(led); } - component.print(config.encode().toBuffer()); + component.print(DeviceDriver.DriverConfig.encode(config).finish()); }, 10); }, loader2: function () { @@ -236,21 +236,21 @@ module.exports = { // figure out light matrix for (var i = 0; i < 35; i++) { var led = new IoDriver.LedValue; - led.setRed(0); - led.setGreen(0); - led.setBlue(0); - led.setWhite(0); + led.red = 0; + led.green = 0; + led.blue = 0; + led.white = 0; if (self.start === i) { - led.setRed(Math.round(self.baseColor[0] / tick)); - led.setGreen(Math.round(self.baseColor[1] / tick)); - led.setBlue(Math.round(self.baseColor[2] / tick)); + led.red = Math.round(self.baseColor[0] / tick); + led.green = Math.round(self.baseColor[1] / tick); + led.blue = Math.round(self.baseColor[2] / tick); } if (self.spread.indexOf(i) !== -1) { - led.setRed(Math.round((self.baseColor[0]) * self.strength / tick / self.particleWeight[p])); - led.setGreen(Math.round((self.baseColor[1]) * self.strength / tick / self.particleWeight[p])); - led.setBlue(Math.round((self.baseColor[2]) * self.strength / tick / self.particleWeight[p])); + led.red = Math.round((self.baseColor[0]) * self.strength / tick / self.particleWeight[p]); + led.green = Math.round((self.baseColor[1]) * self.strength / tick / self.particleWeight[p]); + led.blue = Math.round((self.baseColor[2]) * self.strength / tick / self.particleWeight[p]); p++; } @@ -259,7 +259,7 @@ module.exports = { // // console.log(config.image, this) - component.print(config.encode().toBuffer()); + component.print(DeviceDriver.DriverConfig.encode(config).finish()); }; // end boom @@ -329,22 +329,22 @@ module.exports = { var config = new DeviceDriver.DriverConfig; config.image = new IoDriver.EverloopImage; - //Set base black color array + // base = black color array for (var i = 0; i < 35; i++) { var led = new IoDriver.LedValue; - led.setRed(0); - led.setGreen(0); - led.setBlue(0); - led.setWhite(0); + led.red = 0; + led.green = 0; + led.blue = 0; + led.white = 0; colorFill[i] = led; } loaderInt = setInterval(function () { if (counter < 35) { //Transfer colors over var led = new IoDriver.LedValue; - led.setRed(Math.floor(colors[counter].r / dimFactor)); - led.setGreen(Math.floor(colors[counter].g / dimFactor)); - led.setBlue(Math.floor(colors[counter].b / dimFactor)); + led.red = Math.floor(colors[counter].r / dimFactor); + led.green = Math.floor(colors[counter].g / dimFactor); + led.blue = Math.floor(colors[counter].b / dimFactor); colorFill[counter] = led; counter++; } else { //Shift array for rotation effect @@ -352,7 +352,7 @@ module.exports = { colorFill.pop(); } config.image.led = colorFill; - component.print(config.encode().toBuffer()); //Render + component.print(DeviceDriver.DriverConfig.encode(config).finish()); //Render }, 15); }, @@ -366,19 +366,19 @@ module.exports = { for (var i = 0; i < 35; i++) { var led = new IoDriver.LedValue; - led.setRed(127); - led.setGreen(0); - led.setBlue(0); - led.setWhite(0); + led.red = 127; + led.green = 0; + led.blue = 0; + led.white = 0; config.image.led.push(led); } - component.print(config.encode().toBuffer()); + component.print(DeviceDriver.DriverConfig.encode(config).finish()); }, timedError: function (seconds, cb) { module.exports.error(); - setTimeout(function () { + timeout = setTimeout(function () { stopLoader(); clear(); cb(); @@ -402,17 +402,17 @@ module.exports = { for (var i = 0; i < 35; i++) { var led = new IoDriver.LedValue; var color = Math.floor((255 * intensity) / dimFactor); - led.setRed(color); + led.red = color; ledArray.push(led); } config.image.led = ledArray; - component.print(config.encode().toBuffer()); + component.print(DeviceDriver.DriverConfig.encode(config).finish()); counter += 1 / 20; }, 10); - setTimeout(function () { + timeout = setTimeout(function () { stopLoader(); clear(); cb(); @@ -430,10 +430,10 @@ module.exports = { config.image = new IoDriver.EverloopImage; for (var i = 0; i < 35; i++) { var led = new IoDriver.LedValue; - led.setRed(Math.round(intensity / 4)); - led.setGreen(Math.round(intensity / 3)); - led.setBlue(intensity); - led.setWhite(0); + led.red = Math.round(intensity / 4); + led.green = Math.round(intensity / 3); + led.blue = intensity; + led.white = 0; config.image.led.push(led); } @@ -451,7 +451,7 @@ module.exports = { debug(intensity); - component.print(config.encode().toBuffer()); + component.print(DeviceDriver.DriverConfig.encode(config).finish()); if (up === false && intensity <= 1) { clearInterval(int); diff --git a/lib/device/drivers/zigbee.js b/lib/device/drivers/zigbee.js index 3ce09767..0731b72a 100644 --- a/lib/device/drivers/zigbee.js +++ b/lib/device/drivers/zigbee.js @@ -1,4 +1,4 @@ -var DeviceDriver, ZigbeeDriver, driverConfig, ZB, Cmd; +var DeviceDriver, ZigbeeDriver, ZB, Cmd; var debug = debugLog('zigbee'); @@ -382,10 +382,12 @@ module.exports = { // components.send pushes proto through prepare prepare: function (options, cb) { + // no options, callback only if (_.isFunction(options)) { cb = options; options = {}; } + if (_.isUndefined(options)) { options = {}; } diff --git a/lib/device/malos.js b/lib/device/malos.js index 27df9359..4cd7050b 100644 --- a/lib/device/malos.js +++ b/lib/device/malos.js @@ -1,7 +1,7 @@ module.exports = { - info : function(cb){ - var DriverInfo = Matrix.service.protobuf.malos.driver.build('matrix_malos') - Matrix.service.zeromq.deviceInfo(function(response){ + info: function (cb) { + var DriverInfo = Matrix.service.protobuf.malos.driver; + Matrix.service.zeromq.deviceInfo(function (response) { var re = DriverInfo.MalosDriverInfo.decode(response); cb(re); }); From 430e035316d88173ae6ae122d27f47afd50a4218 Mon Sep 17 00:00:00 2001 From: Sean Canton Date: Fri, 15 Sep 2017 16:32:50 -0700 Subject: [PATCH 05/42] start migratin --- lib/device/drivers/altitude.js | 2 +- lib/device/drivers/detection.js | 42 +++++++++++++++++---------------- lib/device/drivers/gpio.js | 12 ++++++---- lib/device/drivers/zigbee.js | 4 ++-- 4 files changed, 32 insertions(+), 28 deletions(-) diff --git a/lib/device/drivers/altitude.js b/lib/device/drivers/altitude.js index a5381282..21f98f77 100644 --- a/lib/device/drivers/altitude.js +++ b/lib/device/drivers/altitude.js @@ -39,7 +39,7 @@ module.exports = { // Stop sending updates 6 seconds after pings. driverConfigProto.timeout_after_last_ping = options.timeout; debug('altitude start'); - cb(driverConfigProto.encode().toBuffer()); + cb(DeviceDriver.DriverConfig.encode(driverConfigProto).finish()); }, ping: function () { if (_.has(Matrix.components, 'altitude')) { diff --git a/lib/device/drivers/detection.js b/lib/device/drivers/detection.js index b13159df..f7d074d9 100644 --- a/lib/device/drivers/detection.js +++ b/lib/device/drivers/detection.js @@ -1,4 +1,4 @@ -var DeviceDriver, VisionDriver, matrixVisionMalosBuilder, matrixMalosBuilder; +var DeviceDriver, VisionDriver, EyeDriver; var debug = debugLog('detection'); @@ -7,12 +7,13 @@ module.exports = { // init runs automatically, wait for app to request component creation init: function () { VisionDriver = Matrix.service.protobuf.vision.vision; + EyeDriver = Matrix.service.protobuf.malos.maloseye; DeviceDriver = Matrix.service.protobuf.malos.driver; }, // not technically async, needs for facial_recognition read: function (buffer) { - debug('read>', new matrixVisionMalosBuilder.VisionResult.decode(buffer).toRaw()); - var detect = new matrixVisionMalosBuilder.VisionResult.decode(buffer).toRaw(); + debug('read>', new VisionDriver.VisionResult.decode(buffer).toRaw()); + var detect = new VisionDriver.VisionResult.decode(buffer).toRaw(); _.each(detect.vision_event, function (v) { debug('>v_e', v.tag, v.tracking_id); @@ -21,7 +22,8 @@ module.exports = { } else if (v.tag === 'TRACKING_END') { Matrix.service.track.remove(v.tracking_id); } - }); + } + ); // unlike other sensors, this one is a collection @@ -80,22 +82,22 @@ module.exports = { } // map options to protobuf config - var driverConfigProto = new matrixMalosBuilder.DriverConfig; + var driverConfig = new DeviceDriver.DriverConfig; // 2 seconds between updates. - driverConfigProto.set_delay_between_updates(0.05); + driverConfig.delay_between_updates = 0.05; // Stop sending updates 6 seconds after pings. - // driverConfigProto.timeout_after_last_ping = options.timeout; + // driverConfig.timeout_after_last_ping = options.timeout; - var camConfig = new matrixMalosBuilder.CameraConfig; - camConfig.set_camera_id(0); - camConfig.set_width(640); - camConfig.set_height(480); + var camConfig = new EyeDriver.CameraConfig; + camConfig.camera_id = 0; + camConfig.width = 640; + camConfig.height = 480; - driverConfigProto.malos_eye_config = new matrixMalosBuilder.MalosEyeConfig; - driverConfigProto.malos_eye_config.set_camera_config(camConfig); + driverConfig.malos_eye_config = new EyeDriver.MalosEyeConfig; + driverConfig.malos_eye_config.camera_config = camConfig; - debug('config>', driverConfigProto); - cb(driverConfigProto.encode().toBuffer()); + debug('config>', driverConfig); + cb(DeviceDriver.DriverConfig.encode(driverConfig).finish()); }, ping: function () { if (_.has(Matrix.components, 'detection')) { @@ -112,15 +114,15 @@ module.exports = { debug('config detection>', options); - var config = new matrixMalosBuilder.DriverConfig; - config.malos_eye_config = new matrixMalosBuilder.MalosEyeConfig; + var config = new DeviceDriver.DriverConfig; + config.malos_eye_config = new EyeDriver.MalosEyeConfig; // send config - config.malos_eye_config.object_to_detect.push(matrixMalosBuilder.EnumMalosEyeDetectionType[options.enumName]); - config.malos_eye_config.object_to_detect.push(matrixMalosBuilder.EnumMalosEyeDetectionType.FACE_DESCRIPTOR); + config.malos_eye_config.object_to_detect.push(EyeDriver.EnumMalosEyeDetectionType[options.enumName]); + config.malos_eye_config.object_to_detect.push(EyeDriver.EnumMalosEyeDetectionType.FACE_DESCRIPTOR); if (_.has(Matrix.components, 'detection')) { - Matrix.components.detection.config(config.encode().toBuffer()); + Matrix.components.detection.config(config.encode(config).finish()); } else { console.log('Detection Component not ready for Config'); } diff --git a/lib/device/drivers/gpio.js b/lib/device/drivers/gpio.js index 8e38741b..4e6cb5c6 100644 --- a/lib/device/drivers/gpio.js +++ b/lib/device/drivers/gpio.js @@ -1,4 +1,4 @@ -var DeviceDriver, matrixMalosBuilder; +var DeviceDriver, SenseDriver; var debug = debugLog('gpio') var pinAmount = 16; @@ -7,10 +7,11 @@ module.exports = { commands: ['gpio'], // init runs automatically, wait for app to request component creation init: function () { - DeviceDriver = Matrix.service.protobuf.malos.driver + DeviceDriver = Matrix.service.protobuf.malos.driver; + SenseDriver = Matrix.service.protobuf.malos.sense; }, read: function (buffer) { - var buffer = new matrixMalosBuilder.GpioParams.decode(buffer); + var buffer = new SenseDriver.GpioParams.decode(buffer); return { pin: buffer.pin, //set_pin value: buffer.value, //set_value @@ -33,14 +34,15 @@ module.exports = { debug('prepare=>', options); var pin = parseInt(options.pin); var value = parseInt(options.value); - var driverConfigProto = new matrixMalosBuilder.DriverConfig + var driverConfigProto = new DeviceDriver.DriverConfig if (options.servo === true && pin < pinAmount) { var servoHandler = new matrixMalosBuilder.ServoParams; servoHandler.set_pin(pin); servoHandler.set_angle(value); driverConfigProto.set_servo(servoHandler) - return cb(driverConfigProto.encode().toBuffer()); + return + cb(DeviceDriver.DriverConfig.encode(driverConfigProto).finish()); } var gpioHandler = new matrixMalosBuilder.GpioParams; diff --git a/lib/device/drivers/zigbee.js b/lib/device/drivers/zigbee.js index 0731b72a..b759725e 100644 --- a/lib/device/drivers/zigbee.js +++ b/lib/device/drivers/zigbee.js @@ -131,8 +131,8 @@ module.exports = { const __send = function () { config.zigbee_message = cmds.msg; if (activated && self.errors.length === 0) { - debug(require('util').inspect(config, { depth: null })); - Matrix.components.zigbee.print(config.encode().toBuffer()); + debug(require('util').inspect(DeviceDriver.DriverConfig.encode(config), { depth: null })); + Matrix.components.zigbee.print(DeviceDriver.DriverConfig.encode(config).finish()); } else if (self.errors.length > 0) { console.error('Zigbee Command Errors:\n'.red, '->', self.errors.join('\n -> '.red)); } else { From 5b2bb07301f2e89d462cd9bf32307d94f10a1f1d Mon Sep 17 00:00:00 2001 From: Sean Canton Date: Fri, 15 Sep 2017 23:22:17 -0700 Subject: [PATCH 06/42] Fixing encodes --- lib/device/drivers/accelerometer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/device/drivers/accelerometer.js b/lib/device/drivers/accelerometer.js index af05fcdb..aaac0b84 100644 --- a/lib/device/drivers/accelerometer.js +++ b/lib/device/drivers/accelerometer.js @@ -39,7 +39,7 @@ module.exports = { // Stop sending updates 6 seconds after pings. driverConfigProto.timeout_after_last_ping = options.timeout; debug('gyro start') - cb(driverConfigProto.encode().toBuffer()); + cb(DeviceDriver.DriverConfig.encode(driverConfigProto).finish()); }, ping: function () { if (_.has(Matrix.components, 'accelerometer')) { From d4f99d8aeb7e61444ddaa39b85ed4cd466ab4a1e Mon Sep 17 00:00:00 2001 From: Sean Canton Date: Wed, 20 Sep 2017 17:02:00 -0700 Subject: [PATCH 07/42] Proto changes done, untested --- lib/device/drivers/gesture.js | 25 ++++++------- lib/device/drivers/gpio.js | 24 ++++++------ lib/device/drivers/gyroscope.js | 2 +- lib/device/drivers/humidity.js | 12 +++--- lib/device/drivers/ir.js | 15 +++++--- lib/device/drivers/led.js | 3 -- lib/device/drivers/magnetometer.js | 8 ++-- lib/device/drivers/mic.js | 28 +++++++------- lib/device/drivers/recognition.js | 24 ++++++------ lib/device/drivers/temperature.js | 8 ++-- lib/device/drivers/uv.js | 8 ++-- lib/device/drivers/zigbee.js | 5 ++- test/component.test.js | 60 +++++++++++++++--------------- 13 files changed, 114 insertions(+), 108 deletions(-) diff --git a/lib/device/drivers/gesture.js b/lib/device/drivers/gesture.js index e95ba9cf..1f8ea170 100644 --- a/lib/device/drivers/gesture.js +++ b/lib/device/drivers/gesture.js @@ -1,4 +1,4 @@ -var protoBuilder, VisionDriver, matrixVisionMalosBuilder, matrixMalosBuilder; +var protoBuilder, VisionDriver, DeviceDriver; var debug = debugLog('gesture') @@ -7,14 +7,13 @@ module.exports = { // init runs automatically, wait for app to request component creation init: function () { VisionDriver = Matrix.service.protobuf.vision.vision; - DeviceDriver = Matrix.service.protobuf.malos.driver; }, // not technically async, but needs to be this way to support recog being under service read: function (buffer) { - debug('-read>', new matrixVisionMalosBuilder.VisionResult.decode(buffer).toRaw()); - var detect = new matrixVisionMalosBuilder.VisionResult.decode(buffer).toRaw(); + debug('-read>', new VisionDriver.VisionResult.decode(buffer).toRaw()); + var detect = new VisionDriver.VisionResult.decode(buffer).toRaw(); // unlike other sensors, this one is a collection return _.map(detect.rect_detection, function (d) { @@ -44,25 +43,25 @@ module.exports = { options.timeout = options.timeout / 1000 } - var config = new matrixMalosBuilder.DriverConfig + var config = new DeviceDriver.DriverConfig; // Generic configuration. // Almost 0 delay between updates. 200ms. config.set_delay_between_updates(0.25) // Driver specific configuration. - config.malos_eye_config = new matrixMalosBuilder.MalosEyeConfig + config.malos_eye_config = new DeviceDriver.MalosEyeConfig; - var camConfig = new matrixMalosBuilder.CameraConfig; + var camConfig = new DeviceDriver.CameraConfig; camConfig.set_camera_id(0); camConfig.set_width(640); camConfig.set_height(480); - config.malos_eye_config = new matrixMalosBuilder.MalosEyeConfig; + config.malos_eye_config = new DeviceDriver.MalosEyeConfig; config.malos_eye_config.set_camera_config(camConfig); debug('gesture video setup for ', options.enumName) - cb(config.encode().toBuffer()); + cb(DeviceDriver.DriverConfig.encode(config).finish()); }, // pings are executed by heartbeats @@ -84,14 +83,14 @@ module.exports = { debug('configure options>', options); - var config = new matrixMalosBuilder.DriverConfig; - config.malos_eye_config = new matrixMalosBuilder.MalosEyeConfig; + var config = new DeviceDriver.DriverConfig; + config.malos_eye_config = new DeviceDriver.MalosEyeConfig; // send config - config.malos_eye_config.object_to_detect.push(matrixMalosBuilder.EnumMalosEyeDetectionType[options.enumName]); + config.malos_eye_config.object_to_detect.push(DeviceDriver.EnumMalosEyeDetectionType[options.enumName]); if (_.has(Matrix.components, 'gesture')) { - Matrix.components.gesture.config(config.encode().toBuffer()); + Matrix.components.gesture.config(DeviceDriver.DriverConfig.encode(config).finish()); } else { console.error('No Gesture Component Available for Config') console.error('Components:', _.keys(Matrix.components)); diff --git a/lib/device/drivers/gpio.js b/lib/device/drivers/gpio.js index 4e6cb5c6..16d78d79 100644 --- a/lib/device/drivers/gpio.js +++ b/lib/device/drivers/gpio.js @@ -34,15 +34,14 @@ module.exports = { debug('prepare=>', options); var pin = parseInt(options.pin); var value = parseInt(options.value); - var driverConfigProto = new DeviceDriver.DriverConfig + var config = new DeviceDriver.DriverConfig if (options.servo === true && pin < pinAmount) { var servoHandler = new matrixMalosBuilder.ServoParams; servoHandler.set_pin(pin); servoHandler.set_angle(value); - driverConfigProto.set_servo(servoHandler) - return - cb(DeviceDriver.DriverConfig.encode(driverConfigProto).finish()); + config.set_servo(servoHandler) + return cb(DeviceDriver.DriverConfig.encode(config).finish()); } var gpioHandler = new matrixMalosBuilder.GpioParams; @@ -51,15 +50,16 @@ module.exports = { if (!_.isUndefined(pin)) { if (_.isArray(pin)) { //#Overload pin = pins array //TODO This will eventually be supported by the protos debug('SETTING ALL PINS'); - gpioHandler.set_pins(true); //TODO Still not supported by the protos - gpioHandler.set_values(pin); //TODO Still not supported by the protos - cb(gpioHandler.encode().toBuffer()); + gpioHandler.pins = true; //TODO Still not supported by the protos + gpioHandler.values = pin; //TODO Still not supported by the protos + config.gpio = gpioHandler; + return cb(DeviceDriver.DriverConfig.encode(config).finish()); } else if (_.isInteger(pin) && pin >= 0 && pin < pinAmount && _.isInteger(value)) { debug('SETTING PIN #', pin); - gpioHandler.set_pin(pin); - gpioHandler.set_value(value); - driverConfigProto.set_gpio(gpioHandler); - cb(driverConfigProto.encode().toBuffer()); + gpioHandler.pin = pin; + gpioHandler.value = value; + config.gpio = gpioHandler; + return cb(DeviceDriver.DriverConfig.encode(config).finish()); } else { //Incorrect format debug('Incorrect format!'); @@ -67,7 +67,7 @@ module.exports = { } } else { debug('Need to provide params!'); - cb(new Error('Need to provide params')); + return cb(new Error('Need to provide params')); } }, ping: function () { diff --git a/lib/device/drivers/gyroscope.js b/lib/device/drivers/gyroscope.js index 72c319d7..b9f677af 100644 --- a/lib/device/drivers/gyroscope.js +++ b/lib/device/drivers/gyroscope.js @@ -49,7 +49,7 @@ module.exports = { // Stop sending updates 6 seconds after pings. driverConfigProto.timeout_after_last_ping = options.timeout; debug('gyro start'); - cb(driverConfigProto.encode().toBuffer()); + cb(DeviceDriver.DriverConfig.encode(config).finish()); }, ping: function () { if (_.has(Matrix.components, 'gyroscope')) { diff --git a/lib/device/drivers/humidity.js b/lib/device/drivers/humidity.js index 5b3a9f1f..dfe0fed4 100644 --- a/lib/device/drivers/humidity.js +++ b/lib/device/drivers/humidity.js @@ -34,13 +34,15 @@ module.exports = { } // map options to protobuf config - var driverConfigProto = new DeviceDriver.DriverConfig + var config = new DeviceDriver.DriverConfig // 2 seconds between updates. - driverConfigProto.delay_between_updates = options.refresh; + config.delay_between_updates = options.refresh; // Stop sending updates 6 seconds after pings. - driverConfigProto.timeout_after_last_ping = options.timeout; - debug('humidity start') - cb(driverConfigProto.encode().toBuffer()); + config.timeout_after_last_ping = options.timeout; + debug('humidity start> :', config) + + // we don't really need anything specific to humidity here + cb(DeviceDriver.DriverConfig.encode(config).finish()); }, ping: function () { if (_.has(Matrix.components, 'humidity')) { diff --git a/lib/device/drivers/ir.js b/lib/device/drivers/ir.js index f1016c8b..de82c8c1 100644 --- a/lib/device/drivers/ir.js +++ b/lib/device/drivers/ir.js @@ -15,10 +15,12 @@ module.exports = { }; }, send: function (message) { - var msgProto = new SenseDriver.LircParams(); + // doesn't work yet + var msg = new SenseDriver.LircParams(); msg.proto.device = ''; msg.proto.command = ''; - Matrix.components.ir.send(msg.encode().toBuffer()); + // Matrix.components.ir.send(SenseDriver.LircParams.encode(msg).finish()); + return console.warn('IR.Send is not working yet') }, prepare: function (options, cb) { if (_.isFunction(options)) { @@ -41,13 +43,14 @@ module.exports = { } // map options to protobuf config - var driverConfigProto = new DeviceDriver.DriverConfig; + var config = new DeviceDriver.DriverConfig; // 2 seconds between updates. - driverConfigProto.delay_between_updates = options.refresh; + config.delay_between_updates = options.refresh; // Stop sending updates 6 seconds after pings. - driverConfigProto.timeout_after_last_ping = options.timeout; + config.timeout_after_last_ping = options.timeout; debug('ir start'); - cb(driverConfigProto.encode().toBuffer()); + + cb(DeviceDriver.DriverConfig.encode(config).finish()); }, ping: function () { if (_.has(Matrix.components, 'ir')) { diff --git a/lib/device/drivers/led.js b/lib/device/drivers/led.js index a14ad24a..8894ac65 100644 --- a/lib/device/drivers/led.js +++ b/lib/device/drivers/led.js @@ -74,9 +74,6 @@ module.exports = { cb(DeviceDriver.DriverConfig.encode(config).finish()); }, - sendProto: function (colorsProto) { - component.print(colorsProto.encode().toBuffer()); - }, clear: clear, bleLoader: function () { stopLoader(); diff --git a/lib/device/drivers/magnetometer.js b/lib/device/drivers/magnetometer.js index c129fdf0..93c4e84e 100644 --- a/lib/device/drivers/magnetometer.js +++ b/lib/device/drivers/magnetometer.js @@ -35,13 +35,13 @@ module.exports = { } // map options to protobuf config - var driverConfigProto = new DeviceDriver.DriverConfig; + var config = new DeviceDriver.DriverConfig; // 2 seconds between updates. - driverConfigProto.delay_between_updates = options.refresh; + config.delay_between_updates = options.refresh; // Stop sending updates 6 seconds after pings. - driverConfigProto.timeout_after_last_ping = options.timeout; + config.timeout_after_last_ping = options.timeout; debug('gyro start'); - cb(driverConfigProto.encode().toBuffer()); + cb(DeviceDriver.DriverConfig.encode(config).finish()); }, ping: function () { if (_.has(Matrix.components, 'magnetometer')) { diff --git a/lib/device/drivers/mic.js b/lib/device/drivers/mic.js index 6abc787d..4d1b0a4c 100644 --- a/lib/device/drivers/mic.js +++ b/lib/device/drivers/mic.js @@ -1,4 +1,4 @@ -var protoBuilder, matrixMalosBuilder; +var DeviceDriver, IODriver; // not using malos for data var micInstance, micKill, micStream; @@ -7,20 +7,21 @@ var debug = debugLog('mic'); var mic = require('mic'); module.exports = { - init: function() { - protoBuilder = Matrix.service.protobuf.malos.driver; + init: function () { + DeviceDriver = Matrix.service.protobuf.malos.driver; + IODriver = Matrix.service.protobuf.malos.io; }, - read: function(spl) { + read: function (spl) { debug('-read>', spl); return spl; }, - stop: function() { + stop: function () { micInstance.stop(); }, - prepare: function(options, cb) { + prepare: function (options, cb) { //default to beamformed mic var micNum = (options.hasOwnProperty('number')) ? options.number : 8; @@ -40,7 +41,7 @@ module.exports = { var headerSent = false; var ds = []; - micStream.on('data', function(d) { + micStream.on('data', function (d) { if (!headerSent) { debug('id', d.slice(0, 4).toString()); @@ -70,13 +71,13 @@ module.exports = { micInstance.start(); - var config = new matrixMalosBuilder.DriverConfig; + var config = new IODriver.DriverConfig; if (!_.has(options, 'gain')) { options.gain = 0; } - var micConfig = new matrixMalosBuilder.MicArrayParams; + var micConfig = new IODriver.MicArrayParams; micConfig.gain = options.gain; // setup gain for all microphones @@ -90,10 +91,11 @@ module.exports = { config.set_micarray(micConfig); - cb(config.encode().toBuffer()); + + cb(DeviceDriver.DriverConfig.encode(config).finish()); }, - ping: function() { + ping: function () { if (_.has(Matrix.components, 'mic')) { @@ -102,7 +104,7 @@ module.exports = { // mic isn't managed by malos, so we need to stop it here clearInterval(micKill); // if the above isn't called every 10 seconds, the process stops - micKill = setTimeout(function() { + micKill = setTimeout(function () { micInstance.stop(); }, 10000); @@ -111,7 +113,7 @@ module.exports = { console.error('Components:', Matrix.components); } }, - error: function(err) { + error: function (err) { console.error('Mic', err); } }; \ No newline at end of file diff --git a/lib/device/drivers/recognition.js b/lib/device/drivers/recognition.js index 7381ac02..c5d4eba3 100644 --- a/lib/device/drivers/recognition.js +++ b/lib/device/drivers/recognition.js @@ -147,16 +147,18 @@ module.exports = { // configure malos first prepare: function (component, cb) { var options = component.options; - var driverConfig = new DeviceDriver.DriverConfig; - driverConfig.set_delay_between_updates(0.05); - driverConfig.set_timeout_after_last_ping(15); - driverConfig.malos_eye_config = new DeviceDriver.MalosEyeConfig; + var config = new DeviceDriver.config; + config.set_delay_between_updates(0.05); + config.set_timeout_after_last_ping(15); + config.malos_eye_config = new DeviceDriver.MalosEyeConfig; var cameraConfig = new DeviceDriver.CameraConfig; cameraConfig.set_camera_id(0); cameraConfig.set_width(800); cameraConfig.set_height(600); - driverConfig.malos_eye_config.set_camera_config(cameraConfig); - cb(driverConfig.encode().toBuffer()); + + config.malos_eye_config.set_camera_config(cameraConfig); + + cb(DeviceDriver.DriverConfig.encode(config).finish()); // parse mode option if (options.hasOwnProperty('mode')) { @@ -216,16 +218,16 @@ module.exports = { startRecognitionService(); // setup malos_eye_ - var eyeConfig = new DeviceDriver.DriverConfig; - eyeConfig.malos_eye_config = new DeviceDriver.MalosEyeConfig; + var config = new DeviceDriver.DriverConfig; + config.malos_eye_config = new DeviceDriver.MalosEyeConfig; // FIXME: We should only need FACE_DESCRIPTOR here. @resolved? - eyeConfig.malos_eye_config.object_to_detect.push( + config.malos_eye_config.object_to_detect.push( DeviceDriver.EnumMalosEyeDetectionType.FACE_DEMOGRAPHICS); - eyeConfig.malos_eye_config.object_to_detect.push( + config.malos_eye_config.object_to_detect.push( DeviceDriver.EnumMalosEyeDetectionType.FACE_DESCRIPTOR); - Matrix.components.recognition.config(eyeConfig.encode().toBuffer()); + cb(DeviceDriver.DriverConfig.encode(config).finish()); // Additional Inits getAllTags(function (err, tags) { diff --git a/lib/device/drivers/temperature.js b/lib/device/drivers/temperature.js index 6d00e283..8b09ef7a 100644 --- a/lib/device/drivers/temperature.js +++ b/lib/device/drivers/temperature.js @@ -34,13 +34,13 @@ module.exports = { } // map options to protobuf config - var driverConfigProto = new DeviceDriver.DriverConfig; + var config = new DeviceDriver.DriverConfig; // 2 seconds between updates. - driverConfigProto.delay_between_updates = options.refresh; + config.delay_between_updates = options.refresh; // Stop sending updates 6 seconds after pings. - driverConfigProto.timeout_after_last_ping = options.timeout; + config.timeout_after_last_ping = options.timeout; debug('temperature start'); - cb(driverConfigProto.encode().toBuffer()); + cb(DeviceDriver.DriverConfig.encode(config).finish()); }, ping: function () { if (_.has(Matrix.components, 'temperature')) { diff --git a/lib/device/drivers/uv.js b/lib/device/drivers/uv.js index 7626acec..f6b98c5e 100644 --- a/lib/device/drivers/uv.js +++ b/lib/device/drivers/uv.js @@ -38,13 +38,13 @@ module.exports = { } // map options to protobuf config - var driverConfigProto = new SenseDriver.DriverConfig; + var config = new SenseDriver.DriverConfig; // 2 seconds between updates. - driverConfigProto.delay_between_updates = options.refresh; + config.delay_between_updates = options.refresh; // Stop sending updates 6 seconds after pings. - driverConfigProto.timeout_after_last_ping = options.timeout; + config.timeout_after_last_ping = options.timeout; debug('uv start'); - cb(driverConfigProto.encode().toBuffer()); + cb(DeviceDriver.DriverConfig.encode(config).finish()); }, ping: function () { if (_.has(Matrix.components, 'uv')) { diff --git a/lib/device/drivers/zigbee.js b/lib/device/drivers/zigbee.js index b759725e..002294d8 100644 --- a/lib/device/drivers/zigbee.js +++ b/lib/device/drivers/zigbee.js @@ -412,8 +412,9 @@ module.exports = { config.base.set_zigbee_message(options.msg); } - debug('prepare->', config); - cb(config.base.encode().toBuffer()); + debug('prepare->', config.base); + + cb(DeviceDriver.DriverConfig.encode(config.base).finish()); }, ping: function () { if (_.has(Matrix.components, 'zigbee')) { diff --git a/test/component.test.js b/test/component.test.js index 54592116..361ac895 100644 --- a/test/component.test.js +++ b/test/component.test.js @@ -1,9 +1,9 @@ var zeromq = require('zmq'); var protobuf = require('protobufjs'); -describe('component', function(){ +describe('component', function () { var component, TestProto, malosSend, malosRead, malosPing, malosError, TestProto; - before(function(){ + before(function () { var TestBuilder = protobuf.loadProtoFile('./test/fixtures/test.proto'); TestProto = TestBuilder.build('matrix_test'); @@ -13,22 +13,22 @@ describe('component', function(){ // fake driver Matrix.device.drivers.test = { name: 'test', - init: function(){}, - read: function(buffer){ + init: function () { }, + read: function (buffer) { return new TestProto.Test.decode(buffer) }, - prepare: function(option, cb){ + prepare: function (option, cb) { var t = new TestProto.Test; _.extend(t, option) - cb( t.encode().toBuffer() ) + cb(TestProto.Test.encode(t).finish()); }, - ping: function(){ + ping: function () { Matrix.components.test.ping(); }, - config: function(config){ + config: function (config) { Matrix.components.test.config(config) }, - error: function(err){ + error: function (err) { return err.toString(); } } @@ -36,7 +36,7 @@ describe('component', function(){ // makes component available var mqs = Matrix.service.zeromq.registerComponent(Matrix.device.drivers.test); - component = new Matrix.service.component( mqs ); + component = new Matrix.service.component(mqs); //fake malos malosSend = zeromq.socket('pull'); @@ -54,24 +54,24 @@ describe('component', function(){ Matrix.components.should.have.property('test') }); - it('should identify as a sensor', function(){ + it('should identify as a sensor', function () { Matrix.components.test.sensor.should.equal(true); }) - describe('Component methods', function(){ - it('should have a send method', function(){ + describe('Component methods', function () { + it('should have a send method', function () { Matrix.components.test.should.have.property('send') }) - it('should have a read method', function(){ + it('should have a read method', function () { Matrix.components.test.should.have.property('read') }) - it('should have a ping method', function(){ + it('should have a ping method', function () { Matrix.components.test.should.have.property('ping') }) - it('should have a error method', function(){ + it('should have a error method', function () { Matrix.components.test.should.have.property('error') }) - it('should have a config method', function(){ + it('should have a config method', function () { Matrix.components.test.should.have.property('config') }) }) @@ -80,41 +80,41 @@ describe('component', function(){ it('should implement ping', function (done) { var d = _.once(done); - malosPing.on('message', function (msg){ + malosPing.on('message', function (msg) { d(); }) Matrix.components.test.ping(); }); - it('should implement send', function(done){ + it('should implement send', function (done) { var d = _.once(done); - malosSend.on('message', function (msg){ + malosSend.on('message', function (msg) { var decode = new TestProto.Test.decode(msg); - decode.should.property('test', true ); + decode.should.property('test', true); d(); }) Matrix.components.test.send({ test: true }); }); - it('should implement print', function(done){ + it('should implement print', function (done) { malosSend.connect('tcp://127.0.0.1:' + Matrix.device.port.get('test').input); var d = _.once(done); - malosSend.on('message', function(msg){ + malosSend.on('message', function (msg) { var decode = new TestProto.Test.decode(msg); - decode.should.property('test', true ); + decode.should.property('test', true); d(); }) //print takes raw protobufs var t = new TestProto.Test; t.test = true; - Matrix.components.test.print( t.encode().toBuffer() ); + Matrix.components.test.print(TestProto.Test.encode(t).finish()); }) - it('should implement read', function(done){ - Matrix.components.test.read( function(msg){ + it('should implement read', function (done) { + Matrix.components.test.read(function (msg) { msg.should.property('test', true); done(); }); @@ -124,13 +124,13 @@ describe('component', function(){ var t = new TestProto.Test; t.test = true; setTimeout(function () { - malosRead.send(t.encode().toBuffer()); + malosRead.send(TestProto.Test.encode(t).finish()); }, 500) }) // TODO: Finish this, not sure why not working - it('should implement error', function(done){ - Matrix.components.test.error( function(msg){ + it('should implement error', function (done) { + Matrix.components.test.error(function (msg) { msg.should.equal('test'); done(); }); From f82ac8dc0e68619f23d7353ff3fa88886f35a2b7 Mon Sep 17 00:00:00 2001 From: Sean Canton Date: Thu, 21 Sep 2017 11:52:40 -0700 Subject: [PATCH 08/42] progress --- index.js | 5 +++-- lib/device/drivers/accelerometer.js | 13 +++++++------ lib/device/drivers/altitude.js | 13 +++++++------ lib/device/drivers/gyroscope.js | 6 +++--- lib/device/drivers/mic.js | 2 +- lib/device/drivers/pressure.js | 10 +++++----- lib/device/drivers/uv.js | 5 ++--- lib/device/drivers/zigbee.js | 6 +++--- 8 files changed, 31 insertions(+), 29 deletions(-) diff --git a/index.js b/index.js index d66dc14a..4552efbc 100644 --- a/index.js +++ b/index.js @@ -131,8 +131,9 @@ Matrix.api.makeUrls(Matrix.apiServer); var malosInfoOut = ''; Matrix.device.malos.info(function (data) { + console.log(data); _.each(data.info, function (i) { - malosInfoOut += ' ⚙ '.yellow + i.driver_name.blue + ':' + i.base_port + ' | ' + i.notes_for_human.grey + '\n'; + malosInfoOut += ' ⚙ '.yellow + i.driverName.blue + ':' + i.basePort + ' | ' + i.notesForHuman.grey + '\n'; }); }); @@ -276,7 +277,7 @@ function offlineSetup(callback) { function startConfigurationBLE(cb) { // env vars have creds, skip BT - if ( Matrix.preAuth === true ){ + if (Matrix.preAuth === true) { return cb(); } diff --git a/lib/device/drivers/accelerometer.js b/lib/device/drivers/accelerometer.js index aaac0b84..f5b9f6ae 100644 --- a/lib/device/drivers/accelerometer.js +++ b/lib/device/drivers/accelerometer.js @@ -1,4 +1,4 @@ -var protoBuilder, DeviceDriver; +var SenseDriver, DeviceDriver; var debug = debugLog('accelerometer') @@ -7,9 +7,10 @@ module.exports = { // init runs automatically, wait for app to request component creation init: function () { DeviceDriver = Matrix.service.protobuf.malos.driver + SenseDriver = Matrix.service.protobuf.malos.sense; }, read: function (buffer) { - var a = new DeviceDriver.Imu.decode(buffer) + var a = new SenseDriver.Imu.decode(buffer) return { x: a.accel_x, y: a.accel_y, z: a.accel_z }; }, prepare: function (options, cb) { @@ -33,13 +34,13 @@ module.exports = { } // map options to protobuf config - var driverConfigProto = new DeviceDriver.DriverConfig + var config = new DeviceDriver.DriverConfig // 2 seconds between updates. - driverConfigProto.delay_between_updates = options.refresh; + config.delay_between_updates = options.refresh; // Stop sending updates 6 seconds after pings. - driverConfigProto.timeout_after_last_ping = options.timeout; + config.timeout_after_last_ping = options.timeout; debug('gyro start') - cb(DeviceDriver.DriverConfig.encode(driverConfigProto).finish()); + cb(DeviceDriver.DriverConfig.encode(config).finish()); }, ping: function () { if (_.has(Matrix.components, 'accelerometer')) { diff --git a/lib/device/drivers/altitude.js b/lib/device/drivers/altitude.js index 21f98f77..4f3e90f1 100644 --- a/lib/device/drivers/altitude.js +++ b/lib/device/drivers/altitude.js @@ -1,4 +1,4 @@ -var DeviceDriver; +var DeviceDriver, SenseDriver; var debug = debugLog('altitude'); @@ -6,10 +6,11 @@ module.exports = { // init runs automatically, wait for app to request component creation init: function () { DeviceDriver = Matrix.service.protobuf.malos.driver; + SenseDriver = Matrix.service.protobuf.malos.sense; }, read: function (buffer) { return { - value: new DeviceDriver.Pressure.decode(buffer).altitude + value: new SenseDriver.Pressure.decode(buffer).altitude }; }, prepare: function (options, cb) { @@ -33,13 +34,13 @@ module.exports = { } // map options to protobuf config - var driverConfigProto = new DeviceDriver.DriverConfig; + var config = new DeviceDriver.DriverConfig; // 2 seconds between updates. - driverConfigProto.delay_between_updates = options.refresh; + config.delay_between_updates = options.refresh; // Stop sending updates 6 seconds after pings. - driverConfigProto.timeout_after_last_ping = options.timeout; + config.timeout_after_last_ping = options.timeout; debug('altitude start'); - cb(DeviceDriver.DriverConfig.encode(driverConfigProto).finish()); + cb(DeviceDriver.DriverConfig.encode(config).finish()); }, ping: function () { if (_.has(Matrix.components, 'altitude')) { diff --git a/lib/device/drivers/gyroscope.js b/lib/device/drivers/gyroscope.js index b9f677af..12ff4090 100644 --- a/lib/device/drivers/gyroscope.js +++ b/lib/device/drivers/gyroscope.js @@ -43,11 +43,11 @@ module.exports = { } // map options to protobuf config - var driverConfigProto = new DeviceDriver.DriverConfig; + var config = new DeviceDriver.DriverConfig; // 2 seconds between updates. - driverConfigProto.delay_between_updates = options.refresh; + config.delay_between_updates = options.refresh; // Stop sending updates 6 seconds after pings. - driverConfigProto.timeout_after_last_ping = options.timeout; + config.timeout_after_last_ping = options.timeout; debug('gyro start'); cb(DeviceDriver.DriverConfig.encode(config).finish()); }, diff --git a/lib/device/drivers/mic.js b/lib/device/drivers/mic.js index 4d1b0a4c..4ce0cdb8 100644 --- a/lib/device/drivers/mic.js +++ b/lib/device/drivers/mic.js @@ -71,7 +71,7 @@ module.exports = { micInstance.start(); - var config = new IODriver.DriverConfig; + var config = new DeviceDriver.DriverConfig; if (!_.has(options, 'gain')) { options.gain = 0; diff --git a/lib/device/drivers/pressure.js b/lib/device/drivers/pressure.js index 81549b14..7630b359 100644 --- a/lib/device/drivers/pressure.js +++ b/lib/device/drivers/pressure.js @@ -12,7 +12,7 @@ module.exports = { }, read: function (buffer) { return { - value: new matrixMalosBuilder.Pressure.decode(buffer).pressure + value: new SenseDriver.Pressure.decode(buffer).pressure }; }, prepare: function (options, cb) { @@ -36,13 +36,13 @@ module.exports = { } // map options to protobuf config - var driverConfigProto = new SenseDriver.DriverConfig; + var config = new DeviceDriver.DriverConfig; // 2 seconds between updates. - driverConfigProto.delay_between_updates = options.refresh; + config.delay_between_updates = options.refresh; // Stop sending updates 6 seconds after pings. - driverConfigProto.timeout_after_last_ping = options.timeout; + config.timeout_after_last_ping = options.timeout; debug('pressure start'); - cb(driverConfigProto.encode().toBuffer()); + cb(DeviceDriver.DriverConfig.encode(config).finish()); }, ping: function () { if (_.has(Matrix.components, 'pressure')) { diff --git a/lib/device/drivers/uv.js b/lib/device/drivers/uv.js index f6b98c5e..e8bab512 100644 --- a/lib/device/drivers/uv.js +++ b/lib/device/drivers/uv.js @@ -1,4 +1,4 @@ -var DeviceDriver, matrixMalosBuilder; +var DeviceDriver, SenseDriver; var debug = debugLog('uv'); @@ -8,7 +8,6 @@ module.exports = { init: function () { DeviceDriver = Matrix.service.protobuf.malos.driver; // Parse matrix_malos package (namespace). - SenseDriver = Matrix.service.protobuf.malos.sense; }, read: function (buffer) { @@ -38,7 +37,7 @@ module.exports = { } // map options to protobuf config - var config = new SenseDriver.DriverConfig; + var config = new DeviceDriver.DriverConfig; // 2 seconds between updates. config.delay_between_updates = options.refresh; // Stop sending updates 6 seconds after pings. diff --git a/lib/device/drivers/zigbee.js b/lib/device/drivers/zigbee.js index 002294d8..65030f11 100644 --- a/lib/device/drivers/zigbee.js +++ b/lib/device/drivers/zigbee.js @@ -48,9 +48,9 @@ function lookForBulbs(nodes) { })[0]; var levelIds = _.map(levels, 'node_id'); var colorIds = _.map(colors, 'node_id'); - console.log('>>>ONOFF<<<', onoffIds, onoffs); - console.log('>>>LEVEL<<<', levelIds, levels); - console.log('>>>COLOR<<<', colorIds, colors); + console.log('ONOFF:', onoffIds, onoffs); + console.log('LEVEL:', levelIds, levels); + console.log('COLOR:', colorIds, colors); knownBulbs.add([onoffIds[0], onoffEndpoints[0]]); } From c7ade9ebed9872dc3a39f14463f7df5324e6921a Mon Sep 17 00:00:00 2001 From: Sean Canton Date: Fri, 22 Sep 2017 17:13:05 -0700 Subject: [PATCH 09/42] more progress for protobuf, finally testing --- apps/lib/led.js | 2 +- lib/device/drivers/accelerometer.js | 8 ++-- lib/device/drivers/altitude.js | 6 +-- lib/device/drivers/detection.js | 44 ++++++++--------- lib/device/drivers/gesture.js | 24 +++++----- lib/device/drivers/gpio.js | 9 ++-- lib/device/drivers/gyroscope.js | 12 ++--- lib/device/drivers/humidity.js | 6 +-- lib/device/drivers/ir.js | 6 +-- lib/device/drivers/led.js | 50 +++++++++---------- lib/device/drivers/magnetometer.js | 8 ++-- lib/device/drivers/pressure.js | 4 +- lib/device/drivers/recognition.js | 50 +++++++++---------- lib/device/drivers/temperature.js | 6 +-- lib/device/drivers/uv.js | 9 ++-- lib/device/drivers/wakeword.js | 33 ++++++------- lib/device/drivers/zigbee.js | 74 ++++++++++++++--------------- lib/service/grpc.js | 10 ++-- package.json | 4 +- proto | 2 +- 20 files changed, 186 insertions(+), 181 deletions(-) diff --git a/apps/lib/led.js b/apps/lib/led.js index 4e79d7e5..2ab1aa9f 100644 --- a/apps/lib/led.js +++ b/apps/lib/led.js @@ -28,7 +28,7 @@ module.exports = function(c) { var tcColors = _.times('#000000', 35); if (_.isPlainObject(color)) { - // console.log('o>', color) + // console.log('o>', color); if ( color.color.indexOf('rgba') !== -1 ){ console.log('rgba is not supported. results may vary.'); } diff --git a/lib/device/drivers/accelerometer.js b/lib/device/drivers/accelerometer.js index f5b9f6ae..11ea0f00 100644 --- a/lib/device/drivers/accelerometer.js +++ b/lib/device/drivers/accelerometer.js @@ -10,8 +10,8 @@ module.exports = { SenseDriver = Matrix.service.protobuf.malos.sense; }, read: function (buffer) { - var a = new SenseDriver.Imu.decode(buffer) - return { x: a.accel_x, y: a.accel_y, z: a.accel_z }; + var a = SenseDriver.Imu.decode(buffer); + return { x: a.accelX, y: a.accelY, z: a.accelZ }; }, prepare: function (options, cb) { if (_.isFunction(options)) { @@ -36,9 +36,9 @@ module.exports = { // map options to protobuf config var config = new DeviceDriver.DriverConfig // 2 seconds between updates. - config.delay_between_updates = options.refresh; + config.delayBetweenUpdates = options.refresh; // Stop sending updates 6 seconds after pings. - config.timeout_after_last_ping = options.timeout; + config.timeoutAfterLastPing = options.timeout; debug('gyro start') cb(DeviceDriver.DriverConfig.encode(config).finish()); }, diff --git a/lib/device/drivers/altitude.js b/lib/device/drivers/altitude.js index 4f3e90f1..ec9628a5 100644 --- a/lib/device/drivers/altitude.js +++ b/lib/device/drivers/altitude.js @@ -10,7 +10,7 @@ module.exports = { }, read: function (buffer) { return { - value: new SenseDriver.Pressure.decode(buffer).altitude + value: SenseDriver.Pressure.decode(buffer).altitude }; }, prepare: function (options, cb) { @@ -36,9 +36,9 @@ module.exports = { // map options to protobuf config var config = new DeviceDriver.DriverConfig; // 2 seconds between updates. - config.delay_between_updates = options.refresh; + config.delayBetweenUpdates = options.refresh; // Stop sending updates 6 seconds after pings. - config.timeout_after_last_ping = options.timeout; + config.timeoutAfterLastPing = options.timeout; debug('altitude start'); cb(DeviceDriver.DriverConfig.encode(config).finish()); }, diff --git a/lib/device/drivers/detection.js b/lib/device/drivers/detection.js index f7d074d9..3ed42d78 100644 --- a/lib/device/drivers/detection.js +++ b/lib/device/drivers/detection.js @@ -10,24 +10,24 @@ module.exports = { EyeDriver = Matrix.service.protobuf.malos.maloseye; DeviceDriver = Matrix.service.protobuf.malos.driver; }, - // not technically async, needs for facial_recognition + // not technically async, needs for facialRecognition read: function (buffer) { - debug('read>', new VisionDriver.VisionResult.decode(buffer).toRaw()); - var detect = new VisionDriver.VisionResult.decode(buffer).toRaw(); + debug('read>', VisionDriver.VisionResult.decode(buffer)); + var detect = VisionDriver.VisionResult.decode(buffer); _.each(detect.vision_event, function (v) { - debug('>v_e', v.tag, v.tracking_id); + debug('>v_e', v.tag, v.trackingId); if (v.tag === 'TRACKING_START') { - Matrix.service.track.add(v.tracking_id); + Matrix.service.track.add(v.trackingId); } else if (v.tag === 'TRACKING_END') { - Matrix.service.track.remove(v.tracking_id); + Matrix.service.track.remove(v.trackingId); } } ); // unlike other sensors, this one is a collection - return _.map(detect.rect_detection, (d) => { + return _.map(detect.rectDetection, (d) => { var o = { location: d.location, tag: d.tag, @@ -35,12 +35,12 @@ module.exports = { // image_small: d.image_small.toString() }; - if (_.has(d, 'tracking_id')) { - o.trackId = parseInt(d.tracking_id, 10); + if (_.has(d, 'trackingId')) { + o.trackId = parseInt(d.trackingId, 10); } - if (_.has(d, 'facial_recognition')) { - o.demographics = _.reduce(d.facial_recognition, function (r, v, k) { + if (_.has(d, 'facialRecognition')) { + o.demographics = _.reduce(d.facialRecognition, function (r, v, k) { // translate from { tag: 'EMOTION', emotion: 'HAPPY' to { emotion: 'happy' } var tag = v.tag.toLowerCase(); if (_.has(v, tag)) { @@ -50,9 +50,9 @@ module.exports = { // complex values if (tag === 'head_pose') { r.pose = {}; - r.pose.yaw = v.pose_yaw; - r.pose.roll = v.pose_roll; - r.pose.pitch = v.pose_pitch; + r.pose.yaw = v.poseYaw; + r.pose.roll = v.poseRoll; + r.pose.pitch = v.posePitch; } } return r; @@ -84,17 +84,17 @@ module.exports = { // map options to protobuf config var driverConfig = new DeviceDriver.DriverConfig; // 2 seconds between updates. - driverConfig.delay_between_updates = 0.05; + driverConfig.delayBetweenUpdates = 0.05; // Stop sending updates 6 seconds after pings. - // driverConfig.timeout_after_last_ping = options.timeout; + // driverConfig.timeoutAfterLastPing = options.timeout; var camConfig = new EyeDriver.CameraConfig; - camConfig.camera_id = 0; + camConfig.cameraId = 0; camConfig.width = 640; camConfig.height = 480; - driverConfig.malos_eye_config = new EyeDriver.MalosEyeConfig; - driverConfig.malos_eye_config.camera_config = camConfig; + driverConfig.malosEyeConfig = new EyeDriver.MalosEyeConfig; + driverConfig.malosEyeConfig.cameraConfig = camConfig; debug('config>', driverConfig); cb(DeviceDriver.DriverConfig.encode(driverConfig).finish()); @@ -115,11 +115,11 @@ module.exports = { debug('config detection>', options); var config = new DeviceDriver.DriverConfig; - config.malos_eye_config = new EyeDriver.MalosEyeConfig; + config.malosEyeConfig = new EyeDriver.MalosEyeConfig; // send config - config.malos_eye_config.object_to_detect.push(EyeDriver.EnumMalosEyeDetectionType[options.enumName]); - config.malos_eye_config.object_to_detect.push(EyeDriver.EnumMalosEyeDetectionType.FACE_DESCRIPTOR); + config.malosEyeConfig.objectToDetect.push(EyeDriver.EnumMalosEyeDetectionType[options.enumName]); + config.malosEyeConfig.objectToDetect.push(EyeDriver.EnumMalosEyeDetectionType.FACE_DESCRIPTOR); if (_.has(Matrix.components, 'detection')) { Matrix.components.detection.config(config.encode(config).finish()); diff --git a/lib/device/drivers/gesture.js b/lib/device/drivers/gesture.js index 1f8ea170..9514cd02 100644 --- a/lib/device/drivers/gesture.js +++ b/lib/device/drivers/gesture.js @@ -12,11 +12,11 @@ module.exports = { // not technically async, but needs to be this way to support recog being under service read: function (buffer) { - debug('-read>', new VisionDriver.VisionResult.decode(buffer).toRaw()); - var detect = new VisionDriver.VisionResult.decode(buffer).toRaw(); + debug('-read>', VisionDriver.VisionResult.decode(buffer)); + var detect = VisionDriver.VisionResult.decode(buffer); // unlike other sensors, this one is a collection - return _.map(detect.rect_detection, function (d) { + return _.map(detect.rectDetection, function (d) { return { location: d.location, tag: d.tag @@ -46,18 +46,18 @@ module.exports = { var config = new DeviceDriver.DriverConfig; // Generic configuration. // Almost 0 delay between updates. 200ms. - config.set_delay_between_updates(0.25) + config.delayBetweenUpdates(0.25) // Driver specific configuration. - config.malos_eye_config = new DeviceDriver.MalosEyeConfig; + config.malosEyeConfig = new DeviceDriver.MalosEyeConfig; var camConfig = new DeviceDriver.CameraConfig; - camConfig.set_camera_id(0); - camConfig.set_width(640); - camConfig.set_height(480); + camConfig.cameraId(0); + camConfig.width(640); + camConfig.height(480); - config.malos_eye_config = new DeviceDriver.MalosEyeConfig; - config.malos_eye_config.set_camera_config(camConfig); + config.malosEyeConfig = new DeviceDriver.MalosEyeConfig; + config.malosEyeConfig.cameraConfig(camConfig); debug('gesture video setup for ', options.enumName) @@ -84,10 +84,10 @@ module.exports = { debug('configure options>', options); var config = new DeviceDriver.DriverConfig; - config.malos_eye_config = new DeviceDriver.MalosEyeConfig; + config.malosEyeConfig = new DeviceDriver.MalosEyeConfig; // send config - config.malos_eye_config.object_to_detect.push(DeviceDriver.EnumMalosEyeDetectionType[options.enumName]); + config.malosEyeConfig.object_to_detect.push(DeviceDriver.EnumMalosEyeDetectionType[options.enumName]); if (_.has(Matrix.components, 'gesture')) { Matrix.components.gesture.config(DeviceDriver.DriverConfig.encode(config).finish()); diff --git a/lib/device/drivers/gpio.js b/lib/device/drivers/gpio.js index 16d78d79..ee3064b1 100644 --- a/lib/device/drivers/gpio.js +++ b/lib/device/drivers/gpio.js @@ -9,6 +9,7 @@ module.exports = { init: function () { DeviceDriver = Matrix.service.protobuf.malos.driver; SenseDriver = Matrix.service.protobuf.malos.sense; + IODriver = Matrix.service.protobuf.malos.io; }, read: function (buffer) { var buffer = new SenseDriver.GpioParams.decode(buffer); @@ -37,10 +38,10 @@ module.exports = { var config = new DeviceDriver.DriverConfig if (options.servo === true && pin < pinAmount) { - var servoHandler = new matrixMalosBuilder.ServoParams; - servoHandler.set_pin(pin); - servoHandler.set_angle(value); - config.set_servo(servoHandler) + var servoHandler = new IODriver.ServoParams; + servoHandler.pin(pin); + servoHandler.angle(value); + config.servo(servoHandler) return cb(DeviceDriver.DriverConfig.encode(config).finish()); } diff --git a/lib/device/drivers/gyroscope.js b/lib/device/drivers/gyroscope.js index 12ff4090..eaadebc1 100644 --- a/lib/device/drivers/gyroscope.js +++ b/lib/device/drivers/gyroscope.js @@ -11,15 +11,15 @@ module.exports = { SenseDriver = Matrix.service.protobuf.malos.sense; }, read: function (buffer) { - var g = new SenseDriver.Imu.decode(buffer); + var g = SenseDriver.Imu.decode(buffer); return { // orientation values sent with gyro yaw: g.yaw, pitch: g.pitch, roll: g.roll, - x: g.gyro_x, - y: g.gyro_y, - z: g.gyro_z + x: g.gyroX, + y: g.gyroY, + z: g.gyroZ }; }, prepare: function (options, cb) { @@ -45,9 +45,9 @@ module.exports = { // map options to protobuf config var config = new DeviceDriver.DriverConfig; // 2 seconds between updates. - config.delay_between_updates = options.refresh; + config.delayBetweenUpdates = options.refresh; // Stop sending updates 6 seconds after pings. - config.timeout_after_last_ping = options.timeout; + config.timeoutAfterLastPing = options.timeout; debug('gyro start'); cb(DeviceDriver.DriverConfig.encode(config).finish()); }, diff --git a/lib/device/drivers/humidity.js b/lib/device/drivers/humidity.js index dfe0fed4..e23b3751 100644 --- a/lib/device/drivers/humidity.js +++ b/lib/device/drivers/humidity.js @@ -11,7 +11,7 @@ module.exports = { SenseDriver = Matrix.service.protobuf.malos.sense; }, read: function (buffer) { - return { value: new SenseDriver.Humidity.decode(buffer).humidity } + return { value: SenseDriver.Humidity.decode(buffer).humidity } }, prepare: function (options, cb) { if (_.isFunction(options)) { @@ -36,9 +36,9 @@ module.exports = { // map options to protobuf config var config = new DeviceDriver.DriverConfig // 2 seconds between updates. - config.delay_between_updates = options.refresh; + config.delayBetweenUpdates = options.refresh; // Stop sending updates 6 seconds after pings. - config.timeout_after_last_ping = options.timeout; + config.timeoutAfterLastPing = options.timeout; debug('humidity start> :', config) // we don't really need anything specific to humidity here diff --git a/lib/device/drivers/ir.js b/lib/device/drivers/ir.js index de82c8c1..1bdb3aa2 100644 --- a/lib/device/drivers/ir.js +++ b/lib/device/drivers/ir.js @@ -11,7 +11,7 @@ module.exports = { }, read: function (buffer) { return { - value: new SenseDriver.LircParams.decode(buffer).pressure + value: SenseDriver.LircParams.decode(buffer).pressure }; }, send: function (message) { @@ -45,9 +45,9 @@ module.exports = { // map options to protobuf config var config = new DeviceDriver.DriverConfig; // 2 seconds between updates. - config.delay_between_updates = options.refresh; + config.delayBetweenUpdates = options.refresh; // Stop sending updates 6 seconds after pings. - config.timeout_after_last_ping = options.timeout; + config.timeoutAfterLastPing = options.timeout; debug('ir start'); cb(DeviceDriver.DriverConfig.encode(config).finish()); diff --git a/lib/device/drivers/led.js b/lib/device/drivers/led.js index 8894ac65..3b965452 100644 --- a/lib/device/drivers/led.js +++ b/lib/device/drivers/led.js @@ -1,4 +1,4 @@ -var DeviceDriver, IoDriver, component; +var DeviceDriver, IODriver, component; var loaderInt; @@ -9,10 +9,10 @@ function stopLoader() { function clear() { var config = new DeviceDriver.DriverConfig; - config.image = new IoDriver.EverloopImage; + config.image = new IODriver.EverloopImage; for (var i = 0; i < 35; i++) { - var led = new IoDriver.LedValue; + var led = new IODriver.LedValue; led.red = 0; led.green = 0; led.blue = 0; @@ -27,7 +27,7 @@ module.exports = { // runs init automatically. up = component here for loader init: function () { DeviceDriver = Matrix.service.protobuf.malos.driver; - IoDriver = Matrix.service.protobuf.malos.io; + IODriver = Matrix.service.protobuf.malos.io; var options = { name: 'led' }; @@ -49,10 +49,10 @@ module.exports = { prepare: function (colors, cb) { var config = new DeviceDriver.DriverConfig; - config.image = new IoDriver.EverloopImage; + config.image = new IODriver.EverloopImage; for (var i = 0; i < 35; i++) { - var led = new IoDriver.LedValue; + var led = new IODriver.LedValue; if (i < colors.length) { var c = colors[i]; if (!_.has(c, 'w')) { @@ -84,14 +84,14 @@ module.exports = { var ledArray; var intensity; //This changes over time var config = new DeviceDriver.DriverConfig; - config.image = new IoDriver.EverloopImage; + config.image = new IODriver.EverloopImage; loaderInt = setInterval(function () { intensity = Math.abs(Math.sin(counter)); ledArray = []; for (var i = 0; i < 35; i++) { - var led = new IoDriver.LedValue; + var led = new IODriver.LedValue; var color = Math.floor((255 * intensity) / dimFactor); led.blue = color; ledArray.push(led); @@ -110,14 +110,14 @@ module.exports = { var ledArray; var intensity; //This changes over time var config = new DeviceDriver.DriverConfig; - config.image = new IoDriver.EverloopImage; + config.image = new IODriver.EverloopImage; loaderInt = setInterval(function () { intensity = Math.abs(Math.sin(counter)); ledArray = []; for (var i = 0; i < 35; i++) { - var led = new IoDriver.LedValue; + var led = new IODriver.LedValue; var color = Math.floor((255 * intensity) / dimFactor); led.green = color; ledArray.push(led); @@ -135,11 +135,11 @@ module.exports = { loaderInt = setInterval(function () { var config = new DeviceDriver.DriverConfig; - config.image = new IoDriver.EverloopImage; + config.image = new IODriver.EverloopImage; var dimFactor = 0; for (var i = 0; i < 35; i++) { - var led = new IoDriver.LedValue; + var led = new IODriver.LedValue; led.red = 0; led.green = 0; @@ -174,14 +174,14 @@ module.exports = { loaderInt = setInterval(function () { var config = new DeviceDriver.DriverConfig; - config.image = new IoDriver.EverloopImage; + config.image = new IODriver.EverloopImage; bright = (fadeIn) ? bright + 1 : bright - 1; fadeIn = (bright >= 75 || bright <= 1) ? !fadeIn : fadeIn; for (var i = 0; i < 35; i++) { - var led = new IoDriver.LedValue; + var led = new IODriver.LedValue; led.red = 0; led.green = 0; @@ -217,7 +217,7 @@ module.exports = { this.t = function (tick) { var config = new DeviceDriver.DriverConfig; - config.image = new IoDriver.EverloopImage; + config.image = new IODriver.EverloopImage; self.spread = []; for (var i = 0; i < this.particles; i++) { @@ -232,7 +232,7 @@ module.exports = { // figure out light matrix for (var i = 0; i < 35; i++) { - var led = new IoDriver.LedValue; + var led = new IODriver.LedValue; led.red = 0; led.green = 0; led.blue = 0; @@ -324,11 +324,11 @@ module.exports = { const dimFactor = 10; //1 - 255, use 1 for full blinding powah var config = new DeviceDriver.DriverConfig; - config.image = new IoDriver.EverloopImage; + config.image = new IODriver.EverloopImage; // base = black color array for (var i = 0; i < 35; i++) { - var led = new IoDriver.LedValue; + var led = new IODriver.LedValue; led.red = 0; led.green = 0; led.blue = 0; @@ -338,7 +338,7 @@ module.exports = { loaderInt = setInterval(function () { if (counter < 35) { //Transfer colors over - var led = new IoDriver.LedValue; + var led = new IODriver.LedValue; led.red = Math.floor(colors[counter].r / dimFactor); led.green = Math.floor(colors[counter].g / dimFactor); led.blue = Math.floor(colors[counter].b / dimFactor); @@ -358,10 +358,10 @@ module.exports = { stopLoader(); clear(); var config = new DeviceDriver.DriverConfig; - config.image = new IoDriver.EverloopImage; + config.image = new IODriver.EverloopImage; for (var i = 0; i < 35; i++) { - var led = new IoDriver.LedValue; + var led = new IODriver.LedValue; led.red = 127; led.green = 0; @@ -390,14 +390,14 @@ module.exports = { var ledArray; var intensity; //This changes over time var config = new DeviceDriver.DriverConfig; - config.image = new IoDriver.EverloopImage; + config.image = new IODriver.EverloopImage; loaderInt = setInterval(function () { intensity = Math.abs(Math.sin(counter)); ledArray = []; for (var i = 0; i < 35; i++) { - var led = new IoDriver.LedValue; + var led = new IODriver.LedValue; var color = Math.floor((255 * intensity) / dimFactor); led.red = color; ledArray.push(led); @@ -424,9 +424,9 @@ module.exports = { var int = setInterval(function () { var config = new DeviceDriver.DriverConfig; - config.image = new IoDriver.EverloopImage; + config.image = new IODriver.EverloopImage; for (var i = 0; i < 35; i++) { - var led = new IoDriver.LedValue; + var led = new IODriver.LedValue; led.red = Math.round(intensity / 4); led.green = Math.round(intensity / 3); led.blue = intensity; diff --git a/lib/device/drivers/magnetometer.js b/lib/device/drivers/magnetometer.js index 93c4e84e..4d82608e 100644 --- a/lib/device/drivers/magnetometer.js +++ b/lib/device/drivers/magnetometer.js @@ -11,8 +11,8 @@ module.exports = { SenseDriver = Matrix.service.protobuf.malos.sense; }, read: function (buffer) { - var m = new SenseDriver.Imu.decode(buffer); - return { x: m.mag_x, y: m.mag_y, z: m.mag_z }; + var m = SenseDriver.Imu.decode(buffer); + return { x: m.magX, y: m.magY, z: m.magZ }; }, prepare: function (options, cb) { if (_.isFunction(options)) { @@ -37,9 +37,9 @@ module.exports = { // map options to protobuf config var config = new DeviceDriver.DriverConfig; // 2 seconds between updates. - config.delay_between_updates = options.refresh; + config.delayBetweenUpdates = options.refresh; // Stop sending updates 6 seconds after pings. - config.timeout_after_last_ping = options.timeout; + config.timeoutAfterLastPing = options.timeout; debug('gyro start'); cb(DeviceDriver.DriverConfig.encode(config).finish()); }, diff --git a/lib/device/drivers/pressure.js b/lib/device/drivers/pressure.js index 7630b359..5e743a01 100644 --- a/lib/device/drivers/pressure.js +++ b/lib/device/drivers/pressure.js @@ -38,9 +38,9 @@ module.exports = { // map options to protobuf config var config = new DeviceDriver.DriverConfig; // 2 seconds between updates. - config.delay_between_updates = options.refresh; + config.delayBetweenUpdates = options.refresh; // Stop sending updates 6 seconds after pings. - config.timeout_after_last_ping = options.timeout; + config.timeoutAfterLastPing = options.timeout; debug('pressure start'); cb(DeviceDriver.DriverConfig.encode(config).finish()); }, diff --git a/lib/device/drivers/recognition.js b/lib/device/drivers/recognition.js index c5d4eba3..8e98a2d7 100644 --- a/lib/device/drivers/recognition.js +++ b/lib/device/drivers/recognition.js @@ -31,8 +31,8 @@ function getAllTags(cb) { RecognitionService.getFeatureDescriptorTags({}, headers, function (err, res) { if (err) return cb(err); - if (res.hasOwnProperty('feature_tags_for_device')) { - var tagData = res.feature_tags_for_device; + if (res.hasOwnProperty('featureTagsForDevice')) { + var tagData = res.featureTagsForDevice; var tags = []; tags = _.map(tagData, function (t) { return _.map(t.tags, function (tag) { @@ -104,11 +104,11 @@ function getDescriptors(options, cb) { function (cb) { RecognitionService.getFeatureDescriptors(options, headers, (err, resp) => { if (err) cb(err); - descriptors.concat(resp.feature_descriptor_list); - if (_.isUndefined(resp.next_page_token)) { + descriptors.concat(resp.featureDescriptorList); + if (_.isUndefined(resp.nextPageToken)) { done = true; } else { - options.next_page_token = resp.next_page_token; + options.nextPageToken = resp.nextPageToken; } cb(null, descriptors); }); @@ -147,16 +147,16 @@ module.exports = { // configure malos first prepare: function (component, cb) { var options = component.options; - var config = new DeviceDriver.config; - config.set_delay_between_updates(0.05); - config.set_timeout_after_last_ping(15); - config.malos_eye_config = new DeviceDriver.MalosEyeConfig; + var config = new DeviceDriver.DeviceConfig; + config.delayBetweenUpdates(0.05); + config.timeoutAfterLastPing(15); + config.malosEyeConfig = new DeviceDriver.MalosEyeConfig; var cameraConfig = new DeviceDriver.CameraConfig; - cameraConfig.set_camera_id(0); - cameraConfig.set_width(800); - cameraConfig.set_height(600); + cameraConfig.cameraId(0); + cameraConfig.width(800); + cameraConfig.height(600); - config.malos_eye_config.set_camera_config(cameraConfig); + config.malosEyeConfig.cameraConfig(cameraConfig); cb(DeviceDriver.DriverConfig.encode(config).finish()); @@ -219,11 +219,11 @@ module.exports = { // setup malos_eye_ var config = new DeviceDriver.DriverConfig; - config.malos_eye_config = new DeviceDriver.MalosEyeConfig; + config.malosEyeConfig = new DeviceDriver.MalosEyeConfig; // FIXME: We should only need FACE_DESCRIPTOR here. @resolved? - config.malos_eye_config.object_to_detect.push( + config.malosEyeConfig.when.push( DeviceDriver.EnumMalosEyeDetectionType.FACE_DEMOGRAPHICS); - config.malos_eye_config.object_to_detect.push( + config.malosEyeConfig.when.push( DeviceDriver.EnumMalosEyeDetectionType.FACE_DESCRIPTOR); @@ -261,24 +261,24 @@ module.exports = { if (result.vision_event.length > 0) { _.each(result.vision_event, function (v) { - debug('>v_e', v.tag, v.tracking_id); + debug('>v_e', v.tag, v.trackingId); if (v.tag === 'TRACKING_START') { - Matrix.service.track.add(v.tracking_id); + Matrix.service.track.add(v.trackingId); } else if (v.tag === 'TRACKING_END') { - Matrix.service.track.remove(v.tracking_id); + Matrix.service.track.remove(v.trackingId); } }); } _.each(result.rect_detection, function (r) { - if (!Matrix.service.track.has(r.tracking_id)) { + if (!Matrix.service.track.has(r.trackingId)) { console.warn('Detection has no Tracking Id', r, Matrix.service.track.getIds()); } - var tId = r.tracking_id.toString(); + var tId = r.trackingId.toString(); debug('track id>', tId); - _.each(r.facial_recognition, function (recog) { + _.each(r.facialRecognition, function (recog) { if (recog.tag === 'FACE_DESCRIPTOR') { @@ -326,14 +326,14 @@ module.exports = { var featureList = new RecognitionRPC.FeatureDescriptorList(); var feature = new RecognitionRPC.FeatureDescriptor(); - feature.data = recog.face_descriptor; + feature.data = recog.faceDescriptor; feature.tags = recognizeTags; features.push(feature); featureList.feature_descriptors = features; RecognitionService.recognize({ - feature_descriptor_list: featureList + featureDescriptorList: featureList }, headers, (e, recogs) => { if (e) return error(e); // debug('recognition occurred', recogs); @@ -344,7 +344,7 @@ module.exports = { } // Training Mode }); - //# facial_recognition map + //# facialRecognition map }); //# rect_detection map diff --git a/lib/device/drivers/temperature.js b/lib/device/drivers/temperature.js index 8b09ef7a..bde39509 100644 --- a/lib/device/drivers/temperature.js +++ b/lib/device/drivers/temperature.js @@ -11,7 +11,7 @@ module.exports = { SenseDriver = Matrix.service.protobuf.malos.sense; }, read: function (buffer) { - return { value: new SenseDriver.Humidity.decode(buffer).temperature }; + return { value: SenseDriver.Humidity.decode(buffer).temperature }; }, prepare: function (options, cb) { if (_.isFunction(options)) { @@ -36,9 +36,9 @@ module.exports = { // map options to protobuf config var config = new DeviceDriver.DriverConfig; // 2 seconds between updates. - config.delay_between_updates = options.refresh; + config.delayBetweenUpdates = options.refresh; // Stop sending updates 6 seconds after pings. - config.timeout_after_last_ping = options.timeout; + config.timeoutAfterLastPing = options.timeout; debug('temperature start'); cb(DeviceDriver.DriverConfig.encode(config).finish()); }, diff --git a/lib/device/drivers/uv.js b/lib/device/drivers/uv.js index e8bab512..e9def0bc 100644 --- a/lib/device/drivers/uv.js +++ b/lib/device/drivers/uv.js @@ -11,9 +11,10 @@ module.exports = { SenseDriver = Matrix.service.protobuf.malos.sense; }, read: function (buffer) { + log('>>>', SenseDriver.UV.decode(buffer)); return { - value: new SenseDriver.UV.decode(buffer).uv_index, - risk: new SenseDriver.UV.decode(buffer).oms_risk + value: SenseDriver.UV.decode(buffer).uvIndex, + risk: SenseDriver.UV.decode(buffer).omsRisk }; }, prepare: function (options, cb) { @@ -39,9 +40,9 @@ module.exports = { // map options to protobuf config var config = new DeviceDriver.DriverConfig; // 2 seconds between updates. - config.delay_between_updates = options.refresh; + config.delayBetweenUpdates = options.refresh; // Stop sending updates 6 seconds after pings. - config.timeout_after_last_ping = options.timeout; + config.timeoutAfterLastPing = options.timeout; debug('uv start'); cb(DeviceDriver.DriverConfig.encode(config).finish()); }, diff --git a/lib/device/drivers/wakeword.js b/lib/device/drivers/wakeword.js index f55e1698..17a2339a 100644 --- a/lib/device/drivers/wakeword.js +++ b/lib/device/drivers/wakeword.js @@ -28,15 +28,16 @@ // stop recognition service bool stop_recognition = 6; - */ -let protoBuilder, matrixMalosBuilder; +*/ + +let DeviceDriver, IODriver; const debug = debugLog('wakeword'); module.exports = { init: () => { - protoBuilder = Matrix.service.protobuf.malos.driver; - matrixMalosBuilder = protoBuilder.build('matrix_malos'); + DeviceDriver = Matrix.service.protobuf.malos.driver; + IODriver = Matrix.service.protobuf.malos.io; }, read: (buffer) => { @@ -53,10 +54,10 @@ module.exports = { return console.error('No Wakeword provided.') } - let wakeword_config = new matrixMalosBuilder.WakeWordParams; - wakeword_config.set_wake_word(options.wakeword); - wakeword_config.set_lm_path("/home/pi/assets/9854.lm"); - wakeword_config.set_dic_path("/home/pi/assets/9854.dic"); + let wakeword_config = new IOBuilder.WakeWordParams; + wakeword_config.wakeWord(options.wakeword); + wakeword_config.lmPath("/home/pi/assets/9854.lm"); + wakeword_config.dicPath("/home/pi/assets/9854.dic"); if (_.has(options, 'channel')) { if ( @@ -64,20 +65,20 @@ module.exports = { options.channel <= 8 && options.channel >= 0 ) { - let channel = matrixMalosBuilder.WakeWordParams.MicChannel['channel' + options.channel]; - wakeword_config.set_channel(channel); + let channel = IOBuilder.WakeWordParams.MicChannel['channel' + options.channel]; + wakeword_config.channel(channel); } else { return console.error('Invalid Channel ( 0-8 )', options.channel); } } else { - wakeword_config.set_channel(matrixMalosBuilder.WakeWordParams.MicChannel.channel0) + wakeword_config.channel(IOBuilder.WakeWordParams.MicChannel.channel0) } - wakeword_config.set_enable_verbose(false) - cb(wakeword_config.encode().toBuffer()); + wakeword_config.enableVerbose = false; + cb(IOBuilder.WakeWordParams.encode(wakeword_config).finish()); }, stop: () => { - let wakeword_config = new matrixMalosBuilder.WakeWordParams; - wakeword_config.set_stop_recognition(true) - Matrix.components.wakeword.config(wakeword_config.encode().toBuffer()); + let wakeword_config = new IOBuilder.WakeWordParams; + wakeword_config.stopRecognition = true; + Matrix.components.wakeword.config(IOBuilder.WakeWordParams.encode(wakeword_config).finish()); } } \ No newline at end of file diff --git a/lib/device/drivers/zigbee.js b/lib/device/drivers/zigbee.js index 65030f11..fa0fe43a 100644 --- a/lib/device/drivers/zigbee.js +++ b/lib/device/drivers/zigbee.js @@ -20,7 +20,7 @@ function lookForBulbs(nodes) { var onoffs = _.filter(nodes, function (n) { return _.find(n.endpoints, function (e) { return _.find(e.clusters, function (c) { - return (c.cluster_id === 6); + return (c.clusterId === 6); }); }); }); @@ -28,7 +28,7 @@ function lookForBulbs(nodes) { var levels = _.filter(nodes, function (n) { return _.find(n.endpoints, function (e) { return _.find(e.clusters, function (c) { - return (c.cluster_id === 8); + return (c.clusterId === 8); }); }); }); @@ -36,18 +36,18 @@ function lookForBulbs(nodes) { var colors = _.filter(nodes, function (n) { return _.find(n.endpoints, function (e) { return _.find(e.clusters, function (c) { - return (c.cluster_id === 768); + return (c.clusterId === 768); }); }); }); - var onoffIds = _.map(onoffs, 'node_id'); + var onoffIds = _.map(onoffs, 'nodeId'); var onoffEndpoints = _.map(onoffs, function (n) { - return _.map(n.endpoints, 'endpoint_index'); + return _.map(n.endpoints, 'endpointIndex'); })[0]; - var levelIds = _.map(levels, 'node_id'); - var colorIds = _.map(colors, 'node_id'); + var levelIds = _.map(levels, 'nodeId'); + var colorIds = _.map(colors, 'nodeId'); console.log('ONOFF:', onoffIds, onoffs); console.log('LEVEL:', levelIds, levels); console.log('COLOR:', colorIds, colors); @@ -109,8 +109,8 @@ module.exports = { } else { var node = Array.from(knownBulbs)[i][0]; var endpoint = Array.from(knownBulbs)[i][1]; - cmds.zcl.node_id = node; - cmds.zcl.endpoint_index = endpoint; + cmds.zcl.nodeId = node; + cmds.zcl.endpointIndex = endpoint; } return self; }; @@ -121,15 +121,15 @@ module.exports = { // LEVEL 1 self.init = function (timeout, delay) { - config.timeout_after_last_ping = timeout || 15; - config.delay_between_updates = delay || 1; + config.timeoutAfterLastPing = timeout || 15; + config.delayBetweenUpdates = delay || 1; __send(); }; // Private Methods - // LEVEL 1 Assignments const __send = function () { - config.zigbee_message = cmds.msg; + config.zigbeeMessage = cmds.msg; if (activated && self.errors.length === 0) { debug(require('util').inspect(DeviceDriver.DriverConfig.encode(config), { depth: null })); Matrix.components.zigbee.print(DeviceDriver.DriverConfig.encode(config).finish()); @@ -144,16 +144,16 @@ module.exports = { // // LEVEL 2 Assignments const __net = function () { - cmds.msg.network_mgmt_cmd = cmds.net; + cmds.msg.networkMgmtCmd = cmds.net; cmds.msg.type = enums.zbCmdTypes.NETWORK_MGMT; __send(); }; const __zcl = function () { - if (_.isUndefined(cmds.zcl.node_id) || _.isUndefined(cmds.zcl.endpoint_index)) { + if (_.isUndefined(cmds.zcl.nodeId) || _.isUndefined(cmds.zcl.endpointIndex)) { self.errors.push('No Node ID and/or Endpoint ID set'); } - cmds.msg.zcl_cmd = cmds.zcl; + cmds.msg.zclCmd = cmds.zcl; cmds.msg.type = enums.zbCmdTypes.ZCL; __send(); }; @@ -162,19 +162,19 @@ module.exports = { // LEVEL 3 ZCL Assignments const __onoff = function () { cmds.zcl.type = enums.zclCmdTypes.ON_OFF; - cmds.zcl.onoff_cmd = cmds.onoff; + cmds.zcl.onoffCmd = cmds.onoff; __zcl(); }; const __level = function () { cmds.zcl.type = enums.zclCmdTypes.LEVEL; - cmds.zcl.level_cmd = cmds.level; + cmds.zcl.levelCmd = cmds.level; __zcl(); }; const __color = function () { cmds.zcl.type = enums.zclCmdTypes.COLOR_CONTROL; - cmds.zcl.colorcontrol_cmd = cmds.colorcontrol; + cmds.zcl.colorcontrolCmd = cmds.colorcontrol; __zcl(); }; @@ -203,7 +203,7 @@ module.exports = { self.movetolevel = function (level, time) { params.movetolevel.level = level; params.movetolevel.transition_time = time; - cmds.level.move_to_level_params = params.movetolevel; + cmds.level.moveToLevelParams = params.movetolevel; cmds.level.type = enums.level.MOVE_TO_LEVEL; __level(); }; @@ -216,7 +216,7 @@ module.exports = { self.movelevel = function (up, rate) { params.movelevel.mode = (up) ? 0 : 1; params.movelevel.rate = rate; - cmds.level.move_params = params.movelevel; + cmds.level.moveParams = params.movelevel; cmds.level.type = enums.level.MOVE; __level(); }; @@ -231,8 +231,8 @@ module.exports = { self.movetohue = function (hue, time) { params.movetohue.hue = hue; params.movetohue.direction = 0; - params.movetohue.transition_time = time; - cmds.colorcontrol.movetohue_params = params.movetohue; + params.movetohue.transitionTime = time; + cmds.colorcontrol.movetohueParams = params.movetohue; __color(); }; @@ -246,19 +246,19 @@ module.exports = { }; self.reset = function () { - cmds.net.set_type(enums.netTypes.RESET_PROXY); + cmds.net.type(enums.netTypes.RESET_PROXY); __net(); }; self.status = function () { - cmds.net.set_type(enums.netTypes.NETWORK_STATUS); + cmds.net.type(enums.netTypes.NETWORK_STATUS); __net(); }; self.permitJoin = function () { - cmds.net.set_type(enums.netTypes.PERMIT_JOIN); + cmds.net.type(enums.netTypes.PERMIT_JOIN); params.permitJoin.time = 60; - cmds.net.permit_join_params = params.permitJoin; + cmds.net.permitJoinParams = params.permitJoin; __net(); }; @@ -282,8 +282,8 @@ module.exports = { self.errors.push('No Node Defined to Ask To Leave'); } cmds.net.type = enums.netTypes.NODE_LEAVE_NWK; - params.nodeLeave.node_id = node; - cmds.net.node_leave_params = params.nodeLeave; + params.nodeLeave.nodeId = node; + cmds.net.nodeLeaveParams = params.nodeLeave; __net(); }; @@ -333,25 +333,25 @@ module.exports = { if (zbMsg.type === enums.zbCmdTypes.ZCL) { /// } else if (enums.zbCmdTypes.NETWORK_MGMT) { - var netCmd = zbMsg.network_mgmt_cmd; + var netCmd = zbMsg.networkMgmtCmd; var netCmdType = netCmd.type; debug('NET:', netCmdType); - if (!_.isEmpty(netCmd.connected_nodes)) { + if (!_.isEmpty(netCmd.connectedNodes)) { - lookForBulbs(netCmd.connected_nodes); + lookForBulbs(netCmd.connectedNodes); } if (netCmdType === 'IS_PROXY_ACTIVE') { - if (zbMsg.network_mgmt_cmd.is_proxy_active) { + if (zbMsg.networkMgmtCmd.isProxyActive) { debug('Gateway Active'); } else { return console.error('Zigbee Gateway Error'); } Cmd.status(); } else if (netCmdType === 'NETWORK_STATUS') { - var status = netCmd.network_status.type; + var status = netCmd.networkStatus.type; debug('STATUS:', status); if (status === 'JOINED_NETWORK') { // NetCmd.permitJoin(); @@ -362,7 +362,7 @@ module.exports = { //# end networks status } else if (netCmdType === 'DISCOVERY_INFO') { - // netCmd.connectedNodes[].endpoints[].clusters[].cluster_id + // netCmd.connectedNodes[].endpoints[].clusters[].clusterId // 0 - information // 3 - identity ( flash on / off ) // 6 - onoff @@ -405,11 +405,11 @@ module.exports = { } // 2 seconds between updates. - config.base.set_delay_between_updates(options.refresh); - config.base.set_timeout_after_last_ping(options.timeout); + config.base.delayBetweenUpdates(options.refresh); + config.base.timeoutAfterLastPing(options.timeout); if (_.has(options, 'msg')) { - config.base.set_zigbee_message(options.msg); + config.base.zigbeeMessage(options.msg); } debug('prepare->', config.base); diff --git a/lib/service/grpc.js b/lib/service/grpc.js index 71bff9cd..f2efa6fd 100644 --- a/lib/service/grpc.js +++ b/lib/service/grpc.js @@ -1,4 +1,3 @@ - const protos = require('matrix-protos'); module.exports = protos; @@ -23,7 +22,8 @@ for (let p in Protos) { // automatically load newest protos available if (vInt === latestV) { - let fns = [], others = []; + let fns = [], + others = []; for (let pi in Protos[p][pv]) { if (!_.isNull(pi.match(/get|store|delete|service|!Response$|!Request$/gi))) { @@ -31,11 +31,13 @@ for (let p in Protos) { fns.push(pi); } } + + // assign pExport[p] = Protos[p]['v' + latestV]; if (fns.length > 0) { debug('GRPC ::', p, 'v' + latestV) - // debug('↳'.yellow, others.concat(fns).join(' ').grey) + // debug('↳'.yellow, others.concat(fns).join(' ').grey) } } } @@ -63,4 +65,4 @@ module.exports = pExport; // } // }) // } -// }) +// }) \ No newline at end of file diff --git a/package.json b/package.json index f269aa68..79f120e3 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "debug": "DEBUG=*,-engine*,-needle,-*led,-gatt,-bleno,-Component,-bt-characteristic,-hci NODE_ENV=dev node index.js", "debugger": "DEBUG=*,-engine*,-needle,-*led,-gatt,-bleno,-Component,-bt-characteristic,-hci NODE_ENV=dev node --debug index.js", "debug-test": "DEBUG=*,-engine*,-Component*,-gatt,-bleno,-bt-characteristic,-hci node test/_runner.js", - "debug-watch": "NODE_ENV=dev nodemon index.js", + "debug-watch": "NODE_ENV=dev nodemon index.js -i apps", "local-debug": "DEBUG=*,-engine*,-Component* NODE_ENV=local node index.js", "local": "NODE_ENV=local node index.js", "start": "nodemon --watch lib --watch config", @@ -20,7 +20,7 @@ "deploy-clear": "sudo rm -r db node_modules/matrix-firebase node_modules/matrix-app-config-helper node_modules/matrix-node-sdk node_modules/matrix-eventfilter", "deploy-copy": "cd node_modules; cp -r ../../matrix-firebase ./matrix-firebase; cp -r ../../matrix-app-config-helper ./matrix-app-config-helper; cp -r ../../matrix-node-sdk ./matrix-node-sdk; cp -r ../../matrix-eventfilter ./matrix-eventfilter; cd ..;", "deploy-image": "find apps -name '*.matrix' ! -name 'monitor.matrix' -type d -exec rm -r {} +; docker build --no-cache -t matrix/matrix-os .;docker push admobilize/matrix-os", - "local-setup": "cd node_modules; ln -s ../../pi-wifi ./pi-wifi; ln -s ../../matrix-firebase ./matrix-firebase; ln -s ../../matrix-app-config-helper ./matrix-app-config-helper; ln -s ../../matrix-node-sdk ./matrix-node-sdk; ln -s ../../matrix-eventfilter ./matrix-eventfilter; cd ..", + "local-setup": "cd node_modules; ln -s ../../pi-wifi ./pi-wifi; ln -s ../../matrix-firebase ./matrix-firebase; ln -s ../../matrix-app-config-helper ./matrix-app-config-helper; ln -s ../../matrix-node-sdk ./matrix-node-sdk; ln -s ../../matrix-eventfilter ./matrix-eventfilter; ln -s ../../matrix-protos ./matrix-protos; cd ..", "sync": "rsync -e ssh --progress -u package.json index.js pi@m:mos/;rsync -ru -e ssh --progress lib proto config apps test pi@m:mos", "sync-local": "rsync -e ssh --progress -u package.json index.js pi@l:matrix-os/;rsync -ru -e ssh --progress lib proto config apps test pi@l:matrix-os", "sync-m1": "rsync -e ssh --progress -u package.json index.js pi@m1:matrix-os/;rsync -ru -e ssh --progress lib proto config apps test pi@m1:matrix-os", diff --git a/proto b/proto index 59f72b78..2f24057b 160000 --- a/proto +++ b/proto @@ -1 +1 @@ -Subproject commit 59f72b786494b76eebfabfe7f1a06b4ff7d92f3a +Subproject commit 2f24057b0d6a244218709bc6ce89d4a43c3f6c64 From 6f28463c04ec2799a2ffe1f552288793d804a796 Mon Sep 17 00:00:00 2001 From: Sean Canton Date: Mon, 25 Sep 2017 12:48:10 -0700 Subject: [PATCH 10/42] detect --- lib/device/drivers/detection.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/device/drivers/detection.js b/lib/device/drivers/detection.js index 3ed42d78..1aef42d8 100644 --- a/lib/device/drivers/detection.js +++ b/lib/device/drivers/detection.js @@ -1,4 +1,4 @@ -var DeviceDriver, VisionDriver, EyeDriver; +var DeviceDriver, VisionDriver, EyeDriver, VisionService; var debug = debugLog('detection'); @@ -6,7 +6,9 @@ module.exports = { commands: ['face', 'demographics'], // init runs automatically, wait for app to request component creation init: function () { - VisionDriver = Matrix.service.protobuf.vision.vision; + console.log('>>>', Matrix.service.protobuf ); + VisionDriver = Matrix.service.protobuf.vision; + VisionService = Matrix.service.protobuf.vision_service; EyeDriver = Matrix.service.protobuf.malos.maloseye; DeviceDriver = Matrix.service.protobuf.malos.driver; }, @@ -122,7 +124,7 @@ module.exports = { config.malosEyeConfig.objectToDetect.push(EyeDriver.EnumMalosEyeDetectionType.FACE_DESCRIPTOR); if (_.has(Matrix.components, 'detection')) { - Matrix.components.detection.config(config.encode(config).finish()); + Matrix.components.detection.config(DeviceDriver.DriverConfig.encode(config).finish()); } else { console.log('Detection Component not ready for Config'); } From 1f3cdb6c8e6edbd947b6f34685859f0b5b7a1d70 Mon Sep 17 00:00:00 2001 From: Sean Canton Date: Wed, 27 Sep 2017 10:37:51 -0700 Subject: [PATCH 11/42] prog --- lib/device/drivers/detection.js | 1 - lib/device/drivers/led.js | 2 +- lib/device/drivers/uv.js | 5 ++--- proto | 2 +- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/device/drivers/detection.js b/lib/device/drivers/detection.js index 1aef42d8..efb2647a 100644 --- a/lib/device/drivers/detection.js +++ b/lib/device/drivers/detection.js @@ -6,7 +6,6 @@ module.exports = { commands: ['face', 'demographics'], // init runs automatically, wait for app to request component creation init: function () { - console.log('>>>', Matrix.service.protobuf ); VisionDriver = Matrix.service.protobuf.vision; VisionService = Matrix.service.protobuf.vision_service; EyeDriver = Matrix.service.protobuf.malos.maloseye; diff --git a/lib/device/drivers/led.js b/lib/device/drivers/led.js index 3b965452..ff7dcd96 100644 --- a/lib/device/drivers/led.js +++ b/lib/device/drivers/led.js @@ -363,7 +363,7 @@ module.exports = { for (var i = 0; i < 35; i++) { var led = new IODriver.LedValue; - led.red = 127; + led.red = (i % 2 == 0) ? 127 : 64; led.green = 0; led.blue = 0; led.white = 0; diff --git a/lib/device/drivers/uv.js b/lib/device/drivers/uv.js index e9def0bc..3328d52e 100644 --- a/lib/device/drivers/uv.js +++ b/lib/device/drivers/uv.js @@ -11,10 +11,9 @@ module.exports = { SenseDriver = Matrix.service.protobuf.malos.sense; }, read: function (buffer) { - log('>>>', SenseDriver.UV.decode(buffer)); return { - value: SenseDriver.UV.decode(buffer).uvIndex, - risk: SenseDriver.UV.decode(buffer).omsRisk + value: SenseDriver.UV.decode(buffer).uvIndex, + risk: SenseDriver.UV.decode(buffer).omsRisk }; }, prepare: function (options, cb) { diff --git a/proto b/proto index 2f24057b..59f72b78 160000 --- a/proto +++ b/proto @@ -1 +1 @@ -Subproject commit 2f24057b0d6a244218709bc6ce89d4a43c3f6c64 +Subproject commit 59f72b786494b76eebfabfe7f1a06b4ff7d92f3a From d8b4df747a9ede9aacb896d487f262e01c8a130a Mon Sep 17 00:00:00 2001 From: Sean Canton Date: Thu, 28 Sep 2017 09:21:54 -0700 Subject: [PATCH 12/42] Woot detection working --- apps/lib/led.js | 3 +-- apps/lib/service.js | 2 +- lib/device/drivers/detection.js | 2 +- lib/service/manager.js | 10 +++++----- proto | 2 +- 5 files changed, 9 insertions(+), 10 deletions(-) diff --git a/apps/lib/led.js b/apps/lib/led.js index 2ab1aa9f..6e069b11 100644 --- a/apps/lib/led.js +++ b/apps/lib/led.js @@ -28,8 +28,7 @@ module.exports = function(c) { var tcColors = _.times('#000000', 35); if (_.isPlainObject(color)) { - // console.log('o>', color); - if ( color.color.indexOf('rgba') !== -1 ){ + if ( _.isString(color.color) && color.color.indexOf('rgba') !== -1 ){ console.log('rgba is not supported. results may vary.'); } // shape diff --git a/apps/lib/service.js b/apps/lib/service.js index c02bdf7b..ff671d2c 100644 --- a/apps/lib/service.js +++ b/apps/lib/service.js @@ -147,7 +147,7 @@ var service = function(name, options) { if (_.isFunction(cb)) { cb(_.omit(data.payload, 'serviceType', 'engine', 'type')); } else { - console.log('No callback passed to service>%s.then', self.name); + cb(console.warn('No callback passed to service>%s.then', self.name)); } } }); diff --git a/lib/device/drivers/detection.js b/lib/device/drivers/detection.js index efb2647a..eca1bf39 100644 --- a/lib/device/drivers/detection.js +++ b/lib/device/drivers/detection.js @@ -13,8 +13,8 @@ module.exports = { }, // not technically async, needs for facialRecognition read: function (buffer) { - debug('read>', VisionDriver.VisionResult.decode(buffer)); var detect = VisionDriver.VisionResult.decode(buffer); + debug('read>', detect); _.each(detect.vision_event, function (v) { debug('>v_e', v.tag, v.trackingId); diff --git a/lib/service/manager.js b/lib/service/manager.js index f11dc090..bfc7a410 100644 --- a/lib/service/manager.js +++ b/lib/service/manager.js @@ -62,8 +62,8 @@ function clearAppList(cb) { $exists: true } }, { - multi: true - }, cb); + multi: true + }, cb); } @@ -309,8 +309,8 @@ function startApp(name, cb) { 'matrix-apphost', 'node', 'apps/' + name + '.matrix/index.js' ], { - stdio: ['pipe', 'pipe', 'pipe'] - }); + stdio: ['pipe', 'pipe', 'pipe'] + }); @@ -468,7 +468,7 @@ function startApp(name, cb) { var day = new Date().getDay(); var time = new Date().toISOString().slice(0, -5); var str = time + ' l o g [' + name + ']' + ' ' + data; - fs.appendFile(Matrix.config.path.appLog + day, str); + // fs.appendFileSync(Matrix.config.path.appLog + day, str); log('(' + name.yellow + ')', data.toString()); //send out realtime update if not being watched diff --git a/proto b/proto index 59f72b78..2f24057b 160000 --- a/proto +++ b/proto @@ -1 +1 @@ -Subproject commit 59f72b786494b76eebfabfe7f1a06b4ff7d92f3a +Subproject commit 2f24057b0d6a244218709bc6ce89d4a43c3f6c64 From 8f2498503b0c0af2efa8c5c048a401f656bacdee Mon Sep 17 00:00:00 2001 From: Sean Canton Date: Wed, 4 Oct 2017 15:33:32 -0700 Subject: [PATCH 13/42] progress until grpc --- lib/device/drivers/recognition.js | 39 +++++++++++++++++++------------ proto | 2 +- 2 files changed, 25 insertions(+), 16 deletions(-) diff --git a/lib/device/drivers/recognition.js b/lib/device/drivers/recognition.js index 8e98a2d7..79d97750 100644 --- a/lib/device/drivers/recognition.js +++ b/lib/device/drivers/recognition.js @@ -51,14 +51,18 @@ function getAllTags(cb) { } function startRecognitionService() { + if (_.isUndefined(RecognitionRPC)) { + module.exports.init(); + } headers = new grpc.Metadata(); headers.add('authorization', 'Bearer ' + Matrix.deviceToken); var credentials = grpc.credentials.createSsl(); + log('>>>', RecognitionRPC) if (_.isUndefined(RecognitionService)) { - RecognitionService = new RecognitionRPC.RecognitionService( + RecognitionService = RecognitionRPC( HOST_ADDRESS, credentials ); debug('RecognitionService:'.blue, HOST_ADDRESS, credentials); @@ -82,10 +86,6 @@ function deleteTags(tags, cb) { }); } -function startDetection() { - -} - /** * Obtain a list of descriptors * @param {[]} uuids options.uuids for descriptors @@ -125,12 +125,16 @@ module.exports = { commands: ['recognition'], init: function () { VisionDriver = Matrix.service.protobuf.vision.vision; + + RecognitionRPC = Matrix.service.grpc.recognition; + + EyeDriver = Matrix.service.protobuf.malos.maloseye; RecognitionService = Matrix.service.protobuf.vision.recognition_service; RecognitionDriver = Matrix.service.protobuf.vision.recognition; - RecognitionRPC = Matrix.service.grpc.vision.recognition_service; DeviceDriver = Matrix.service.protobuf.malos.driver; + var env = process.env.NODE_ENV; if (env === 'dev') { @@ -146,17 +150,22 @@ module.exports = { // configure malos first prepare: function (component, cb) { + if (_.isUndefined(VisionDriver)) { + module.exports.init(); + } var options = component.options; - var config = new DeviceDriver.DeviceConfig; - config.delayBetweenUpdates(0.05); - config.timeoutAfterLastPing(15); - config.malosEyeConfig = new DeviceDriver.MalosEyeConfig; - var cameraConfig = new DeviceDriver.CameraConfig; - cameraConfig.cameraId(0); - cameraConfig.width(800); - cameraConfig.height(600); + var config = new DeviceDriver.DriverConfig; + config.delayBetweenUpdates = 0.05; + config.timeoutAfterLastPing = 15; + config.malosEyeConfig = new EyeDriver.MalosEyeConfig; + var cameraConfig = new EyeDriver.CameraConfig; + //reference + config.malosEyeConfig.cameraConfig = cameraConfig; + + cameraConfig.cameraId = 0; + cameraConfig.width = 800; + cameraConfig.height = 600; - config.malosEyeConfig.cameraConfig(cameraConfig); cb(DeviceDriver.DriverConfig.encode(config).finish()); diff --git a/proto b/proto index 2f24057b..59f72b78 160000 --- a/proto +++ b/proto @@ -1 +1 @@ -Subproject commit 2f24057b0d6a244218709bc6ce89d4a43c3f6c64 +Subproject commit 59f72b786494b76eebfabfe7f1a06b4ff7d92f3a From 7dd629ae3d1b617f420ba7a61afe4f095f8952d7 Mon Sep 17 00:00:00 2001 From: Sean Canton Date: Wed, 4 Oct 2017 15:35:38 -0700 Subject: [PATCH 14/42] revert grpc --- lib/service/grpc.js | 78 +++++++++++---------------------------------- 1 file changed, 19 insertions(+), 59 deletions(-) diff --git a/lib/service/grpc.js b/lib/service/grpc.js index f2efa6fd..a9dd812e 100644 --- a/lib/service/grpc.js +++ b/lib/service/grpc.js @@ -1,68 +1,28 @@ -const protos = require('matrix-protos'); +// We use GRPC to communicate with the MALOS and external services -module.exports = protos; +var grpc = require('grpc'); +var debug = debugLog('grpc'); -var debug = debugLog('grpc') -// var protobuf = require('protobufjs'); -const Protos = require('matrix-protos').matrix_io; +const fs = require('fs') +const protosPath = __dirname + '/../../proto'; +var files = fs.readdirSync(protosPath); +_.each(files, function(f){ + // initialize container for this directory + module.exports[f] = {}; -let pExport = {}; -for (let p in Protos) { + if ( fs.statSync(protosPath + '/' + f ).isDirectory() ){ + var ps = fs.readdirSync(protosPath + '/' + f ); - // for keeping track of latest version when iterating - let latestV = 0; - for (let pv in Protos[p]) { - // version integer - let vInt = pv.replace(/\D/g, ''); + _.each(ps, function(p){ + if ( p.indexOf('.proto') > -1 ){ + var exp = grpc.load(protosPath + '/' + f + '/' + p ); + if ( _.has(exp, 'admobilize_vision')){ + module.exports[f][p.slice(0, -6)] = exp.admobilize_vision; + debug('GRPC:>', f, ':', p.slice(0, -6)); - if (vInt > latestV) { - latestV = vInt; - } - - // automatically load newest protos available - if (vInt === latestV) { - let fns = [], - others = []; - - for (let pi in Protos[p][pv]) { - if (!_.isNull(pi.match(/get|store|delete|service|!Response$|!Request$/gi))) { - // others.push(pi); - fns.push(pi); } } - - // assign - pExport[p] = Protos[p]['v' + latestV]; - - if (fns.length > 0) { - debug('GRPC ::', p, 'v' + latestV) - // debug('↳'.yellow, others.concat(fns).join(' ').grey) - } - } + }) } -} - -module.exports = pExport; - -// const protosPath = __dirname + '/../../proto'; -// var files = fs.readdirSync(protosPath); -// _.each(files, function(f){ -// // initialize container for this directory -// module.exports[f] = {}; - -// if ( fs.statSync(protosPath + '/' + f ).isDirectory() ){ -// var ps = fs.readdirSync(protosPath + '/' + f ); - -// _.each(ps, function(p){ -// if ( p.indexOf('.proto') > -1 ){ -// var exp = grpc.load(protosPath + '/' + f + '/' + p ); -// if ( _.has(exp, 'admobilize_vision')){ -// module.exports[f][p.slice(0, -6)] = exp.admobilize_vision; -// debug('GRPC:>', f, ':', p.slice(0, -6)); - -// } -// } -// }) -// } -// }) \ No newline at end of file +}) From 268e5d73b4c81b9d3402abd1730a86bf7cf44682 Mon Sep 17 00:00:00 2001 From: Sean Canton Date: Thu, 5 Oct 2017 10:15:18 -0700 Subject: [PATCH 15/42] progress --- lib/device/drivers/recognition.js | 12 ++- lib/service/grpc.js | 40 ++++---- lib/service/protobuf.js | 5 + package-lock.json | 152 +++++++++++++++--------------- package.json | 2 +- 5 files changed, 109 insertions(+), 102 deletions(-) diff --git a/lib/device/drivers/recognition.js b/lib/device/drivers/recognition.js index 79d97750..eaa7ef74 100644 --- a/lib/device/drivers/recognition.js +++ b/lib/device/drivers/recognition.js @@ -60,11 +60,13 @@ function startRecognitionService() { var credentials = grpc.credentials.createSsl(); - log('>>>', RecognitionRPC) if (_.isUndefined(RecognitionService)) { - RecognitionService = RecognitionRPC( - HOST_ADDRESS, credentials - ); + RecognitionService = RecognitionRPC.create(function rpcImpl() { + console.log('>>>', arguments) + }) + // RecognitionService = RecognitionRPC( + // HOST_ADDRESS, credentials + // ); debug('RecognitionService:'.blue, HOST_ADDRESS, credentials); } @@ -228,7 +230,7 @@ module.exports = { // setup malos_eye_ var config = new DeviceDriver.DriverConfig; - config.malosEyeConfig = new DeviceDriver.MalosEyeConfig; + config.malosEyeConfig = new EyeDriver.MalosEyeConfig; // FIXME: We should only need FACE_DESCRIPTOR here. @resolved? config.malosEyeConfig.when.push( DeviceDriver.EnumMalosEyeDetectionType.FACE_DEMOGRAPHICS); diff --git a/lib/service/grpc.js b/lib/service/grpc.js index a9dd812e..4a17943a 100644 --- a/lib/service/grpc.js +++ b/lib/service/grpc.js @@ -4,25 +4,25 @@ var grpc = require('grpc'); var debug = debugLog('grpc'); + const fs = require('fs') -const protosPath = __dirname + '/../../proto'; -var files = fs.readdirSync(protosPath); -_.each(files, function(f){ - // initialize container for this directory - module.exports[f] = {}; - - if ( fs.statSync(protosPath + '/' + f ).isDirectory() ){ - var ps = fs.readdirSync(protosPath + '/' + f ); - - _.each(ps, function(p){ - if ( p.indexOf('.proto') > -1 ){ - var exp = grpc.load(protosPath + '/' + f + '/' + p ); - if ( _.has(exp, 'admobilize_vision')){ - module.exports[f][p.slice(0, -6)] = exp.admobilize_vision; - debug('GRPC:>', f, ':', p.slice(0, -6)); - - } - } - }) +const protosPath = __dirname + '/../../proto/matrix_io'; + +module.exports = { + + // this needs to run after PROTO + populate: function (Protos) { + + var gv = Protos.vision.VisionService; + var gr = Protos.recognition.RecognitionService; + + var vFn = grpc.loadObject(gv, { protobufjsVersion: 6 }); + var rFn = grpc.loadObject(gr, { protobufjsVersion: 6 }); + + module.exports.vision = vFn; + module.exports.recognition = rFn; + } -}) +} + + diff --git a/lib/service/protobuf.js b/lib/service/protobuf.js index 3819192a..e0a01c67 100644 --- a/lib/service/protobuf.js +++ b/lib/service/protobuf.js @@ -2,6 +2,7 @@ var debug = debugLog('proto') // var protobuf = require('protobufjs'); const Protos = require('matrix-protos').matrix_io; +const grpc = require('grpc'); let pExport = {}; for (let p in Protos) { @@ -27,8 +28,12 @@ for (let p in Protos) { } } +// grpc is based on proto objects + + module.exports = pExport; +require('./grpc.js').populate(pExport); // const fs = require('fs') // const protosPath = __dirname + '/../../proto'; diff --git a/package-lock.json b/package-lock.json index f1634d23..b3a759dc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -68,6 +68,29 @@ "resolved": "https://registry.npmjs.org/@types/node/-/node-7.0.43.tgz", "integrity": "sha512-7scYwwfHNppXvH/9JzakbVxk0o0QUILVk1Lv64GRaxwPuGpnF1QBiwdvhDpLcymb8BpomQL3KYoWKq3wUdDMhQ==" }, + "Base64": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/Base64/-/Base64-0.2.1.tgz", + "integrity": "sha1-ujpCMHCOGGcFBl5mur3Uw1z2ACg=" + }, + "JSONStream": { + "version": "0.8.4", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-0.8.4.tgz", + "integrity": "sha1-kWV9/m/4V0gwZhMrRhi2Lo9Ih70=", + "requires": { + "jsonparse": "0.0.5", + "through": "2.3.8" + } + }, + "MD5": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/MD5/-/MD5-1.2.2.tgz", + "integrity": "sha1-2QPI7FuiI80rgEMoJIgdBLuYQcA=", + "requires": { + "charenc": "0.0.2", + "crypt": "0.0.2" + } + }, "abbrev": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.0.tgz", @@ -237,11 +260,6 @@ "resolved": "https://registry.npmjs.org/base62/-/base62-0.1.1.tgz", "integrity": "sha1-e0F0wvlESXU7EcJlHAg9qEGnsIQ=" }, - "Base64": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/Base64/-/Base64-0.2.1.tgz", - "integrity": "sha1-ujpCMHCOGGcFBl5mur3Uw1z2ACg=" - }, "base64-arraybuffer": { "version": "0.1.5", "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.5.tgz", @@ -362,10 +380,10 @@ "resolved": "https://registry.npmjs.org/browser-pack/-/browser-pack-3.2.0.tgz", "integrity": "sha1-+qHLxBSHsazEdH43PhFIrf/Q4tk=", "requires": { + "JSONStream": "0.8.4", "combine-source-map": "0.3.0", "concat-stream": "1.4.10", "defined": "0.0.0", - "JSONStream": "0.8.4", "through2": "0.5.1", "umd": "2.1.0" }, @@ -417,6 +435,7 @@ "resolved": "https://registry.npmjs.org/browserify/-/browserify-6.3.4.tgz", "integrity": "sha1-V7XRlcxWgTnpcTAuXNnVjdr7VNg=", "requires": { + "JSONStream": "0.8.4", "assert": "1.1.2", "browser-pack": "3.2.0", "browser-resolve": "1.11.2", @@ -440,7 +459,6 @@ "inherits": "2.0.3", "insert-module-globals": "6.6.3", "isarray": "0.0.1", - "JSONStream": "0.8.4", "labeled-stream-splicer": "1.0.2", "module-deps": "3.9.1", "os-browserify": "0.1.2", @@ -934,11 +952,6 @@ "through2": "1.1.1" }, "dependencies": { - "jsonparse": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", - "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=" - }, "JSONStream": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.1.tgz", @@ -947,6 +960,11 @@ "jsonparse": "1.3.1", "through": "2.3.8" } + }, + "jsonparse": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", + "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=" } } }, @@ -2173,14 +2191,6 @@ } } }, - "string_decoder": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", - "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", - "requires": { - "safe-buffer": "5.1.1" - } - }, "string-width": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", @@ -2191,6 +2201,14 @@ "strip-ansi": "3.0.1" } }, + "string_decoder": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "requires": { + "safe-buffer": "5.1.1" + } + }, "stringstream": { "version": "0.0.5", "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", @@ -2518,16 +2536,25 @@ "resolved": "https://registry.npmjs.org/insert-module-globals/-/insert-module-globals-6.6.3.tgz", "integrity": "sha1-IGOOKaMPntHKLjqCX7wsulJG3fw=", "requires": { + "JSONStream": "1.3.1", "combine-source-map": "0.6.1", "concat-stream": "1.4.10", "is-buffer": "1.1.5", - "JSONStream": "1.3.1", "lexical-scope": "1.2.0", "process": "0.11.10", "through2": "1.1.1", "xtend": "4.0.1" }, "dependencies": { + "JSONStream": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.1.tgz", + "integrity": "sha1-cH92HgHa6eFvG8+TcDt4xwlmV5o=", + "requires": { + "jsonparse": "1.3.1", + "through": "2.3.8" + } + }, "combine-source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.6.1.tgz", @@ -2557,15 +2584,6 @@ "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=" }, - "JSONStream": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.1.tgz", - "integrity": "sha1-cH92HgHa6eFvG8+TcDt4xwlmV5o=", - "requires": { - "jsonparse": "1.3.1", - "through": "2.3.8" - } - }, "process": { "version": "0.11.10", "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", @@ -2712,15 +2730,6 @@ "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-0.0.5.tgz", "integrity": "sha1-MwVCrT8KZUZlt3jz6y2an6UHrGQ=" }, - "JSONStream": { - "version": "0.8.4", - "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-0.8.4.tgz", - "integrity": "sha1-kWV9/m/4V0gwZhMrRhi2Lo9Ih70=", - "requires": { - "jsonparse": "0.0.5", - "through": "2.3.8" - } - }, "jsonwebtoken": { "version": "5.7.0", "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-5.7.0.tgz", @@ -3191,6 +3200,15 @@ "xunit-file": "0.0.6" }, "dependencies": { + "JSONStream": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.1.tgz", + "integrity": "sha1-cH92HgHa6eFvG8+TcDt4xwlmV5o=", + "requires": { + "jsonparse": "1.3.1", + "through": "2.3.8" + } + }, "assert": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/assert/-/assert-1.3.0.tgz", @@ -3214,9 +3232,9 @@ "resolved": "https://registry.npmjs.org/browser-pack/-/browser-pack-5.0.1.tgz", "integrity": "sha1-QZdxmyDG4KqglFHFER5T77b7wY0=", "requires": { + "JSONStream": "1.3.1", "combine-source-map": "0.6.1", "defined": "1.0.0", - "JSONStream": "1.3.1", "through2": "1.1.1", "umd": "3.0.1" } @@ -3226,6 +3244,7 @@ "resolved": "https://registry.npmjs.org/browserify/-/browserify-11.2.0.tgz", "integrity": "sha1-oRu53SCdeVcrgT9+7q+Cil9cDk4=", "requires": { + "JSONStream": "1.3.1", "assert": "1.3.0", "browser-pack": "5.0.1", "browser-resolve": "1.11.2", @@ -3249,7 +3268,6 @@ "inherits": "2.0.3", "insert-module-globals": "6.6.3", "isarray": "0.0.1", - "JSONStream": "1.3.1", "labeled-stream-splicer": "1.0.2", "module-deps": "3.9.1", "os-browserify": "0.1.2", @@ -3374,15 +3392,6 @@ "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=" }, - "JSONStream": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.1.tgz", - "integrity": "sha1-cH92HgHa6eFvG8+TcDt4xwlmV5o=", - "requires": { - "jsonparse": "1.3.1", - "through": "2.3.8" - } - }, "minimatch": { "version": "2.0.10", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz", @@ -3508,15 +3517,6 @@ } } }, - "MD5": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/MD5/-/MD5-1.2.2.tgz", - "integrity": "sha1-2QPI7FuiI80rgEMoJIgdBLuYQcA=", - "requires": { - "charenc": "0.0.2", - "crypt": "0.0.2" - } - }, "md5.js": { "version": "1.3.4", "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.4.tgz", @@ -3665,11 +3665,11 @@ "resolved": "https://registry.npmjs.org/mockfirebase/-/mockfirebase-0.12.0.tgz", "integrity": "sha1-chLO10WH9iJTaHsGU3HqqgVWfhs=", "requires": { + "MD5": "1.2.2", "browserify": "6.3.4", "browserify-shim": "3.8.14", "firebase-auto-ids": "1.1.0", - "lodash": "2.4.2", - "MD5": "1.2.2" + "lodash": "2.4.2" }, "dependencies": { "lodash": { @@ -3684,13 +3684,13 @@ "resolved": "https://registry.npmjs.org/module-deps/-/module-deps-3.9.1.tgz", "integrity": "sha1-6nXK+RmQkNJbDVUStaysuW5/h/M=", "requires": { + "JSONStream": "1.3.1", "browser-resolve": "1.11.2", "concat-stream": "1.4.10", "defined": "1.0.0", "detective": "4.5.0", "duplexer2": "0.0.2", "inherits": "2.0.3", - "JSONStream": "1.3.1", "parents": "1.0.1", "readable-stream": "1.1.14", "resolve": "1.4.0", @@ -3700,6 +3700,15 @@ "xtend": "4.0.1" }, "dependencies": { + "JSONStream": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.1.tgz", + "integrity": "sha1-cH92HgHa6eFvG8+TcDt4xwlmV5o=", + "requires": { + "jsonparse": "1.3.1", + "through": "2.3.8" + } + }, "defined": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", @@ -3710,15 +3719,6 @@ "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=" }, - "JSONStream": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.1.tgz", - "integrity": "sha1-cH92HgHa6eFvG8+TcDt4xwlmV5o=", - "requires": { - "jsonparse": "1.3.1", - "through": "2.3.8" - } - }, "parents": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parents/-/parents-1.0.1.tgz", @@ -4665,11 +4665,6 @@ "through2": "1.1.1" } }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" - }, "string-width": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", @@ -4680,6 +4675,11 @@ "strip-ansi": "3.0.1" } }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + }, "stringstream": { "version": "0.0.5", "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", diff --git a/package.json b/package.json index 79f120e3..d7586b98 100644 --- a/package.json +++ b/package.json @@ -84,4 +84,4 @@ "engines": { "node": ">=0.12.7 <=6.5" } -} \ No newline at end of file +} From b4218ce0f5d499e618de2f9717351d38241148e8 Mon Sep 17 00:00:00 2001 From: Sean Canton Date: Fri, 6 Oct 2017 15:13:06 -0700 Subject: [PATCH 16/42] kicking ass --- lib/device/drivers/recognition.js | 41 +++++++++++++++---------- lib/service/stream.js | 51 ++++++++++++++++--------------- 2 files changed, 51 insertions(+), 41 deletions(-) diff --git a/lib/device/drivers/recognition.js b/lib/device/drivers/recognition.js index eaa7ef74..772cddbb 100644 --- a/lib/device/drivers/recognition.js +++ b/lib/device/drivers/recognition.js @@ -2,6 +2,7 @@ var VisionDriver, DeviceDriver, RecognitionRPC, RecognitionDriver, RecognitionService, RecognitionService, + RecognitionRPCService, protoVisionBuilder, protoMalosBuilder; @@ -29,7 +30,7 @@ var modes = ['OFF', 'TRAIN', 'RECOGNIZE']; function getAllTags(cb) { startRecognitionService(); - RecognitionService.getFeatureDescriptorTags({}, headers, function (err, res) { + RecognitionRPCService.getFeatureDescriptorTags({}, headers, function (err, res) { if (err) return cb(err); if (res.hasOwnProperty('featureTagsForDevice')) { var tagData = res.featureTagsForDevice; @@ -60,13 +61,17 @@ function startRecognitionService() { var credentials = grpc.credentials.createSsl(); - if (_.isUndefined(RecognitionService)) { - RecognitionService = RecognitionRPC.create(function rpcImpl() { - console.log('>>>', arguments) + if (_.isUndefined(RecognitionRPCService)) { + var grpcClient = grpc.Client(HOST_ADDRESS, credentials); + + RecognitionRPCService = RecognitionRPC.create(function rpcImpl(fn, msg, cb) { + log(fn, RecognitionService.decode(msg), RecognitionRPCService, grpc) + cb('HI>>>') + grpcClient.makeUnaryRequest('GET', + function () { log('ser', arguments) }, function () { log('deser') }, headers, function () { log('cb', arguments) }) }) - // RecognitionService = RecognitionRPC( - // HOST_ADDRESS, credentials - // ); + debug('>>>', grpcClient, RecognitionRPCService) + debug('RecognitionService:'.blue, HOST_ADDRESS, credentials); } @@ -126,13 +131,13 @@ function getDescriptors(options, cb) { module.exports = { commands: ['recognition'], init: function () { - VisionDriver = Matrix.service.protobuf.vision.vision; + VisionDriver = Matrix.service.protobuf.vision; RecognitionRPC = Matrix.service.grpc.recognition; EyeDriver = Matrix.service.protobuf.malos.maloseye; RecognitionService = Matrix.service.protobuf.vision.recognition_service; - RecognitionDriver = Matrix.service.protobuf.vision.recognition; + RecognitionDriver = Matrix.service.protobuf.recognition; DeviceDriver = Matrix.service.protobuf.malos.driver; @@ -223,7 +228,7 @@ module.exports = { }, - // happens after preparation + // happens after preparation, see drivers/service.js config: function (options) { startRecognitionService(); @@ -232,13 +237,14 @@ module.exports = { var config = new DeviceDriver.DriverConfig; config.malosEyeConfig = new EyeDriver.MalosEyeConfig; // FIXME: We should only need FACE_DESCRIPTOR here. @resolved? - config.malosEyeConfig.when.push( - DeviceDriver.EnumMalosEyeDetectionType.FACE_DEMOGRAPHICS); - config.malosEyeConfig.when.push( - DeviceDriver.EnumMalosEyeDetectionType.FACE_DESCRIPTOR); + config.malosEyeConfig.objectToDetect = []; + config.malosEyeConfig.objectToDetect.push( + EyeDriver.EnumMalosEyeDetectionType.FACE_DEMOGRAPHICS); + config.malosEyeConfig.objectToDetect.push( + EyeDriver.EnumMalosEyeDetectionType.FACE_DESCRIPTOR); - cb(DeviceDriver.DriverConfig.encode(config).finish()); + Matrix.components.recognition.config(DeviceDriver.DriverConfig.encode(config).finish()); // Additional Inits getAllTags(function (err, tags) { @@ -264,11 +270,14 @@ module.exports = { }, read: function (buffer, cb) { + if (_.isUndefined(RecognitionRPC)) { + module.exports.init(); + } // debug('read>', buffer); if (_.isUndefined(buffer) || mode === 0) { return; } var result = new VisionDriver.VisionResult.decode(buffer); - // debug('>read', result) + debug('>read', result) if (result.vision_event.length > 0) { _.each(result.vision_event, function (v) { diff --git a/lib/service/stream.js b/lib/service/stream.js index 0940e845..73962d40 100644 --- a/lib/service/stream.js +++ b/lib/service/stream.js @@ -37,7 +37,7 @@ function streamError(data) { //Reduce amount of concurrent refreshes using a timer if (!refreshingToken) { refreshingToken = true; - + refreshTokenTimer = setTimeout(function () { refreshingToken = false; //Allows more refreshes to be requested }, Matrix.config.socketRefreshTimeout * 1000); @@ -71,7 +71,7 @@ function stopSocketWatch() { function checkStreamingServer(cb) { if (_.isUndefined(cb)) { - cb = function() {}; + cb = function () { }; } Matrix.service.stream.initSocket(cb); /* @@ -99,6 +99,7 @@ function checkStreamingServer(cb) { function checkSocket() { function recheck() { + // TODO: apply async checkStreamingServer(); return false; } @@ -148,7 +149,7 @@ function initSocket(cb) { transports: ['websocket', 'polling'], }); - socket.on('open', function() { + socket.on('open', function () { // continue init cb(); @@ -160,7 +161,7 @@ function initSocket(cb) { Matrix.socket = socket; - socket.on('message', function(msg) { + socket.on('message', function (msg) { try { msg = JSON.parse(msg); } catch (e) { @@ -215,26 +216,26 @@ function initSocket(cb) { }); }); - socket.on('close', function() { + socket.on('close', function () { debug('socket close: ', socket.id); Matrix.socket = null; socket.connected = false; startSocketWatch(); }); - socket.on('flush', function() { + socket.on('flush', function () { // debug('socket flush', socket.id); }); - socket.on('upgrade', function(n) { + socket.on('upgrade', function (n) { debug('socket upgrade', socket.id); }); - socket.on('upgradeError', function(n) { + socket.on('upgradeError', function (n) { error('socket upgrade error', socket.id); }); - socket.on('error', function(err) { + socket.on('error', function (err) { error('socket error', err, err.stack); }); } @@ -287,7 +288,7 @@ function sendToSocket(channel, data) { } // save data if the socket is down. - if ( !checkSocket() ) { + if (!checkSocket()) { //add device id for tracking Matrix.db.pending.insert({ @@ -300,24 +301,24 @@ function sendToSocket(channel, data) { var d = Date.now(); // only throttle app data - if ( channel !== 'app-emit'){ + if (channel !== 'app-emit') { return socketEmit(channel, data); } // has > n milliseconds elapsed from last write? - if ( d - Matrix.lastWriteTime >= Matrix.rateLimit ){ + if (d - Matrix.lastWriteTime >= Matrix.rateLimit) { // yes! it has been n number of seconds // do we have a cache or not? - if ( Matrix.sendCache.length === 0){ + if (Matrix.sendCache.length === 0) { // typical use - no cache go right through socketEmit(channel, data); Matrix.lastWriteTime = d; } else { // we have a cache, enough time has elapsed to write it // cache = [ payloads ] - var cache = _.map( Matrix.sendCache, 'payload'); + var cache = _.map(Matrix.sendCache, 'payload'); socketEmit('app-emit', cache); Matrix.sendCache = []; Matrix.lastWriteTime = d; @@ -329,7 +330,7 @@ function sendToSocket(channel, data) { payload: data }); - debug(d - Matrix.lastWriteTime, ' ms elapsed, added to streaming cache', Matrix.sendCache.length ); + debug(d - Matrix.lastWriteTime, ' ms elapsed, added to streaming cache', Matrix.sendCache.length); } } @@ -337,11 +338,11 @@ function sendToSocket(channel, data) { // TODO: move to after register Matrix.db.pending.find({ type: channel - }, function(err, points) { + }, function (err, points) { if (err) console.error(err); // TODO: Group this stream into chunks of 10 if (points.length > 0) { - _.each(points, function(p) { + _.each(points, function (p) { socketEmit(channel, p.payload); }); } @@ -353,8 +354,8 @@ function sendToSocket(channel, data) { } // called onDestroy - saves cache in pending -function persistCache(cb){ - async.each(Matrix.sendCache,(d,cb) => { +function persistCache(cb) { + async.each(Matrix.sendCache, (d, cb) => { Matrix.db.pending.insert({ type: d.channel, payload: d.payload @@ -369,21 +370,21 @@ function registerDevice(opts) { return; } -// how many seconds between app emits, optimally - if (_.has(opts, 'rateLimit')){ + // how many seconds between app emits, optimally + if (_.has(opts, 'rateLimit')) { Matrix.rateLimit = opts.rateLimit; } var fs = require('fs'); // gather configurations to provide to SS - var apps = _.filter(fs.readdirSync(Matrix.config.path.apps), function(f){ - return ( f.indexOf('.matrix') > -1 ); + var apps = _.filter(fs.readdirSync(Matrix.config.path.apps), function (f) { + return (f.indexOf('.matrix') > -1); }); var configs = []; - _.each(apps, function(a) { + _.each(apps, function (a) { try { var config = require('js-yaml').safeLoad( fs.readFileSync(Matrix.config.path.apps + '/' + a + '/config.yaml') @@ -403,7 +404,7 @@ function registerDevice(opts) { function socketEmit(channel, payload) { - + if (socket && socket.connected) { debug('[M]->SS', channel, payload); socket.send(JSON.stringify({ From ad046d3d6d2a40ed9a734efd38924c7b52ffc138 Mon Sep 17 00:00:00 2001 From: Sean Canton Date: Wed, 11 Oct 2017 14:07:47 -0700 Subject: [PATCH 17/42] install assert --- lib/service/stream.js | 36 --- package-lock.json | 697 +----------------------------------------- package.json | 3 +- 3 files changed, 12 insertions(+), 724 deletions(-) diff --git a/lib/service/stream.js b/lib/service/stream.js index f4cf0ca0..5636357a 100644 --- a/lib/service/stream.js +++ b/lib/service/stream.js @@ -77,47 +77,11 @@ function stopSocketWatch() { } function checkStreamingServer(cb) { -<<<<<<< HEAD - if (_.isUndefined(cb)) { - cb = function () { }; - } - Matrix.service.stream.initSocket(cb); - /* - var streamOptions = require('url').parse(Matrix.streamingServer); - require('net').connect({ - port: streamOptions.port, - host: streamOptions.hostname - }, function(res) { - debug('==== Streaming Server Visible === ', Matrix.streamingServer ) - // hit server, reset rolling delay - Matrix.config.socketCheckDelay = 500; - Matrix.service.stream.initSocket(cb); - }).on('error', function() { - error('No Streaming Server Visible', Matrix.streamingServer); - - Matrix.service.stream.startWatcher(); - - - if (_.isFunction(cb)) { - cb(); - } - }); - */ -} - -function checkSocket() { - function recheck() { - // TODO: apply async - checkStreamingServer(); - return false; - } -======= if (_.isUndefined(cb)) cb = function () { }; return Matrix.service.stream.initSocket(cb); } function checkSocket(cb) { ->>>>>>> dev if (_.isUndefined(socket)) { error('Streaming Server Socket Not Initialized, trying again'); diff --git a/package-lock.json b/package-lock.json index f6a3aba6..ede31976 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,77 +1,9 @@ { "name": "matrix-os", -<<<<<<< HEAD - "version": "0.14.3", -======= "version": "0.15.0", ->>>>>>> dev "lockfileVersion": 1, "requires": true, "dependencies": { - "@protobufjs/aspromise": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", - "integrity": "sha1-m4sMxmPWaafY9vXQiToU00jzD78=" - }, - "@protobufjs/base64": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", - "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==" - }, - "@protobufjs/codegen": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", - "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==" - }, - "@protobufjs/eventemitter": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", - "integrity": "sha1-NVy8mLr61ZePntCV85diHx0Ga3A=" - }, - "@protobufjs/fetch": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", - "integrity": "sha1-upn7WYYUr2VwDBYZ/wbUVLDYTEU=", - "requires": { - "@protobufjs/aspromise": "1.1.2", - "@protobufjs/inquire": "1.1.0" - } - }, - "@protobufjs/float": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", - "integrity": "sha1-Xp4avctz/Ap8uLKR33jIy9l7h9E=" - }, - "@protobufjs/inquire": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", - "integrity": "sha1-/yAOPnzyQp4tyvwRQIKOjMY48Ik=" - }, - "@protobufjs/path": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", - "integrity": "sha1-bMKyDFya1q0NzP0hynZz2Nf79o0=" - }, - "@protobufjs/pool": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", - "integrity": "sha1-Cf0V8tbTq/qbZbw2ZQbWrXhG/1Q=" - }, - "@protobufjs/utf8": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", - "integrity": "sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA=" - }, - "@types/long": { - "version": "3.0.32", - "resolved": "https://registry.npmjs.org/@types/long/-/long-3.0.32.tgz", - "integrity": "sha512-ZXyOOm83p7X8p3s0IYM3VeueNmHpkk/yMlP8CLeOnEcu6hIwPH7YjZBvhQkR0ZFS2DqZAxKtJ/M5fcuv3OU5BA==" - }, - "@types/node": { - "version": "7.0.43", - "resolved": "https://registry.npmjs.org/@types/node/-/node-7.0.43.tgz", - "integrity": "sha512-7scYwwfHNppXvH/9JzakbVxk0o0QUILVk1Lv64GRaxwPuGpnF1QBiwdvhDpLcymb8BpomQL3KYoWKq3wUdDMhQ==" - }, "Base64": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/Base64/-/Base64-0.2.1.tgz", @@ -95,14 +27,6 @@ "crypt": "0.0.2" } }, -<<<<<<< HEAD - "abbrev": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.0.tgz", - "integrity": "sha1-0FVMIlZjbi9W58LlrRg/hZQo2B8=" - }, -======= ->>>>>>> dev "accessory": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/accessory/-/accessory-1.1.0.tgz", @@ -154,8 +78,6 @@ "resolved": "https://registry.npmjs.org/ap/-/ap-0.2.0.tgz", "integrity": "sha1-rglCYAspkS8NKxTsYMRejzMLYRA=" }, -<<<<<<< HEAD -======= "aproba": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", @@ -199,7 +121,6 @@ } } }, ->>>>>>> dev "argparse": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.9.tgz", @@ -218,14 +139,6 @@ "resolved": "https://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.6.tgz", "integrity": "sha1-8zshWfBTKj8xB6JywMz70a0peco=" }, -<<<<<<< HEAD - "asap": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", - "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=" - }, -======= ->>>>>>> dev "ascli": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/ascli/-/ascli-1.0.1.tgz", @@ -259,9 +172,9 @@ } }, "assert-plus": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz", - "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=" + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" }, "assertion-error": { "version": "1.0.2", @@ -365,21 +278,6 @@ "underscore": "1.4.4" } }, -<<<<<<< HEAD - "bindings": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.2.1.tgz", - "integrity": "sha1-FK1hE4EtLTfXLme0ystLtyZQXxE=" - }, - "bleno": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/bleno/-/bleno-0.4.2.tgz", - "integrity": "sha1-IesK10O850eU45L0ph4TsHOT26o=", - "requires": { - "bplist-parser": "0.0.6", - "debug": "2.6.8", - "xpc-connection": "0.1.4" -======= "bl": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.1.tgz", @@ -415,7 +313,6 @@ "safe-buffer": "5.1.1" } } ->>>>>>> dev } }, "blob": { @@ -423,22 +320,6 @@ "resolved": "https://registry.npmjs.org/blob/-/blob-0.0.4.tgz", "integrity": "sha1-vPEwUspURj8w+fx+lbmkdjCpSSE=" }, -<<<<<<< HEAD - "block-stream": { - "version": "0.0.9", - "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz", - "integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=", - "requires": { - "inherits": "2.0.3" - } - }, - "bluebird": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.0.tgz", - "integrity": "sha1-eRQg1/VR7qKJdFOop3ZT+WYG1nw=" - }, -======= ->>>>>>> dev "bn.js": { "version": "4.11.8", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", @@ -452,15 +333,6 @@ "hoek": "2.16.3" } }, -<<<<<<< HEAD - "bplist-parser": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.0.6.tgz", - "integrity": "sha1-ONo0cYF9+dRKs4kuJ3B7u9daEbk=", - "optional": true - }, -======= ->>>>>>> dev "brace-expansion": { "version": "1.1.8", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", @@ -781,14 +653,11 @@ "resolved": "https://registry.npmjs.org/charenc/-/charenc-0.0.2.tgz", "integrity": "sha1-wKHS86cJLgN3S/qD8UwPxXkKhmc=" }, -<<<<<<< HEAD -======= "chownr": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.0.1.tgz", "integrity": "sha1-4qdQQqlVGQi+vSW4Uj1fl2nXkYE=" }, ->>>>>>> dev "cipher-base": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", @@ -846,27 +715,11 @@ "delayed-stream": "1.0.0" } }, -<<<<<<< HEAD - "commander": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.11.0.tgz", - "integrity": "sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ==" - }, -======= ->>>>>>> dev "commondir": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/commondir/-/commondir-0.0.1.tgz", "integrity": "sha1-ifAP3NUbUZxXhzP+xWPmptp/W+I=" }, -<<<<<<< HEAD - "complex.js": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/complex.js/-/complex.js-2.0.4.tgz", - "integrity": "sha512-Syl95HpxUTS0QjwNxencZsKukgh1zdS9uXeXX2Us0pHaqBR6kiZZi0AkZ9VpZFwHJyVIUVzI4EumjWdXP3fy6w==" - }, -======= ->>>>>>> dev "component-emitter": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", @@ -892,18 +745,6 @@ "typedarray": "0.0.6" } }, -<<<<<<< HEAD - "config-chain": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.11.tgz", - "integrity": "sha1-q6CXR9++TD5w52am5BWG4YWfxvI=", - "requires": { - "ini": "1.3.4", - "proto-list": "1.2.4" - } - }, -======= ->>>>>>> dev "console-browserify": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", @@ -912,14 +753,11 @@ "date-now": "0.1.4" } }, -<<<<<<< HEAD -======= "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=" }, ->>>>>>> dev "constants-browserify": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-0.0.1.tgz", @@ -1031,14 +869,6 @@ "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" }, -<<<<<<< HEAD - "decimal.js": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-7.2.3.tgz", - "integrity": "sha512-AoFI37QS0S87Ft0r3Bdz4q9xSpm1Paa9lSeKLXgMPk/u/+QPIM5Gy4DHcZQS1seqPJH4gHLauPGn347z0HbsrA==" - }, -======= ->>>>>>> dev "deep-eql": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-0.1.3.tgz", @@ -1059,14 +889,11 @@ "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-0.2.2.tgz", "integrity": "sha1-hLdFiW80xoTpjyzg5Cq69Du6AX0=" }, -<<<<<<< HEAD -======= "deep-extend": { "version": "0.4.2", "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.4.2.tgz", "integrity": "sha1-SLaZwn4zS/ifEIkr5DL25MfTSn8=" }, ->>>>>>> dev "defined": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/defined/-/defined-0.0.0.tgz", @@ -1077,14 +904,11 @@ "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" }, -<<<<<<< HEAD -======= "delegates": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=" }, ->>>>>>> dev "deps-sort": { "version": "1.3.9", "resolved": "https://registry.npmjs.org/deps-sort/-/deps-sort-1.3.9.tgz", @@ -1137,14 +961,6 @@ } } }, -<<<<<<< HEAD - "df": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/df/-/df-1.1.1.tgz", - "integrity": "sha1-Zdl+h6bA/j7ZyRTz3L4SBaC5aTo=" - }, -======= ->>>>>>> dev "diff": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/diff/-/diff-1.4.0.tgz", @@ -1170,14 +986,6 @@ "resolved": "https://registry.npmjs.org/dot-parts/-/dot-parts-1.0.1.tgz", "integrity": "sha1-iEvXvPwwgv+tL+XbU+SU2PPgdD8=" }, -<<<<<<< HEAD - "duplexer": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz", - "integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=" - }, -======= ->>>>>>> dev "duplexer2": { "version": "0.0.2", "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.0.2.tgz", @@ -1218,21 +1026,6 @@ "resolved": "https://registry.npmjs.org/editions/-/editions-1.3.3.tgz", "integrity": "sha1-CQcQG92iD6w8vjNMJ8vQaI3Jmls=" }, -<<<<<<< HEAD - "editorconfig": { - "version": "0.13.3", - "resolved": "https://registry.npmjs.org/editorconfig/-/editorconfig-0.13.3.tgz", - "integrity": "sha512-WkjsUNVCu+ITKDj73QDvi0trvpdDWdkDyHybDGSXPfekLCqwmpD7CP7iPbvBgosNuLcI96XTDwNa75JyFl7tEQ==", - "requires": { - "bluebird": "3.5.0", - "commander": "2.11.0", - "lru-cache": "3.2.0", - "semver": "5.4.1", - "sigmund": "1.0.1" - } - }, -======= ->>>>>>> dev "elliptic": { "version": "6.4.0", "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.0.tgz", @@ -1247,8 +1040,6 @@ "minimalistic-crypto-utils": "1.0.1" } }, -<<<<<<< HEAD -======= "end-of-stream": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.0.tgz", @@ -1257,7 +1048,6 @@ "once": "1.4.0" } }, ->>>>>>> dev "engine.io-client": { "version": "1.8.4", "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-1.8.4.tgz", @@ -1397,14 +1187,11 @@ "safe-buffer": "5.1.1" } }, -<<<<<<< HEAD -======= "expand-template": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-1.1.0.tgz", "integrity": "sha512-kkjwkMqj0h4w/sb32ERCDxCQkREMCAgS39DscDnSwDsbxnwwM1BTZySdC3Bn1lhY7vL08n9GoO/fVTynjDgRyQ==" }, ->>>>>>> dev "exposify": { "version": "0.5.0", "resolved": "https://registry.npmjs.org/exposify/-/exposify-0.5.0.tgz", @@ -1495,44 +1282,6 @@ "resolved": "https://registry.npmjs.org/find-parent-dir/-/find-parent-dir-0.3.0.tgz", "integrity": "sha1-M8RLQpqysvBkYpnF+fcY83b/jVQ=" }, -<<<<<<< HEAD - "firebase": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/firebase/-/firebase-2.4.2.tgz", - "integrity": "sha1-ThEZ7AOWylYdinrL/xYw/qxsCjE=", - "requires": { - "faye-websocket": "0.9.3" - }, - "dependencies": { - "faye-websocket": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.9.3.tgz", - "integrity": "sha1-SCpQWw3wrmJrlphm0710DNuWLoM=", - "requires": { - "websocket-driver": "0.5.2" - }, - "dependencies": { - "websocket-driver": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.5.2.tgz", - "integrity": "sha1-jHyF2gcTtAYFVrTXHAF3XuEmnrk=", - "requires": { - "websocket-extensions": "0.1.1" - }, - "dependencies": { - "websocket-extensions": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.1.tgz", - "integrity": "sha1-domUmcGEtu91Q3fC27DNbLVdKec=" - } - } - } - } - } - } - }, -======= ->>>>>>> dev "firebase-auto-ids": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/firebase-auto-ids/-/firebase-auto-ids-1.1.0.tgz", @@ -1558,27 +1307,6 @@ "mime-types": "2.1.17" } }, -<<<<<<< HEAD - "formatio": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/formatio/-/formatio-1.1.1.tgz", - "integrity": "sha1-XtPM1jZVEJc4NGXZlhmRAOhhYek=", - "requires": { - "samsam": "1.1.2" - } - }, - "fraction.js": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.0.2.tgz", - "integrity": "sha512-OswcigOSil3vYXgrPSx4NCaSyPikXqVNYN/4CyhS0ucVOJ4GVYr6KQQLLcAudvS/4bBOzxqJ3XIsFaaMjl98ZQ==" - }, - "from": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/from/-/from-0.1.7.tgz", - "integrity": "sha1-g8YK/Fi5xWmXAH7Rp2izqzA6RP4=" - }, -======= ->>>>>>> dev "fs-extra": { "version": "0.30.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.30.0.tgz", @@ -1596,27 +1324,11 @@ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, -<<<<<<< HEAD - "fstream": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz", - "integrity": "sha1-XB+x8RdHcRTwYyoOtLcbPLD9MXE=", - "requires": { - "graceful-fs": "4.1.11", - "inherits": "2.0.3", - "mkdirp": "0.5.1", - "rimraf": "2.6.1" - } - }, -======= ->>>>>>> dev "function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" }, -<<<<<<< HEAD -======= "gauge": { "version": "2.7.4", "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", @@ -1632,7 +1344,6 @@ "wide-align": "1.1.2" } }, ->>>>>>> dev "geo-distance": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/geo-distance/-/geo-distance-0.1.2.tgz", @@ -1661,14 +1372,11 @@ } } }, -<<<<<<< HEAD -======= "github-from-package": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", "integrity": "sha1-l/tdlr/eiXMxPyDoKI75oWf6ZM4=" }, ->>>>>>> dev "glob": { "version": "7.1.2", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", @@ -2578,14 +2286,11 @@ } } }, -<<<<<<< HEAD -======= "has-unicode": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=" }, ->>>>>>> dev "hash-base": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-2.0.2.tgz", @@ -2651,6 +2356,13 @@ "assert-plus": "0.2.0", "jsprim": "1.4.1", "sshpk": "1.13.1" + }, + "dependencies": { + "assert-plus": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz", + "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=" + } } }, "https-browserify": { @@ -2878,25 +2590,6 @@ } } }, -<<<<<<< HEAD - "javascript-natural-sort": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/javascript-natural-sort/-/javascript-natural-sort-0.7.1.tgz", - "integrity": "sha1-+eIwPUUH9tdDVac2ZNFED7Wg71k=" - }, - "js-beautify": { - "version": "1.6.14", - "resolved": "https://registry.npmjs.org/js-beautify/-/js-beautify-1.6.14.tgz", - "integrity": "sha1-07j3Mi0CuSd9WL0jgmTDJ+WARM0=", - "requires": { - "config-chain": "1.1.11", - "editorconfig": "0.13.3", - "mkdirp": "0.5.1", - "nopt": "3.0.6" - } - }, -======= ->>>>>>> dev "js-yaml": { "version": "3.9.1", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.9.1.tgz", @@ -3074,14 +2767,6 @@ "unreachable-branch-transform": "0.3.0" } }, -<<<<<<< HEAD - "line-by-line": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/line-by-line/-/line-by-line-0.1.5.tgz", - "integrity": "sha1-GcRbWfCoBjLDC1xDpkf+Faq5BcI=" - }, -======= ->>>>>>> dev "localforage": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/localforage/-/localforage-1.5.0.tgz", @@ -3100,14 +2785,6 @@ "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-3.0.4.tgz", "integrity": "sha1-LcvSwofLwKVcxCMovQxzYVDVPj8=" }, -<<<<<<< HEAD - "lolex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/lolex/-/lolex-1.3.2.tgz", - "integrity": "sha1-fD2mL/yzDw9agKJWbKJORdigHzE=" - }, -======= ->>>>>>> dev "long": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/long/-/long-3.2.0.tgz", @@ -3118,30 +2795,11 @@ "resolved": "https://registry.npmjs.org/long-stack-traces/-/long-stack-traces-0.1.2.tgz", "integrity": "sha1-YCK1Dum7x0tcvXz+6q5BZeGlRuw=" }, -<<<<<<< HEAD - "lru-cache": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-3.2.0.tgz", - "integrity": "sha1-cXibO39Tmb7IVl3aOKow0qCX7+4=", - "requires": { - "pseudomap": "1.0.2" - } - }, -======= ->>>>>>> dev "map-obj": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=" }, -<<<<<<< HEAD - "map-stream": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.1.0.tgz", - "integrity": "sha1-5WqpTEyAVaFkBKBnS3jyFffI4ZQ=" - }, -======= ->>>>>>> dev "match-stream": { "version": "0.0.2", "resolved": "https://registry.npmjs.org/match-stream/-/match-stream-0.0.2.tgz", @@ -3164,23 +2822,6 @@ } } }, -<<<<<<< HEAD - "mathjs": { - "version": "3.16.3", - "resolved": "https://registry.npmjs.org/mathjs/-/mathjs-3.16.3.tgz", - "integrity": "sha512-lb7Q0+4RCFdAJk/+01nDpRuQfoPm2EXmAy9LSa8nXzAQjeTqeLELdsQsRlMBDvJ53KXC7IOTHdhBOwZd7Q6FjQ==", - "requires": { - "complex.js": "2.0.4", - "decimal.js": "7.2.3", - "fraction.js": "4.0.2", - "javascript-natural-sort": "0.7.1", - "seed-random": "2.2.0", - "tiny-emitter": "2.0.0", - "typed-function": "0.10.5" - } - }, -======= ->>>>>>> dev "matrix-app-config-helper": { "version": "https://github.com/matrix-io/matrix-app-config-helper/tarball/master", "integrity": "sha1-T1qhwk/Ww0ctpE9R9d627pxNqcQ=", @@ -3720,42 +3361,6 @@ } } }, - "matrix-protos": { -<<<<<<< HEAD - "version": "0.0.14", - "resolved": "https://registry.npmjs.org/matrix-protos/-/matrix-protos-0.0.14.tgz", - "integrity": "sha1-7K25YrRnHq5/AzIqAhv8gYOg6qE=", -======= - "version": "0.0.11", - "resolved": "https://registry.npmjs.org/matrix-protos/-/matrix-protos-0.0.11.tgz", - "integrity": "sha1-GAkD04S7MhEixMReFxFU1IYki+U=", ->>>>>>> dev - "requires": { - "protobufjs": "6.8.0" - }, - "dependencies": { - "protobufjs": { - "version": "6.8.0", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.8.0.tgz", - "integrity": "sha512-47Y49f5JN5Qsbxas2TyI2zFO8j9GpQAQm5thf54fr2O8qcP/jkIXYxmYx1hN2WQFAhESU1xpVn5NWVDBB8WFnw==", - "requires": { - "@protobufjs/aspromise": "1.1.2", - "@protobufjs/base64": "1.1.2", - "@protobufjs/codegen": "2.0.4", - "@protobufjs/eventemitter": "1.1.0", - "@protobufjs/fetch": "1.1.0", - "@protobufjs/float": "1.0.2", - "@protobufjs/inquire": "1.1.0", - "@protobufjs/path": "1.1.2", - "@protobufjs/pool": "1.1.0", - "@protobufjs/utf8": "1.1.0", - "@types/long": "3.0.32", - "@types/node": "7.0.43", - "long": "3.2.0" - } - } - } - }, "md5.js": { "version": "1.3.4", "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.4.tgz", @@ -3994,41 +3599,6 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" }, -<<<<<<< HEAD - "mv": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/mv/-/mv-2.1.1.tgz", - "integrity": "sha1-rmzg1vbV4KT32JN5jQPB6pVZtqI=", - "requires": { - "mkdirp": "0.5.1", - "ncp": "2.0.0", - "rimraf": "2.4.5" - }, - "dependencies": { - "glob": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/glob/-/glob-6.0.4.tgz", - "integrity": "sha1-DwiGD2oVUSey+t1PnOJLGqtuTSI=", - "requires": { - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" - } - }, - "rimraf": { - "version": "2.4.5", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.4.5.tgz", - "integrity": "sha1-7nEM5dk6j9uFb7Xqj/Di11k0sto=", - "requires": { - "glob": "6.0.4" - } - } - } - }, -======= ->>>>>>> dev "nan": { "version": "2.7.0", "resolved": "https://registry.npmjs.org/nan/-/nan-2.7.0.tgz", @@ -4039,14 +3609,6 @@ "resolved": "https://registry.npmjs.org/natives/-/natives-1.1.0.tgz", "integrity": "sha1-6f+EFBimsux6SV6TmYT3jxY+bjE=" }, -<<<<<<< HEAD - "ncp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ncp/-/ncp-2.0.0.tgz", - "integrity": "sha1-GVoh1sRuNh0vsSgbo4uR6d9727M=" - }, -======= ->>>>>>> dev "nedb": { "version": "https://github.com/matrix-io/nedb/tarball/master", "integrity": "sha1-XsMIaDSbQ2RjZp4OjZZCc5JuCNY=", @@ -4084,14 +3646,6 @@ "wmic": "0.1.0" } }, -<<<<<<< HEAD - "nopt": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", - "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", - "requires": { - "abbrev": "1.1.0" -======= "node-abi": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.1.1.tgz", @@ -4111,7 +3665,6 @@ "console-control-strings": "1.1.0", "gauge": "2.7.4", "set-blocking": "2.0.0" ->>>>>>> dev } }, "number-is-nan": { @@ -4124,14 +3677,11 @@ "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=" }, -<<<<<<< HEAD -======= "object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" }, ->>>>>>> dev "object-keys": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz", @@ -4153,14 +3703,11 @@ "wordwrap": "0.0.3" } }, -<<<<<<< HEAD -======= "optional": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/optional/-/optional-0.1.4.tgz", "integrity": "sha512-gtvrrCfkE08wKcgXaVwQVgwEQ8vel2dc5DDBn9RLQZ3YtmtkBss6A2HY6BnJH4N/4Ku97Ri/SF8sNWE2225WJw==" }, ->>>>>>> dev "options": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/options/-/options-0.0.6.tgz", @@ -4176,14 +3723,11 @@ "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.1.2.tgz", "integrity": "sha1-ScoCk+CxlZCl9d4Qx/JlphfY/lQ=" }, -<<<<<<< HEAD -======= "os-homedir": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" }, ->>>>>>> dev "os-locale": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", @@ -4283,17 +3827,6 @@ "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.2.5.tgz", "integrity": "sha1-C0JpkeOH/ExnXeI1V/NYcV62b7A=" }, -<<<<<<< HEAD - "pause-stream": { - "version": "0.0.11", - "resolved": "https://registry.npmjs.org/pause-stream/-/pause-stream-0.0.11.tgz", - "integrity": "sha1-/lo0sMvOErWqaitAPuLnO2AvFEU=", - "requires": { - "through": "2.3.8" - } - }, -======= ->>>>>>> dev "pbkdf2": { "version": "3.0.13", "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.13.tgz", @@ -4330,21 +3863,6 @@ } } }, -<<<<<<< HEAD - "portfinder": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-0.4.0.tgz", - "integrity": "sha1-o/+t/6/k+5jgYBqF7aJ8J86Eyh4=", - "requires": { - "async": "0.9.0", - "mkdirp": "0.5.1" - }, - "dependencies": { - "async": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/async/-/async-0.9.0.tgz", - "integrity": "sha1-rDYTsdqb7RtHUQu0ZRuJMeRxRsc=" -======= "prebuild-install": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-2.2.2.tgz", @@ -4370,7 +3888,6 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" ->>>>>>> dev } } }, @@ -4389,30 +3906,11 @@ "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=" }, -<<<<<<< HEAD - "promise": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", - "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", - "requires": { - "asap": "2.0.6" - } - }, -======= ->>>>>>> dev "properties-parser": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/properties-parser/-/properties-parser-0.1.1.tgz", "integrity": "sha1-OsGkJEKqYpBN1xQnFafKT7CMVCw=" }, -<<<<<<< HEAD - "proto-list": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz", - "integrity": "sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk=" - }, -======= ->>>>>>> dev "protobufjs": { "version": "5.0.2", "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-5.0.2.tgz", @@ -4424,38 +3922,6 @@ "yargs": "3.32.0" } }, -<<<<<<< HEAD - "ps-tree": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/ps-tree/-/ps-tree-1.1.0.tgz", - "integrity": "sha1-tCGyQUDWID8e08dplrRCewjowBQ=", - "requires": { - "event-stream": "3.3.4" - }, - "dependencies": { - "event-stream": { - "version": "3.3.4", - "resolved": "https://registry.npmjs.org/event-stream/-/event-stream-3.3.4.tgz", - "integrity": "sha1-SrTJoPWlTbkzi0w02Gv86PSzVXE=", - "requires": { - "duplexer": "0.1.1", - "from": "0.1.7", - "map-stream": "0.1.0", - "pause-stream": "0.0.11", - "split": "0.3.3", - "stream-combiner": "0.0.4", - "through": "2.3.8" - } - } - } - }, - "pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" - }, -======= ->>>>>>> dev "public-encrypt": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.0.tgz", @@ -4492,8 +3958,6 @@ } } }, -<<<<<<< HEAD -======= "pump": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/pump/-/pump-1.0.2.tgz", @@ -4503,7 +3967,6 @@ "once": "1.4.0" } }, ->>>>>>> dev "punycode": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", @@ -4537,8 +4000,6 @@ "safe-buffer": "5.1.1" } }, -<<<<<<< HEAD -======= "rc": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.1.tgz", @@ -4557,7 +4018,6 @@ } } }, ->>>>>>> dev "read-only-stream": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/read-only-stream/-/read-only-stream-1.1.1.tgz", @@ -4736,27 +4196,10 @@ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" }, -<<<<<<< HEAD - "samsam": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/samsam/-/samsam-1.1.2.tgz", - "integrity": "sha1-vsEf3IOp/aBjQBIQ5AF2wwJNFWc=" - }, - "seed-random": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/seed-random/-/seed-random-2.2.0.tgz", - "integrity": "sha1-KpsZ4lCoFwmSMaW5mk2vgLf77VQ=" - }, - "semver": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", - "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==" -======= "set-blocking": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" ->>>>>>> dev }, "setimmediate": { "version": "1.0.5", @@ -4859,25 +4302,6 @@ "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz", "integrity": "sha1-P/IfGYytIXX587eBhT/ZTQ0ZtZA=" }, -<<<<<<< HEAD - "sinon": { - "version": "1.17.7", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-1.17.7.tgz", - "integrity": "sha1-RUKk9JugxFwF6y6d2dID4rjv4L8=", - "requires": { - "formatio": "1.1.1", - "lolex": "1.3.2", - "samsam": "1.1.2", - "util": "0.10.3" - } - }, - "sleep": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/sleep/-/sleep-5.1.1.tgz", - "integrity": "sha1-h4+h1E0I7rDyb7IBjvhinrGjq5Q=", - "requires": { - "nan": "2.7.0" -======= "signal-exit": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", @@ -4891,7 +4315,6 @@ "once": "1.4.0", "unzip-response": "1.0.2", "xtend": "4.0.1" ->>>>>>> dev } }, "slice-stream": { @@ -4931,17 +4354,6 @@ "amdefine": "1.0.1" } }, -<<<<<<< HEAD - "split": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/split/-/split-0.3.3.tgz", - "integrity": "sha1-zQ7qXmOiEd//frDwkcQTPi0N0o8=", - "requires": { - "through": "2.3.8" - } - }, -======= ->>>>>>> dev "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", @@ -4978,17 +4390,6 @@ "readable-stream": "1.1.14" } }, -<<<<<<< HEAD - "stream-combiner": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/stream-combiner/-/stream-combiner-0.0.4.tgz", - "integrity": "sha1-TV5DPBhSYd3mI8o/RMWGvPXErRQ=", - "requires": { - "duplexer": "0.1.1" - } - }, -======= ->>>>>>> dev "stream-combiner2": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/stream-combiner2/-/stream-combiner2-1.0.2.tgz", @@ -5086,14 +4487,11 @@ "ansi-regex": "2.1.1" } }, -<<<<<<< HEAD -======= "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=" }, ->>>>>>> dev "subarg": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/subarg/-/subarg-1.0.0.tgz", @@ -5122,16 +4520,6 @@ "acorn": "4.0.13" } }, -<<<<<<< HEAD - "tar": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz", - "integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=", - "requires": { - "block-stream": "0.0.9", - "fstream": "1.0.11", - "inherits": "2.0.3" -======= "tar-fs": { "version": "1.15.3", "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-1.15.3.tgz", @@ -5181,7 +4569,6 @@ "safe-buffer": "5.1.1" } } ->>>>>>> dev } }, "ternary": { @@ -5203,19 +4590,6 @@ "xtend": "4.0.1" } }, -<<<<<<< HEAD - "time": { - "version": "0.11.4", - "resolved": "https://registry.npmjs.org/time/-/time-0.11.4.tgz", - "integrity": "sha1-7DyJR9f6SI87GXi4EQpoGG9dNA8=", - "requires": { - "bindings": "1.2.1", - "debug": "2.6.8", - "nan": "2.7.0" - } - }, -======= ->>>>>>> dev "timers-browserify": { "version": "1.4.2", "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-1.4.2.tgz", @@ -5231,14 +4605,6 @@ } } }, -<<<<<<< HEAD - "tiny-emitter": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/tiny-emitter/-/tiny-emitter-2.0.0.tgz", - "integrity": "sha1-utMnrbGAS0KiMa+nQVMr2ITNCa0=" - }, -======= ->>>>>>> dev "tinycolor2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.4.1.tgz", @@ -5307,14 +4673,6 @@ "editions": "1.3.3" } }, -<<<<<<< HEAD - "typed-function": { - "version": "0.10.5", - "resolved": "https://registry.npmjs.org/typed-function/-/typed-function-0.10.5.tgz", - "integrity": "sha1-Lg8Yq9BlIZ+raUpEamXG0ZgYMsA=" - }, -======= ->>>>>>> dev "typedarray": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", @@ -5430,14 +4788,11 @@ } } }, -<<<<<<< HEAD -======= "unzip-response": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/unzip-response/-/unzip-response-1.0.2.tgz", "integrity": "sha1-uYTwh3/AqJwsdzzB73tbIytbBv4=" }, ->>>>>>> dev "unzip2": { "version": "0.2.5", "resolved": "https://registry.npmjs.org/unzip2/-/unzip2-0.2.5.tgz", @@ -5549,8 +4904,6 @@ "indexof": "0.0.1" } }, -<<<<<<< HEAD -======= "wide-align": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.2.tgz", @@ -5559,7 +4912,6 @@ "string-width": "1.0.2" } }, ->>>>>>> dev "window-size": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.4.tgz", @@ -5627,18 +4979,6 @@ "resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.3.tgz", "integrity": "sha1-GFqIjATspGw+QHDZn3tJ3jUomS0=" }, -<<<<<<< HEAD - "xpc-connection": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/xpc-connection/-/xpc-connection-0.1.4.tgz", - "integrity": "sha1-3Nf6oq7Gt6bhjMXdrQQvejTHcVY=", - "optional": true, - "requires": { - "nan": "2.7.0" - } - }, -======= ->>>>>>> dev "xtend": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", @@ -5673,22 +5013,6 @@ "resolved": "https://registry.npmjs.org/yeast/-/yeast-0.1.2.tgz", "integrity": "sha1-AI4G2AlDIMNy28L47XagymyKxBk=" }, -<<<<<<< HEAD - "zmq": { - "version": "2.15.3", - "resolved": "https://registry.npmjs.org/zmq/-/zmq-2.15.3.tgz", - "integrity": "sha1-Zsbegsw2sJc0uCBwN3ZJCm+75iQ=", - "requires": { - "bindings": "1.2.1", - "nan": "2.3.5" - }, - "dependencies": { - "nan": { - "version": "2.3.5", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.3.5.tgz", - "integrity": "sha1-gioNwmYpDOTNOhIoLKPn42Rmigg=" - } -======= "zeromq": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/zeromq/-/zeromq-4.6.0.tgz", @@ -5696,7 +5020,6 @@ "requires": { "nan": "2.7.0", "prebuild-install": "2.2.2" ->>>>>>> dev } } } diff --git a/package.json b/package.json index 064c0677..72850663 100644 --- a/package.json +++ b/package.json @@ -38,6 +38,7 @@ ], "license": "ISC", "dependencies": { + "assert-plus": "^1.0.0", "async": "^1.5.2", "chai": "^3.5.0", "colors": "^1.1.2", @@ -71,4 +72,4 @@ "engines": { "node": ">=0.12.7 <=6.5" } -} \ No newline at end of file +} From dfc6465f2bcb4e6e6ce60763d3ffa16d3fa14d48 Mon Sep 17 00:00:00 2001 From: Sean Canton Date: Fri, 13 Oct 2017 07:56:08 -0700 Subject: [PATCH 18/42] progress --- lib/device/drivers/recognition.js | 3 +- lib/device/drivers/voice.js | 223 ---------------------------- lib/service/grpc.js | 27 +--- lib/service/protobuf.js | 2 - package-lock.json | 236 +++++++++++++++++++++--------- package.json | 2 +- test/component.test.js | 8 +- 7 files changed, 176 insertions(+), 325 deletions(-) delete mode 100644 lib/device/drivers/voice.js diff --git a/lib/device/drivers/recognition.js b/lib/device/drivers/recognition.js index 772cddbb..250206fa 100644 --- a/lib/device/drivers/recognition.js +++ b/lib/device/drivers/recognition.js @@ -10,6 +10,7 @@ var debug = debugLog('recognition'); var grpc = require('grpc'); +var grpcClient = require('../../service/grpc.js'); var trainingTags = []; var recognizeTags = []; @@ -133,7 +134,7 @@ module.exports = { init: function () { VisionDriver = Matrix.service.protobuf.vision; - RecognitionRPC = Matrix.service.grpc.recognition; + RecognitionRPC = Matrix.service.grpc.recognition.v1.recognitionService; EyeDriver = Matrix.service.protobuf.malos.maloseye; RecognitionService = Matrix.service.protobuf.vision.recognition_service; diff --git a/lib/device/drivers/voice.js b/lib/device/drivers/voice.js deleted file mode 100644 index 01eefdfb..00000000 --- a/lib/device/drivers/voice.js +++ /dev/null @@ -1,223 +0,0 @@ -/* // Wake Word - string wake_word = 1; - - // Mic channel - enum MicChannel { - channel0 = 0; - channel1 = 1; - channel2 = 2; - channel3 = 3; - channel4 = 4; - channel5 = 5; - channel6 = 6; - channel7 = 7; - channel8 = 8; - } - - MicChannel channel = 2; - - // lenguaje model path from lmtool or similar alternative: - // http://www.speech.cs.cmu.edu/tools/lmtool-new.html - string lm_path = 3; - - // dictionary path from lmtool - string dic_path = 4; - - // enable pocketsphinx verbose mode - bool enable_verbose = 5; - - // stop recognition service - bool stop_recognition = 6; - */ -let protoBuilder, matrixMalosBuilder; - -const debug = debugLog('wakeword'); - -module.exports = { - init: () => { - protoBuilder = Matrix.service.protobuf.malos.driver; - matrixMalosBuilder = protoBuilder.build('matrix_malos'); - }, - read: (buffer) => { - debug('read', buffer.toString()); - // strip unicode - return { speech: buffer.toString().trim().replace(/[^\x2000-\x7FFF]/g,'')} - }, - config: (config) => { - debug('config', config); - }, - /** - * @param config.channel - which microphone - * @param config.options.phrase - set wakeword, defaults to MATRIX - */ - prepare: (config, cb) => { - debug('prepare', config); - if ( !_.has( config.options, 'wakeword' ) ){ - return console.error('No Wakeword Specified in Driver'); - } - var wakeword = config.options.wakeword; - - // TODO: Check wakeword vs stored models - - // TODO: Manage dictionaries - // 8383 - hey joe - // 6854 - matrix - var malosConfig = new matrixMalosBuilder.DriverConfig; - - let voiceConfigProto = new matrixMalosBuilder.WakeWordParams; - voiceConfigProto.set_wake_word(wakeword.toUpperCase()); - voiceConfigProto.set_lm_path('/home/pi/assets/6854.lm'); - voiceConfigProto.set_dic_path('/home/pi/assets/6854.dic'); - - if (_.has(config.options, 'channel')) { - if ( - _.isInteger(config.options.channel) && - config.options.channel <= 8 && - config.options.channel >= 0 - ) { - let channel = matrixMalosBuilder.WakeWordParams.MicChannel['channel' + config.options.channel]; - voiceConfigProto.set_channel(channel); - } else { - return console.error('Invalid Channel ( 0-8 )', config.options.channel); - } - } else { - voiceConfigProto.set_channel(matrixMalosBuilder.WakeWordParams.MicChannel.channel8); - } - voiceConfigProto.set_enable_verbose(true); - malosConfig.set_wakeword(voiceConfigProto); - debug('proto>'.green, malosConfig) - cb(malosConfig.encode().toBuffer()); - }, - stop: () => { - let voiceConfigProto = new matrixMalosBuilder.WakeWordParams; - voiceConfigProto.set_stop_recognition(true); - Matrix.components.wakeword.config(voiceConfigProto.encode().toBuffer()); - }, - error: function(err) { - debug(err); - } -}; - -/** - * -// This is how we connect to the creator. IP and port. -// The IP is the IP I'm using and you need to edit it. -// By default, MALOS has its 0MQ ports open to the world. - -// Every device is identified by a base port. Then the mapping works -// as follows: -// BasePort => Configuration port. Used to config the device. -// BasePort + 1 => Keepalive port. Send pings to this port. -// BasePort + 2 => Error port. Receive errros from device. -// BasePort + 3 => Data port. Receive data from device. - -var creator_ip = '127.0.0.1'; -var creator_wakeword_base_port = 60001; -var creator_everloop_base_port = 20013 + 8 // port for Everloop driver. -var protoBuf = require("protobufjs"); -var zmq = require('zmq'); - -var protoBuilder = protoBuf.loadProtoFile('../../protocol-buffers/malos/driver.proto'); -var matrixMalosBuilder = protoBuilder.build("matrix_malos"); -var configSocket = zmq.socket('push') -configSocket.connect('tcp://' + creator_ip + ':' + creator_wakeword_base_port /* config */ - -// ********** Start error management. -// var errorSocket = zmq.socket('sub') -// errorSocket.connect('tcp://' + creator_ip + ':' + (creator_wakeword_base_port + 2)) -// errorSocket.subscribe('') -// errorSocket.on('message', function(error_message) { -// process.stdout.write('Received Wakeword error: ' + error_message.toString('utf8') + "\n") -// }); -// // ********** End error management. - -// /************************************** -// * start/stop service functions -// **************************************/ - -// function startWakeUpRecognition(){ -// console.log('<== config wakeword recognition..') -// var voiceConfigProto = new matrixMalosBuilder.WakeWordParams; -// voiceConfigProto.set_wake_word("MIA"); -// voiceConfigProto.set_lm_path("/home/pi/assets/9854.lm"); -// wakeword_config.set_dic_path("/home/pi/assets/9854.dic"); -// wakeword_config.set_channel(matrixMalosBuilder.WakeWordParams.MicChannel.channel8); -// wakeword_config.set_enable_verbose(false) -// sendConfigProto(wakeword_config); -// } - -// function stopWakeUpRecognition(){ -// console.log('<== stop wakeword recognition..') -// var wakeword_config = new matrixMalosBuilder.WakeWordParams; -// wakeword_config.set_stop_recognition(true) -// sendConfigProto(wakeword_config); -// } - -// /************************************** -// * Register wakeword callbacks -// **************************************/ - -// var updateSocket = zmq.socket('sub') -// updateSocket.connect('tcp://' + creator_ip + ':' + (creator_wakeword_base_port + 3)) -// updateSocket.subscribe('') - -// updateSocket.on('message', function(wakeword_buffer) { -// var wakeWordData = new matrixMalosBuilder.WakeWordParams.decode(wakeword_buffer); -// console.log('==> WakeWord Reached:',wakeWordData.wake_word) - -// switch(wakeWordData.wake_word) { -// case "MIA RING RED": -// setEverloop(255, 0, 25, 0, 0.05) -// break; -// case "MIA RING BLUE": -// setEverloop(0, 25, 255, 0, 0.05) -// break; -// case "MIA RING GREEN": -// setEverloop(0, 255, 100, 0, 0.05) -// break; -// case "MIA RING ORANGE": -// setEverloop(255, 77, 0, 0, 0.05) -// break; -// case "MIA RING CLEAR": -// setEverloop(0, 0, 0, 0, 0) -// break; -// } -// }); - -// /************************************** -// * Everloop Ring LEDs handler -// **************************************/ - -// var ledsConfigSocket = zmq.socket('push') -// ledsConfigSocket.connect('tcp://' + creator_ip + ':' + creator_everloop_base_port /* config */) - -// function setEverloop(r, g, b, w, i) { -// var config = new matrixMalosBuilder.DriverConfig -// config.image = new matrixMalosBuilder.EverloopImage -// for (var j = 0; j < 35; ++j) { -// var ledValue = new matrixMalosBuilder.LedValue; -// ledValue.setRed(Math.round(r*i)); -// ledValue.setGreen(Math.round(g*i)); -// ledValue.setBlue(Math.round(b*i)); -// ledValue.setWhite(Math.round(w*i)); -// config.image.led.push(ledValue) -// } -// ledsConfigSocket.send(config.encode().toBuffer()); -// } - -// /************************************** -// * sendConfigProto: build Proto message -// **************************************/ - -// function sendConfigProto(cfg){ -// var config = new matrixMalosBuilder.DriverConfig -// config.set_wakeword(cfg) -// configSocket.send(config.encode().toBuffer()) -// } - -// /********************************************** -// ****************** MAIN ********************** -// **********************************************/ - -// startWakeUpRecognition(); - diff --git a/lib/service/grpc.js b/lib/service/grpc.js index 4a17943a..4587fe1f 100644 --- a/lib/service/grpc.js +++ b/lib/service/grpc.js @@ -1,28 +1,7 @@ // We use GRPC to communicate with the MALOS and external services var grpc = require('grpc'); -var debug = debugLog('grpc'); - - - -const fs = require('fs') -const protosPath = __dirname + '/../../proto/matrix_io'; - -module.exports = { - - // this needs to run after PROTO - populate: function (Protos) { - - var gv = Protos.vision.VisionService; - var gr = Protos.recognition.RecognitionService; - - var vFn = grpc.loadObject(gv, { protobufjsVersion: 6 }); - var rFn = grpc.loadObject(gr, { protobufjsVersion: 6 }); - - module.exports.vision = vFn; - module.exports.recognition = rFn; - - } -} - +var protos = require('matrix-protos').proto; +var client = grpc.loadObject(protos, { protobufjsVersion: 6 }).matrix_io; +module.exports = client; diff --git a/lib/service/protobuf.js b/lib/service/protobuf.js index e0a01c67..8b29c01f 100644 --- a/lib/service/protobuf.js +++ b/lib/service/protobuf.js @@ -33,8 +33,6 @@ for (let p in Protos) { module.exports = pExport; -require('./grpc.js').populate(pExport); - // const fs = require('fs') // const protosPath = __dirname + '/../../proto'; // // monkey patch protobuf to add enum strings diff --git a/package-lock.json b/package-lock.json index ede31976..06ac01da 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4,29 +4,70 @@ "lockfileVersion": 1, "requires": true, "dependencies": { - "Base64": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/Base64/-/Base64-0.2.1.tgz", - "integrity": "sha1-ujpCMHCOGGcFBl5mur3Uw1z2ACg=" + "@protobufjs/aspromise": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", + "integrity": "sha1-m4sMxmPWaafY9vXQiToU00jzD78=" }, - "JSONStream": { - "version": "0.8.4", - "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-0.8.4.tgz", - "integrity": "sha1-kWV9/m/4V0gwZhMrRhi2Lo9Ih70=", - "requires": { - "jsonparse": "0.0.5", - "through": "2.3.8" - } + "@protobufjs/base64": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", + "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==" }, - "MD5": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/MD5/-/MD5-1.2.2.tgz", - "integrity": "sha1-2QPI7FuiI80rgEMoJIgdBLuYQcA=", + "@protobufjs/codegen": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", + "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==" + }, + "@protobufjs/eventemitter": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", + "integrity": "sha1-NVy8mLr61ZePntCV85diHx0Ga3A=" + }, + "@protobufjs/fetch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", + "integrity": "sha1-upn7WYYUr2VwDBYZ/wbUVLDYTEU=", "requires": { - "charenc": "0.0.2", - "crypt": "0.0.2" + "@protobufjs/aspromise": "1.1.2", + "@protobufjs/inquire": "1.1.0" } }, + "@protobufjs/float": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", + "integrity": "sha1-Xp4avctz/Ap8uLKR33jIy9l7h9E=" + }, + "@protobufjs/inquire": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", + "integrity": "sha1-/yAOPnzyQp4tyvwRQIKOjMY48Ik=" + }, + "@protobufjs/path": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", + "integrity": "sha1-bMKyDFya1q0NzP0hynZz2Nf79o0=" + }, + "@protobufjs/pool": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", + "integrity": "sha1-Cf0V8tbTq/qbZbw2ZQbWrXhG/1Q=" + }, + "@protobufjs/utf8": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", + "integrity": "sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA=" + }, + "@types/long": { + "version": "3.0.32", + "resolved": "https://registry.npmjs.org/@types/long/-/long-3.0.32.tgz", + "integrity": "sha512-ZXyOOm83p7X8p3s0IYM3VeueNmHpkk/yMlP8CLeOnEcu6hIwPH7YjZBvhQkR0ZFS2DqZAxKtJ/M5fcuv3OU5BA==" + }, + "@types/node": { + "version": "7.0.43", + "resolved": "https://registry.npmjs.org/@types/node/-/node-7.0.43.tgz", + "integrity": "sha512-7scYwwfHNppXvH/9JzakbVxk0o0QUILVk1Lv64GRaxwPuGpnF1QBiwdvhDpLcymb8BpomQL3KYoWKq3wUdDMhQ==" + }, "accessory": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/accessory/-/accessory-1.1.0.tgz", @@ -229,6 +270,11 @@ "resolved": "https://registry.npmjs.org/base62/-/base62-0.1.1.tgz", "integrity": "sha1-e0F0wvlESXU7EcJlHAg9qEGnsIQ=" }, + "Base64": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/Base64/-/Base64-0.2.1.tgz", + "integrity": "sha1-ujpCMHCOGGcFBl5mur3Uw1z2ACg=" + }, "base64-arraybuffer": { "version": "0.1.5", "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.5.tgz", @@ -352,10 +398,10 @@ "resolved": "https://registry.npmjs.org/browser-pack/-/browser-pack-3.2.0.tgz", "integrity": "sha1-+qHLxBSHsazEdH43PhFIrf/Q4tk=", "requires": { - "JSONStream": "0.8.4", "combine-source-map": "0.3.0", "concat-stream": "1.4.10", "defined": "0.0.0", + "JSONStream": "0.8.4", "through2": "0.5.1", "umd": "2.1.0" }, @@ -407,7 +453,6 @@ "resolved": "https://registry.npmjs.org/browserify/-/browserify-6.3.4.tgz", "integrity": "sha1-V7XRlcxWgTnpcTAuXNnVjdr7VNg=", "requires": { - "JSONStream": "0.8.4", "assert": "1.1.2", "browser-pack": "3.2.0", "browser-resolve": "1.11.2", @@ -431,6 +476,7 @@ "inherits": "2.0.3", "insert-module-globals": "6.6.3", "isarray": "0.0.1", + "JSONStream": "0.8.4", "labeled-stream-splicer": "1.0.2", "module-deps": "3.9.1", "os-browserify": "0.1.2", @@ -920,6 +966,11 @@ "through2": "1.1.1" }, "dependencies": { + "jsonparse": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", + "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=" + }, "JSONStream": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.1.tgz", @@ -928,11 +979,6 @@ "jsonparse": "1.3.1", "through": "2.3.8" } - }, - "jsonparse": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", - "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=" } } }, @@ -2106,6 +2152,14 @@ } } }, + "string_decoder": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "requires": { + "safe-buffer": "5.1.1" + } + }, "string-width": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", @@ -2116,14 +2170,6 @@ "strip-ansi": "3.0.1" } }, - "string_decoder": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", - "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", - "requires": { - "safe-buffer": "5.1.1" - } - }, "stringstream": { "version": "0.0.5", "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", @@ -2463,25 +2509,16 @@ "resolved": "https://registry.npmjs.org/insert-module-globals/-/insert-module-globals-6.6.3.tgz", "integrity": "sha1-IGOOKaMPntHKLjqCX7wsulJG3fw=", "requires": { - "JSONStream": "1.3.1", "combine-source-map": "0.6.1", "concat-stream": "1.4.10", "is-buffer": "1.1.5", + "JSONStream": "1.3.1", "lexical-scope": "1.2.0", "process": "0.11.10", "through2": "1.1.1", "xtend": "4.0.1" }, "dependencies": { - "JSONStream": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.1.tgz", - "integrity": "sha1-cH92HgHa6eFvG8+TcDt4xwlmV5o=", - "requires": { - "jsonparse": "1.3.1", - "through": "2.3.8" - } - }, "combine-source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.6.1.tgz", @@ -2511,6 +2548,15 @@ "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=" }, + "JSONStream": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.1.tgz", + "integrity": "sha1-cH92HgHa6eFvG8+TcDt4xwlmV5o=", + "requires": { + "jsonparse": "1.3.1", + "through": "2.3.8" + } + }, "process": { "version": "0.11.10", "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", @@ -2641,6 +2687,15 @@ "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-0.0.5.tgz", "integrity": "sha1-MwVCrT8KZUZlt3jz6y2an6UHrGQ=" }, + "JSONStream": { + "version": "0.8.4", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-0.8.4.tgz", + "integrity": "sha1-kWV9/m/4V0gwZhMrRhi2Lo9Ih70=", + "requires": { + "jsonparse": "0.0.5", + "through": "2.3.8" + } + }, "jsonwebtoken": { "version": "5.7.0", "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-5.7.0.tgz", @@ -3074,15 +3129,6 @@ "xunit-file": "0.0.6" }, "dependencies": { - "JSONStream": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.1.tgz", - "integrity": "sha1-cH92HgHa6eFvG8+TcDt4xwlmV5o=", - "requires": { - "jsonparse": "1.3.1", - "through": "2.3.8" - } - }, "assert": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/assert/-/assert-1.3.0.tgz", @@ -3106,9 +3152,9 @@ "resolved": "https://registry.npmjs.org/browser-pack/-/browser-pack-5.0.1.tgz", "integrity": "sha1-QZdxmyDG4KqglFHFER5T77b7wY0=", "requires": { - "JSONStream": "1.3.1", "combine-source-map": "0.6.1", "defined": "1.0.0", + "JSONStream": "1.3.1", "through2": "1.1.1", "umd": "3.0.1" } @@ -3118,7 +3164,6 @@ "resolved": "https://registry.npmjs.org/browserify/-/browserify-11.2.0.tgz", "integrity": "sha1-oRu53SCdeVcrgT9+7q+Cil9cDk4=", "requires": { - "JSONStream": "1.3.1", "assert": "1.3.0", "browser-pack": "5.0.1", "browser-resolve": "1.11.2", @@ -3142,6 +3187,7 @@ "inherits": "2.0.3", "insert-module-globals": "6.6.3", "isarray": "0.0.1", + "JSONStream": "1.3.1", "labeled-stream-splicer": "1.0.2", "module-deps": "3.9.1", "os-browserify": "0.1.2", @@ -3266,6 +3312,15 @@ "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=" }, + "JSONStream": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.1.tgz", + "integrity": "sha1-cH92HgHa6eFvG8+TcDt4xwlmV5o=", + "requires": { + "jsonparse": "1.3.1", + "through": "2.3.8" + } + }, "minimatch": { "version": "2.0.10", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz", @@ -3361,6 +3416,45 @@ } } }, + "matrix-protos": { + "version": "0.0.17", + "resolved": "https://registry.npmjs.org/matrix-protos/-/matrix-protos-0.0.17.tgz", + "integrity": "sha1-3WWn6Y1+taezkeBouFGdq8Z3Ngk=", + "requires": { + "protobufjs": "6.8.0" + }, + "dependencies": { + "protobufjs": { + "version": "6.8.0", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.8.0.tgz", + "integrity": "sha512-47Y49f5JN5Qsbxas2TyI2zFO8j9GpQAQm5thf54fr2O8qcP/jkIXYxmYx1hN2WQFAhESU1xpVn5NWVDBB8WFnw==", + "requires": { + "@protobufjs/aspromise": "1.1.2", + "@protobufjs/base64": "1.1.2", + "@protobufjs/codegen": "2.0.4", + "@protobufjs/eventemitter": "1.1.0", + "@protobufjs/fetch": "1.1.0", + "@protobufjs/float": "1.0.2", + "@protobufjs/inquire": "1.1.0", + "@protobufjs/path": "1.1.2", + "@protobufjs/pool": "1.1.0", + "@protobufjs/utf8": "1.1.0", + "@types/long": "3.0.32", + "@types/node": "7.0.43", + "long": "3.2.0" + } + } + } + }, + "MD5": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/MD5/-/MD5-1.2.2.tgz", + "integrity": "sha1-2QPI7FuiI80rgEMoJIgdBLuYQcA=", + "requires": { + "charenc": "0.0.2", + "crypt": "0.0.2" + } + }, "md5.js": { "version": "1.3.4", "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.4.tgz", @@ -3509,11 +3603,11 @@ "resolved": "https://registry.npmjs.org/mockfirebase/-/mockfirebase-0.12.0.tgz", "integrity": "sha1-chLO10WH9iJTaHsGU3HqqgVWfhs=", "requires": { - "MD5": "1.2.2", "browserify": "6.3.4", "browserify-shim": "3.8.14", "firebase-auto-ids": "1.1.0", - "lodash": "2.4.2" + "lodash": "2.4.2", + "MD5": "1.2.2" }, "dependencies": { "lodash": { @@ -3528,13 +3622,13 @@ "resolved": "https://registry.npmjs.org/module-deps/-/module-deps-3.9.1.tgz", "integrity": "sha1-6nXK+RmQkNJbDVUStaysuW5/h/M=", "requires": { - "JSONStream": "1.3.1", "browser-resolve": "1.11.2", "concat-stream": "1.4.10", "defined": "1.0.0", "detective": "4.5.0", "duplexer2": "0.0.2", "inherits": "2.0.3", + "JSONStream": "1.3.1", "parents": "1.0.1", "readable-stream": "1.1.14", "resolve": "1.4.0", @@ -3544,15 +3638,6 @@ "xtend": "4.0.1" }, "dependencies": { - "JSONStream": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.1.tgz", - "integrity": "sha1-cH92HgHa6eFvG8+TcDt4xwlmV5o=", - "requires": { - "jsonparse": "1.3.1", - "through": "2.3.8" - } - }, "defined": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", @@ -3563,6 +3648,15 @@ "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=" }, + "JSONStream": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.1.tgz", + "integrity": "sha1-cH92HgHa6eFvG8+TcDt4xwlmV5o=", + "requires": { + "jsonparse": "1.3.1", + "through": "2.3.8" + } + }, "parents": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parents/-/parents-1.0.1.tgz", @@ -4459,6 +4553,11 @@ "through2": "1.1.1" } }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + }, "string-width": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", @@ -4469,11 +4568,6 @@ "strip-ansi": "3.0.1" } }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" - }, "stringstream": { "version": "0.0.5", "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", diff --git a/package.json b/package.json index 72850663..e1d4c3af 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,7 @@ "matrix-eventfilter": "https://github.com/matrix-io/matrix-eventfilter/tarball/master", "matrix-firebase": "https://github.com/matrix-io/matrix-firebase/tarball/master", "matrix-node-sdk": "https://github.com/matrix-io/matrix-node-sdk/tarball/master", - "matrix-protos": "^0.0.14", + "matrix-protos": "0.0.17", "mic": "^2.1.1", "mocha": "^2.4.5", "nedb": "https://github.com/matrix-io/nedb/tarball/master", diff --git a/test/component.test.js b/test/component.test.js index 4cce1155..73435c10 100644 --- a/test/component.test.js +++ b/test/component.test.js @@ -1,5 +1,7 @@ var zeromq = require('zeromq'); var protobuf = require('protobufjs'); + +//TODO this whole tests needs to use Driver.DriverInfo.name from matrix-protos describe('component', function () { var component, TestProto, malosSend, malosRead, malosPing, malosError, TestProto; @@ -86,7 +88,7 @@ describe('component', function () { Matrix.components.test.ping(); }); - it('should implement send', function (done) { + it.skip('should implement send', function (done) { var d = _.once(done); malosSend.on('message', function (msg) { var decode = new TestProto.Test.decode(msg); @@ -97,7 +99,7 @@ describe('component', function () { Matrix.components.test.send({ test: true }); }); - it('should implement print', function (done) { + it.skip('should implement print', function (done) { malosSend.connect('tcp://127.0.0.1:' + Matrix.device.port.get('test').input); var d = _.once(done); @@ -113,7 +115,7 @@ describe('component', function () { Matrix.components.test.print(TestProto.Test.encode(t).finish()); }) - it('should implement read', function (done) { + it.skip('should implement read', function (done) { Matrix.components.test.read(function (msg) { msg.should.property('test', true); done(); From ed5a50728ab84e5b4409d4d077dd6fb0d78e5082 Mon Sep 17 00:00:00 2001 From: Sean Canton Date: Fri, 13 Oct 2017 09:24:58 -0700 Subject: [PATCH 19/42] adjust timing for recog --- lib/device/drivers/recognition.js | 133 +++++++++++++++++------------- 1 file changed, 76 insertions(+), 57 deletions(-) diff --git a/lib/device/drivers/recognition.js b/lib/device/drivers/recognition.js index 016c845d..7c46643e 100644 --- a/lib/device/drivers/recognition.js +++ b/lib/device/drivers/recognition.js @@ -1,7 +1,8 @@ // Unlike other drivers, this will use RPC directly -var matrixVision, matrixMalos, matrixRPC, matrixRecognition, matrixRecognitionService, +var VisionDriver, DeviceDriver, RecognitionRPC, RecognitionDriver, RecognitionService, RecognitionService, + RecognitionRPCService, protoVisionBuilder, protoMalosBuilder; @@ -9,6 +10,7 @@ var debug = debugLog('recognition'); var grpc = require('grpc'); +var grpcClient = require('../../service/grpc.js'); var trainingTags = []; var recognizeTags = []; @@ -29,10 +31,10 @@ var modes = ['OFF', 'TRAIN', 'RECOGNIZE']; function getAllTags(cb) { startRecognitionService(); - RecognitionService.getFeatureDescriptorTags({}, headers, function (err, res) { + RecognitionRPCService.getFeatureDescriptorTags({}, headers, function (err, res) { if (err) return cb(err); - if (res.hasOwnProperty('feature_tags_for_device')) { - var tagData = res.feature_tags_for_device; + if (res.hasOwnProperty('featureTagsForDevice')) { + var tagData = res.featureTagsForDevice; var tags = []; tags = _.map(tagData, function (t) { return _.map(t.tags, function (tag) { @@ -51,16 +53,26 @@ function getAllTags(cb) { } function startRecognitionService() { + if (_.isUndefined(RecognitionRPC)) { + module.exports.init(); + } headers = new grpc.Metadata(); headers.add('authorization', 'Bearer ' + Matrix.deviceToken); var credentials = grpc.credentials.createSsl(); - if (_.isUndefined(RecognitionService)) { - RecognitionService = new matrixRPC.RecognitionService( - HOST_ADDRESS, credentials - ); + if (_.isUndefined(RecognitionRPCService)) { + var grpcClient = grpc.Client(HOST_ADDRESS, credentials); + + RecognitionRPCService = RecognitionRPC.create(function rpcImpl(fn, msg, cb) { + log(fn, RecognitionService.decode(msg), RecognitionRPCService, grpc) + cb('HI>>>') + grpcClient.makeUnaryRequest('GET', + function () { log('ser', arguments) }, function () { log('deser') }, headers, function () { log('cb', arguments) }) + }) + debug('>>>', grpcClient, RecognitionRPCService) + debug('RecognitionService:'.blue, HOST_ADDRESS, credentials); } @@ -82,10 +94,6 @@ function deleteTags(tags, cb) { }); } -function startDetection() { - -} - /** * Obtain a list of descriptors * @param {[]} uuids options.uuids for descriptors @@ -104,11 +112,11 @@ function getDescriptors(options, cb) { function (cb) { RecognitionService.getFeatureDescriptors(options, headers, (err, resp) => { if (err) cb(err); - descriptors.concat(resp.feature_descriptor_list); - if (_.isUndefined(resp.next_page_token)) { + descriptors.concat(resp.featureDescriptorList); + if (_.isUndefined(resp.nextPageToken)) { done = true; } else { - options.next_page_token = resp.next_page_token; + options.nextPageToken = resp.nextPageToken; } cb(null, descriptors); }); @@ -124,15 +132,15 @@ function getDescriptors(options, cb) { module.exports = { commands: ['recognition'], init: function () { - var protoVisionBuilder = Matrix.service.protobuf.vision.vision; - var protoRecognitionBuilder = Matrix.service.protobuf.vision.recognition; - var protoRecognitionServiceBuilder = Matrix.service.protobuf.vision.recognition_service; - matrixVision = protoVisionBuilder.build('admobilize_vision'); - matrixRecognitionService = protoRecognitionServiceBuilder.build('admobilize_vision'); - matrixRecognition = protoRecognitionBuilder.build('admobilize_vision'); - protoMalosBuilder = Matrix.service.protobuf.malos.driver; - matrixMalos = protoMalosBuilder.build('matrix_malos'); - matrixRPC = Matrix.service.grpc.vision.recognition_service; + VisionDriver = Matrix.service.protobuf.vision; + + RecognitionRPC = Matrix.service.grpc.recognition.v1.recognitionService; + + EyeDriver = Matrix.service.protobuf.malos.maloseye; + RecognitionService = Matrix.service.protobuf.vision.recognition_service; + RecognitionDriver = Matrix.service.protobuf.recognition; + DeviceDriver = Matrix.service.protobuf.malos.driver; + var env = process.env.NODE_ENV; @@ -150,17 +158,24 @@ module.exports = { // configure malos first prepare: function (component, cb) { + if (_.isUndefined(VisionDriver)) { + module.exports.init(); + } var options = component.options; - var driverConfig = new matrixMalos.DriverConfig; - driverConfig.set_delay_between_updates(0.05); - driverConfig.set_timeout_after_last_ping(15); - driverConfig.malos_eye_config = new matrixMalos.MalosEyeConfig; - var cameraConfig = new matrixMalos.CameraConfig; - cameraConfig.set_camera_id(0); - cameraConfig.set_width(800); - cameraConfig.set_height(600); - driverConfig.malos_eye_config.set_camera_config(cameraConfig); - cb(driverConfig.encode().toBuffer()); + var config = new DeviceDriver.DriverConfig; + config.delayBetweenUpdates = 0.25; + config.timeoutAfterLastPing = 15; + config.malosEyeConfig = new EyeDriver.MalosEyeConfig; + var cameraConfig = new EyeDriver.CameraConfig; + //reference + config.malosEyeConfig.cameraConfig = cameraConfig; + + cameraConfig.cameraId = 0; + cameraConfig.width = 800; + cameraConfig.height = 600; + + + cb(DeviceDriver.DriverConfig.encode(config).finish()); // parse mode option if (options.hasOwnProperty('mode')) { @@ -214,22 +229,23 @@ module.exports = { }, - // happens after preparation + // happens after preparation, see drivers/service.js config: function (options) { startRecognitionService(); // setup malos_eye_ - var eyeConfig = new matrixMalos.DriverConfig; - eyeConfig.malos_eye_config = new matrixMalos.MalosEyeConfig; + var config = new DeviceDriver.DriverConfig; + config.malosEyeConfig = new EyeDriver.MalosEyeConfig; // FIXME: We should only need FACE_DESCRIPTOR here. @resolved? - eyeConfig.malos_eye_config.object_to_detect.push( - matrixMalos.EnumMalosEyeDetectionType.FACE_DEMOGRAPHICS); - eyeConfig.malos_eye_config.object_to_detect.push( - matrixMalos.EnumMalosEyeDetectionType.FACE_DESCRIPTOR); + config.malosEyeConfig.objectToDetect = []; + config.malosEyeConfig.objectToDetect.push( + EyeDriver.EnumMalosEyeDetectionType.FACE_DEMOGRAPHICS); + config.malosEyeConfig.objectToDetect.push( + EyeDriver.EnumMalosEyeDetectionType.FACE_DESCRIPTOR); - Matrix.components.recognition.config(eyeConfig.encode().toBuffer()); + Matrix.components.recognition.config(DeviceDriver.DriverConfig.encode(config).finish()); // Additional Inits getAllTags(function (err, tags) { @@ -255,38 +271,41 @@ module.exports = { }, read: function (buffer, cb) { + if (_.isUndefined(RecognitionRPC)) { + module.exports.init(); + } // debug('read>', buffer); if (_.isUndefined(buffer) || mode === 0) { return; } - var result = new matrixVision.VisionResult.decode(buffer); + var result = new VisionDriver.VisionResult.decode(buffer); - // debug('>read', result) + debug('>read', result) if (result.vision_event.length > 0) { _.each(result.vision_event, function (v) { - debug('>v_e', v.tag, v.tracking_id); + debug('>v_e', v.tag, v.trackingId); if (v.tag === 'TRACKING_START') { - Matrix.service.track.add(v.tracking_id); + Matrix.service.track.add(v.trackingId); } else if (v.tag === 'TRACKING_END') { - Matrix.service.track.remove(v.tracking_id); + Matrix.service.track.remove(v.trackingId); } }); } _.each(result.rect_detection, function (r) { - if (!Matrix.service.track.has(r.tracking_id)) { + if (!Matrix.service.track.has(r.trackingId)) { console.warn('Detection has no Tracking Id', r, Matrix.service.track.getIds()); } - var tId = r.tracking_id.toString(); + var tId = r.trackingId.toString(); debug('track id>', tId); - _.each(r.facial_recognition, function (recog) { + _.each(r.facialRecognition, function (recog) { if (recog.tag === 'FACE_DESCRIPTOR') { if (mode === modes.indexOf('TRAIN')) { - var trainTarget = 7; + var trainTarget = 3; Matrix.service.track.addDescriptor(tId, recog.face_descriptor); var dCount = Matrix.service.track.getDescriptors(tId).length; @@ -297,7 +316,7 @@ module.exports = { debug('>face_recog', recog.tag, tId); var descriptors = _.map(Matrix.service.track.getDescriptors(tId), function (d) { - var feature = new matrixRPC.FeatureDescriptor(); + var feature = new RecognitionRPC.FeatureDescriptor(); feature.tags = trainingTags; feature.data = d; return feature; @@ -325,17 +344,17 @@ module.exports = { debug('recog', recog); var features = []; - var featureList = new matrixRPC.FeatureDescriptorList(); + var featureList = new RecognitionRPC.FeatureDescriptorList(); - var feature = new matrixRPC.FeatureDescriptor(); - feature.data = recog.face_descriptor; + var feature = new RecognitionRPC.FeatureDescriptor(); + feature.data = recog.faceDescriptor; feature.tags = recognizeTags; features.push(feature); featureList.feature_descriptors = features; RecognitionService.recognize({ - feature_descriptor_list: featureList + featureDescriptorList: featureList }, headers, (e, recogs) => { if (e) return error(e); // debug('recognition occurred', recogs); @@ -346,7 +365,7 @@ module.exports = { } // Training Mode }); - //# facial_recognition map + //# facialRecognition map }); //# rect_detection map From 7cd56d66dc766ec2152972b8bfdfdafe2bc5eec8 Mon Sep 17 00:00:00 2001 From: Sean Canton Date: Sun, 15 Oct 2017 12:22:49 -0700 Subject: [PATCH 20/42] update recog docs --- lib/device/drivers/recognition.js | 31 ++++++++++++++++++++++++++----- package-lock.json | 2 +- 2 files changed, 27 insertions(+), 6 deletions(-) diff --git a/lib/device/drivers/recognition.js b/lib/device/drivers/recognition.js index 250206fa..a3358351 100644 --- a/lib/device/drivers/recognition.js +++ b/lib/device/drivers/recognition.js @@ -1,3 +1,10 @@ +/** + * Recognition Driver - Triggers Detection Service to get face matrix. Sends to Recognition Service along with a tag. + * @method init - called from device/service.js via application. sets up protobuffers and grpc + * @method getTags - retrieve stored tags from GRPC recognition service + * @method prepare - called from service.config to prepare the initial detection configuration + */ + // Unlike other drivers, this will use RPC directly var VisionDriver, DeviceDriver, RecognitionRPC, RecognitionDriver, RecognitionService, @@ -162,6 +169,7 @@ module.exports = { module.exports.init(); } var options = component.options; +<<<<<<< Updated upstream var config = new DeviceDriver.DriverConfig; config.delayBetweenUpdates = 0.05; config.timeoutAfterLastPing = 15; @@ -177,6 +185,18 @@ module.exports = { cb(DeviceDriver.DriverConfig.encode(config).finish()); +======= + var driverConfig = new matrixMalos.DriverConfig; + driverConfig.set_delay_between_updates(0.05); + driverConfig.set_timeout_after_last_ping(15); + driverConfig.malos_eye_config = new matrixMalos.MalosEyeConfig; + var cameraConfig = new matrixMalos.CameraConfig; + cameraConfig.set_camera_id(0); + cameraConfig.set_width(800); + cameraConfig.set_height(600); + driverConfig.malos_eye_config.set_camera_config(cameraConfig); + +>>>>>>> Stashed changes // parse mode option if (options.hasOwnProperty('mode')) { var m = modes.indexOf(options.mode.toUpperCase()); @@ -196,10 +216,10 @@ module.exports = { console.warn('No mode specified, defaulting to recognize'); mode = modes.indexOf('RECOGNIZE'); } - - + + // parse tag and tags - + var targetTags = []; // make sure tags is ok if (_.has(options.tags) && !_.isArray(options.tags)) { @@ -217,14 +237,15 @@ module.exports = { if (_.has(options, 'tag') && _.has(options, 'tags')) { targetTags = options.tags.push(options.tag); } - + // reconcile mode with tags if (mode === modes.indexOf('TRAIN')) { trainingTags = targetTags; } else if (mode === modes.indexOf('RECOGNIZE')) { recognizeTags = targetTags; } - + + cb(driverConfig.encode().toBuffer()); // config is called next - startDetection }, diff --git a/package-lock.json b/package-lock.json index 06ac01da..c34bd926 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2918,7 +2918,7 @@ }, "matrix-firebase": { "version": "https://github.com/matrix-io/matrix-firebase/tarball/master", - "integrity": "sha1-nCZhR3vwF/c/8GD7zlWzN7oU1Vg=", + "integrity": "sha1-s76AzAp7KMDcUF6egff3i8//KdY=", "requires": { "async": "2.5.0", "colors": "1.1.2", From 85a8fe1a4d4e63f43695361e8ac7978187091378 Mon Sep 17 00:00:00 2001 From: Sean Canton Date: Sun, 15 Oct 2017 17:07:41 -0700 Subject: [PATCH 21/42] progress, update readme, inde xdocs --- DEVELOPERS.md | 4 +++- index.js | 43 +++++++++++++++++++++++++-------------- lib/device/drivers/led.js | 3 ++- lib/service/manager.js | 15 +++++++------- package.json | 2 +- 5 files changed, 42 insertions(+), 25 deletions(-) diff --git a/DEVELOPERS.md b/DEVELOPERS.md index b1e9c02a..faca7e8a 100644 --- a/DEVELOPERS.md +++ b/DEVELOPERS.md @@ -34,6 +34,8 @@ To exclude engine-io from the output, do ``` MATRIX_API_SERVER https://dev-api.admobilize.com MATRIX_STREAMING_SERVER http://dev-mxss.admobilize.com:80 +MATRIX_NOMXSS - don't use streaming server +NO_INSTALL - disable auto install from firebase for apps ``` # Command Line Switches @@ -50,7 +52,7 @@ DOCKER_APPS=true START_APP=clock node index.js ``` ## Start your MATRIX OS with an installed App -Please note that the application must be registered with the infrastructure to launch. Internet connectivity is only required on boot. +Please note that the application must be registered with the infrastructure to launch. Internet connectivity is only required on boot. It can be disconnected, so long as an app doesn't use GRPC services or tries to save data. ``` START_APP=monitor node index.js ``` diff --git a/index.js b/index.js index ad9c5564..fdb0cf8d 100644 --- a/index.js +++ b/index.js @@ -1,6 +1,15 @@ -// Welcome to MatrixOS - A JavaScript environment for IoT Applications +/** + * MATRIX OS - is an orchestration system for IoT applications. It uses ZeroMQ and Protocol buffers to communicate with the hardware layer via MALOS/CORE + * @see https://github.com/matrix-io/matrix-malos-lib MALOS + HAL is otherwise known as CORE + * @see https://github.com/matrix-io/matrix-cli MATRIX CLI enables user configuration via command line + * @see https://matrix-io.github.io/matrix-documentation/ System documentation + * + * We welcome feedback on github or via email. -> sean.canton@admobilize.com + */ + var optional = require('optional'); -var bleno = optional('bleno'); +// bluetooth lib, doesn't work on non bt platforms, so optional +const bleno = optional('bleno'); const mosRepoURL = 'https://raw.githubusercontent.com/matrix-io/matrix-os/master/package.json'; // check gh @@ -21,29 +30,33 @@ var checks = { }; /* GLOBALS */ +require('colors'); _ = require('lodash'); async = require('async'); exec = require('child_process').exec; os = require('os'); -require('colors'); - -var fs = require('fs'); - warn = console.log; log = console.log; error = console.error; +// local system vars +var fs = require('fs'); + // based on NODE_ENV, set sensible defaults var envSettings = getEnvSettings(); -// if NODE_ENV=dev then set sane debug + +// if NODE_ENV=dev then set sane debug settings if (envSettings.debug === true && !_.has(process.env, 'DEBUG')) { process.env.DEBUG = '*,-engine*,-Component*,-*led*,-gatt,-bleno,-bt-characteristic,-hci'; // process.env.DEBUG = '*,-engine*'; } +// system wide debug setup function debugLog = require('debug'); -debug = debugLog('matrix'); + +// debug for this file +const debug = debugLog('matrix'); // Core Library - Creates Matrix.device, Matrix.event, Matrix.service Matrix = require('./lib/index.js'); @@ -87,7 +100,6 @@ if (foundKeys.length < reqKeys.length) { onDestroy(); } -debug('', 'ENV:'.grey, Matrix.env.blue, 'API:'.grey, Matrix.apiServer.blue, 'MXSS:'.grey, Matrix.streamingServer.blue); debug('', 'ENV:'.grey, Matrix.env.blue, 'API:'.grey, Matrix.apiServer.blue, 'MXSS:'.grey, Matrix.streamingServer.blue); var events = require('events'); @@ -365,6 +377,7 @@ function onlineSetup(callback) { // Lets login to the streaming server function mxssInit(cb) { + // for debugging use MATRIX_NOMXSS env var to avoid MXSS . still needs internet tho. if (!process.env.hasOwnProperty('MATRIX_NOMXSS')) { Matrix.service.stream.initSocket(cb); } else { @@ -417,6 +430,7 @@ function onlineSetup(callback) { console.log('Local Apps:'.yellow, appFolders.join(', ').grey); var fileSystemVariance = appFolders.length - _.map(Matrix.localApps, 'name').length; + // is there a difference between what's supposed to be on the device and what is there console.log('Local / Installed Δ', fileSystemVariance); if (fileSystemVariance === 0) { debug('Invariance. Clean System. Matching Records'); @@ -493,7 +507,7 @@ function onlineSetup(callback) { }); }); - //App install update + //When application status changes on firebase, install on device Matrix.service.firebase.user.watchAppInstall(Matrix.deviceId, function (app, appId) { if (!_.isUndefined(app) && !_.isUndefined(appId)) { Matrix.localApps[appId] = app; @@ -507,6 +521,7 @@ function onlineSetup(callback) { name: appName, version: app.meta.version || app.version, //TODO only use meta id: appId, + // is this application running or not running: Matrix.activeApplications.some((a) => { return (a.name === appName); }) @@ -515,10 +530,7 @@ function onlineSetup(callback) { debug('Trying to install: ' + appName.yellow); Matrix.service.manager.stop(appName, function (err, appStopped) { Matrix.service.manager.install(installOptions, function (err) { - debug('Finished index install'); console.log(appName, installOptions.version, 'installed from', installOptions.url); - //TODO Start the app if it was running before deployment? - //if (appStopped) Matrix.service.manager.start(appName); }); }); }); @@ -527,6 +539,7 @@ function onlineSetup(callback) { } }); + // continue setup cb(); }, @@ -566,8 +579,8 @@ function onlineSetup(callback) { else error('MXSS Unavailable'.red); // MALOS - if (malosInfoOut.length > 0) log('MALOS COMPONENTS', malosInfoOut); - else error('MALOS Unavailable'.red); + if (malosInfoOut.length > 0) log('CORE COMPONENTS', malosInfoOut); + else error('MALOS/CORE Unavailable'.red); // MOS log(Matrix.is.green.bold, '['.grey + Matrix.deviceId.grey + ']'.grey, 'ready'.yellow.bold); diff --git a/lib/device/drivers/led.js b/lib/device/drivers/led.js index ff7dcd96..4ad36296 100644 --- a/lib/device/drivers/led.js +++ b/lib/device/drivers/led.js @@ -1,7 +1,8 @@ var DeviceDriver, IODriver, component; - var loaderInt; +const debug = debugLog('led') + function stopLoader() { debug('Loader stopped'); if (loaderInt) clearInterval(loaderInt); diff --git a/lib/service/manager.js b/lib/service/manager.js index 28410abb..6d929f7b 100644 --- a/lib/service/manager.js +++ b/lib/service/manager.js @@ -81,13 +81,14 @@ function clearAppList(cb) { /** * install an application. fired from firebase change right now. * - * @param {} options Install options - * @param '' options.name Application name - * @param '' options.url Application URL to download - * @param '' options.version SEMVER. Multiple versions are not supported. - * @param '' options.running Start this application after installing - * @param {Function} cb [description] - * @return {[type]} [description] + * @param {Object} options Install options + * @param {String} options.name Application name + * @param {String} options.url Application URL to download + * @param {String} options.version SEMVER. Multiple versions are not supported. + * @param {Boolean} options.running Start this application after installing + * @param {InstallCallback} cb + * @callback InstallCallback + * @param {String} error */ function installApp(options, cb) { debug('Install>', options); diff --git a/package.json b/package.json index e1d4c3af..e445416e 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,7 @@ "matrix-eventfilter": "https://github.com/matrix-io/matrix-eventfilter/tarball/master", "matrix-firebase": "https://github.com/matrix-io/matrix-firebase/tarball/master", "matrix-node-sdk": "https://github.com/matrix-io/matrix-node-sdk/tarball/master", - "matrix-protos": "0.0.17", + "matrix-protos": "^0.0.17", "mic": "^2.1.1", "mocha": "^2.4.5", "nedb": "https://github.com/matrix-io/nedb/tarball/master", From 9ab59460a8d733d52c7926677839665601af536f Mon Sep 17 00:00:00 2001 From: Sean Canton Date: Mon, 16 Oct 2017 08:08:13 -0700 Subject: [PATCH 22/42] test progress --- index.js | 2 +- lib/service/application.js | 71 +++++++++++++++++++++------- lib/service/component.js | 11 +++-- lib/service/firebase.js | 4 ++ lib/service/index.js | 7 ++- lib/service/stream.js | 96 ++++++++++++++++++++++++++++++-------- test/app.test.js | 1 + 7 files changed, 148 insertions(+), 44 deletions(-) diff --git a/index.js b/index.js index fdb0cf8d..eb060933 100644 --- a/index.js +++ b/index.js @@ -596,7 +596,7 @@ function onlineSetup(callback) { console.log('MATRIX OS can be upgraded.'.yellow, Matrix.latestVersion, 'available!'.yellow, Matrix.version); } - // CLI uses IPC for tests + // CLI uses IPC for tests, will boot MOS with send method if (process.hasOwnProperty('send')) process.send({ 'matrix-ready': true }); if (process.env.hasOwnProperty('REPL')) { diff --git a/lib/service/application.js b/lib/service/application.js index 281dbdd1..4ea06795 100644 --- a/lib/service/application.js +++ b/lib/service/application.js @@ -16,7 +16,8 @@ var configHelper = require('matrix-app-config-helper'); * @property { object } policy - runtime policy * * @method setRuntimeStatus - set to 'active', 'inactive' or 'error' - * @method clearConfig - remove firebase configuration + * @method + * // used?clearConfig - remove firebase configuration * @method validateConfig - make sure configuration is valid * * @todo @method activate - communicate with activeApplications @@ -41,9 +42,13 @@ function Application(name, cb) { var fb = Matrix.service.firebase; self.name = name; + // config stores the contents of config.yaml self.config = {}; + // stores the policy object as nested objects and bools + // ex. policy = { sensors : {temperature: true}} self.policy = {}; + // set app status on firebase, used on install / deploy / start / stop / error self.setRuntimeStatus = function (status) { if (self.hasOwnProperty('appId') && !_.isUndefined(self.appId) && !_.isUndefined(status)) { fb.app.setStatus(self.appId, status); @@ -64,17 +69,17 @@ function Application(name, cb) { if (_.isUndefined(self.appId)) { return console.error('No appId defined for syncConfig'); } - + // todo: check for validation if (config.validated === true && self.name === config.name) { if (_.isObject(config) || !_.isFunction(config)) { - + // if config sent, update fb, event will populate file change saveAppConfig(self.appId, config, cb); self.config = config; } else { cb = config; - // no obj sent - send local + // no config from fb - send local saveAppConfig(self.appId, self.config, cb); } } else { @@ -93,8 +98,9 @@ function Application(name, cb) { } } }; - + // check firebase, or use local file + // default is to use firebase, and if it doesn't exist, use config.json self.getConfig = function (cb) { debug(self.name.blue, '(fb)->(config)'); if (_.isUndefined(cb)) { @@ -109,14 +115,14 @@ function Application(name, cb) { debug('Fallback to file. No Policy / ID Available.'); // no record in FB. read local? self.config = self.getConfigFromFile(); - - } else { debug('Using FB Config'); + + // validated is a field added by app-config-helper after populating and validating the config if (resp.validated) { debug('FB Configuration Validated'); - // check for validity + // check again for validity on app start var valid = configHelper.validate(resp); if (!valid) { @@ -127,16 +133,19 @@ function Application(name, cb) { self.config = resp; cb(err, self.config); } else { + // need to put meta back into config to validate + // stripped out and put on another node in fb fb.app.getMeta(self.appId, function (err, meta) { _.merge(meta, resp); - // populate config + // validate self.config = configHelper.validate(resp); if (self.config === false) { console.warn('Invalid Configuration from Firebase. File Fallback.', resp); - // if bad config in firebase, refresh from file and validate + + // if bad config in firebase, refresh from file and try again var fileConfig = self.getConfigFromFile(); self.config = configHelper.validate(fileConfig); @@ -163,11 +172,12 @@ function Application(name, cb) { }); }; - +// not used self.initCV = function () { Matrix.service.ves.spawn(); }; + // used? self.validateConfig = function (config) { if (config.name !== self.name) { return new Error('Configuration name needs to match application name.'); @@ -203,10 +213,12 @@ function Application(name, cb) { // }) }; + // this is called after all methods are defined. unlike other init methods, this is not called on boot function init(cb) { debug('init:', self.name); + // need id to reference future FB commands fb.app.getIDForName(self.name, function (err, appId) { if (err) return console.error(err); @@ -222,11 +234,12 @@ function Application(name, cb) { debug('config=>', config); self.config = config; - self.sensors = config.sensors; + self.sensors = ( config.hasOwnProperty('sensors') ) ? config.sensors : []; // these are used to map messages back to apps - self.services = config.services; - self.integrations = config.integrations; + self.services = ( config.hasOwnProperty('services') ? config.services : []; + self.integrations = (config.hasOwnProperty('integrations')) ? config.integrations : []; + // parse config.services to find valid terms for `matrix.service(term)` self.validInitServiceCmds = _.reduce(config.services, (names, params) => { // params = engine: detection, type: face var add = names; @@ -239,10 +252,9 @@ function Application(name, cb) { } } if (_.compact(add).length !== add.length) { - console.warn('undefined service name init', add); + console.warn('undefined service name initialized', add); } - return add; }, []); @@ -255,6 +267,7 @@ function Application(name, cb) { }); }, + // Policy determines which device services and sensors are made explicitly available for users. function policy(cba) { fb.app.getPolicy(self.appId, function (err, policy) { if (err) return cba(err); @@ -264,9 +277,8 @@ function Application(name, cb) { // for whatever reason, there is no policy written to firebase } - self.policy = policy; - debug(self.policy); + debug('==== policy ===== vvvv'); // if no fb record, default to file self.sensorList = _.keys(_.pickBy(self.policy.sensors, function (v) { return v; })); self.integrationList = _.keys(_.pickBy(self.policy.integrations, function (v) { return v; })); @@ -288,15 +300,28 @@ function Application(name, cb) { } + // interface for stopping apps self.stop = function () { Matrix.service.manager.stop(name); }; + // fire it off when ready init(cb); + // return this object to manager.js for use in Matrix.activeApplications return self; } +/** + * Write application configuration object to fb + * @param {string} appId - application ID in firebase. + * @param {} config - configuration object to write + * @param {WriteCallback} cb + * @callback WriteCallback - from firebase + * @param {Error} err + * @param {FirebaseObject} - descriptor for use with firebase, don't use, abstracted via matrix-firebase + */ + function saveAppConfig(appId, config, cb) { debug('(config)->[FB]', appId.blue); var fb = Matrix.service.firebase; @@ -304,6 +329,16 @@ function saveAppConfig(appId, config, cb) { fb.app.setConfig(appId, config, cb); } +/** + * write config object to application config.yaml + * @param {String} name + * @param {Configuration} config + * @param {WriteAppCallback} cb + * @callback WriteAppCallback + * @param {Error} err Error + * @param {fs} - file descriptor + */ + function writeAppConfigFile(name, config, cb) { var configFile = Matrix.config.path.apps + '/' + name + '.matrix/config.yaml'; config = yaml.safeDump(config); diff --git a/lib/service/component.js b/lib/service/component.js index b3e14beb..f4ab490f 100644 --- a/lib/service/component.js +++ b/lib/service/component.js @@ -29,7 +29,7 @@ * */ -// Pass second option for override. ie. servo / gpio +// Pass second option for component driver override. ie. servo / gpio module.exports = function (options, driver) { var self = this; @@ -87,6 +87,8 @@ module.exports = function (options, driver) { self.sockets.ping.send(''); }; + // attach a listener to the socket, pass data to driver read method + // NOTE: read will only be called on a component if a read function is defined in the driver self.read = function (cb) { self.debug('] read init'); self.sockets.read.subscribe(''); @@ -97,7 +99,7 @@ module.exports = function (options, driver) { }); }; - // For async read processing - recog services + // For async read processing - used with grpc services self.readAsync = function (cb) { self.debug('] read async init'); self.sockets.read.subscribe(''); @@ -105,7 +107,8 @@ module.exports = function (options, driver) { self.driver.read(data, cb); }); }; - + + // similiar to read above, except on error port self.error = function (cb) { self.debug('error init'); self.sockets.error.subscribe(''); @@ -126,7 +129,7 @@ module.exports = function (options, driver) { self.sockets.config.send(config); }; + // expose this component to the global space Matrix.components[self.name] = self; - return self; }; \ No newline at end of file diff --git a/lib/service/firebase.js b/lib/service/firebase.js index 778370ce..1bb176f5 100644 --- a/lib/service/firebase.js +++ b/lib/service/firebase.js @@ -1,3 +1,7 @@ +/** + * Load matrix-firebase module into Matrix.service.firebase; + */ + var firebase = require('matrix-firebase'); module.exports = firebase; diff --git a/lib/service/index.js b/lib/service/index.js index 6fee4e2b..4543362f 100644 --- a/lib/service/index.js +++ b/lib/service/index.js @@ -1,5 +1,7 @@ -//* The server we're running -// +/** + * index loads all files in service and makes their exports available on Matrix.service + * Also calls init() if it exists on the service + */ var f = {}; var debug = debugLog('matrix'); @@ -22,6 +24,7 @@ var debug = debugLog('matrix'); f.init = function(){ for (var i in f){ + // skips firebase init for until after tokens are available if( f[i].init && i !== 'firebase' ){ f[i].init(); debug('service init:'.blue, i); diff --git a/lib/service/stream.js b/lib/service/stream.js index 5636357a..a161d5c2 100644 --- a/lib/service/stream.js +++ b/lib/service/stream.js @@ -1,3 +1,10 @@ +/** + * Matrix.service.stream is concerned with establishing and maintaining a WebSocket connection to the Streaming Server (MXSS) + * A progressive rolloff is implemented for connection timeouts. + * The connection is initialized after the device token is retrieved. @see index + * Events coming from the WebSocket connection are relayed into the Matrix.events emitter + */ + var url = require('url'); var socket; @@ -29,6 +36,10 @@ function success() { Matrix.registerOK = true; } +/** + * There was a problem connecting to the MXSS + * @param {*} data + */ function streamError(data) { console.error('Auth Error to MXSS', data); closeSocket(); @@ -58,17 +69,27 @@ function streamError(data) { } } +/* Used to distribute app logs to clients */ function streamLog(data) { socketEmit('app-log', data); } +/** + * First MXSS try failed, this is recursed until a connection is made + * Connections are increasingly staggered, max 1 hour + */ function startSocketWatch() { debug('Start Socket Watch'); - Matrix.config.socketCheckDelay = Math.round(Matrix.config.socketCheckDelay * 2); + Matrix.config.socketCheckDelay = Math.min(1000*60*60, Math.round(Matrix.config.socketCheckDelay * 2)); debug('Socket Watch', Matrix.config.socketCheckDelay); + + //TODO: validate that this works properly _.delay(checkStreamingServer, Matrix.config.socketCheckDelay, stopSocketWatch); } +/** + * we have made a successful connection, reset the socket reconnection logic + */ function stopSocketWatch() { debug('Stop Socket Watch'); @@ -76,11 +97,17 @@ function stopSocketWatch() { clearTimeout(Matrix.socketWatcher); } +/** + * self reference for easy coding, and versatility with callback handling + */ function checkStreamingServer(cb) { if (_.isUndefined(cb)) cb = function () { }; return Matrix.service.stream.initSocket(cb); } +/** + * first step of MXSS connection is to determine socket state + */ function checkSocket(cb) { if (_.isUndefined(socket)) { @@ -101,6 +128,9 @@ function checkSocket(cb) { }); } +/** + * kick this beast off + */ function initSocket(cb) { if (_.isUndefined(Matrix.deviceToken)) { return error('Device Token:'.grey, Matrix.deviceToken, @@ -113,10 +143,11 @@ function initSocket(cb) { var socketError; var callbackCalled = false; + // populated from config/env or env vars var sUrl = url.parse(Matrix.streamingServer); sUrl.protocol = 'wss'; - if (Matrix.env === 'hardcode') sUrl.protocol = 'ws'; + if (Matrix.env === 'hardcode') sUrl.protocol = 'ws'; // ips generally don't use https if (Matrix.env === 'local') sUrl.protocol = 'http'; // for local dev sUrl.pathname = 'engine.io'; @@ -127,11 +158,12 @@ function initSocket(cb) { debug('Init Streaming Server:'.green, url.format(sUrl)); // socket = require('engine.io-client')(url.format(sUrl)); - // Try to avoid making more then one of these. + // Try to avoid making more then one of these. Scoped to file. socket = require('engine.io-client')(url.format(sUrl), { transports: ['websocket', 'polling'], }); + // socket initialization, this is called once socket.on('open', function () { debug('Socket Server Connected:'.blue, Matrix.streamingServer, socket.id); // socket.removeAllListeners(); @@ -143,6 +175,7 @@ function initSocket(cb) { cb(); // continue init } + // socket message, this is called many many times socket.on('message', function (msg) { try { msg = JSON.parse(msg); @@ -150,14 +183,18 @@ function initSocket(cb) { error(e); } - debug('SS>', msg.channel, ':', msg.payload); + debug('SS>[M]', msg.channel, ':', msg.payload); // handled in event/server.js + // TODO: filter message, only pass valid channels Matrix.events.emit(msg.channel, msg); }); }); + /** + * for whatever reason, the socket closes. this is how we handle it. + */ socket.on('close', function () { debug('socket close: ', socket.id); Matrix.socket = null; @@ -190,10 +227,12 @@ function closeSocket() { socket.close(); } +/** majority of the traffic is this one */ function sendDataPoint(data) { sendToSocket('app-emit', data); } +/** cross talk */ function sendAppEvent(data) { sendToSocket('app-event', data); } @@ -228,10 +267,10 @@ function unifyObject(data) { // Sends to Streaming Service 'app-emit' function sendToSocket(channel, data) { - //TODO add a cb? + //TODO add a cb? this should be part of the ack logic var cb = function () { }; //Fake cb - //TODO: Switch over to unified object + //TODO: Switch over to unified object. 10-15-17 is this still happening? -sc if (process.env.UNIFIED === true) data = unifyObject(data); // Unified Object // Save data and return if socket is down @@ -248,7 +287,7 @@ function sendToSocket(channel, data) { var send = true; // Deliver other pending data - // TODO: move to after register + // TODO: copy to after register Matrix.db.pending.find({ type: channel }, { _id: 0 }, function (err, points) { @@ -267,24 +306,31 @@ function sendToSocket(channel, data) { }); }); - - if (channel === 'app-emit') { // only throttle app data + // THROTTLE DATA POINTS + if (channel === 'app-emit') { + // only throttle app data var d = Date.now(); - if (d - Matrix.lastWriteTime >= Matrix.rateLimit) { // has > n milliseconds elapsed from last write? if yes then it has been n number of seconds + + if (d - Matrix.lastWriteTime >= Matrix.rateLimit) { + // has > n milliseconds elapsed from last write? if yes then it has been n number of seconds debug('not too fast'); - if (Matrix.sendCache.length > 0) { // do we have a cache or not? + if (Matrix.sendCache.length > 0) { + // do we have a cache or not? debug('[M]->SS cache rollup >>>'); - data = _.map(Matrix.sendCache, 'payload'); // we have a cache, enough time has elapsed to write it, data = [ payloads ] + data = _.map(Matrix.sendCache, 'payload'); + // we have a cache, enough time has elapsed to write it, data = [ payload, payload... ] Matrix.sendCache = []; } + + //reset the timer for last write, as we're going to write in the next step Matrix.lastWriteTime = d; } else { send = false; // data is coming too quick! add to cache - debug('too fast', d - Matrix.lastWriteTime, ' ms elapsed write to streaming cache', Matrix.sendCache.length); + debug('too fast', d - Matrix.lastWriteTime, ' ms elapsed write to streaming cache. rec#', Matrix.sendCache.length); } } @@ -297,7 +343,7 @@ function sendToSocket(channel, data) { socketEmit(channel, data); } else { // Store in cache - debug('[M]->SS cache save'); + debug('[M]->cache'.green); Matrix.sendCache.push({ channel: channel, payload: data }); // } @@ -306,11 +352,15 @@ function sendToSocket(channel, data) { }); } +// timeout to send cache, setup on stream load, +// makes sure we write every 15 seconds no matter what var writeSendCacheInterval = setInterval(function () { - if (Matrix.sendCache.length > 0) { // do we have a cache or not? + if (Matrix.sendCache.length > 0) { + // do we have a cache or not? debug('[M]->SS write stale send cache #', Matrix.sendCache.length); - var data = _.map(Matrix.sendCache, 'payload'); // we have a cache, enough time has elapsed to write it, data = [ payloads ] - // only app-eimts are cached + // we have a cache, enough time has elapsed to write it, data = [ payloads ] + var data = _.map(Matrix.sendCache, 'payload'); + // only app-emits are cached, this will send as [], triggers bulk mode socketEmit('app-emit', data); Matrix.sendCache = []; } @@ -328,18 +378,21 @@ function persistCache(cb) { // After device-auth, do device-register to handle data / events function registerDevice(opts) { - debug('Auth OK'); + debug('Auth OK. Registering...'.yellow); + + // make sure we havn't been kicked off during auth checkSocket(function (err, status) { if (err || !status) return; // how many seconds between app emits, optimally + // TODO: make MXSS support sending this if (_.has(opts, 'rateLimit')) { Matrix.rateLimit = opts.rateLimit; } socketEmit('device-register', { deviceId: Matrix.deviceId, - //TODO: Now we're sending app configs on app start, depreciate + //TODO: Now we're sending configs on app start, depreciate this applicationConfigs: true }); @@ -348,6 +401,11 @@ function registerDevice(opts) { } +/** + * pretty damn important for being at the end of the file + * writes to the socket using a standardized format + * @example { channel: 'app-emit', payload: {foo: 'bar'}} + */ function socketEmit(channel, payload) { if (socket && socket.connected) { diff --git a/test/app.test.js b/test/app.test.js index 1929ef19..db085fa5 100644 --- a/test/app.test.js +++ b/test/app.test.js @@ -33,6 +33,7 @@ describe('Matrix Applications', function () { }); it('should save a reference to the sensors', function (done) { appRecord.should.have.property('sensors'); + log(appRecord); appRecord.sensors[0].should.equal('temperature'); done(); }); From 3082cdbc7b03d90f660d8278d595a8fba5b061be Mon Sep 17 00:00:00 2001 From: Sean Canton Date: Mon, 16 Oct 2017 08:30:18 -0700 Subject: [PATCH 23/42] update readme --- DEVELOPERS.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/DEVELOPERS.md b/DEVELOPERS.md index faca7e8a..7939fd44 100644 --- a/DEVELOPERS.md +++ b/DEVELOPERS.md @@ -261,6 +261,13 @@ vim -nb or :nbs from inside vim Be sure to deploy `test/fixtures/test.matrix` to the device you are going to use. You can run `matrix deploy` from inside the folder. We have to install the application vs manually copy it so there are firebase records created. +``` +cd test/fixtures/test.matrix/ +matrix deploy +cd ../../../ +npm test +``` + ## Maintainers Sean Canton From a2f287b254fddc9a2e6fa1466f43df48f75ce06a Mon Sep 17 00:00:00 2001 From: Sean Canton Date: Mon, 16 Oct 2017 12:32:06 -0700 Subject: [PATCH 24/42] tests pass zigbee woot --- lib/device/drivers/zigbee.js | 9 +- lib/service/application.js | 14 ++-- package-lock.json | 154 +++++++++++++++++------------------ 3 files changed, 92 insertions(+), 85 deletions(-) diff --git a/lib/device/drivers/zigbee.js b/lib/device/drivers/zigbee.js index fa0fe43a..b33f022a 100644 --- a/lib/device/drivers/zigbee.js +++ b/lib/device/drivers/zigbee.js @@ -100,6 +100,10 @@ module.exports = { self.errors = []; + debug('>>> cmds', cmds) + debug('>>> params', params) + debug('>>> enums', enums) + // indicate a device. takes index for now. use object later self.device = function (i) { var i = i || 0; @@ -240,18 +244,19 @@ module.exports = { self.movetosat = function () { }; self.movetohueandsat = function () { }; + // ZigbeeDriver.ZigBeeMsg.NetworkMgmtCmd self.check = function () { cmds.net.type = enums.netTypes.IS_PROXY_ACTIVE; __net(); }; self.reset = function () { - cmds.net.type(enums.netTypes.RESET_PROXY); + cmds.net.type = enums.netTypes.RESET_PROXY; __net(); }; self.status = function () { - cmds.net.type(enums.netTypes.NETWORK_STATUS); + cmds.net.type = enums.netTypes.NETWORK_STATUS; __net(); }; diff --git a/lib/service/application.js b/lib/service/application.js index 4ea06795..16a893ea 100644 --- a/lib/service/application.js +++ b/lib/service/application.js @@ -5,6 +5,7 @@ var debug = debugLog('Application'); var configHelper = require('matrix-app-config-helper'); + /** * Application is a class to make applications. * @constructor @@ -69,11 +70,11 @@ function Application(name, cb) { if (_.isUndefined(self.appId)) { return console.error('No appId defined for syncConfig'); } - + // todo: check for validation if (config.validated === true && self.name === config.name) { if (_.isObject(config) || !_.isFunction(config)) { - + // if config sent, update fb, event will populate file change saveAppConfig(self.appId, config, cb); self.config = config; @@ -98,7 +99,7 @@ function Application(name, cb) { } } }; - + // check firebase, or use local file // default is to use firebase, and if it doesn't exist, use config.json self.getConfig = function (cb) { @@ -172,7 +173,7 @@ function Application(name, cb) { }); }; -// not used + // not used self.initCV = function () { Matrix.service.ves.spawn(); }; @@ -234,9 +235,9 @@ function Application(name, cb) { debug('config=>', config); self.config = config; - self.sensors = ( config.hasOwnProperty('sensors') ) ? config.sensors : []; + self.sensors = (config.hasOwnProperty('sensors')) ? config.sensors : []; // these are used to map messages back to apps - self.services = ( config.hasOwnProperty('services') ? config.services : []; + self.services = (config.hasOwnProperty('services')) ? config.services : []; self.integrations = (config.hasOwnProperty('integrations')) ? config.integrations : []; // parse config.services to find valid terms for `matrix.service(term)` @@ -361,6 +362,7 @@ function updateConfigKey(options, cb) { } // Go through list of integrations and activate +// TODO: Expand this list as able. zwave, etc function activateIntegrations(integrations) { debug('activating integrations', integrations); if (!_.isUndefined(integrations) && integrations.indexOf('zigbee') !== 1) { diff --git a/package-lock.json b/package-lock.json index c34bd926..d05f81b9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -68,6 +68,29 @@ "resolved": "https://registry.npmjs.org/@types/node/-/node-7.0.43.tgz", "integrity": "sha512-7scYwwfHNppXvH/9JzakbVxk0o0QUILVk1Lv64GRaxwPuGpnF1QBiwdvhDpLcymb8BpomQL3KYoWKq3wUdDMhQ==" }, + "Base64": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/Base64/-/Base64-0.2.1.tgz", + "integrity": "sha1-ujpCMHCOGGcFBl5mur3Uw1z2ACg=" + }, + "JSONStream": { + "version": "0.8.4", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-0.8.4.tgz", + "integrity": "sha1-kWV9/m/4V0gwZhMrRhi2Lo9Ih70=", + "requires": { + "jsonparse": "0.0.5", + "through": "2.3.8" + } + }, + "MD5": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/MD5/-/MD5-1.2.2.tgz", + "integrity": "sha1-2QPI7FuiI80rgEMoJIgdBLuYQcA=", + "requires": { + "charenc": "0.0.2", + "crypt": "0.0.2" + } + }, "accessory": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/accessory/-/accessory-1.1.0.tgz", @@ -270,11 +293,6 @@ "resolved": "https://registry.npmjs.org/base62/-/base62-0.1.1.tgz", "integrity": "sha1-e0F0wvlESXU7EcJlHAg9qEGnsIQ=" }, - "Base64": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/Base64/-/Base64-0.2.1.tgz", - "integrity": "sha1-ujpCMHCOGGcFBl5mur3Uw1z2ACg=" - }, "base64-arraybuffer": { "version": "0.1.5", "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.5.tgz", @@ -398,10 +416,10 @@ "resolved": "https://registry.npmjs.org/browser-pack/-/browser-pack-3.2.0.tgz", "integrity": "sha1-+qHLxBSHsazEdH43PhFIrf/Q4tk=", "requires": { + "JSONStream": "0.8.4", "combine-source-map": "0.3.0", "concat-stream": "1.4.10", "defined": "0.0.0", - "JSONStream": "0.8.4", "through2": "0.5.1", "umd": "2.1.0" }, @@ -453,6 +471,7 @@ "resolved": "https://registry.npmjs.org/browserify/-/browserify-6.3.4.tgz", "integrity": "sha1-V7XRlcxWgTnpcTAuXNnVjdr7VNg=", "requires": { + "JSONStream": "0.8.4", "assert": "1.1.2", "browser-pack": "3.2.0", "browser-resolve": "1.11.2", @@ -476,7 +495,6 @@ "inherits": "2.0.3", "insert-module-globals": "6.6.3", "isarray": "0.0.1", - "JSONStream": "0.8.4", "labeled-stream-splicer": "1.0.2", "module-deps": "3.9.1", "os-browserify": "0.1.2", @@ -966,11 +984,6 @@ "through2": "1.1.1" }, "dependencies": { - "jsonparse": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", - "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=" - }, "JSONStream": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.1.tgz", @@ -979,6 +992,11 @@ "jsonparse": "1.3.1", "through": "2.3.8" } + }, + "jsonparse": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", + "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=" } } }, @@ -2152,14 +2170,6 @@ } } }, - "string_decoder": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", - "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", - "requires": { - "safe-buffer": "5.1.1" - } - }, "string-width": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", @@ -2170,6 +2180,14 @@ "strip-ansi": "3.0.1" } }, + "string_decoder": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "requires": { + "safe-buffer": "5.1.1" + } + }, "stringstream": { "version": "0.0.5", "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", @@ -2509,16 +2527,25 @@ "resolved": "https://registry.npmjs.org/insert-module-globals/-/insert-module-globals-6.6.3.tgz", "integrity": "sha1-IGOOKaMPntHKLjqCX7wsulJG3fw=", "requires": { + "JSONStream": "1.3.1", "combine-source-map": "0.6.1", "concat-stream": "1.4.10", "is-buffer": "1.1.5", - "JSONStream": "1.3.1", "lexical-scope": "1.2.0", "process": "0.11.10", "through2": "1.1.1", "xtend": "4.0.1" }, "dependencies": { + "JSONStream": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.1.tgz", + "integrity": "sha1-cH92HgHa6eFvG8+TcDt4xwlmV5o=", + "requires": { + "jsonparse": "1.3.1", + "through": "2.3.8" + } + }, "combine-source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.6.1.tgz", @@ -2548,15 +2575,6 @@ "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=" }, - "JSONStream": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.1.tgz", - "integrity": "sha1-cH92HgHa6eFvG8+TcDt4xwlmV5o=", - "requires": { - "jsonparse": "1.3.1", - "through": "2.3.8" - } - }, "process": { "version": "0.11.10", "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", @@ -2687,15 +2705,6 @@ "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-0.0.5.tgz", "integrity": "sha1-MwVCrT8KZUZlt3jz6y2an6UHrGQ=" }, - "JSONStream": { - "version": "0.8.4", - "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-0.8.4.tgz", - "integrity": "sha1-kWV9/m/4V0gwZhMrRhi2Lo9Ih70=", - "requires": { - "jsonparse": "0.0.5", - "through": "2.3.8" - } - }, "jsonwebtoken": { "version": "5.7.0", "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-5.7.0.tgz", @@ -2918,7 +2927,7 @@ }, "matrix-firebase": { "version": "https://github.com/matrix-io/matrix-firebase/tarball/master", - "integrity": "sha1-s76AzAp7KMDcUF6egff3i8//KdY=", + "integrity": "sha1-nCZhR3vwF/c/8GD7zlWzN7oU1Vg=", "requires": { "async": "2.5.0", "colors": "1.1.2", @@ -3129,6 +3138,15 @@ "xunit-file": "0.0.6" }, "dependencies": { + "JSONStream": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.1.tgz", + "integrity": "sha1-cH92HgHa6eFvG8+TcDt4xwlmV5o=", + "requires": { + "jsonparse": "1.3.1", + "through": "2.3.8" + } + }, "assert": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/assert/-/assert-1.3.0.tgz", @@ -3152,9 +3170,9 @@ "resolved": "https://registry.npmjs.org/browser-pack/-/browser-pack-5.0.1.tgz", "integrity": "sha1-QZdxmyDG4KqglFHFER5T77b7wY0=", "requires": { + "JSONStream": "1.3.1", "combine-source-map": "0.6.1", "defined": "1.0.0", - "JSONStream": "1.3.1", "through2": "1.1.1", "umd": "3.0.1" } @@ -3164,6 +3182,7 @@ "resolved": "https://registry.npmjs.org/browserify/-/browserify-11.2.0.tgz", "integrity": "sha1-oRu53SCdeVcrgT9+7q+Cil9cDk4=", "requires": { + "JSONStream": "1.3.1", "assert": "1.3.0", "browser-pack": "5.0.1", "browser-resolve": "1.11.2", @@ -3187,7 +3206,6 @@ "inherits": "2.0.3", "insert-module-globals": "6.6.3", "isarray": "0.0.1", - "JSONStream": "1.3.1", "labeled-stream-splicer": "1.0.2", "module-deps": "3.9.1", "os-browserify": "0.1.2", @@ -3312,15 +3330,6 @@ "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=" }, - "JSONStream": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.1.tgz", - "integrity": "sha1-cH92HgHa6eFvG8+TcDt4xwlmV5o=", - "requires": { - "jsonparse": "1.3.1", - "through": "2.3.8" - } - }, "minimatch": { "version": "2.0.10", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz", @@ -3446,15 +3455,6 @@ } } }, - "MD5": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/MD5/-/MD5-1.2.2.tgz", - "integrity": "sha1-2QPI7FuiI80rgEMoJIgdBLuYQcA=", - "requires": { - "charenc": "0.0.2", - "crypt": "0.0.2" - } - }, "md5.js": { "version": "1.3.4", "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.4.tgz", @@ -3603,11 +3603,11 @@ "resolved": "https://registry.npmjs.org/mockfirebase/-/mockfirebase-0.12.0.tgz", "integrity": "sha1-chLO10WH9iJTaHsGU3HqqgVWfhs=", "requires": { + "MD5": "1.2.2", "browserify": "6.3.4", "browserify-shim": "3.8.14", "firebase-auto-ids": "1.1.0", - "lodash": "2.4.2", - "MD5": "1.2.2" + "lodash": "2.4.2" }, "dependencies": { "lodash": { @@ -3622,13 +3622,13 @@ "resolved": "https://registry.npmjs.org/module-deps/-/module-deps-3.9.1.tgz", "integrity": "sha1-6nXK+RmQkNJbDVUStaysuW5/h/M=", "requires": { + "JSONStream": "1.3.1", "browser-resolve": "1.11.2", "concat-stream": "1.4.10", "defined": "1.0.0", "detective": "4.5.0", "duplexer2": "0.0.2", "inherits": "2.0.3", - "JSONStream": "1.3.1", "parents": "1.0.1", "readable-stream": "1.1.14", "resolve": "1.4.0", @@ -3638,6 +3638,15 @@ "xtend": "4.0.1" }, "dependencies": { + "JSONStream": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.1.tgz", + "integrity": "sha1-cH92HgHa6eFvG8+TcDt4xwlmV5o=", + "requires": { + "jsonparse": "1.3.1", + "through": "2.3.8" + } + }, "defined": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", @@ -3648,15 +3657,6 @@ "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=" }, - "JSONStream": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.1.tgz", - "integrity": "sha1-cH92HgHa6eFvG8+TcDt4xwlmV5o=", - "requires": { - "jsonparse": "1.3.1", - "through": "2.3.8" - } - }, "parents": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parents/-/parents-1.0.1.tgz", @@ -4553,11 +4553,6 @@ "through2": "1.1.1" } }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" - }, "string-width": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", @@ -4568,6 +4563,11 @@ "strip-ansi": "3.0.1" } }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + }, "stringstream": { "version": "0.0.5", "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", From b3014f32bcb31f668dd27e96a3b01a81a05cb176 Mon Sep 17 00:00:00 2001 From: Sean Canton Date: Mon, 16 Oct 2017 16:28:14 -0700 Subject: [PATCH 25/42] change npm run watch --- lib/device/drivers/zigbee.js | 8 ++++---- package.json | 5 +++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/device/drivers/zigbee.js b/lib/device/drivers/zigbee.js index b33f022a..adbeaf0a 100644 --- a/lib/device/drivers/zigbee.js +++ b/lib/device/drivers/zigbee.js @@ -100,9 +100,9 @@ module.exports = { self.errors = []; - debug('>>> cmds', cmds) - debug('>>> params', params) - debug('>>> enums', enums) + // debug('>>> cmds', cmds) + // debug('>>> params', params) + // debug('>>> enums', enums) // indicate a device. takes index for now. use object later self.device = function (i) { @@ -244,7 +244,7 @@ module.exports = { self.movetosat = function () { }; self.movetohueandsat = function () { }; - // ZigbeeDriver.ZigBeeMsg.NetworkMgmtCmd + // cmds.net = ZigbeeDriver.ZigBeeMsg.NetworkMgmtCmd self.check = function () { cmds.net.type = enums.netTypes.IS_PROXY_ACTIVE; __net(); diff --git a/package.json b/package.json index e445416e..35e0d9ec 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,8 @@ "apphost-debug": "docker run -v `pwd`/apps:/apps -it matrix-apphost bash", "apphost-build": "docker build -t matrix-apphost -f Dockerfile-apphost-arm .", "upgrade": "npm update matrix-node-sdk matrix-app-config-helper matrix-firebase matrix-eventfilter pi-wifi", - "watch": "nodemon --exec npm run sync" + "watch": "nodemon --watch lib --exec npm run sync", + "watch-test": "nodemon --watch lib test --exec npm test" }, "author": "Sean Canton ", "contributors": [ @@ -72,4 +73,4 @@ "engines": { "node": ">=0.12.7 <=6.5" } -} +} \ No newline at end of file From 1c2fd634aab1c52d6065f24894519e6db2b82dd4 Mon Sep 17 00:00:00 2001 From: Sean Canton Date: Tue, 17 Oct 2017 10:34:14 -0700 Subject: [PATCH 26/42] Zb updates --- lib/device/drivers/zigbee.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/device/drivers/zigbee.js b/lib/device/drivers/zigbee.js index adbeaf0a..c86cda50 100644 --- a/lib/device/drivers/zigbee.js +++ b/lib/device/drivers/zigbee.js @@ -17,6 +17,7 @@ var enums = { }; function lookForBulbs(nodes) { + debug('looking for bulbs', nodes); var onoffs = _.filter(nodes, function (n) { return _.find(n.endpoints, function (e) { return _.find(e.clusters, function (c) { @@ -133,9 +134,10 @@ module.exports = { // Private Methods - // LEVEL 1 Assignments const __send = function () { + debug('zb send>', cmds.msg); config.zigbeeMessage = cmds.msg; if (activated && self.errors.length === 0) { - debug(require('util').inspect(DeviceDriver.DriverConfig.encode(config), { depth: null })); + // debug(require('util').inspect(DeviceDriver.DriverConfig.encode(config), { depth: null })); Matrix.components.zigbee.print(DeviceDriver.DriverConfig.encode(config).finish()); } else if (self.errors.length > 0) { console.error('Zigbee Command Errors:\n'.red, '->', self.errors.join('\n -> '.red)); @@ -261,7 +263,7 @@ module.exports = { }; self.permitJoin = function () { - cmds.net.type(enums.netTypes.PERMIT_JOIN); + cmds.net.type = enums.netTypes.PERMIT_JOIN; params.permitJoin.time = 60; cmds.net.permitJoinParams = params.permitJoin; __net(); From 65e4b046ec0a10995f87a67a39c1b27902120812 Mon Sep 17 00:00:00 2001 From: Sean Canton Date: Tue, 17 Oct 2017 18:35:29 -0700 Subject: [PATCH 27/42] zigbee working --- index.js | 2 +- lib/device/drivers/zigbee.js | 2 +- lib/service/component.js | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index eb060933..f4e6e5ec 100644 --- a/index.js +++ b/index.js @@ -146,7 +146,7 @@ Matrix.api.makeUrls(Matrix.apiServer); var malosInfoOut = ''; Matrix.device.malos.info(function (data) { - console.log(data); + // console.log(data); _.each(data.info, function (i) { malosInfoOut += ' ⚙ '.yellow + i.driverName.blue + ':' + i.basePort + ' | ' + i.notesForHuman.grey + '\n'; }); diff --git a/lib/device/drivers/zigbee.js b/lib/device/drivers/zigbee.js index c86cda50..987acd60 100644 --- a/lib/device/drivers/zigbee.js +++ b/lib/device/drivers/zigbee.js @@ -431,7 +431,7 @@ module.exports = { } }, error: function (err) { - console.error('Error', err.toString()); + console.error('Zigbee Error', err.toString()); }, cmd: Cmd, spin: function () { diff --git a/lib/service/component.js b/lib/service/component.js index f4ab490f..7c36a580 100644 --- a/lib/service/component.js +++ b/lib/service/component.js @@ -77,7 +77,7 @@ module.exports = function (options, driver) { //for leds + loader right now, write protos direct to socket self.print = function (configProto) { - // self.debug(']<-print', configProto); + self.debug(']<-print', configProto); self.sockets.send.send(configProto); }; @@ -107,7 +107,7 @@ module.exports = function (options, driver) { self.driver.read(data, cb); }); }; - + // similiar to read above, except on error port self.error = function (cb) { self.debug('error init'); From cdce68201b190f414babde88adad9cada4026e3d Mon Sep 17 00:00:00 2001 From: Sean Canton Date: Wed, 18 Oct 2017 10:31:10 -0700 Subject: [PATCH 28/42] progressZ --- lib/device/drivers/recognition.js | 64 +++++++++++++------------------ lib/service/grpc.js | 10 ++++- 2 files changed, 34 insertions(+), 40 deletions(-) diff --git a/lib/device/drivers/recognition.js b/lib/device/drivers/recognition.js index c39667a7..10a31717 100644 --- a/lib/device/drivers/recognition.js +++ b/lib/device/drivers/recognition.js @@ -65,40 +65,28 @@ function getAllTags(cb) { */ function startRecognitionService() { - // just in case if this is called before init - if (_.isUndefined(RecognitionRPC)) { - module.exports.init(); - } - - // add token to grpc headers for auth headers = new grpc.Metadata(); headers.add('authorization', 'Bearer ' + Matrix.deviceToken); - var credentials = grpc.credentials.createSsl(); - // we call this function many times, don't reinit the GRPC if it's already made - if (_.isUndefined(RecognitionRPCService)) { - var grpcClient = grpc.Client(HOST_ADDRESS, credentials); - - RecognitionRPCService = RecognitionRPC.create(function rpcImpl(fn, msg, cb) { - log(fn, RecognitionService.decode(msg), RecognitionRPCService, grpc) - cb('HI>>>') - grpcClient.makeUnaryRequest('GET', - function () { log('ser', arguments) }, function () { log('deser') }, headers, function () { log('cb', arguments) }) - }) - debug('>>>', grpcClient, RecognitionRPCService) + var credentials = grpc.credentials.createSsl(); + if (_.isUndefined(RecognitionService)) { + RecognitionService = new RecognitionRPC.RecognitionService( + HOST_ADDRESS, credentials + ); debug('RecognitionService:'.blue, HOST_ADDRESS, credentials); } - // not sure if this is used + return RecognitionService; } - /** - * Removes tags from database. Warning: Fails if there are > 500 points for a single tag. - * @exports delete - * @param {Array} tags - collection of tags to delete - */ + +/** + * Removes tags from database. Warning: Fails if there are > 500 points for a single tag. + * @exports delete + * @param {Array} tags - collection of tags to delete + */ function deleteTags(tags, cb) { debug('delete>', tags); if (_.isUndefined(tags)) { @@ -153,7 +141,7 @@ module.exports = { init: function () { VisionDriver = Matrix.service.protobuf.vision; - RecognitionRPC = Matrix.service.grpc.recognition.v1.recognitionService; + RecognitionRPC = Matrix.service.grpc.recognition; EyeDriver = Matrix.service.protobuf.malos.maloseye; RecognitionService = Matrix.service.protobuf.vision.recognition_service; @@ -185,7 +173,7 @@ module.exports = { * @param {protobuf} config - serialized command for MALOS/CORE */ - prepare: function (component, cb) { + prepare: function (component, cb) { if (_.isUndefined(VisionDriver)) { module.exports.init(); } @@ -222,10 +210,10 @@ module.exports = { console.warn('No mode specified, defaulting to recognize'); mode = modes.indexOf('RECOGNIZE'); } - - + + // parse tag and tags - + var targetTags = []; // make sure tags is ok if (_.has(options.tags) && !_.isArray(options.tags)) { @@ -243,20 +231,20 @@ module.exports = { if (_.has(options, 'tag') && _.has(options, 'tags')) { targetTags = options.tags.push(options.tag); } - + // reconcile mode with tags if (mode === modes.indexOf('TRAIN')) { trainingTags = targetTags; } else if (mode === modes.indexOf('RECOGNIZE')) { recognizeTags = targetTags; } - + // Component is not setup yet, so we have to print to MALOS via cb cb(DeviceDriver.DriverConfig.encode(config).finish()); // config is called next - startDetection, startRecognition - + }, - + // happens after preparation, see drivers/service.js /** * After prepare is called, config sets up the detection service, and the recognition listener. @@ -264,9 +252,9 @@ module.exports = { * @param {Object} options - not used */ config: function (options) { - + startRecognitionService(); - + // setup malos_eye_ var config = new DeviceDriver.DriverConfig; config.malosEyeConfig = new EyeDriver.MalosEyeConfig; @@ -274,8 +262,8 @@ module.exports = { config.malosEyeConfig.objectToDetect = []; config.malosEyeConfig.objectToDetect.push( EyeDriver.EnumMalosEyeDetectionType.FACE_DEMOGRAPHICS); - config.malosEyeConfig.objectToDetect.push( - EyeDriver.EnumMalosEyeDetectionType.FACE_DESCRIPTOR); + config.malosEyeConfig.objectToDetect.push( + EyeDriver.EnumMalosEyeDetectionType.FACE_DESCRIPTOR); Matrix.components.recognition.config(DeviceDriver.DriverConfig.encode(config).finish()); @@ -289,7 +277,7 @@ module.exports = { }); }, - + delete: deleteTags, /** diff --git a/lib/service/grpc.js b/lib/service/grpc.js index 4587fe1f..c62c4263 100644 --- a/lib/service/grpc.js +++ b/lib/service/grpc.js @@ -2,6 +2,12 @@ var grpc = require('grpc'); var protos = require('matrix-protos').proto; -var client = grpc.loadObject(protos, { protobufjsVersion: 6 }).matrix_io; +var client = grpc.loadObject(protos, { protobufjsVersion: 6 }).matrix_io; -module.exports = client; +// TODO: Parse versions for newest. Provide for stable vs building. + +module.exports = { + client: client, + recognition: client.recognition.v1.recognitionService, + vision: client.recognition.v1.visionService +}; From 2a72a6c53b47d34ee336c4ffe599f1b4c93eec4c Mon Sep 17 00:00:00 2001 From: Sean Canton Date: Wed, 18 Oct 2017 21:56:18 -0700 Subject: [PATCH 29/42] grpc working --- lib/device/drivers/recognition.js | 31 ++++++++++++++++++++----------- lib/service/grpc.js | 6 ++++-- proto | 2 +- 3 files changed, 25 insertions(+), 14 deletions(-) diff --git a/lib/device/drivers/recognition.js b/lib/device/drivers/recognition.js index 10a31717..061682c1 100644 --- a/lib/device/drivers/recognition.js +++ b/lib/device/drivers/recognition.js @@ -38,7 +38,7 @@ var modes = ['OFF', 'TRAIN', 'RECOGNIZE']; function getAllTags(cb) { startRecognitionService(); - RecognitionRPCService.getFeatureDescriptorTags({}, headers, function (err, res) { + RecognitionService.getFeatureDescriptorTags({}, headers, function (err, res) { if (err) return cb(err); if (res.hasOwnProperty('featureTagsForDevice')) { var tagData = res.featureTagsForDevice; @@ -64,6 +64,9 @@ function getAllTags(cb) { * this function is the keystone of completing a recognition data flow. */ function startRecognitionService() { + if (_.isUndefined(RecognitionRPC)) { + module.exports.init(); + } headers = new grpc.Metadata(); headers.add('authorization', 'Bearer ' + Matrix.deviceToken); @@ -71,7 +74,8 @@ function startRecognitionService() { var credentials = grpc.credentials.createSsl(); if (_.isUndefined(RecognitionService)) { - RecognitionService = new RecognitionRPC.RecognitionService( + debug(RecognitionRPC) + RecognitionService = new RecognitionRPC( HOST_ADDRESS, credentials ); debug('RecognitionService:'.blue, HOST_ADDRESS, credentials); @@ -144,7 +148,6 @@ module.exports = { RecognitionRPC = Matrix.service.grpc.recognition; EyeDriver = Matrix.service.protobuf.malos.maloseye; - RecognitionService = Matrix.service.protobuf.vision.recognition_service; RecognitionDriver = Matrix.service.protobuf.recognition; DeviceDriver = Matrix.service.protobuf.malos.driver; @@ -319,12 +322,18 @@ module.exports = { } // debug('read>', buffer); if (_.isUndefined(buffer) || mode === 0) { return; } - var result = new VisionDriver.VisionResult.decode(buffer); + try { + var result = new VisionDriver.VisionResult.decode(buffer); + } catch (e) { + cb(e); + } debug('>read', result) - if (result.vision_event.length > 0) { - _.each(result.vision_event, function (v) { + + + if (result.visionEvent.length > 0) { + _.each(result.visionEvent, function (v) { debug('>v_e', v.tag, v.trackingId); if (v.tag === 'TRACKING_START') { Matrix.service.track.add(v.trackingId); @@ -360,7 +369,7 @@ module.exports = { debug('>face_recog', recog.tag, tId); var descriptors = _.map(Matrix.service.track.getDescriptors(tId), function (d) { - var feature = new RecognitionRPC.FeatureDescriptor(); + var feature = new RecognitionDriver.FeatureDescriptor(); feature.tags = trainingTags; feature.data = d; return feature; @@ -369,7 +378,7 @@ module.exports = { Matrix.service.track.clearDescriptors(tId); debug('Send to RS Training > ', descriptors, trainingTags); - RecognitionService.storeFeatureDescriptors({ + RecognitionService.StoreFeatureDescriptors({ 'tags': trainingTags, 'feature_descriptors': descriptors, }, headers, function (err, res) { @@ -388,16 +397,16 @@ module.exports = { debug('recog', recog); var features = []; - var featureList = new RecognitionRPC.FeatureDescriptorList(); + var featureList = new RecognitionDriver.FeatureDescriptorList(); - var feature = new RecognitionRPC.FeatureDescriptor(); + var feature = new RecognitionDriver.FeatureDescriptor(); feature.data = recog.faceDescriptor; feature.tags = recognizeTags; features.push(feature); featureList.feature_descriptors = features; - RecognitionService.recognize({ + RecognitionService.Recognize({ featureDescriptorList: featureList }, headers, (e, recogs) => { if (e) return error(e); diff --git a/lib/service/grpc.js b/lib/service/grpc.js index c62c4263..396bc553 100644 --- a/lib/service/grpc.js +++ b/lib/service/grpc.js @@ -4,10 +4,12 @@ var grpc = require('grpc'); var protos = require('matrix-protos').proto; var client = grpc.loadObject(protos, { protobufjsVersion: 6 }).matrix_io; +log(client); + // TODO: Parse versions for newest. Provide for stable vs building. module.exports = { client: client, - recognition: client.recognition.v1.recognitionService, - vision: client.recognition.v1.visionService + recognition: client.recognition.v1.RecognitionService, + vision: client.vision.v1.VisionService }; diff --git a/proto b/proto index 59f72b78..d0eef5f6 160000 --- a/proto +++ b/proto @@ -1 +1 @@ -Subproject commit 59f72b786494b76eebfabfe7f1a06b4ff7d92f3a +Subproject commit d0eef5f60393b53a3704fbe3edb142487ae2d9f8 From 7e8b673e6bcb2012fa3badef551c49d9e8721233 Mon Sep 17 00:00:00 2001 From: Sean Canton Date: Thu, 19 Oct 2017 13:05:49 -0700 Subject: [PATCH 30/42] Recog progress. hit wall, need remote updates --- lib/device/drivers/recognition.js | 1 - lib/event/app.js | 74 +++++++++++++++---------------- package.json | 4 +- 3 files changed, 39 insertions(+), 40 deletions(-) diff --git a/lib/device/drivers/recognition.js b/lib/device/drivers/recognition.js index 061682c1..8474a3d2 100644 --- a/lib/device/drivers/recognition.js +++ b/lib/device/drivers/recognition.js @@ -74,7 +74,6 @@ function startRecognitionService() { var credentials = grpc.credentials.createSsl(); if (_.isUndefined(RecognitionService)) { - debug(RecognitionRPC) RecognitionService = new RecognitionRPC( HOST_ADDRESS, credentials ); diff --git a/lib/event/app.js b/lib/event/app.js index d7fc3d8b..37efb126 100644 --- a/lib/event/app.js +++ b/lib/event/app.js @@ -2,7 +2,7 @@ var debug = debugLog('app-event'); // Listen for global detection events sent to device, route to application via provided cb function setupCVHandlers(name, cb) { - var listener = function(data) { + var listener = function (data) { if (_.has(data, 'appName') && data.appName === name) { // Filter Data Points by Name cb(null, data); @@ -42,8 +42,8 @@ function handleDeviceEvent(event) { } module.exports = { - init: function() { - // Parse and Direct Data sent from Apps + init: function () { + // Parse and Direct Data sent from Apps Matrix.events.on('app-emit', function dataHandler(data) { debug('app(data)->[M]'.green, data); Matrix.service.stream.sendDataPoint(data.payload); @@ -53,16 +53,16 @@ module.exports = { }, setupCrosstalk: setupAppListeners, setupCVHandlers: setupCVHandlers, - closeProcessHandler: function(code, number) { + closeProcessHandler: function (code, number) { debug('App Close:', code, number); }, - exitProcessHandler: function(code, number, app) { + exitProcessHandler: function (code, number, app) { debug('App Exit:', name, code, number); - // references app.process from manager.js + // references app.process from manager.js var name = app.name; - _.remove(Matrix.activeApplications, function(activeProcess) { + _.remove(Matrix.activeApplications, function (activeProcess) { if (_.has(activeProcess, 'process')) { return activeProcess.process.pid === app.pid; } else { @@ -72,27 +72,27 @@ module.exports = { debugger; - // TODO: clean up listeners + // TODO: clean up listeners if (_.has(app, 'process.handlers') && !_.isEmpty(name)) { Matrix.events.removeListener('app-message', app.process.handlers.crosstalk); Matrix.events.removeListener('app-' + name + '-message', app.process.handlers.crosstalk); console.log('Event Listeners Removed', name); } - // TODO: stop VES instances on app exit + // TODO: stop VES instances on app exit console.warn('VES Instances yet not halted on app stop'); }, - // handle events coming from app - /** - * @param m - * @param m.type - event type - * @param m.payload - accompanying data - */ + // handle events coming from app + /** + * @param m + * @param m.type - event type + * @param m.payload - accompanying data + */ messageProcessHandler: function messageHandler(m) { - // debug('App Message Handler ->'.green, m) + // debug('App Message Handler ->'.green, m) - //lookup activeApplication record + //lookup activeApplication record var appRecord = Matrix.service.manager.getAppRecordForPid(this.pid); if (_.isUndefined(appRecord)) { @@ -104,21 +104,21 @@ module.exports = { var appConfig = appRecord.config; var appPolicy = appRecord.policy; - // don't show led debugs + // don't show led debugs if (m.type !== 'led-image') { debug('app('.green + appName.green + ')->'.green, m.type, m); } - //TODO: refactor #113965661 + //TODO: refactor #113965661 if (m.type === 'app-emit') { debug('== app-emit'.blue, m.payload); - // TODO: Hacky for demo. Type should be outside data - // m.payload.data.type = m.payload.data.type; + // TODO: Hacky for demo. Type should be outside data + // m.payload.data.type = m.payload.data.type; m.payload.appName = appName.toLowerCase(); m.payload.appVersion = appConfig.version || 0; - // Reroutes to dataHandler above via events + // Reroutes to dataHandler above via events Matrix.events.emit('app-emit', m); } else if (m.type === 'service-init') { @@ -145,7 +145,7 @@ module.exports = { } } else if (m.type === 'sensor-init') { - // policy lookup + // policy lookup if (_.has(process.env, 'CHECK_POLICY') && (!_.has(appPolicy.sensors, m.name) || appPolicy.sensors[m.name] === false)) { console.error(appName.grey, 'application policy does not allow', m.name, 'sensor'); } else { @@ -168,13 +168,13 @@ module.exports = { Matrix.events.emit('train-start', m); } else if (m.type === 'app-message') { - // TODO: Add policy check to see if app can emit this message - // should need events: global + // TODO: Add policy check to see if app can emit this message + // should need events: global - // sending global interapp message for device + // sending global interapp message for device Matrix.events.emit('app-message', m); - //send msgs to infrastructure + //send msgs to infrastructure Matrix.service.stream.sendAppEvent({ data: m, appName: appName, @@ -183,13 +183,13 @@ module.exports = { } else if (m.type.match(/app-.*-message/)) { - // TODO: Add policy check here - // should need events: AppName or events: AppName::EventName + // TODO: Add policy check here + // should need events: AppName or events: AppName::EventName - // sending specific interapp message for device + // sending specific interapp message for device Matrix.events.emit(m.type, m); - //send msgs to infrastructure + //send msgs to infrastructure Matrix.service.stream.sendAppEvent({ data: m, appName: appName, @@ -201,7 +201,7 @@ module.exports = { return console.error('Bad Configuration Sent. Not an Object.'.red); } - // Route elsewhere + // Route elsewhere _.extend(m, { name: appName.toLowerCase(), version: (_.isNumber(m.payload.version)) ? m.payload.version : m.payload.version.replace(/\./g, '') || 0 @@ -209,13 +209,13 @@ module.exports = { Matrix.events.emit('app-config', m); - // manage local record - // add what system need to knows from config + // manage local record + // add what system need to knows from config _.extend(appRecord, { sensors: m.payload.sensors, types: m.payload.dataTypes, integrations: m.payload.integrations - // TODO: Add services here + // TODO: Add services here }); } else if (m.type === 'trigger') { @@ -224,7 +224,7 @@ module.exports = { } else if (m.type === 'service-cmd') { console.warn('service-cmd sent no listener'); } else if (m.type === 'led-image') { - debug('[M]->#0', m.payload[0]); + // debug('[M]->#0', m.payload[0]); if (_.has(Matrix.components, 'led')) { Matrix.components.led.send(m.payload); } else { @@ -251,7 +251,7 @@ module.exports = { }; - // for dynamic messaging +// for dynamic messaging function setupAppListeners(name, cb) { debug('app('.green + name.green + ')->listeners'.green); Matrix.events.on('app-' + name + '-message', cb); diff --git a/package.json b/package.json index a53a87d2..7e108261 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "homepage": "http://creator.matrix.one", "bugs": "https://github.com/matrix-io/matrix-os/issues/new", "scripts": { - "debug": "DEBUG=*,-engine*,-needle,-*led,-gatt,-bleno,-Component,-bt-characteristic,-hci NODE_ENV=dev node index.js", + "debug": "DEBUG=*,-engine*,-needle*,-*led,-gatt*,-bleno*,-Component*,-bt-characteristic*,-hci* NODE_ENV=dev node index.js", "debugger": "DEBUG=*,-engine*,-needle,-*led,-gatt,-bleno,-Component,-bt-characteristic,-hci NODE_ENV=dev node --debug index.js", "debug-test": "DEBUG=*,-engine*,-Component*,-gatt,-bleno,-bt-characteristic,-hci node test/_runner.js", "debug-watch": "NODE_ENV=dev nodemon index.js -i apps", @@ -30,7 +30,7 @@ "apphost-debug": "docker run -v `pwd`/apps:/apps -it matrix-apphost bash", "apphost-build": "docker build -t matrix-apphost -f Dockerfile-apphost-arm .", "upgrade": "npm update matrix-node-sdk matrix-app-config-helper matrix-firebase matrix-eventfilter pi-wifi", - "watch": "nodemon --watch lib --exec npm run sync", + "watch": "nodemon --watch lib index.js package.json config --exec npm run sync", "watch-test": "nodemon --watch lib test --exec npm test" }, "author": "Sean Canton ", From 905ab81ea4e028aa1dd7a228e8f111746a07dd41 Mon Sep 17 00:00:00 2001 From: Sean Canton Date: Thu, 19 Oct 2017 15:18:07 -0700 Subject: [PATCH 31/42] progress --- lib/device/drivers/detection.js | 9 +- lib/device/drivers/gesture.js | 10 +- lib/device/drivers/voice.js | 223 -------------------------------- lib/service/manager.js | 11 +- lib/service/protobuf.js | 1 - package.json | 75 +---------- 6 files changed, 16 insertions(+), 313 deletions(-) delete mode 100644 lib/device/drivers/voice.js diff --git a/lib/device/drivers/detection.js b/lib/device/drivers/detection.js index eca1bf39..d5dd1ebf 100644 --- a/lib/device/drivers/detection.js +++ b/lib/device/drivers/detection.js @@ -10,6 +10,9 @@ module.exports = { VisionService = Matrix.service.protobuf.vision_service; EyeDriver = Matrix.service.protobuf.malos.maloseye; DeviceDriver = Matrix.service.protobuf.malos.driver; + + //enums + EventTags = Matrix.service.protobuf.vision.EventTag; }, // not technically async, needs for facialRecognition read: function (buffer) { @@ -17,10 +20,10 @@ module.exports = { debug('read>', detect); _.each(detect.vision_event, function (v) { - debug('>v_e', v.tag, v.trackingId); - if (v.tag === 'TRACKING_START') { + debug('>v_e', _.findKey(EventTags, v.tag), v.trackingId); + if (v.tag === EventTags['TRACKING_START']) { Matrix.service.track.add(v.trackingId); - } else if (v.tag === 'TRACKING_END') { + } else if (v.tag === EventTags['TRACKING_END']) { Matrix.service.track.remove(v.trackingId); } } diff --git a/lib/device/drivers/gesture.js b/lib/device/drivers/gesture.js index 9514cd02..b2429286 100644 --- a/lib/device/drivers/gesture.js +++ b/lib/device/drivers/gesture.js @@ -46,18 +46,18 @@ module.exports = { var config = new DeviceDriver.DriverConfig; // Generic configuration. // Almost 0 delay between updates. 200ms. - config.delayBetweenUpdates(0.25) + config.delayBetweenUpdates = 0.25; // Driver specific configuration. config.malosEyeConfig = new DeviceDriver.MalosEyeConfig; var camConfig = new DeviceDriver.CameraConfig; - camConfig.cameraId(0); - camConfig.width(640); - camConfig.height(480); + camConfig.cameraId = 0; + camConfig.width = 640; + camConfig.height = 480; config.malosEyeConfig = new DeviceDriver.MalosEyeConfig; - config.malosEyeConfig.cameraConfig(camConfig); + config.malosEyeConfig.cameraConfig = camConfig; debug('gesture video setup for ', options.enumName) diff --git a/lib/device/drivers/voice.js b/lib/device/drivers/voice.js deleted file mode 100644 index 2f023a90..00000000 --- a/lib/device/drivers/voice.js +++ /dev/null @@ -1,223 +0,0 @@ -/* // Wake Word - string wake_word = 1; - - // Mic channel - enum MicChannel { - channel0 = 0; - channel1 = 1; - channel2 = 2; - channel3 = 3; - channel4 = 4; - channel5 = 5; - channel6 = 6; - channel7 = 7; - channel8 = 8; - } - - MicChannel channel = 2; - - // lenguaje model path from lmtool or similar alternative: - // http://www.speech.cs.cmu.edu/tools/lmtool-new.html - string lm_path = 3; - - // dictionary path from lmtool - string dic_path = 4; - - // enable pocketsphinx verbose mode - bool enable_verbose = 5; - - // stop recognition service - bool stop_recognition = 6; - */ -let protoBuilder, matrixMalosBuilder; - -const debug = debugLog('wakeword'); - -module.exports = { - init: () => { - protoBuilder = Matrix.service.protobuf.malos.driver; - matrixMalosBuilder = protoBuilder.build('matrix_malos'); - }, - read: (buffer) => { - debug('read', buffer.toString()); - // strip unicode - return { speech: buffer.toString().trim().replace(/[^\x2000-\x7FFF]/g,'')} - }, - config: (config) => { - debug('config', config); - }, - /** - * @param config.channel - which microphone - * @param config.options.phrase - set wakeword, defaults to MATRIX - */ - prepare: (config, cb) => { - debug('prepare', config); - if ( !_.has( config.options, 'wakeword' ) ){ - return console.error('No Wakeword Specified in Driver'); - } - var wakeword = config.options.wakeword; - - // TODO: Check wakeword vs stored models - - // TODO: Manage dictionaries - // 8383 - hey joe - // 6854 - matrix - var malosConfig = new matrixMalosBuilder.DriverConfig; - - let voiceConfigProto = new matrixMalosBuilder.WakeWordParams; - voiceConfigProto.set_wake_word(wakeword.toUpperCase()); - voiceConfigProto.set_lm_path('/home/pi/assets/voice.lm'); - voiceConfigProto.set_dic_path('/home/pi/assets/voice.dic'); - - if (_.has(config.options, 'channel')) { - if ( - _.isInteger(config.options.channel) && - config.options.channel <= 8 && - config.options.channel >= 0 - ) { - let channel = matrixMalosBuilder.WakeWordParams.MicChannel['channel' + config.options.channel]; - voiceConfigProto.set_channel(channel); - } else { - return console.error('Invalid Channel ( 0-8 )', config.options.channel); - } - } else { - voiceConfigProto.set_channel(matrixMalosBuilder.WakeWordParams.MicChannel.channel8); - } - voiceConfigProto.set_enable_verbose(true); - malosConfig.set_wakeword(voiceConfigProto); - debug('proto>'.green, malosConfig) - cb(malosConfig.encode().toBuffer()); - }, - stop: () => { - let voiceConfigProto = new matrixMalosBuilder.WakeWordParams; - voiceConfigProto.set_stop_recognition(true); - Matrix.components.wakeword.config(voiceConfigProto.encode().toBuffer()); - }, - error: function(err) { - debug(err); - } -}; - -/** - * -// This is how we connect to the creator. IP and port. -// The IP is the IP I'm using and you need to edit it. -// By default, MALOS has its 0MQ ports open to the world. - -// Every device is identified by a base port. Then the mapping works -// as follows: -// BasePort => Configuration port. Used to config the device. -// BasePort + 1 => Keepalive port. Send pings to this port. -// BasePort + 2 => Error port. Receive errros from device. -// BasePort + 3 => Data port. Receive data from device. - -var creator_ip = '127.0.0.1'; -var creator_wakeword_base_port = 60001; -var creator_everloop_base_port = 20013 + 8 // port for Everloop driver. -var protoBuf = require("protobufjs"); -var zmq = require('zmq'); - -var protoBuilder = protoBuf.loadProtoFile('../../protocol-buffers/malos/driver.proto'); -var matrixMalosBuilder = protoBuilder.build("matrix_malos"); -var configSocket = zmq.socket('push') -configSocket.connect('tcp://' + creator_ip + ':' + creator_wakeword_base_port /* config */ - -// ********** Start error management. -// var errorSocket = zmq.socket('sub') -// errorSocket.connect('tcp://' + creator_ip + ':' + (creator_wakeword_base_port + 2)) -// errorSocket.subscribe('') -// errorSocket.on('message', function(error_message) { -// process.stdout.write('Received Wakeword error: ' + error_message.toString('utf8') + "\n") -// }); -// // ********** End error management. - -// /************************************** -// * start/stop service functions -// **************************************/ - -// function startWakeUpRecognition(){ -// console.log('<== config wakeword recognition..') -// var voiceConfigProto = new matrixMalosBuilder.WakeWordParams; -// voiceConfigProto.set_wake_word("MIA"); -// voiceConfigProto.set_lm_path("/home/pi/assets/9854.lm"); -// wakeword_config.set_dic_path("/home/pi/assets/9854.dic"); -// wakeword_config.set_channel(matrixMalosBuilder.WakeWordParams.MicChannel.channel8); -// wakeword_config.set_enable_verbose(false) -// sendConfigProto(wakeword_config); -// } - -// function stopWakeUpRecognition(){ -// console.log('<== stop wakeword recognition..') -// var wakeword_config = new matrixMalosBuilder.WakeWordParams; -// wakeword_config.set_stop_recognition(true) -// sendConfigProto(wakeword_config); -// } - -// /************************************** -// * Register wakeword callbacks -// **************************************/ - -// var updateSocket = zmq.socket('sub') -// updateSocket.connect('tcp://' + creator_ip + ':' + (creator_wakeword_base_port + 3)) -// updateSocket.subscribe('') - -// updateSocket.on('message', function(wakeword_buffer) { -// var wakeWordData = new matrixMalosBuilder.WakeWordParams.decode(wakeword_buffer); -// console.log('==> WakeWord Reached:',wakeWordData.wake_word) - -// switch(wakeWordData.wake_word) { -// case "MIA RING RED": -// setEverloop(255, 0, 25, 0, 0.05) -// break; -// case "MIA RING BLUE": -// setEverloop(0, 25, 255, 0, 0.05) -// break; -// case "MIA RING GREEN": -// setEverloop(0, 255, 100, 0, 0.05) -// break; -// case "MIA RING ORANGE": -// setEverloop(255, 77, 0, 0, 0.05) -// break; -// case "MIA RING CLEAR": -// setEverloop(0, 0, 0, 0, 0) -// break; -// } -// }); - -// /************************************** -// * Everloop Ring LEDs handler -// **************************************/ - -// var ledsConfigSocket = zmq.socket('push') -// ledsConfigSocket.connect('tcp://' + creator_ip + ':' + creator_everloop_base_port /* config */) - -// function setEverloop(r, g, b, w, i) { -// var config = new matrixMalosBuilder.DriverConfig -// config.image = new matrixMalosBuilder.EverloopImage -// for (var j = 0; j < 35; ++j) { -// var ledValue = new matrixMalosBuilder.LedValue; -// ledValue.setRed(Math.round(r*i)); -// ledValue.setGreen(Math.round(g*i)); -// ledValue.setBlue(Math.round(b*i)); -// ledValue.setWhite(Math.round(w*i)); -// config.image.led.push(ledValue) -// } -// ledsConfigSocket.send(config.encode().toBuffer()); -// } - -// /************************************** -// * sendConfigProto: build Proto message -// **************************************/ - -// function sendConfigProto(cfg){ -// var config = new matrixMalosBuilder.DriverConfig -// config.set_wakeword(cfg) -// configSocket.send(config.encode().toBuffer()) -// } - -// /********************************************** -// ****************** MAIN ********************** -// **********************************************/ - -// startWakeUpRecognition(); - diff --git a/lib/service/manager.js b/lib/service/manager.js index 84c4d13b..29ad11bc 100644 --- a/lib/service/manager.js +++ b/lib/service/manager.js @@ -62,8 +62,8 @@ function clearAppList(cb) { $exists: true } }, { - multi: true - }, cb); + multi: true + }, cb); } @@ -268,11 +268,8 @@ function startApp(name, cb) { return (v.indexOf('--debug') > -1 || v.indexOf('-debug-brk') > -1); }); -<<<<<<< HEAD // don't node debug because stderr (kills apps) process.env.DEBUG = 'false'; -======= ->>>>>>> dev //Check for app folder existance, expect the unexpected (╯°□°)╯︵ ┻━┻ fs.access(pathToApp, function (err) { @@ -310,8 +307,8 @@ function startApp(name, cb) { 'matrix-apphost', 'node', 'apps/' + name + '.matrix/index.js' ], { - stdio: ['pipe', 'pipe', 'pipe'] - }); + stdio: ['pipe', 'pipe', 'pipe'] + }); diff --git a/lib/service/protobuf.js b/lib/service/protobuf.js index 9df685a5..c60e0675 100644 --- a/lib/service/protobuf.js +++ b/lib/service/protobuf.js @@ -38,7 +38,6 @@ for (let p in Protos) { // automatically load newest protos available if (vInt === latestV) { - pExport[p] = Protos[p]['v' + latestV]; debug('Protobuf ::', p, 'v' + latestV) diff --git a/package.json b/package.json index 3b34a95c..091f3363 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,4 @@ { -<<<<<<< HEAD "name": "matrix-os", "version": "0.16.0", "description": "Portal to device layer for AdMobilize Matrix devices. Includes global component, npm install -g matrix-cli", @@ -32,6 +31,7 @@ "apphost-build": "docker build -t matrix-apphost -f Dockerfile-apphost-arm .", "upgrade": "npm update matrix-node-sdk matrix-app-config-helper matrix-firebase matrix-eventfilter pi-wifi", "watch": "nodemon --watch lib index.js package.json config --exec npm run sync", + "watch-apps": "nodemon --watch apps config --exec npm run sync", "watch-test": "nodemon --watch lib test --exec npm test" }, "author": "Sean Canton ", @@ -74,77 +74,4 @@ "engines": { "node": ">=0.12.7 <=6.5" } -======= - "name": "matrix-os", - "version": "0.16.0", - "description": "Portal to device layer for AdMobilize Matrix devices. Includes global component, npm install -g matrix-cli", - "main": "app.js", - "repository": "http://github.com/matrix-io/matrix-os", - "keywords": "matrix,creator,iot,zmq,protobuf,zigbee,zwave,nfc,gyroscope,accellerometer,thread,bluetooth,ir,microphone,robots,smart homes,smart business,security,sensors,maker,firebase", - "homepage": "http://creator.matrix.one", - "bugs": "https://github.com/matrix-io/matrix-os/issues/new", - "scripts": { - "debug": "DEBUG=*,-engine*,-needle,-*led,-gatt,-bleno,-Component,-bt-characteristic,-hci NODE_ENV=dev node index.js", - "debugger": "DEBUG=*,-engine*,-needle,-*led,-gatt,-bleno,-Component,-bt-characteristic,-hci NODE_ENV=dev node --debug index.js", - "debug-test": "DEBUG=*,-engine*,-Component*,-gatt,-bleno,-bt-characteristic,-hci node test/_runner.js", - "local-debug": "DEBUG=*,-engine*,-Component* NODE_ENV=local node index.js", - "local": "NODE_ENV=local node index.js", - "start": "nodemon --watch lib --watch config", - "test": "node test/_runner.js", - "pr": "open https://bitbucket.org/admobilize/admatrix/pull-request/new", - "deploy-clear": "sudo rm -r db node_modules/matrix-firebase node_modules/matrix-app-config-helper node_modules/matrix-node-sdk node_modules/matrix-eventfilter", - "deploy-copy": "cd node_modules; cp -r ../../matrix-firebase ./matrix-firebase; cp -r ../../matrix-app-config-helper ./matrix-app-config-helper; cp -r ../../matrix-node-sdk ./matrix-node-sdk; cp -r ../../matrix-eventfilter ./matrix-eventfilter; cd ..;", - "deploy-image": "find apps -name '*.matrix' ! -name 'monitor.matrix' -type d -exec rm -r {} +; docker build --no-cache -t matrix/matrix-os .;docker push admobilize/matrix-os", - "local-setup": "cd node_modules; ln -s ../../pi-wifi ./pi-wifi; ln -s ../../matrix-firebase ./matrix-firebase; ln -s ../../matrix-app-config-helper ./matrix-app-config-helper; ln -s ../../matrix-node-sdk ./matrix-node-sdk; ln -s ../../matrix-eventfilter ./matrix-eventfilter; cd ..", - "sync": "rsync -e ssh --progress -u package.json index.js pi@m:mos/;rsync -ru -e ssh --progress lib proto config apps test pi@m:mos", - "sync-local": "rsync -e ssh --progress -u package.json index.js pi@l:matrix-os/;rsync -ru -e ssh --progress lib proto config apps test pi@l:matrix-os", - "sync-m1": "rsync -e ssh --progress -u package.json index.js pi@m1:matrix-os/;rsync -ru -e ssh --progress lib proto config apps test pi@m1:matrix-os", - "device-diagnostics": "DEBUG=*,-engine*,-gatt,-bleno,-bt-characteristic,-hci START_APP=monitor NODE_ENV=dev node index.js", - "screensaver": "START_APP=life NODE_ENV=dev node index.js", - "clock": "START_APP=clock NODE_ENV=dev node index.js", - "apphost-debug": "docker run -v `pwd`/apps:/apps -it matrix-apphost bash", - "apphost-build": "docker build -t matrix-apphost -f Dockerfile-apphost-arm .", - "upgrade": "npm update matrix-node-sdk matrix-app-config-helper matrix-firebase matrix-eventfilter pi-wifi", - "watch": "nodemon --exec npm run sync" - }, - "author": "Sean Canton ", - "contributors": [ - "Sean Canton " - ], - "license": "ISC", - "dependencies": { - "async": "^1.5.2", - "chai": "^3.5.0", - "colors": "^1.1.2", - "debug": "^2.2.0", - "engine.io-client": "^1.6.8", - "fs-extra": "^0.30.0", - "grpc": "^1.0.0", - "js-yaml": "^3.6.1", - "jsonwebtoken": "^5.7.0", - "lodash": "^4.13.1", - "matrix-app-config-helper": "https://github.com/matrix-io/matrix-app-config-helper/tarball/master", - "matrix-eventfilter": "https://github.com/matrix-io/matrix-eventfilter/tarball/master", - "matrix-firebase": "https://github.com/matrix-io/matrix-firebase/tarball/master", - "matrix-node-sdk": "https://github.com/matrix-io/matrix-node-sdk/tarball/master", - "matrix-protos": "0.0.11", - "mic": "^2.1.1", - "mocha": "^2.4.5", - "nedb": "https://github.com/matrix-io/nedb/tarball/master", - "network": "^0.3.2", - "optional": "^0.1.4", - "pi-wifi": "^1.1.2", - "protobufjs": "^5.0.1", - "request": "^2.72.0", - "rimraf": "^2.5.2", - "should": "^7.0.2", - "tinycolor2": "^1.3.0", - "tree-kill": "^1.1.0", - "unzip2": "^0.2.5", - "zeromq": "^4.6.0" - }, - "engines": { - "node": ">=0.12.7 <=6.5" - } ->>>>>>> dev } \ No newline at end of file From 78f01296990c9bcc8cd2ba1cbedc143ff3fa3c04 Mon Sep 17 00:00:00 2001 From: Sean Canton Date: Thu, 19 Oct 2017 16:43:56 -0700 Subject: [PATCH 32/42] gestures works --- lib/device/drivers/gesture.js | 19 +++++++++++-------- proto | 2 +- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/lib/device/drivers/gesture.js b/lib/device/drivers/gesture.js index b2429286..d2559b13 100644 --- a/lib/device/drivers/gesture.js +++ b/lib/device/drivers/gesture.js @@ -1,4 +1,4 @@ -var protoBuilder, VisionDriver, DeviceDriver; +var protoBuilder, VisionDriver, DeviceDriver, MalosEye; var debug = debugLog('gesture') @@ -6,8 +6,11 @@ module.exports = { commands: ['palm', 'thumb-up', 'fist', 'pinch'], // init runs automatically, wait for app to request component creation init: function () { - VisionDriver = Matrix.service.protobuf.vision.vision; + VisionDriver = Matrix.service.protobuf.vision; DeviceDriver = Matrix.service.protobuf.malos.driver; + MalosEye = Matrix.service.protobuf.malos.maloseye; + debug('>>>', VisionDriver) + //Enums }, // not technically async, but needs to be this way to support recog being under service read: function (buffer) { @@ -48,15 +51,15 @@ module.exports = { // Almost 0 delay between updates. 200ms. config.delayBetweenUpdates = 0.25; // Driver specific configuration. - config.malosEyeConfig = new DeviceDriver.MalosEyeConfig; + config.malosEyeConfig = new MalosEye.MalosEyeConfig; - var camConfig = new DeviceDriver.CameraConfig; + var camConfig = new MalosEye.CameraConfig; camConfig.cameraId = 0; camConfig.width = 640; camConfig.height = 480; - config.malosEyeConfig = new DeviceDriver.MalosEyeConfig; + config.malosEyeConfig = new MalosEye.MalosEyeConfig; config.malosEyeConfig.cameraConfig = camConfig; @@ -84,10 +87,10 @@ module.exports = { debug('configure options>', options); var config = new DeviceDriver.DriverConfig; - config.malosEyeConfig = new DeviceDriver.MalosEyeConfig; + config.malosEyeConfig = new MalosEye.MalosEyeConfig; - // send config - config.malosEyeConfig.object_to_detect.push(DeviceDriver.EnumMalosEyeDetectionType[options.enumName]); + // send config = options.enumName = HAND_FIST, HAND_PALM, etc + config.malosEyeConfig.objectToDetect.push(MalosEye.EnumMalosEyeDetectionType[options.enumName]); if (_.has(Matrix.components, 'gesture')) { Matrix.components.gesture.config(DeviceDriver.DriverConfig.encode(config).finish()); diff --git a/proto b/proto index d0eef5f6..59f72b78 160000 --- a/proto +++ b/proto @@ -1 +1 @@ -Subproject commit d0eef5f60393b53a3704fbe3edb142487ae2d9f8 +Subproject commit 59f72b786494b76eebfabfe7f1a06b4ff7d92f3a From a2b6dbda5849a46e2944e7ff07f2240a22dcc97a Mon Sep 17 00:00:00 2001 From: Sean Canton Date: Thu, 19 Oct 2017 16:44:08 -0700 Subject: [PATCH 33/42] fix oops --- lib/device/drivers/gesture.js | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/device/drivers/gesture.js b/lib/device/drivers/gesture.js index d2559b13..79f45d0e 100644 --- a/lib/device/drivers/gesture.js +++ b/lib/device/drivers/gesture.js @@ -9,7 +9,6 @@ module.exports = { VisionDriver = Matrix.service.protobuf.vision; DeviceDriver = Matrix.service.protobuf.malos.driver; MalosEye = Matrix.service.protobuf.malos.maloseye; - debug('>>>', VisionDriver) //Enums }, // not technically async, but needs to be this way to support recog being under service From 4acc828825e6f4c535454aea0c500e13bbad80b2 Mon Sep 17 00:00:00 2001 From: Sean Canton Date: Thu, 19 Oct 2017 17:44:06 -0700 Subject: [PATCH 34/42] wowo --- lib/device/drivers/gpio.js | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/lib/device/drivers/gpio.js b/lib/device/drivers/gpio.js index ee3064b1..fb5a3ec9 100644 --- a/lib/device/drivers/gpio.js +++ b/lib/device/drivers/gpio.js @@ -1,4 +1,4 @@ -var DeviceDriver, SenseDriver; +var DeviceDriver, IODriver; var debug = debugLog('gpio') var pinAmount = 16; @@ -8,11 +8,10 @@ module.exports = { // init runs automatically, wait for app to request component creation init: function () { DeviceDriver = Matrix.service.protobuf.malos.driver; - SenseDriver = Matrix.service.protobuf.malos.sense; IODriver = Matrix.service.protobuf.malos.io; }, read: function (buffer) { - var buffer = new SenseDriver.GpioParams.decode(buffer); + var buffer = new IODriver.GpioParams.decode(buffer); return { pin: buffer.pin, //set_pin value: buffer.value, //set_value @@ -35,18 +34,18 @@ module.exports = { debug('prepare=>', options); var pin = parseInt(options.pin); var value = parseInt(options.value); - var config = new DeviceDriver.DriverConfig + var config = new DeviceDriver.DriverConfig; if (options.servo === true && pin < pinAmount) { var servoHandler = new IODriver.ServoParams; - servoHandler.pin(pin); - servoHandler.angle(value); - config.servo(servoHandler) + servoHandler.pin = pin; + servoHandler.angle = value; + config.servo = servoHandler; return cb(DeviceDriver.DriverConfig.encode(config).finish()); } - var gpioHandler = new matrixMalosBuilder.GpioParams; - gpioHandler.set_mode(matrixMalosBuilder.GpioParams.EnumMode.OUTPUT); + var gpioHandler = new IODriver.GpioParams; + gpioHandler.mode = IODriver.GpioParams.EnumMode['OUTPUT']; if (!_.isUndefined(pin)) { if (_.isArray(pin)) { //#Overload pin = pins array //TODO This will eventually be supported by the protos From 30cd06bceebe75a3c9e42d68d2bdf6d02bc4c37a Mon Sep 17 00:00:00 2001 From: Sean Canton Date: Fri, 20 Oct 2017 10:34:48 -0700 Subject: [PATCH 35/42] wakeword finished, untested --- lib/device/drivers/wakeword.js | 84 ---------------------------------- lib/device/gpio.js | 28 ++++++------ lib/device/heartbeat.js | 4 +- lib/device/index.js | 70 ++++++++++++++-------------- lib/service/application.js | 2 +- package.json | 2 +- 6 files changed, 53 insertions(+), 137 deletions(-) delete mode 100644 lib/device/drivers/wakeword.js diff --git a/lib/device/drivers/wakeword.js b/lib/device/drivers/wakeword.js deleted file mode 100644 index 17a2339a..00000000 --- a/lib/device/drivers/wakeword.js +++ /dev/null @@ -1,84 +0,0 @@ -/* // Wake Word - string wake_word = 1; - - // Mic channel - enum MicChannel { - channel0 = 0; - channel1 = 1; - channel2 = 2; - channel3 = 3; - channel4 = 4; - channel5 = 5; - channel6 = 6; - channel7 = 7; - channel8 = 8; - } - - MicChannel channel = 2; - - // lenguaje model path from lmtool or similar alternative: - // http://www.speech.cs.cmu.edu/tools/lmtool-new.html - string lm_path = 3; - - // dictionary path from lmtool - string dic_path = 4; - - // enable pocketsphinx verbose mode - bool enable_verbose = 5; - - // stop recognition service - bool stop_recognition = 6; -*/ - -let DeviceDriver, IODriver; - -const debug = debugLog('wakeword'); - -module.exports = { - init: () => { - DeviceDriver = Matrix.service.protobuf.malos.driver; - IODriver = Matrix.service.protobuf.malos.io; - }, - read: (buffer) => { - - }, - /** - * @param options.channel - which microphone - * @param options.wakeword - set wakeword, defaults to MATRIX - */ - prepare: (options, cb) => { - debug('prepare', options); - if (!_.has(options, 'wakeword') || - !_.isString(options.wakeword) || options.wakeword.length > 0 - ) { - return console.error('No Wakeword provided.') - } - - let wakeword_config = new IOBuilder.WakeWordParams; - wakeword_config.wakeWord(options.wakeword); - wakeword_config.lmPath("/home/pi/assets/9854.lm"); - wakeword_config.dicPath("/home/pi/assets/9854.dic"); - - if (_.has(options, 'channel')) { - if ( - _.isInteger(options.channel) && - options.channel <= 8 && - options.channel >= 0 - ) { - let channel = IOBuilder.WakeWordParams.MicChannel['channel' + options.channel]; - wakeword_config.channel(channel); - } else { - return console.error('Invalid Channel ( 0-8 )', options.channel); - } - } else { - wakeword_config.channel(IOBuilder.WakeWordParams.MicChannel.channel0) - } - wakeword_config.enableVerbose = false; - cb(IOBuilder.WakeWordParams.encode(wakeword_config).finish()); - }, - stop: () => { - let wakeword_config = new IOBuilder.WakeWordParams; - wakeword_config.stopRecognition = true; - Matrix.components.wakeword.config(IOBuilder.WakeWordParams.encode(wakeword_config).finish()); - } -} \ No newline at end of file diff --git a/lib/device/gpio.js b/lib/device/gpio.js index 684b0666..b1bd3cb1 100644 --- a/lib/device/gpio.js +++ b/lib/device/gpio.js @@ -44,7 +44,7 @@ module.exports = { write: function (options) { //setup the component if needed - if ( !Matrix.components.hasOwnProperty('gpio') && options.servo !== true ){ + if (!Matrix.components.hasOwnProperty('gpio') && options.servo !== true) { // fetches the zero mq connections in a keyed object { config, update, ping... } //gpio @@ -56,28 +56,28 @@ module.exports = { var component = new Matrix.service.component(options); options = _.pick(options, ['pin', 'value']); - } else if (!Matrix.components.hasOwnProperty('servo') && options.servo === true){ + } else if (!Matrix.components.hasOwnProperty('servo') && options.servo === true) { // fakes a servo component using gpio driver, but a different port - var gpioBase = _.clone(Matrix.device.drivers['gpio']); - gpioBase.name = 'servo'; - // uses new port - var mqs = Matrix.service.zeromq.registerComponent(gpioBase); + var gpioBase = _.clone(Matrix.device.drivers['gpio']); + gpioBase.name = 'gpio'; + // uses new port + var mqs = Matrix.service.zeromq.registerComponent(gpioBase); - // put connections in options for component - _.merge(options, mqs); + // put connections in options for component + _.merge(options, mqs); - // makes Matrix.component.servo with gpio driver - var component = new Matrix.service.component(options, Matrix.device.drivers['gpio']); + // makes Matrix.component.servo with gpio driver + var component = new Matrix.service.component(options, Matrix.device.drivers['gpio']); - // remove 0mq from options - options = _.pick(options, ['pin', 'servo', 'value']); + // remove 0mq from options + options = _.pick(options, ['pin', 'servo', 'value']); } // component ready - if ( options.servo === true && Matrix.components.hasOwnProperty('servo') && options.hasOwnProperty('pin') && options.hasOwnProperty('value')){ + if (options.servo === true && Matrix.components.hasOwnProperty('servo') && options.hasOwnProperty('pin') && options.hasOwnProperty('value')) { Matrix.components.servo.send(options); - } else if ( Matrix.components.hasOwnProperty('gpio') && options.hasOwnProperty('pin') && options.hasOwnProperty('value')) { + } else if (Matrix.components.hasOwnProperty('gpio') && options.hasOwnProperty('pin') && options.hasOwnProperty('value')) { Matrix.components.gpio.send(options); } else { console.error('Invalid Conditions for GPIO Write', options); diff --git a/lib/device/heartbeat.js b/lib/device/heartbeat.js index 5285d21c..0a4fe977 100644 --- a/lib/device/heartbeat.js +++ b/lib/device/heartbeat.js @@ -59,8 +59,8 @@ module.exports = { } else { services.push(sName); } - } else if ( d.engine === 'voice' ){ - services.push('voice'); + } else if (d.engine === 'voice') { + services.push('wakeword'); } else { console.warn(k, ' service type is not defined'); } diff --git a/lib/device/index.js b/lib/device/index.js index 8a02f5ec..ee059850 100644 --- a/lib/device/index.js +++ b/lib/device/index.js @@ -4,56 +4,56 @@ var debug = debugLog('device') var f = {}; // only do files that end in .js -var files = require('fs').readdirSync(__dirname).filter(function(f){ return ( f.indexOf('.js') === f.length - 3 ) } ); +var files = require('fs').readdirSync(__dirname).filter(function (f) { return (f.indexOf('.js') === f.length - 3) }); -var drivers = require('fs').readdirSync(__dirname+'/drivers').filter(function(f){ return ( f.indexOf('.js') === f.length - 3 ) } ); +var drivers = require('fs').readdirSync(__dirname + '/drivers').filter(function (f) { return (f.indexOf('.js') === f.length - 3) }); - //remove self - files.splice(files.indexOf(require('path').basename(__filename)), 1); +//remove self +files.splice(files.indexOf(require('path').basename(__filename)), 1); - files.forEach(function(file) { - debug('Loading... device > ' + file.slice(0,-3)) - f[file.slice(0,-3)] = require('./' + file); - }); +files.forEach(function (file) { + debug('Loading... device > ' + file.slice(0, -3)) + f[file.slice(0, -3)] = require('./' + file); +}); - f.drivers = {}; +f.drivers = {}; - var cmds = []; - drivers.forEach(function(file) { - var fileName = file.slice(0,-3); - debug('Loading... device > driver > ' + fileName) - f.drivers[fileName] = require('./drivers/' + file); - f.drivers[fileName].name = fileName; - if ( f.drivers[fileName].hasOwnProperty('commands') ){ - cmds = cmds.concat( f.drivers[fileName].commands ); - } - }); - debug('Init Cmds Registered:>'.blue, cmds.length, cmds.join(' ').blue ); +var cmds = []; +drivers.forEach(function (file) { + var fileName = file.slice(0, -3); + debug('Loading... device > driver > ' + fileName) + f.drivers[fileName] = require('./drivers/' + file); + f.drivers[fileName].name = fileName; + if (f.drivers[fileName].hasOwnProperty('commands')) { + cmds = cmds.concat(f.drivers[fileName].commands); + } + +}); +debug('Init Cmds Registered:>'.blue, cmds.length, cmds.join(' ').blue); // TODO improve command to driver mapping - // Matrix.applicationEnvironment.validInitCommands = cmds; +// Matrix.applicationEnvironment.validInitCommands = cmds; - f.init = function(){ +f.init = function () { - for (var i in f){ - if( f[i].init ){ - f[i].init(); - debug('device init:'.blue, i); - } + for (var i in f) { + if (f[i].init) { + f[i].init(); + debug('device init:'.blue, i); } + } - f['bluetooth'] = require('./bluetooth'); //Add bluetooth folder + f['bluetooth'] = require('./bluetooth'); //Add bluetooth folder - for (i in f.drivers){ - if (f.drivers[i].init){ - f.drivers[i].init(); - debug('driver init:'.blue, i ); - } + for (i in f.drivers) { + if (f.drivers[i].init) { + f.drivers[i].init(); + debug('driver init:'.blue, i); } } +} - module.exports = f; - \ No newline at end of file +module.exports = f; diff --git a/lib/service/application.js b/lib/service/application.js index ffcde8c9..1d969fd5 100644 --- a/lib/service/application.js +++ b/lib/service/application.js @@ -368,7 +368,7 @@ function updateConfigKey(options, cb) { // TODO: Expand this list as able. zwave, etc function activateIntegrations(integrations) { debug('activating integrations', integrations); - if (!_.isUndefined(integrations) && integrations.indexOf('zigbee') !== 1) { + if (!_.isUndefined(integrations) && integrations.indexOf('zigbee') !== -1) { Matrix.device.drivers.zigbee.activate(); } } diff --git a/package.json b/package.json index 091f3363..2a1ac5b1 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "apphost-debug": "docker run -v `pwd`/apps:/apps -it matrix-apphost bash", "apphost-build": "docker build -t matrix-apphost -f Dockerfile-apphost-arm .", "upgrade": "npm update matrix-node-sdk matrix-app-config-helper matrix-firebase matrix-eventfilter pi-wifi", - "watch": "nodemon --watch lib index.js package.json config --exec npm run sync", + "watch": "nodemon --watch lib --watch config --exec npm run sync", "watch-apps": "nodemon --watch apps config --exec npm run sync", "watch-test": "nodemon --watch lib test --exec npm test" }, From b24123ecf8e4f13302c05714aca229d962b15384 Mon Sep 17 00:00:00 2001 From: Sean Canton Date: Mon, 23 Oct 2017 09:00:02 -0700 Subject: [PATCH 36/42] add voice, i guess?` --- lib/device/drivers/voice.js | 94 +++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 lib/device/drivers/voice.js diff --git a/lib/device/drivers/voice.js b/lib/device/drivers/voice.js new file mode 100644 index 00000000..4a3ae65b --- /dev/null +++ b/lib/device/drivers/voice.js @@ -0,0 +1,94 @@ +/* // Wake Word + string wake_word = 1; + + // Mic channel + enum MicChannel { + channel0 = 0; + channel1 = 1; + channel2 = 2; + channel3 = 3; + channel4 = 4; + channel5 = 5; + channel6 = 6; + channel7 = 7; + channel8 = 8; + } + + MicChannel channel = 2; + + // lenguaje model path from lmtool or similar alternative: + // http://www.speech.cs.cmu.edu/tools/lmtool-new.html + string lm_path = 3; + + // dictionary path from lmtool + string dic_path = 4; + + // enable pocketsphinx verbose mode + bool enable_verbose = 5; + + // stop recognition service + bool stop_recognition = 6; +*/ + +let IODriver; + +const debug = debugLog('voice'); + +module.exports = { + init: () => { + IODriver = Matrix.service.protobuf.malos.io; + }, + read: (buffer) => { + + }, + /** + * @param options.channel - which microphone + * @param options.wakeword - set wakeword, defaults to MATRIX + */ + prepare: (options, cb) => { + debug('prepare', options); + // FIXME: bad structure. easier to patch here then in component + var vc = options.options; + if (!_.has(vc, 'wakeword') || + !_.isString(vc.wakeword) || vc.wakeword.length === 0 + ) { + console.log(!_.has(vc, 'wakeword'), + !_.isString(vc.wakeword), vc.wakeword.length) + return console.error('No Wakeword provided.') + } + + let config = new IODriver.WakeWordParams; + config.wakeWord = vc.wakeword; + config.lmPath = "/home/pi/assets/9854.lm"; + config.dicPath = "/home/pi/assets/9854.dic"; + + if (_.has(vc, 'channel')) { + if ( + _.isInteger(vc.channel) && + vc.channel <= 8 && + vc.channel >= 0 + ) { + let channel = IODriver.WakeWordParams.MicChannel['channel' + vc.channel]; + config.channel = channel; + } else { + return console.error('Invalid Channel ( 0-8 )', vc.channel); + } + } else { + config.channel = IODriver.WakeWordParams.MicChannel.channel0; + } + config.enableVerbose = false; + debug('prepare >', config); + cb(IODriver.WakeWordParams.encode(config).finish()); + }, + stop: () => { + let wakeword_config = new IODriver.WakeWordParams; + wakeword_config.stopRecognition = true; + Matrix.components.wakeword.config(IODriver.WakeWordParams.encode(wakeword_config).finish()); + }, + error: (err) => { + console.error(err) + }, + config: (options) => { + debug('Voice doesn\'t need a config step'); + } +} \ No newline at end of file From 146b93d0d260cacb54e87b0bc57791a5c2b5820a Mon Sep 17 00:00:00 2001 From: Sean Canton Date: Tue, 24 Oct 2017 10:03:02 -0700 Subject: [PATCH 37/42] wakewordy --- apps/lib/service.js | 2 +- lib/device/drivers/voice.js | 58 +++++++++++++++++++++++-------------- 2 files changed, 37 insertions(+), 23 deletions(-) diff --git a/apps/lib/service.js b/apps/lib/service.js index ef4ce21c..0a88f2b7 100644 --- a/apps/lib/service.js +++ b/apps/lib/service.js @@ -94,7 +94,7 @@ var service = function(name, options) { then: function(cb){ var phraseRegex = self.strictPhraseMatch ? new RegExp(self.phrases.join('|'),'i') : new RegExp('.*?', 'i'); - process.on('message', function(data) { + process.on('message', function(data) { console.log('VOICE SERVICE >> ', data, phraseRegex) if (data.eventType === 'service-emit' && data.engine === self.engine && diff --git a/lib/device/drivers/voice.js b/lib/device/drivers/voice.js index 4a3ae65b..5d9de104 100644 --- a/lib/device/drivers/voice.js +++ b/lib/device/drivers/voice.js @@ -30,16 +30,23 @@ bool stop_recognition = 6; */ -let IODriver; +let IODriver, DeviceDriver; const debug = debugLog('voice'); module.exports = { init: () => { IODriver = Matrix.service.protobuf.malos.io; + DeviceDriver = Matrix.service.protobuf.malos.driver; }, - read: (buffer) => { + // translate from wakeWord to speech + read: (buffer) => { + var d = IODriver.WakeWordParams.decode(buffer); + debug('read.decode> ', d); + return { + speech: (_.isUndefined(d.speech)) ? d.wakeWord : d.speech + } }, /** * @param options.channel - which microphone @@ -57,28 +64,35 @@ module.exports = { return console.error('No Wakeword provided.') } - let config = new IODriver.WakeWordParams; - config.wakeWord = vc.wakeword; - config.lmPath = "/home/pi/assets/9854.lm"; - config.dicPath = "/home/pi/assets/9854.dic"; + let config = IODriver.WakeWordParams.create({ + wakeWord: vc.wakeword.toUpperCase(), + lmPath: "/home/pi/assets/9854.lm", + dicPath: "/home/pi/assets/9854.dic", + // TODO: change the channel + channel: IODriver.WakeWordParams.MicChannel.channel8, + enableVerbose: false + }); + - if (_.has(vc, 'channel')) { - if ( - _.isInteger(vc.channel) && - vc.channel <= 8 && - vc.channel >= 0 - ) { - let channel = IODriver.WakeWordParams.MicChannel['channel' + vc.channel]; - config.channel = channel; - } else { - return console.error('Invalid Channel ( 0-8 )', vc.channel); - } - } else { - config.channel = IODriver.WakeWordParams.MicChannel.channel0; - } - config.enableVerbose = false; + // if (_.has(vc, 'channel')) { + // if ( + // _.isInteger(vc.channel) && + // vc.channel <= 8 && + // vc.channel >= 0 + // ) { + // let channel = IODriver.WakeWordParams.MicChannel['channel' + vc.channel]; + // config.channel = channel; + // } else { + // return console.error('Invalid Channel ( 0-8 )', vc.channel); + // } + // } else { + // config.channel = IODriver.WakeWordParams.MicChannel.channel0; + // } + // config.enableVerbose = false; debug('prepare >', config); - cb(IODriver.WakeWordParams.encode(config).finish()); + var DeviceConfig = new DeviceDriver.DriverConfig; + DeviceConfig.wakeword = config; + cb(DeviceDriver.DriverConfig.encode(DeviceConfig).finish()); }, stop: () => { let wakeword_config = new IODriver.WakeWordParams; From 2a764a64e5a2d1f4a4ed1592276c40d6bba26700 Mon Sep 17 00:00:00 2001 From: Sean Canton Date: Thu, 26 Oct 2017 06:38:43 -0700 Subject: [PATCH 38/42] notes --- lib/device/service.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/device/service.js b/lib/device/service.js index 681968a4..0fcf7ba8 100644 --- a/lib/device/service.js +++ b/lib/device/service.js @@ -204,11 +204,10 @@ var serviceMethods = { * */ start: function(options) { - - debug('start>', options); // this is ugly but it solves the init vs cmd start payload issues + // TODO: init is deprecited, can this be removed? if (_.isUndefined(options.name)) { options.name = options.engine; } @@ -226,6 +225,8 @@ var serviceMethods = { } } + // TODO: Don't init an already existing service, just key into it's output + // var appProcess = _.find(Matrix.activeApplications, { name: options.appName }); // if ( _.isUndefined( appProcess )){ @@ -260,7 +261,7 @@ var serviceMethods = { // zmq connections construct with component Class var component = new Matrix.service.component(options); - debug('Component Registered'.yellow, component.name); + debug('Component<->ZMQ'.yellow, component.name); // generate enum name for vision services if ( !_.isNull( options.engine.match(/detection|recognition|gesture/) )) { From 82e79868b6ea3571a47f5e68f9032ee6635e8f95 Mon Sep 17 00:00:00 2001 From: Sean Canton Date: Thu, 26 Oct 2017 09:04:18 -0700 Subject: [PATCH 39/42] same app events ok --- apps/matrix.js | 30 +++++++++++++++++++++++------- lib/device/drivers/zigbee.js | 6 +++--- lib/device/service.js | 5 +++++ lib/event/app.js | 4 ---- lib/service/application.js | 2 +- 5 files changed, 32 insertions(+), 15 deletions(-) diff --git a/apps/matrix.js b/apps/matrix.js index a68cda0c..c3fd89d5 100644 --- a/apps/matrix.js +++ b/apps/matrix.js @@ -10,6 +10,7 @@ _ = require('lodash'); //needs sudo for audio commands disable until we figure this out var request = require('request'); var lib = require('./lib'); +var util = require('./lib/util.js'); var fs = require('fs'); var DataStore = require('nedb'); @@ -136,20 +137,34 @@ var matrixDebug = false; * @param {{}Payload} p */ function interAppNotification(appName, eventName, p) { - var payload = p; + var payload = ( _.isUndefined(p) ) ? '' : p; var type; var event; + if (arguments.length === 1) { - // global form type = 'app-message'; - payload = arguments[0]; + if ( util.hasEvent(appName) ){ + // event trigger - matrix.emit('eventName') + log('>>>>>>>>') + event = arguments[0]; + } else { + // global trigger - matrix.emit({ foo: bar }) + payload = arguments[0]; + } } else if (arguments.length === 2) { + if ( util.hasEvent(appName)){ + // event trigger with payload = matrix.emit('eventName', {foo:bar}) + type = 'app-message'; + event = arguments[0] + } else { + //global message for application = matrix.emit('appName', {foo:bar}) + type = 'app-' + appName + '-message'; + payload = arguments[1]; + } //app specific - type = 'app-' + appName + '-message'; - payload = arguments[1]; } else { - // app specific event namespaced + // app specific event namespaced = matrix.emit('appName','eventName', { foo:bar }) type = 'app-' + appName + '-message'; event = eventName; } @@ -376,7 +391,8 @@ var Matrix = { console.log('static not implmented yet'); }, service: require('./lib/service.js'), - sensor: require('./lib/sensor.js') + sensor: require('./lib/sensor.js'), + util: require('./lib/util') }; module.exports = Matrix; \ No newline at end of file diff --git a/lib/device/drivers/zigbee.js b/lib/device/drivers/zigbee.js index fa0fe43a..aa55a8eb 100644 --- a/lib/device/drivers/zigbee.js +++ b/lib/device/drivers/zigbee.js @@ -246,17 +246,17 @@ module.exports = { }; self.reset = function () { - cmds.net.type(enums.netTypes.RESET_PROXY); + cmds.net.type = enums.netTypes.RESET_PROXY; __net(); }; self.status = function () { - cmds.net.type(enums.netTypes.NETWORK_STATUS); + cmds.net.type = enums.netTypes.NETWORK_STATUS; __net(); }; self.permitJoin = function () { - cmds.net.type(enums.netTypes.PERMIT_JOIN); + cmds.net.type = enums.netTypes.PERMIT_JOIN; params.permitJoin.time = 60; cmds.net.permitJoinParams = params.permitJoin; __net(); diff --git a/lib/device/service.js b/lib/device/service.js index 0fcf7ba8..1407ceb9 100644 --- a/lib/device/service.js +++ b/lib/device/service.js @@ -1,3 +1,8 @@ +/** + * Service handles the APP<->ZMQ component interface with computer vision and voice assistants + * TODO: Refactor lists outside of this. + */ + var debug = debugLog('device.service'); var gestureTypeList = [ diff --git a/lib/event/app.js b/lib/event/app.js index d7fc3d8b..c25ae4a6 100644 --- a/lib/event/app.js +++ b/lib/event/app.js @@ -109,13 +109,9 @@ module.exports = { debug('app('.green + appName.green + ')->'.green, m.type, m); } - //TODO: refactor #113965661 if (m.type === 'app-emit') { debug('== app-emit'.blue, m.payload); - // TODO: Hacky for demo. Type should be outside data - // m.payload.data.type = m.payload.data.type; - m.payload.appName = appName.toLowerCase(); m.payload.appVersion = appConfig.version || 0; // Reroutes to dataHandler above via events diff --git a/lib/service/application.js b/lib/service/application.js index 4ea06795..74209d29 100644 --- a/lib/service/application.js +++ b/lib/service/application.js @@ -236,7 +236,7 @@ function Application(name, cb) { self.sensors = ( config.hasOwnProperty('sensors') ) ? config.sensors : []; // these are used to map messages back to apps - self.services = ( config.hasOwnProperty('services') ? config.services : []; + self.services = ( config.hasOwnProperty('services')) ? config.services : []; self.integrations = (config.hasOwnProperty('integrations')) ? config.integrations : []; // parse config.services to find valid terms for `matrix.service(term)` From 1cdf81d0e28d429d465e3a426d6c995fbbc4d69f Mon Sep 17 00:00:00 2001 From: Sean Canton Date: Thu, 26 Oct 2017 09:04:28 -0700 Subject: [PATCH 40/42] add sdk util --- apps/lib/util.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 apps/lib/util.js diff --git a/apps/lib/util.js b/apps/lib/util.js new file mode 100644 index 00000000..9354e460 --- /dev/null +++ b/apps/lib/util.js @@ -0,0 +1,13 @@ + + +module.exports = { +/** + * Is this application configured for this event? + * @param {string} ev - event name to test for + * @return {Boolean} - is in the config + */ +hasEvent: (ev) => { + return ( matrix.config.hasOwnProperty('events') && + matrix.config.events.indexOf(ev) > -1 ) + } +} \ No newline at end of file From 7f8d1bf0b78abca132e463dce79b9b1c00003b48 Mon Sep 17 00:00:00 2001 From: Sean Canton Date: Thu, 1 Feb 2018 08:38:35 -0800 Subject: [PATCH 41/42] package lock update --- package-lock.json | 1770 +++++++++++++++++++-------------------------- proto | 2 +- 2 files changed, 757 insertions(+), 1015 deletions(-) diff --git a/package-lock.json b/package-lock.json index d7449d51..8cea2e3a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -64,32 +64,9 @@ "integrity": "sha512-ZXyOOm83p7X8p3s0IYM3VeueNmHpkk/yMlP8CLeOnEcu6hIwPH7YjZBvhQkR0ZFS2DqZAxKtJ/M5fcuv3OU5BA==" }, "@types/node": { - "version": "7.0.43", - "resolved": "https://registry.npmjs.org/@types/node/-/node-7.0.43.tgz", - "integrity": "sha512-7scYwwfHNppXvH/9JzakbVxk0o0QUILVk1Lv64GRaxwPuGpnF1QBiwdvhDpLcymb8BpomQL3KYoWKq3wUdDMhQ==" - }, - "Base64": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/Base64/-/Base64-0.2.1.tgz", - "integrity": "sha1-ujpCMHCOGGcFBl5mur3Uw1z2ACg=" - }, - "JSONStream": { - "version": "0.8.4", - "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-0.8.4.tgz", - "integrity": "sha1-kWV9/m/4V0gwZhMrRhi2Lo9Ih70=", - "requires": { - "jsonparse": "0.0.5", - "through": "2.3.8" - } - }, - "MD5": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/MD5/-/MD5-1.2.2.tgz", - "integrity": "sha1-2QPI7FuiI80rgEMoJIgdBLuYQcA=", - "requires": { - "charenc": "0.0.2", - "crypt": "0.0.2" - } + "version": "8.5.9", + "resolved": "https://registry.npmjs.org/@types/node/-/node-8.5.9.tgz", + "integrity": "sha512-s+c3AjymyAccTI4hcgNFK4mToH8l+hyPDhu4LIkn71lRy56FLijGu00fyLgldjM/846Pmk9N4KFUs2P8GDs0pA==" }, "accessory": { "version": "1.1.0", @@ -119,12 +96,14 @@ "integrity": "sha1-/ts5T58OAqqXaOcCvaI7UF+ufh8=" }, "ajv": { - "version": "4.11.8", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz", - "integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=", + "version": "5.5.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", + "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", "requires": { "co": "4.6.0", - "json-stable-stringify": "1.0.1" + "fast-deep-equal": "1.0.0", + "fast-json-stable-stringify": "2.0.0", + "json-schema-traverse": "0.3.1" } }, "amdefine": { @@ -218,9 +197,9 @@ "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=" }, "asn1.js": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.9.1.tgz", - "integrity": "sha1-SLokC0WpKA6UdImQull9IWYX/UA=", + "version": "4.9.2", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.9.2.tgz", + "integrity": "sha512-b/OsSjvWEo8Pi8H0zsDd2P6Uqo2TK2pH8gNLSJtNLM2Db0v2QaAZ0pBQJXVjAn4gBuugeVDr7s63ZogpUIwWDg==", "requires": { "bn.js": "4.11.8", "inherits": "2.0.3", @@ -236,19 +215,14 @@ } }, "assert-plus": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz", - "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=" + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" }, "assertion-error": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.0.2.tgz", - "integrity": "sha1-E8pRXYYgbaC6xm6DTdOX2HWBCUw=" - }, - "ast-types": { - "version": "0.8.15", - "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.8.15.tgz", - "integrity": "sha1-ju8IJ/BN/w7IhXupJavj/qYZTlI=" + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==" }, "astw": { "version": "2.2.0", @@ -274,9 +248,9 @@ "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" }, "aws-sign2": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz", - "integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8=" + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" }, "aws4": { "version": "1.6.0", @@ -288,10 +262,10 @@ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" }, - "base62": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/base62/-/base62-0.1.1.tgz", - "integrity": "sha1-e0F0wvlESXU7EcJlHAg9qEGnsIQ=" + "Base64": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/Base64/-/Base64-0.2.1.tgz", + "integrity": "sha1-ujpCMHCOGGcFBl5mur3Uw1z2ACg=" }, "base64-arraybuffer": { "version": "0.1.5", @@ -390,11 +364,11 @@ "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==" }, "boom": { - "version": "2.10.1", - "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", - "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/boom/-/boom-4.3.1.tgz", + "integrity": "sha1-T4owBctKfjiJ90kDD9JbluAdLjE=", "requires": { - "hoek": "2.16.3" + "hoek": "4.2.0" } }, "brace-expansion": { @@ -416,10 +390,10 @@ "resolved": "https://registry.npmjs.org/browser-pack/-/browser-pack-3.2.0.tgz", "integrity": "sha1-+qHLxBSHsazEdH43PhFIrf/Q4tk=", "requires": { - "JSONStream": "0.8.4", "combine-source-map": "0.3.0", "concat-stream": "1.4.10", "defined": "0.0.0", + "JSONStream": "0.8.4", "through2": "0.5.1", "umd": "2.1.0" }, @@ -471,7 +445,6 @@ "resolved": "https://registry.npmjs.org/browserify/-/browserify-6.3.4.tgz", "integrity": "sha1-V7XRlcxWgTnpcTAuXNnVjdr7VNg=", "requires": { - "JSONStream": "0.8.4", "assert": "1.1.2", "browser-pack": "3.2.0", "browser-resolve": "1.11.2", @@ -482,7 +455,7 @@ "concat-stream": "1.4.10", "console-browserify": "1.1.0", "constants-browserify": "0.0.1", - "crypto-browserify": "3.11.1", + "crypto-browserify": "3.12.0", "deep-equal": "0.2.2", "defined": "0.0.0", "deps-sort": "1.3.9", @@ -495,6 +468,7 @@ "inherits": "2.0.3", "insert-module-globals": "6.6.3", "isarray": "0.0.1", + "JSONStream": "0.8.4", "labeled-stream-splicer": "1.0.2", "module-deps": "3.9.1", "os-browserify": "0.1.2", @@ -514,7 +488,7 @@ "syntax-error": "1.3.0", "through2": "1.1.1", "timers-browserify": "1.4.2", - "tty-browserify": "0.0.0", + "tty-browserify": "0.0.1", "umd": "2.1.0", "url": "0.10.3", "util": "0.10.3", @@ -554,9 +528,9 @@ } }, "browserify-aes": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.0.8.tgz", - "integrity": "sha512-WYCMOT/PtGTlpOKFht0YJFYcPy6pLCR98CtWfzK13zoynLlBMvAdEMSRGmgnJCw2M2j/5qxBkinZQFobieM8dQ==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.1.1.tgz", + "integrity": "sha512-UGnTYAnB2a3YuYKIRy1/4FB2HdM866E0qC46JXvVTYKlBlZlnvfpSfY6OKfXZAkv70eJ2a1SqzpAo5CRhZGDFg==", "requires": { "buffer-xor": "1.0.3", "cipher-base": "1.0.4", @@ -571,7 +545,7 @@ "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.0.tgz", "integrity": "sha1-mYgkSHS/XtTijalWZtzWasj8Njo=", "requires": { - "browserify-aes": "1.0.8", + "browserify-aes": "1.1.1", "browserify-des": "1.0.0", "evp_bytestokey": "1.0.3" } @@ -592,7 +566,7 @@ "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", "requires": { "bn.js": "4.11.8", - "randombytes": "2.0.5" + "randombytes": "2.0.6" } }, "browserify-shim": { @@ -699,7 +673,7 @@ "resolved": "https://registry.npmjs.org/chai/-/chai-3.5.0.tgz", "integrity": "sha1-TQJjewZ/6Vi9v906QOxW/vc3Mkc=", "requires": { - "assertion-error": "1.0.2", + "assertion-error": "1.1.0", "deep-eql": "0.1.3", "type-detect": "1.0.0" } @@ -779,6 +753,11 @@ "delayed-stream": "1.0.0" } }, + "commander": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.3.0.tgz", + "integrity": "sha1-/UMOiJgy7DU7ms0d4hfBHLPu+HM=" + }, "commondir": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/commondir/-/commondir-0.0.1.tgz", @@ -854,7 +833,7 @@ "cipher-base": "1.0.4", "inherits": "2.0.3", "ripemd160": "2.0.1", - "sha.js": "2.4.8" + "sha.js": "2.4.10" } }, "create-hmac": { @@ -867,7 +846,7 @@ "inherits": "2.0.3", "ripemd160": "2.0.1", "safe-buffer": "5.1.1", - "sha.js": "2.4.8" + "sha.js": "2.4.10" } }, "crypt": { @@ -876,17 +855,27 @@ "integrity": "sha1-iNf/fsDfuG9xPch7u0LQRNPmxBs=" }, "cryptiles": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", - "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-3.1.2.tgz", + "integrity": "sha1-qJ+7Ig9c4l7FboxKqKT9e1sNKf4=", "requires": { - "boom": "2.10.1" + "boom": "5.2.0" + }, + "dependencies": { + "boom": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/boom/-/boom-5.2.0.tgz", + "integrity": "sha512-Z5BTk6ZRe4tXXQlkqftmsAUANpXmuwlsF5Oov8ThoMbQRzdGTA1ngYRW160GexgOgjsFOKJz0LYhoNi+2AMBUw==", + "requires": { + "hoek": "4.2.0" + } + } } }, "crypto-browserify": { - "version": "3.11.1", - "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.11.1.tgz", - "integrity": "sha512-Na7ZlwCOqoaW5RwUK1WpXws2kv8mNhWdTlzob0UXulk6G9BDbyiJaGTYBIX61Ozn9l1EPPJpICZb4DaOpT9NlQ==", + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", + "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", "requires": { "browserify-cipher": "1.0.0", "browserify-sign": "4.0.4", @@ -895,9 +884,10 @@ "create-hmac": "1.1.6", "diffie-hellman": "5.0.2", "inherits": "2.0.3", - "pbkdf2": "3.0.13", + "pbkdf2": "3.0.14", "public-encrypt": "4.0.0", - "randombytes": "2.0.5" + "randombytes": "2.0.6", + "randomfill": "1.0.3" } }, "dashdash": { @@ -906,13 +896,6 @@ "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", "requires": { "assert-plus": "1.0.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" - } } }, "date-now": { @@ -921,9 +904,9 @@ "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=" }, "debug": { - "version": "2.6.8", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz", - "integrity": "sha1-5zFTHKLt4n0YgiJCfaF4IdaP9Pw=", + "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" } @@ -978,25 +961,25 @@ "resolved": "https://registry.npmjs.org/deps-sort/-/deps-sort-1.3.9.tgz", "integrity": "sha1-Kd//U+F7Nq7K51MK27v2IsLtGnE=", "requires": { - "JSONStream": "1.3.1", + "JSONStream": "1.3.2", "shasum": "1.0.2", "subarg": "1.0.0", "through2": "1.1.1" }, "dependencies": { - "JSONStream": { + "jsonparse": { "version": "1.3.1", - "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.1.tgz", - "integrity": "sha1-cH92HgHa6eFvG8+TcDt4xwlmV5o=", + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", + "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=" + }, + "JSONStream": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.2.tgz", + "integrity": "sha1-wQI3G27Dp887hHygDCC7D85Mbeo=", "requires": { "jsonparse": "1.3.1", "through": "2.3.8" } - }, - "jsonparse": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", - "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=" } } }, @@ -1009,15 +992,25 @@ "minimalistic-assert": "1.0.0" } }, + "detect-libc": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", + "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=" + }, "detective": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/detective/-/detective-4.5.0.tgz", - "integrity": "sha1-blqMaybmx6JUsca210kNmOyR7dE=", + "version": "4.7.1", + "resolved": "https://registry.npmjs.org/detective/-/detective-4.7.1.tgz", + "integrity": "sha512-H6PmeeUcZloWtdt4DAkFyzFL94arpHr3NOwwmVILFiy+9Qd4JTxxXrzfyGk/lmct2qVGBwTSwSXagqu2BxmWig==", "requires": { - "acorn": "4.0.13", + "acorn": "5.3.0", "defined": "1.0.0" }, "dependencies": { + "acorn": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.3.0.tgz", + "integrity": "sha512-Yej+zOJ1Dm/IMZzzj78OntP/r3zHEaKcyNoU2lAaxPtrseM6rF0xwqoz5Q5ysAiED9hTjI2hgtvLXitlCN1/Ug==" + }, "defined": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", @@ -1036,8 +1029,8 @@ "integrity": "sha1-tYNXOScM/ias9jIJn97SoH8gnl4=", "requires": { "bn.js": "4.11.8", - "miller-rabin": "4.0.0", - "randombytes": "2.0.5" + "miller-rabin": "4.0.1", + "randombytes": "2.0.6" } }, "domain-browser": { @@ -1063,7 +1056,7 @@ "resolved": "https://registry.npmjs.org/eachr/-/eachr-3.2.0.tgz", "integrity": "sha1-LDXkPqCGUW95l8+At6pk1VpKRIQ=", "requires": { - "editions": "1.3.3", + "editions": "1.3.4", "typechecker": "4.4.1" } }, @@ -1086,9 +1079,9 @@ } }, "editions": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/editions/-/editions-1.3.3.tgz", - "integrity": "sha1-CQcQG92iD6w8vjNMJ8vQaI3Jmls=" + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/editions/-/editions-1.3.4.tgz", + "integrity": "sha512-gzao+mxnYDzIysXKMQi/+M1mjy/rjestjg6OPoYTtI+3Izp23oiGZitsl9lPDPiTGXbcSIk1iJWhliSaglxnUg==" }, "elliptic": { "version": "6.4.0", @@ -1105,17 +1098,17 @@ } }, "end-of-stream": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.0.tgz", - "integrity": "sha1-epDYM+/abPpurA9JSduw+tOmMgY=", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", + "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", "requires": { "once": "1.4.0" } }, "engine.io-client": { - "version": "1.8.4", - "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-1.8.4.tgz", - "integrity": "sha1-n+hd7iWFPKa6viW9KtaHEIY+kcI=", + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-1.8.5.tgz", + "integrity": "sha512-AYTgHyeVUPitsseqjoedjhYJapNVoSPShbZ+tEUX9/73jgZ/Z3sUlJf9oYgdEBBdVhupUpUqSxH0kBCXlQnmZg==", "requires": { "component-emitter": "1.2.1", "component-inherit": "0.0.3", @@ -1126,7 +1119,7 @@ "parsejson": "0.0.3", "parseqs": "0.0.5", "parseuri": "0.0.5", - "ws": "1.1.2", + "ws": "1.1.5", "xmlhttprequest-ssl": "1.5.3", "yeast": "0.1.2" }, @@ -1159,23 +1152,6 @@ "wtf-8": "1.0.0" } }, - "es3ify": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/es3ify/-/es3ify-0.1.4.tgz", - "integrity": "sha1-rZ+l3xrjTz8x4SEbWBiy1RB439E=", - "requires": { - "esprima-fb": "3001.1.0-dev-harmony-fb", - "jstransform": "3.0.0", - "through": "2.3.8" - }, - "dependencies": { - "esprima-fb": { - "version": "3001.1.0-dev-harmony-fb", - "resolved": "https://registry.npmjs.org/esprima-fb/-/esprima-fb-3001.0001.0000-dev-harmony-fb.tgz", - "integrity": "sha1-t303q8046gt3Qmu4vCkizmtCZBE=" - } - } - }, "escape-string-regexp": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.2.tgz", @@ -1199,11 +1175,6 @@ } } }, - "esmangle-evaluator": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/esmangle-evaluator/-/esmangle-evaluator-1.0.1.tgz", - "integrity": "sha1-Yg2GbvSGGzMR91dm1SqFcrs8YzY=" - }, "esprima": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.0.tgz", @@ -1309,7 +1280,7 @@ "integrity": "sha1-WrvtyYwNUgLjJ4cn+Rktfghsa+E=", "requires": { "eachr": "3.2.0", - "editions": "1.3.3", + "editions": "1.3.4", "typechecker": "4.4.1" } }, @@ -1318,34 +1289,177 @@ "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" }, - "falafel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/falafel/-/falafel-1.2.0.tgz", - "integrity": "sha1-wY0k71CRF0pJfzGM0ksCaiXN2rQ=", + "fast-deep-equal": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz", + "integrity": "sha1-liVqO8l1WV6zbYLpkp0GDYk0Of8=" + }, + "fast-json-stable-stringify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" + }, + "find-parent-dir": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/find-parent-dir/-/find-parent-dir-0.3.0.tgz", + "integrity": "sha1-M8RLQpqysvBkYpnF+fcY83b/jVQ=" + }, + "firebase": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/firebase/-/firebase-3.9.0.tgz", + "integrity": "sha1-xCN/UPWO6yUIGxg51svxdfj37Zs=", "requires": { - "acorn": "1.2.2", - "foreach": "2.0.5", - "isarray": "0.0.1", - "object-keys": "1.0.11" + "dom-storage": "2.0.2", + "faye-websocket": "0.9.3", + "jsonwebtoken": "7.4.0", + "promise-polyfill": "6.0.2", + "xmlhttprequest": "1.8.0" }, "dependencies": { - "acorn": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-1.2.2.tgz", - "integrity": "sha1-yM4n3grMdtiW0rH6099YjZ6C8BQ=" + "base64url": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/base64url/-/base64url-2.0.0.tgz", + "integrity": "sha1-6sFuA+oUOO/5Qj1puqNiYu0fcLs=" }, - "object-keys": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.11.tgz", - "integrity": "sha1-xUYBd4rVYPEULODgG8yotW0TQm0=" + "buffer-equal-constant-time": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", + "integrity": "sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk=" + }, + "dom-storage": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/dom-storage/-/dom-storage-2.0.2.tgz", + "integrity": "sha1-7RfL9oq9EOCu+BgnE+KXxeS1ALA=" + }, + "ecdsa-sig-formatter": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.9.tgz", + "integrity": "sha1-S8kmJ07Dtau1AW5+HWCSGsJisqE=", + "requires": { + "base64url": "2.0.0", + "safe-buffer": "5.0.1" + } + }, + "faye-websocket": { + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.9.3.tgz", + "integrity": "sha1-SCpQWw3wrmJrlphm0710DNuWLoM=", + "requires": { + "websocket-driver": "0.6.5" + } + }, + "hoek": { + "version": "2.16.3", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", + "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=" + }, + "isemail": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/isemail/-/isemail-1.2.0.tgz", + "integrity": "sha1-vgPfjMPineTSxd9lASY/H6RZXpo=" + }, + "joi": { + "version": "6.10.1", + "resolved": "https://registry.npmjs.org/joi/-/joi-6.10.1.tgz", + "integrity": "sha1-TVDDGAeRIgAP5fFq8f+OGRe3fgY=", + "requires": { + "hoek": "2.16.3", + "isemail": "1.2.0", + "moment": "2.18.1", + "topo": "1.1.0" + } + }, + "jsonwebtoken": { + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-7.4.0.tgz", + "integrity": "sha1-UVvyu6Bw7GFbrZf9LpRQJ+tHaUY=", + "requires": { + "joi": "6.10.1", + "jws": "3.1.4", + "lodash.once": "4.1.1", + "ms": "0.7.3", + "xtend": "4.0.1" + } + }, + "jwa": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.1.5.tgz", + "integrity": "sha1-oFUs4CIHQs1S4VN3SjKQXDDnVuU=", + "requires": { + "base64url": "2.0.0", + "buffer-equal-constant-time": "1.0.1", + "ecdsa-sig-formatter": "1.0.9", + "safe-buffer": "5.0.1" + } + }, + "jws": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/jws/-/jws-3.1.4.tgz", + "integrity": "sha1-+ei5M46KhHJ31kRLFGT2GIDgUKI=", + "requires": { + "base64url": "2.0.0", + "jwa": "1.1.5", + "safe-buffer": "5.0.1" + } + }, + "lodash.once": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", + "integrity": "sha1-DdOXEhPHxW34gJd9UEyI+0cal6w=" + }, + "moment": { + "version": "2.18.1", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.18.1.tgz", + "integrity": "sha1-w2GT3Tzhwu7SrbfIAtu8d6gbHA8=" + }, + "ms": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.3.tgz", + "integrity": "sha1-cIFVpeROM/X9D8U+gdDUCpG+H/8=" + }, + "promise-polyfill": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/promise-polyfill/-/promise-polyfill-6.0.2.tgz", + "integrity": "sha1-2chtPcTcLfkBboiUbe/Wm0m0EWI=" + }, + "safe-buffer": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.0.1.tgz", + "integrity": "sha1-0mPKVGls2KMGtcplUekt5XkY++c=" + }, + "topo": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/topo/-/topo-1.1.0.tgz", + "integrity": "sha1-6ddRYV0buH3IZdsYL6HKCl71NtU=", + "requires": { + "hoek": "2.16.3" + } + }, + "websocket-driver": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.6.5.tgz", + "integrity": "sha1-XLJVbOuF9Dc8bYI4qmkchFThOjY=", + "requires": { + "websocket-extensions": "0.1.1" + } + }, + "websocket-extensions": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.1.tgz", + "integrity": "sha1-domUmcGEtu91Q3fC27DNbLVdKec=" + }, + "xmlhttprequest": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz", + "integrity": "sha1-Z/4HXFwk/vOfnWX197f+dRcZaPw=" + }, + "xtend": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" } } }, - "find-parent-dir": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/find-parent-dir/-/find-parent-dir-0.3.0.tgz", - "integrity": "sha1-M8RLQpqysvBkYpnF+fcY83b/jVQ=" - }, "firebase-auto-ids": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/firebase-auto-ids/-/firebase-auto-ids-1.1.0.tgz", @@ -1362,9 +1476,9 @@ "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" }, "form-data": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz", - "integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.1.tgz", + "integrity": "sha1-b7lPvXGIUwbXPRXMSX/kzE7NRL8=", "requires": { "asynckit": "0.4.0", "combined-stream": "1.0.5", @@ -1380,7 +1494,7 @@ "jsonfile": "2.4.0", "klaw": "1.3.1", "path-is-absolute": "1.0.1", - "rimraf": "2.6.1" + "rimraf": "2.6.2" } }, "fs.realpath": { @@ -1388,6 +1502,27 @@ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, + "fstream": { + "version": "0.1.31", + "resolved": "https://registry.npmjs.org/fstream/-/fstream-0.1.31.tgz", + "integrity": "sha1-czfwWPu7vvqMn1YaKMqwhJICyYg=", + "requires": { + "graceful-fs": "3.0.11", + "inherits": "2.0.3", + "mkdirp": "0.5.1", + "rimraf": "2.6.2" + }, + "dependencies": { + "graceful-fs": { + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-3.0.11.tgz", + "integrity": "sha1-dhPHeKGv6mLyXGMKCG1/Osu92Bg=", + "requires": { + "natives": "1.1.1" + } + } + } + }, "function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", @@ -1414,10 +1549,11 @@ "integrity": "sha1-V4/oNDjVlP/6f0z7la+8OQryDEs=" }, "getmac": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/getmac/-/getmac-1.2.1.tgz", - "integrity": "sha1-DQlf0GJ4UAQ+rB3PoLEgu9wUJtE=", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/getmac/-/getmac-1.4.0.tgz", + "integrity": "sha512-sfMUDq2Y0RSCszpvjZ4AMw6YkWr7FXdBPpyXq32MQ2mRmK8twqFYj2NfIJdgPq443PQrMYM06Q1KhupOhNTxKA==", "requires": { + "editions": "1.3.4", "extract-opts": "3.3.1" } }, @@ -1427,13 +1563,6 @@ "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", "requires": { "assert-plus": "1.0.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" - } } }, "github-from-package": { @@ -1475,26 +1604,24 @@ "integrity": "sha1-Dqd0NxXbjY3ixe3hd14bRayFwC8=" }, "grpc": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/grpc/-/grpc-1.6.0.tgz", - "integrity": "sha1-LWN9HligPFMOvJvC3WwTXCTBIs8=", + "version": "1.8.4", + "resolved": "https://registry.npmjs.org/grpc/-/grpc-1.8.4.tgz", + "integrity": "sha1-gdG0nM3SWnFJ8Ynzw2sSPKRsqpU=", "requires": { "arguejs": "0.2.3", "lodash": "4.17.4", - "nan": "2.7.0", - "node-pre-gyp": "0.6.36", + "nan": "2.8.0", + "node-pre-gyp": "0.6.39", "protobufjs": "5.0.2" }, "dependencies": { "abbrev": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.0.tgz", - "integrity": "sha1-0FVMIlZjbi9W58LlrRg/hZQo2B8=" + "version": "1.1.1", + "bundled": true }, "ajv": { "version": "4.11.8", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz", - "integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=", + "bundled": true, "requires": { "co": "4.6.0", "json-stable-stringify": "1.0.1" @@ -1502,18 +1629,15 @@ }, "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.1.2", - "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.1.2.tgz", - "integrity": "sha512-ZpYajIfO0j2cOFTO955KUMIKNmj6zhX8kVztMAxFsDaMwz+9Z9SV0uou2pC9HJqcfpffOsjnbrDMvkNy+9RXPw==" + "version": "1.2.0", + "bundled": 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=", + "bundled": true, "requires": { "delegates": "1.0.0", "readable-stream": "2.3.3" @@ -1521,38 +1645,31 @@ }, "asn1": { "version": "0.2.3", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", - "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=" + "bundled": true }, "assert-plus": { "version": "0.2.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz", - "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=" + "bundled": true }, "asynckit": { "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + "bundled": true }, "aws-sign2": { "version": "0.6.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz", - "integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8=" + "bundled": true }, "aws4": { "version": "1.6.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.6.0.tgz", - "integrity": "sha1-g+9cqGCysy5KDe7e6MdxudtXRx4=" + "bundled": true }, "balanced-match": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + "bundled": true }, "bcrypt-pbkdf": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz", - "integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=", + "bundled": true, "optional": true, "requires": { "tweetnacl": "0.14.5" @@ -1560,24 +1677,21 @@ }, "block-stream": { "version": "0.0.9", - "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz", - "integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=", + "bundled": true, "requires": { "inherits": "2.0.3" } }, "boom": { "version": "2.10.1", - "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", - "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=", + "bundled": true, "requires": { "hoek": "2.16.3" } }, "brace-expansion": { "version": "1.1.8", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", - "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=", + "bundled": true, "requires": { "balanced-match": "1.0.0", "concat-map": "0.0.1" @@ -1585,92 +1699,81 @@ }, "caseless": { "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" + "bundled": true }, "co": { "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" + "bundled": 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=" + "bundled": true }, "combined-stream": { "version": "1.0.5", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz", - "integrity": "sha1-k4NwpXtKUd6ix3wV1cX9+JUWQAk=", + "bundled": true, "requires": { "delayed-stream": "1.0.0" } }, "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=" + "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 }, "cryptiles": { "version": "2.0.5", - "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", - "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=", + "bundled": true, "requires": { "boom": "2.10.1" } }, "dashdash": { "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "bundled": true, "requires": { "assert-plus": "1.0.0" }, "dependencies": { "assert-plus": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + "bundled": true } } }, "debug": { "version": "2.6.8", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz", - "integrity": "sha1-5zFTHKLt4n0YgiJCfaF4IdaP9Pw=", + "bundled": true, "requires": { "ms": "2.0.0" } }, "deep-extend": { "version": "0.4.2", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.4.2.tgz", - "integrity": "sha1-SLaZwn4zS/ifEIkr5DL25MfTSn8=" + "bundled": true }, "delayed-stream": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" + "bundled": true }, "delegates": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", - "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=" + "bundled": true + }, + "detect-libc": { + "version": "1.0.3", + "bundled": true }, "ecc-jsbn": { "version": "0.1.1", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", - "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", + "bundled": true, "optional": true, "requires": { "jsbn": "0.1.1" @@ -1678,49 +1781,42 @@ }, "extend": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", - "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=" + "bundled": true }, "extsprintf": { "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" + "bundled": true }, "forever-agent": { "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" + "bundled": true }, "form-data": { "version": "2.1.4", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz", - "integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=", + "bundled": true, "requires": { "asynckit": "0.4.0", "combined-stream": "1.0.5", - "mime-types": "2.1.16" + "mime-types": "2.1.17" } }, "fs.realpath": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + "bundled": true }, "fstream": { "version": "1.0.11", - "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz", - "integrity": "sha1-XB+x8RdHcRTwYyoOtLcbPLD9MXE=", + "bundled": true, "requires": { "graceful-fs": "4.1.11", "inherits": "2.0.3", "mkdirp": "0.5.1", - "rimraf": "2.6.1" + "rimraf": "2.6.2" } }, "fstream-ignore": { "version": "1.0.5", - "resolved": "https://registry.npmjs.org/fstream-ignore/-/fstream-ignore-1.0.5.tgz", - "integrity": "sha1-nDHa40dnAY/h0kmyTa2mfQktoQU=", + "bundled": true, "requires": { "fstream": "1.0.11", "inherits": "2.0.3", @@ -1729,10 +1825,9 @@ }, "gauge": { "version": "2.7.4", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", - "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", + "bundled": true, "requires": { - "aproba": "1.1.2", + "aproba": "1.2.0", "console-control-strings": "1.1.0", "has-unicode": "2.0.1", "object-assign": "4.1.1", @@ -1744,23 +1839,20 @@ }, "getpass": { "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "bundled": true, "requires": { "assert-plus": "1.0.0" }, "dependencies": { "assert-plus": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + "bundled": true } } }, "glob": { "version": "7.1.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "bundled": true, "requires": { "fs.realpath": "1.0.0", "inflight": "1.0.6", @@ -1772,18 +1864,15 @@ }, "graceful-fs": { "version": "4.1.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" + "bundled": true }, "har-schema": { "version": "1.0.5", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-1.0.5.tgz", - "integrity": "sha1-0mMTX0MwfALGAq/I/pWXDAFRNp4=" + "bundled": true }, "har-validator": { "version": "4.2.1", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-4.2.1.tgz", - "integrity": "sha1-M0gdDxu/9gDdID11gSpqX7oALio=", + "bundled": true, "requires": { "ajv": "4.11.8", "har-schema": "1.0.5" @@ -1791,13 +1880,11 @@ }, "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 }, "hawk": { "version": "3.1.3", - "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz", - "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=", + "bundled": true, "requires": { "boom": "2.10.1", "cryptiles": "2.0.5", @@ -1807,13 +1894,11 @@ }, "hoek": { "version": "2.16.3", - "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", - "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=" + "bundled": true }, "http-signature": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz", - "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=", + "bundled": true, "requires": { "assert-plus": "0.2.0", "jsprim": "1.4.1", @@ -1822,8 +1907,7 @@ }, "inflight": { "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "bundled": true, "requires": { "once": "1.4.0", "wrappy": "1.0.2" @@ -1831,70 +1915,58 @@ }, "inherits": { "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + "bundled": true }, "ini": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.4.tgz", - "integrity": "sha1-BTfLedr1m1mhpRff9wbIbsA5Fi4=" + "version": "1.3.5", + "bundled": 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=", + "bundled": true, "requires": { "number-is-nan": "1.0.1" } }, "is-typedarray": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" + "bundled": true }, "isarray": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + "bundled": true }, "isstream": { "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" + "bundled": true }, "jsbn": { "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "bundled": true, "optional": true }, "json-schema": { "version": "0.2.3", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" + "bundled": true }, "json-stable-stringify": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", - "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", + "bundled": true, "requires": { "jsonify": "0.0.0" } }, "json-stringify-safe": { "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" + "bundled": true }, "jsonify": { "version": "0.0.0", - "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", - "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=" + "bundled": true }, "jsprim": { "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", - "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "bundled": true, "requires": { "assert-plus": "1.0.0", "extsprintf": "1.3.0", @@ -1904,86 +1976,71 @@ "dependencies": { "assert-plus": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + "bundled": true } } }, "mime-db": { - "version": "1.29.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.29.0.tgz", - "integrity": "sha1-SNJtI1WJZRcErFkWygYAGRQmaHg=" + "version": "1.30.0", + "bundled": true }, "mime-types": { - "version": "2.1.16", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.16.tgz", - "integrity": "sha1-K4WKUuXs1RbbiXrCvodIeDBpjiM=", + "version": "2.1.17", + "bundled": true, "requires": { - "mime-db": "1.29.0" + "mime-db": "1.30.0" } }, "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.8" } }, "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + "version": "0.0.8", + "bundled": true }, "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" - }, - "dependencies": { - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" - } } }, "ms": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + "bundled": true }, "node-pre-gyp": { - "version": "0.6.36", - "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.6.36.tgz", - "integrity": "sha1-22BBEst04NR3VU6bUFsXq936t4Y=", + "version": "0.6.39", + "bundled": true, "requires": { + "detect-libc": "1.0.3", + "hawk": "3.1.3", "mkdirp": "0.5.1", "nopt": "4.0.1", "npmlog": "4.1.2", - "rc": "1.2.1", + "rc": "1.2.3", "request": "2.81.0", - "rimraf": "2.6.1", + "rimraf": "2.6.2", "semver": "5.4.1", "tar": "2.2.1", - "tar-pack": "3.4.0" + "tar-pack": "3.4.1" } }, "nopt": { "version": "4.0.1", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz", - "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=", + "bundled": true, "requires": { - "abbrev": "1.1.0", + "abbrev": "1.1.1", "osenv": "0.1.4" } }, "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, "requires": { "are-we-there-yet": "1.1.4", "console-control-strings": "1.1.0", @@ -1993,41 +2050,34 @@ }, "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=" + "bundled": true }, "oauth-sign": { "version": "0.8.2", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", - "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=" + "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 }, "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" } }, "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 }, "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 }, "osenv": { "version": "0.1.4", - "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.4.tgz", - "integrity": "sha1-Qv5tWVPfBsgGS+bxdsPQWqqjRkQ=", + "bundled": true, "requires": { "os-homedir": "1.0.2", "os-tmpdir": "1.0.2" @@ -2035,44 +2085,43 @@ }, "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 }, "performance-now": { "version": "0.2.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-0.2.0.tgz", - "integrity": "sha1-M+8wxcd9TqIcWlOGnZG1bY8lVeU=" + "bundled": true }, "process-nextick-args": { "version": "1.0.7", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", - "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=" + "bundled": true }, "punycode": { "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" + "bundled": true }, "qs": { "version": "6.4.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz", - "integrity": "sha1-E+JtKK1rD/qpExLNO/cI7TUecjM=" + "bundled": true }, "rc": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.1.tgz", - "integrity": "sha1-LgPo5C7kULjLPc5lvhv4l04d/ZU=", + "version": "1.2.3", + "bundled": true, "requires": { "deep-extend": "0.4.2", - "ini": "1.3.4", + "ini": "1.3.5", "minimist": "1.2.0", "strip-json-comments": "2.0.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "bundled": true + } } }, "readable-stream": { "version": "2.3.3", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", - "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", + "bundled": true, "requires": { "core-util-is": "1.0.2", "inherits": "2.0.3", @@ -2085,8 +2134,7 @@ }, "request": { "version": "2.81.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.81.0.tgz", - "integrity": "sha1-xpKJRqDgbF+Nb4qTM0af/aRimKA=", + "bundled": true, "requires": { "aws-sign2": "0.6.0", "aws4": "1.6.0", @@ -2101,57 +2149,50 @@ "is-typedarray": "1.0.0", "isstream": "0.1.2", "json-stringify-safe": "5.0.1", - "mime-types": "2.1.16", + "mime-types": "2.1.17", "oauth-sign": "0.8.2", "performance-now": "0.2.0", "qs": "6.4.0", "safe-buffer": "5.1.1", "stringstream": "0.0.5", - "tough-cookie": "2.3.2", + "tough-cookie": "2.3.3", "tunnel-agent": "0.6.0", "uuid": "3.1.0" } }, "rimraf": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.1.tgz", - "integrity": "sha1-wjOOxkPfeht/5cVPqG9XQopV8z0=", + "version": "2.6.2", + "bundled": true, "requires": { "glob": "7.1.2" } }, "safe-buffer": { "version": "5.1.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", - "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" + "bundled": true }, "semver": { "version": "5.4.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", - "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==" + "bundled": 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 }, "signal-exit": { "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" + "bundled": true }, "sntp": { "version": "1.0.9", - "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", - "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=", + "bundled": true, "requires": { "hoek": "2.16.3" } }, "sshpk": { "version": "1.13.1", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.13.1.tgz", - "integrity": "sha1-US322mKHFEMW3EwY/hzx2UBzm+M=", + "bundled": true, "requires": { "asn1": "0.2.3", "assert-plus": "1.0.0", @@ -2165,51 +2206,44 @@ "dependencies": { "assert-plus": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + "bundled": true } } }, + "string_decoder": { + "version": "1.0.3", + "bundled": true, + "requires": { + "safe-buffer": "5.1.1" + } + }, "string-width": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "bundled": true, "requires": { "code-point-at": "1.1.0", "is-fullwidth-code-point": "1.0.0", "strip-ansi": "3.0.1" } }, - "string_decoder": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", - "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", - "requires": { - "safe-buffer": "5.1.1" - } - }, "stringstream": { "version": "0.0.5", - "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", - "integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg=" + "bundled": true }, "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" } }, "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 }, "tar": { "version": "2.2.1", - "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz", - "integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=", + "bundled": true, "requires": { "block-stream": "0.0.9", "fstream": "1.0.11", @@ -2217,61 +2251,53 @@ } }, "tar-pack": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/tar-pack/-/tar-pack-3.4.0.tgz", - "integrity": "sha1-I74tf2cagzk3bL2wuP4/3r8xeYQ=", + "version": "3.4.1", + "bundled": true, "requires": { "debug": "2.6.8", "fstream": "1.0.11", "fstream-ignore": "1.0.5", "once": "1.4.0", "readable-stream": "2.3.3", - "rimraf": "2.6.1", + "rimraf": "2.6.2", "tar": "2.2.1", "uid-number": "0.0.6" } }, "tough-cookie": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.2.tgz", - "integrity": "sha1-8IH3bkyFcg5sN6X6ztc3FQ2EByo=", + "version": "2.3.3", + "bundled": true, "requires": { "punycode": "1.4.1" } }, "tunnel-agent": { "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "bundled": true, "requires": { "safe-buffer": "5.1.1" } }, "tweetnacl": { "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "bundled": true, "optional": true }, "uid-number": { "version": "0.0.6", - "resolved": "https://registry.npmjs.org/uid-number/-/uid-number-0.0.6.tgz", - "integrity": "sha1-DqEOgDXo61uOREnwbaHHMGY7qoE=" + "bundled": true }, "util-deprecate": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + "bundled": true }, "uuid": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.1.0.tgz", - "integrity": "sha512-DIWtzUkw04M4k3bf1IcpS2tngXEL26YUD2M0tMDUpnUrz2hgzUBlD55a4FjdLGPvfHxS6uluGWvaVEqgBcVa+g==" + "bundled": true }, "verror": { "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "bundled": true, "requires": { "assert-plus": "1.0.0", "core-util-is": "1.0.2", @@ -2280,38 +2306,35 @@ "dependencies": { "assert-plus": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + "bundled": 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==", + "bundled": true, "requires": { "string-width": "1.0.2" } }, "wrappy": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + "bundled": true } } }, "har-schema": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-1.0.5.tgz", - "integrity": "sha1-0mMTX0MwfALGAq/I/pWXDAFRNp4=" + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" }, "har-validator": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-4.2.1.tgz", - "integrity": "sha1-M0gdDxu/9gDdID11gSpqX7oALio=", + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz", + "integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=", "requires": { - "ajv": "4.11.8", - "har-schema": "1.0.5" + "ajv": "5.5.2", + "har-schema": "2.0.0" } }, "has": { @@ -2373,14 +2396,14 @@ } }, "hawk": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz", - "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/hawk/-/hawk-6.0.2.tgz", + "integrity": "sha512-miowhl2+U7Qle4vdLqDdPt9m09K6yZhkLDTWGoUiUzrQCn+mHHSmfJgAyGaLRZbPmTqfFFjRV1QWCW0VWUJBbQ==", "requires": { - "boom": "2.10.1", - "cryptiles": "2.0.5", - "hoek": "2.16.3", - "sntp": "1.0.9" + "boom": "4.3.1", + "cryptiles": "3.1.2", + "hoek": "4.2.0", + "sntp": "2.1.0" } }, "hmac-drbg": { @@ -2394,9 +2417,9 @@ } }, "hoek": { - "version": "2.16.3", - "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", - "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=" + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-4.2.0.tgz", + "integrity": "sha512-v0XCLxICi9nPfYrS9RL8HbYnXi9obYAeLbSP00BmnZwCK9+Ih9WOjoZ8YoHCoav2csqn4FOz4Orldsy2dmDwmQ==" }, "htmlescape": { "version": "1.1.1", @@ -2413,11 +2436,11 @@ } }, "http-signature": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz", - "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", "requires": { - "assert-plus": "0.2.0", + "assert-plus": "1.0.0", "jsprim": "1.4.1", "sshpk": "1.13.1" } @@ -2428,9 +2451,9 @@ "integrity": "sha1-P5E2XKvmC3ftDruiS0VOPgnZWoI=" }, "iconv-lite": { - "version": "0.4.18", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.18.tgz", - "integrity": "sha512-sr1ZQph3UwHTR0XftSbK85OvBbxe/abLGzEnPENCQwmHf7sck8Oyu4ob3LgBxWWxRoM+QszeUyl7jbqapu2TqA==" + "version": "0.4.19", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", + "integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==" }, "ieee754": { "version": "1.1.8", @@ -2462,40 +2485,9 @@ "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" }, "ini": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.4.tgz", - "integrity": "sha1-BTfLedr1m1mhpRff9wbIbsA5Fi4=" - }, - "inline-process-browser": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/inline-process-browser/-/inline-process-browser-1.0.0.tgz", - "integrity": "sha1-RqYbFT3TybFiSxoAYm7bT39BTyI=", - "requires": { - "falafel": "1.2.0", - "through2": "0.6.5" - }, - "dependencies": { - "readable-stream": { - "version": "1.0.34", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", - "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", - "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "0.0.1", - "string_decoder": "0.10.31" - } - }, - "through2": { - "version": "0.6.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", - "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", - "requires": { - "readable-stream": "1.0.34", - "xtend": "4.0.1" - } - } - } + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==" }, "inline-source-map": { "version": "0.3.1", @@ -2520,25 +2512,16 @@ "resolved": "https://registry.npmjs.org/insert-module-globals/-/insert-module-globals-6.6.3.tgz", "integrity": "sha1-IGOOKaMPntHKLjqCX7wsulJG3fw=", "requires": { - "JSONStream": "1.3.1", "combine-source-map": "0.6.1", "concat-stream": "1.4.10", - "is-buffer": "1.1.5", + "is-buffer": "1.1.6", + "JSONStream": "1.3.2", "lexical-scope": "1.2.0", "process": "0.11.10", - "through2": "1.1.1", - "xtend": "4.0.1" - }, - "dependencies": { - "JSONStream": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.1.tgz", - "integrity": "sha1-cH92HgHa6eFvG8+TcDt4xwlmV5o=", - "requires": { - "jsonparse": "1.3.1", - "through": "2.3.8" - } - }, + "through2": "1.1.1", + "xtend": "4.0.1" + }, + "dependencies": { "combine-source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.6.1.tgz", @@ -2568,6 +2551,15 @@ "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=" }, + "JSONStream": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.2.tgz", + "integrity": "sha1-wQI3G27Dp887hHygDCC7D85Mbeo=", + "requires": { + "jsonparse": "1.3.1", + "through": "2.3.8" + } + }, "process": { "version": "0.11.10", "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", @@ -2594,9 +2586,9 @@ "integrity": "sha1-6YUMwsyGDDvAl36EzPDdRkWEJ5o=" }, "is-buffer": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.5.tgz", - "integrity": "sha1-Hzsm72E7IUuIy8ojzGwB2Hlh7sw=" + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" }, "is-defined": { "version": "1.0.0", @@ -2648,9 +2640,9 @@ } }, "js-yaml": { - "version": "3.9.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.9.1.tgz", - "integrity": "sha512-CbcG379L1e+mWBnLvHWWeLs8GyV/EMw862uLI3c+GxVyDHWZcjZinwuBd3iW2pgxgIlksW/1vNJa4to+RvDOww==", + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.10.0.tgz", + "integrity": "sha512-O2v52ffjLa9VeM43J4XocZE//WT9N0IiwDa3KSHH7Tu8CtH+1qM8SIZvnsTh6v+4yFy5KUY3BHUVwjpfAWsjIA==", "requires": { "argparse": "1.0.9", "esprima": "4.0.0" @@ -2667,10 +2659,15 @@ "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" }, + "json-schema-traverse": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", + "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=" + }, "json-stable-stringify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", - "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-0.0.1.tgz", + "integrity": "sha1-YRwj6BTbN1Un34URk9tZ3Sryf0U=", "requires": { "jsonify": "0.0.0" } @@ -2698,6 +2695,15 @@ "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-0.0.5.tgz", "integrity": "sha1-MwVCrT8KZUZlt3jz6y2an6UHrGQ=" }, + "JSONStream": { + "version": "0.8.4", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-0.8.4.tgz", + "integrity": "sha1-kWV9/m/4V0gwZhMrRhi2Lo9Ih70=", + "requires": { + "jsonparse": "0.0.5", + "through": "2.3.8" + } + }, "jsonwebtoken": { "version": "5.7.0", "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-5.7.0.tgz", @@ -2724,38 +2730,6 @@ "extsprintf": "1.3.0", "json-schema": "0.2.3", "verror": "1.10.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" - } - } - }, - "jstransform": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/jstransform/-/jstransform-3.0.0.tgz", - "integrity": "sha1-olkats7o2XvzvoMNv6IxO4fNZAs=", - "requires": { - "base62": "0.1.1", - "esprima-fb": "3001.1.0-dev-harmony-fb", - "source-map": "0.1.31" - }, - "dependencies": { - "esprima-fb": { - "version": "3001.1.0-dev-harmony-fb", - "resolved": "https://registry.npmjs.org/esprima-fb/-/esprima-fb-3001.0001.0000-dev-harmony-fb.tgz", - "integrity": "sha1-t303q8046gt3Qmu4vCkizmtCZBE=" - }, - "source-map": { - "version": "0.1.31", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.31.tgz", - "integrity": "sha1-n3BNDWnZ4TioG63267T94z0VHGE=", - "requires": { - "amdefine": "1.0.1" - } - } } }, "jwa": { @@ -2814,22 +2788,19 @@ } }, "lie": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/lie/-/lie-3.0.2.tgz", - "integrity": "sha1-/9oh17uibzd8rYZdNkmy/Izjn+o=", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/lie/-/lie-3.1.1.tgz", + "integrity": "sha1-mkNrLMd0bKWd56QfpGmz77dr2H4=", "requires": { - "es3ify": "0.1.4", - "immediate": "3.0.6", - "inline-process-browser": "1.0.0", - "unreachable-branch-transform": "0.3.0" + "immediate": "3.0.6" } }, "localforage": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/localforage/-/localforage-1.5.0.tgz", - "integrity": "sha1-a5lOGbVmEfqF3zmS3zl6xKtm6BU=", + "version": "1.5.6", + "resolved": "https://registry.npmjs.org/localforage/-/localforage-1.5.6.tgz", + "integrity": "sha1-0DTRXlNy7pfGQXPpqa65aBX13QY=", "requires": { - "lie": "3.0.2" + "lie": "3.1.1" } }, "lodash": { @@ -2852,6 +2823,11 @@ "resolved": "https://registry.npmjs.org/long-stack-traces/-/long-stack-traces-0.1.2.tgz", "integrity": "sha1-YCK1Dum7x0tcvXz+6q5BZeGlRuw=" }, + "lru-cache": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz", + "integrity": "sha1-bUUk6LlV+V1PW1iFHOId1y+06VI=" + }, "map-obj": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", @@ -2881,12 +2857,12 @@ }, "matrix-app-config-helper": { "version": "https://github.com/matrix-io/matrix-app-config-helper/tarball/master", - "integrity": "sha1-T1qhwk/Ww0ctpE9R9d627pxNqcQ=", + "integrity": "sha1-tZNaazRSgUSyeyk1yuSFNQ9XiLU=", "requires": { "async": "1.5.2", "colors": "1.1.2", - "debug": "2.6.8", - "js-yaml": "3.9.1", + "debug": "2.6.9", + "js-yaml": "3.10.0", "lodash": "4.17.4" } }, @@ -2897,7 +2873,7 @@ "geo-distance": "0.1.2", "lodash": "3.10.1", "mocha": "2.5.3", - "request": "2.81.0", + "request": "2.83.0", "should": "6.0.3" }, "dependencies": { @@ -2920,183 +2896,27 @@ }, "matrix-firebase": { "version": "https://github.com/matrix-io/matrix-firebase/tarball/master", - "integrity": "sha1-nCZhR3vwF/c/8GD7zlWzN7oU1Vg=", + "integrity": "sha1-H/WsnId5HdbXeb8r/BvGqjMl9RA=", "requires": { - "async": "2.5.0", + "async": "2.6.0", "colors": "1.1.2", - "debug": "2.6.8", + "debug": "2.6.9", "firebase": "3.9.0", "jsonwebtoken": "5.7.0", "lodash": "4.17.4", "mockfirebase": "0.12.0", - "request": "2.81.0", + "request": "2.83.0", "uuid": "2.0.3" }, "dependencies": { "async": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/async/-/async-2.5.0.tgz", - "integrity": "sha512-e+lJAJeNWuPCNyxZKOBdaJGyLGHugXVQtrAwtuAe2vhxTYxFTKE73p8JuTmdH0qdQZtDvI4dhJwjZc5zsfIsYw==", + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.0.tgz", + "integrity": "sha512-xAfGg1/NTLBBKlHFmnd7PlmUW9KhVQIUuSrYem9xzFUZy13ScvtyGGejaae9iAVRiRq9+Cx7DPFaAAhCpyxyPw==", "requires": { "lodash": "4.17.4" } }, - "firebase": { - "version": "3.9.0", - "resolved": "https://registry.npmjs.org/firebase/-/firebase-3.9.0.tgz", - "integrity": "sha1-xCN/UPWO6yUIGxg51svxdfj37Zs=", - "requires": { - "dom-storage": "2.0.2", - "faye-websocket": "0.9.3", - "jsonwebtoken": "7.4.0", - "promise-polyfill": "6.0.2", - "xmlhttprequest": "1.8.0" - }, - "dependencies": { - "base64url": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/base64url/-/base64url-2.0.0.tgz", - "integrity": "sha1-6sFuA+oUOO/5Qj1puqNiYu0fcLs=" - }, - "buffer-equal-constant-time": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", - "integrity": "sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk=" - }, - "dom-storage": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/dom-storage/-/dom-storage-2.0.2.tgz", - "integrity": "sha1-7RfL9oq9EOCu+BgnE+KXxeS1ALA=" - }, - "ecdsa-sig-formatter": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.9.tgz", - "integrity": "sha1-S8kmJ07Dtau1AW5+HWCSGsJisqE=", - "requires": { - "base64url": "2.0.0", - "safe-buffer": "5.0.1" - } - }, - "faye-websocket": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.9.3.tgz", - "integrity": "sha1-SCpQWw3wrmJrlphm0710DNuWLoM=", - "requires": { - "websocket-driver": "0.6.5" - } - }, - "hoek": { - "version": "2.16.3", - "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", - "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=" - }, - "isemail": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/isemail/-/isemail-1.2.0.tgz", - "integrity": "sha1-vgPfjMPineTSxd9lASY/H6RZXpo=" - }, - "joi": { - "version": "6.10.1", - "resolved": "https://registry.npmjs.org/joi/-/joi-6.10.1.tgz", - "integrity": "sha1-TVDDGAeRIgAP5fFq8f+OGRe3fgY=", - "requires": { - "hoek": "2.16.3", - "isemail": "1.2.0", - "moment": "2.18.1", - "topo": "1.1.0" - } - }, - "jsonwebtoken": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-7.4.0.tgz", - "integrity": "sha1-UVvyu6Bw7GFbrZf9LpRQJ+tHaUY=", - "requires": { - "joi": "6.10.1", - "jws": "3.1.4", - "lodash.once": "4.1.1", - "ms": "0.7.3", - "xtend": "4.0.1" - } - }, - "jwa": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.1.5.tgz", - "integrity": "sha1-oFUs4CIHQs1S4VN3SjKQXDDnVuU=", - "requires": { - "base64url": "2.0.0", - "buffer-equal-constant-time": "1.0.1", - "ecdsa-sig-formatter": "1.0.9", - "safe-buffer": "5.0.1" - } - }, - "jws": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/jws/-/jws-3.1.4.tgz", - "integrity": "sha1-+ei5M46KhHJ31kRLFGT2GIDgUKI=", - "requires": { - "base64url": "2.0.0", - "jwa": "1.1.5", - "safe-buffer": "5.0.1" - } - }, - "lodash.once": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", - "integrity": "sha1-DdOXEhPHxW34gJd9UEyI+0cal6w=" - }, - "moment": { - "version": "2.18.1", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.18.1.tgz", - "integrity": "sha1-w2GT3Tzhwu7SrbfIAtu8d6gbHA8=" - }, - "ms": { - "version": "0.7.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.3.tgz", - "integrity": "sha1-cIFVpeROM/X9D8U+gdDUCpG+H/8=" - }, - "promise-polyfill": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/promise-polyfill/-/promise-polyfill-6.0.2.tgz", - "integrity": "sha1-2chtPcTcLfkBboiUbe/Wm0m0EWI=" - }, - "safe-buffer": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.0.1.tgz", - "integrity": "sha1-0mPKVGls2KMGtcplUekt5XkY++c=" - }, - "topo": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/topo/-/topo-1.1.0.tgz", - "integrity": "sha1-6ddRYV0buH3IZdsYL6HKCl71NtU=", - "requires": { - "hoek": "2.16.3" - } - }, - "websocket-driver": { - "version": "0.6.5", - "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.6.5.tgz", - "integrity": "sha1-XLJVbOuF9Dc8bYI4qmkchFThOjY=", - "requires": { - "websocket-extensions": "0.1.1" - } - }, - "websocket-extensions": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.1.tgz", - "integrity": "sha1-domUmcGEtu91Q3fC27DNbLVdKec=" - }, - "xmlhttprequest": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz", - "integrity": "sha1-Z/4HXFwk/vOfnWX197f+dRcZaPw=" - }, - "xtend": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", - "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" - } - } - }, "uuid": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.3.tgz", @@ -3106,19 +2926,19 @@ }, "matrix-node-sdk": { "version": "https://github.com/matrix-io/matrix-node-sdk/tarball/master", - "integrity": "sha1-zqSUc98Vs7vZMuxm2mODurvJNUg=", + "integrity": "sha1-8ScfvSrgTduhZadgFNAv3XOzuFU=", "requires": { "async": "0.7.0", "async-waterfall": "0.1.5", "browserify": "11.2.0", "colors": "1.1.2", - "debug": "2.6.8", - "engine.io-client": "1.8.4", + "debug": "2.6.9", + "engine.io-client": "1.8.5", "form-data": "0.1.4", - "getmac": "1.2.1", + "getmac": "1.4.0", "lodash": "4.17.4", "long-stack-traces": "0.1.2", - "mime": "1.4.0", + "mime": "1.6.0", "mocha": "2.5.3", "moment": "2.5.1", "nedb": "https://github.com/matrix-io/nedb/tarball/master", @@ -3126,20 +2946,11 @@ "path-to-regexp": "0.2.5", "properties-parser": "0.1.1", "ps-tree": "0.0.3", - "q": "1.5.0", - "request": "2.81.0", + "q": "1.5.1", + "request": "2.83.0", "xunit-file": "0.0.6" }, "dependencies": { - "JSONStream": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.1.tgz", - "integrity": "sha1-cH92HgHa6eFvG8+TcDt4xwlmV5o=", - "requires": { - "jsonparse": "1.3.1", - "through": "2.3.8" - } - }, "assert": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/assert/-/assert-1.3.0.tgz", @@ -3163,9 +2974,9 @@ "resolved": "https://registry.npmjs.org/browser-pack/-/browser-pack-5.0.1.tgz", "integrity": "sha1-QZdxmyDG4KqglFHFER5T77b7wY0=", "requires": { - "JSONStream": "1.3.1", "combine-source-map": "0.6.1", "defined": "1.0.0", + "JSONStream": "1.3.2", "through2": "1.1.1", "umd": "3.0.1" } @@ -3175,7 +2986,6 @@ "resolved": "https://registry.npmjs.org/browserify/-/browserify-11.2.0.tgz", "integrity": "sha1-oRu53SCdeVcrgT9+7q+Cil9cDk4=", "requires": { - "JSONStream": "1.3.1", "assert": "1.3.0", "browser-pack": "5.0.1", "browser-resolve": "1.11.2", @@ -3186,7 +2996,7 @@ "concat-stream": "1.4.10", "console-browserify": "1.1.0", "constants-browserify": "0.0.1", - "crypto-browserify": "3.11.1", + "crypto-browserify": "3.12.0", "defined": "1.0.0", "deps-sort": "1.3.9", "domain-browser": "1.1.7", @@ -3199,6 +3009,7 @@ "inherits": "2.0.3", "insert-module-globals": "6.6.3", "isarray": "0.0.1", + "JSONStream": "1.3.2", "labeled-stream-splicer": "1.0.2", "module-deps": "3.9.1", "os-browserify": "0.1.2", @@ -3209,7 +3020,7 @@ "querystring-es3": "0.2.1", "read-only-stream": "1.1.1", "readable-stream": "2.3.3", - "resolve": "1.4.0", + "resolve": "1.5.0", "shasum": "1.0.2", "shell-quote": "0.0.1", "stream-browserify": "2.0.1", @@ -3219,7 +3030,7 @@ "syntax-error": "1.3.0", "through2": "1.1.1", "timers-browserify": "1.4.2", - "tty-browserify": "0.0.0", + "tty-browserify": "0.0.1", "url": "0.10.3", "util": "0.10.3", "vm-browserify": "0.0.4", @@ -3323,6 +3134,15 @@ "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=" }, + "JSONStream": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.2.tgz", + "integrity": "sha1-wQI3G27Dp887hHygDCC7D85Mbeo=", + "requires": { + "jsonparse": "1.3.1", + "through": "2.3.8" + } + }, "minimatch": { "version": "2.0.10", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz", @@ -3349,14 +3169,6 @@ "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=" }, - "ps-tree": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/ps-tree/-/ps-tree-0.0.3.tgz", - "integrity": "sha1-2/jXUqf+Ivp9WGNWiUmWEOknbdw=", - "requires": { - "event-stream": "0.5.3" - } - }, "readable-stream": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", @@ -3387,9 +3199,9 @@ } }, "resolve": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.4.0.tgz", - "integrity": "sha512-aW7sVKPufyHqOmyyLzg/J+8606v5nevBgaliIlV7nUpVMsDnoBGV/cbSLNjZAg9q0Cfd/+easKVKQ8vOu8fn1Q==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.5.0.tgz", + "integrity": "sha512-hgoSGrc3pjzAPHNBg+KnFcK2HwlHTs/YrAGUr6qgTVUZmXv1UEXXl0bZNBKMA9fud6lRYFdPGz0xXxycPzmmiw==", "requires": { "path-parse": "1.0.5" } @@ -3423,13 +3235,13 @@ "resolved": "https://registry.npmjs.org/matrix-protos/-/matrix-protos-0.0.11.tgz", "integrity": "sha1-GAkD04S7MhEixMReFxFU1IYki+U=", "requires": { - "protobufjs": "6.8.0" + "protobufjs": "6.8.4" }, "dependencies": { "protobufjs": { - "version": "6.8.0", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.8.0.tgz", - "integrity": "sha512-47Y49f5JN5Qsbxas2TyI2zFO8j9GpQAQm5thf54fr2O8qcP/jkIXYxmYx1hN2WQFAhESU1xpVn5NWVDBB8WFnw==", + "version": "6.8.4", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.8.4.tgz", + "integrity": "sha512-d+WZqUDXKM+oZhr8yprAtQW07q08p9/V35AJ2J1fds+r903S/aH9P8uO1gmTwozOKugt2XCjdrre3OxuPRGkGg==", "requires": { "@protobufjs/aspromise": "1.1.2", "@protobufjs/base64": "1.1.2", @@ -3442,12 +3254,21 @@ "@protobufjs/pool": "1.1.0", "@protobufjs/utf8": "1.1.0", "@types/long": "3.0.32", - "@types/node": "7.0.43", + "@types/node": "8.5.9", "long": "3.2.0" } } } }, + "MD5": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/MD5/-/MD5-1.2.2.tgz", + "integrity": "sha1-2QPI7FuiI80rgEMoJIgdBLuYQcA=", + "requires": { + "charenc": "0.0.2", + "crypt": "0.0.2" + } + }, "md5.js": { "version": "1.3.4", "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.4.tgz", @@ -3474,18 +3295,18 @@ "integrity": "sha1-8DQoOBeY/4iakEBaAxgVHbBUpO0=" }, "miller-rabin": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.0.tgz", - "integrity": "sha1-SmL7HUKTPAVYOYL0xxb2+55sbT0=", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", + "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", "requires": { "bn.js": "4.11.8", "brorand": "1.1.0" } }, "mime": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.0.tgz", - "integrity": "sha512-n9ChLv77+QQEapYz8lV+rIZAW3HhAPW2CXnzb1GN5uMkuczshwvkW7XPsbzU0ZQN3sP47Er2KVkp2p3KyqZKSQ==" + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" }, "mime-db": { "version": "1.30.0", @@ -3548,11 +3369,6 @@ "to-iso-string": "0.0.2" }, "dependencies": { - "commander": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.3.0.tgz", - "integrity": "sha1-/UMOiJgy7DU7ms0d4hfBHLPu+HM=" - }, "debug": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz", @@ -3570,11 +3386,6 @@ "minimatch": "0.3.0" } }, - "lru-cache": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz", - "integrity": "sha1-bUUk6LlV+V1PW1iFHOId1y+06VI=" - }, "minimatch": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.3.0.tgz", @@ -3596,11 +3407,11 @@ "resolved": "https://registry.npmjs.org/mockfirebase/-/mockfirebase-0.12.0.tgz", "integrity": "sha1-chLO10WH9iJTaHsGU3HqqgVWfhs=", "requires": { - "MD5": "1.2.2", "browserify": "6.3.4", "browserify-shim": "3.8.14", "firebase-auto-ids": "1.1.0", - "lodash": "2.4.2" + "lodash": "2.4.2", + "MD5": "1.2.2" }, "dependencies": { "lodash": { @@ -3615,31 +3426,22 @@ "resolved": "https://registry.npmjs.org/module-deps/-/module-deps-3.9.1.tgz", "integrity": "sha1-6nXK+RmQkNJbDVUStaysuW5/h/M=", "requires": { - "JSONStream": "1.3.1", "browser-resolve": "1.11.2", "concat-stream": "1.4.10", "defined": "1.0.0", - "detective": "4.5.0", + "detective": "4.7.1", "duplexer2": "0.0.2", "inherits": "2.0.3", + "JSONStream": "1.3.2", "parents": "1.0.1", "readable-stream": "1.1.14", - "resolve": "1.4.0", + "resolve": "1.5.0", "stream-combiner2": "1.0.2", "subarg": "1.0.0", "through2": "1.1.1", "xtend": "4.0.1" }, "dependencies": { - "JSONStream": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.1.tgz", - "integrity": "sha1-cH92HgHa6eFvG8+TcDt4xwlmV5o=", - "requires": { - "jsonparse": "1.3.1", - "through": "2.3.8" - } - }, "defined": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", @@ -3650,6 +3452,15 @@ "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=" }, + "JSONStream": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.2.tgz", + "integrity": "sha1-wQI3G27Dp887hHygDCC7D85Mbeo=", + "requires": { + "jsonparse": "1.3.1", + "through": "2.3.8" + } + }, "parents": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parents/-/parents-1.0.1.tgz", @@ -3659,9 +3470,9 @@ } }, "resolve": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.4.0.tgz", - "integrity": "sha512-aW7sVKPufyHqOmyyLzg/J+8606v5nevBgaliIlV7nUpVMsDnoBGV/cbSLNjZAg9q0Cfd/+easKVKQ8vOu8fn1Q==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.5.0.tgz", + "integrity": "sha512-hgoSGrc3pjzAPHNBg+KnFcK2HwlHTs/YrAGUr6qgTVUZmXv1UEXXl0bZNBKMA9fud6lRYFdPGz0xXxycPzmmiw==", "requires": { "path-parse": "1.0.5" } @@ -3687,14 +3498,14 @@ "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" }, "nan": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.7.0.tgz", - "integrity": "sha1-2Vv3IeyHfgjbJ27T/G63j5CDrUY=" + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.8.0.tgz", + "integrity": "sha1-7XFfP+neArV6XmJS2QqWZ14fCFo=" }, "natives": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/natives/-/natives-1.1.0.tgz", - "integrity": "sha1-6f+EFBimsux6SV6TmYT3jxY+bjE=" + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/natives/-/natives-1.1.1.tgz", + "integrity": "sha512-8eRaxn8u/4wN8tGkhlc2cgwwvOLMLUMUn4IYTexMgWd+LyUDfeXVkk2ygQR0hvIHbJQXgHujia3ieUUDwNGkEA==" }, "nedb": { "version": "https://github.com/matrix-io/nedb/tarball/master", @@ -3702,7 +3513,7 @@ "requires": { "async": "0.2.10", "binary-search-tree": "0.2.5", - "localforage": "1.5.0", + "localforage": "1.5.6", "mkdirp": "0.5.1", "underscore": "1.4.4" }, @@ -3719,8 +3530,8 @@ "resolved": "https://registry.npmjs.org/needle/-/needle-1.1.2.tgz", "integrity": "sha1-0oQaElv9dP77MMA0QQQ2kGHD4To=", "requires": { - "debug": "2.6.8", - "iconv-lite": "0.4.18" + "debug": "2.6.9", + "iconv-lite": "0.4.19" } }, "network": { @@ -3734,9 +3545,12 @@ } }, "node-abi": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.1.1.tgz", - "integrity": "sha512-6oxV13poCOv7TfGvhsSz6XZWpXeKkdGVh72++cs33OfMh3KAX8lN84dCvmqSETyDXAFcUHtV7eJrgFBoOqZbNQ==" + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.2.0.tgz", + "integrity": "sha512-FqVC0WNNL8fQWQK3GYTESfwZXZKDbSIiEEIvufq7HV6Lj0IDDZRVa4CU/KTA0JVlqY9eTDSuPiC8FS9UfGVuzA==", + "requires": { + "semver": "5.5.0" + } }, "noop-logger": { "version": "0.1.1", @@ -3853,11 +3667,11 @@ "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.0.tgz", "integrity": "sha1-N8T5t+06tlx0gXtfJICTf7+XxxI=", "requires": { - "asn1.js": "4.9.1", - "browserify-aes": "1.0.8", + "asn1.js": "4.9.2", + "browserify-aes": "1.1.1", "create-hash": "1.1.3", "evp_bytestokey": "1.0.3", - "pbkdf2": "3.0.13" + "pbkdf2": "3.0.14" } }, "parsejson": { @@ -3915,58 +3729,66 @@ "integrity": "sha1-C0JpkeOH/ExnXeI1V/NYcV62b7A=" }, "pbkdf2": { - "version": "3.0.13", - "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.13.tgz", - "integrity": "sha512-+dCHxDH+djNtjgWmvVC/my3SYBAKpKNqKSjLkp+GtWWYe4XPE+e/PSD2aCanlEZZnqPk2uekTKNC/ccbwd2X2Q==", + "version": "3.0.14", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.14.tgz", + "integrity": "sha512-gjsZW9O34fm0R7PaLHRJmLLVfSoesxztjPjE9o6R+qtVJij90ltg1joIovN9GKrRW3t1PzhDDG3UMEMFfZ+1wA==", "requires": { "create-hash": "1.1.3", "create-hmac": "1.1.6", "ripemd160": "2.0.1", "safe-buffer": "5.1.1", - "sha.js": "2.4.8" + "sha.js": "2.4.10" } }, "performance-now": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-0.2.0.tgz", - "integrity": "sha1-M+8wxcd9TqIcWlOGnZG1bY8lVeU=" + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" }, "pi-wifi": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/pi-wifi/-/pi-wifi-1.2.0.tgz", - "integrity": "sha1-hxrt3Pjd0huhlLGBHPSiksCMWmA=", + "resolved": "https://registry.npmjs.org/pi-wifi/-/pi-wifi-1.0.1.tgz", + "integrity": "sha1-lToXjoDKsU9RaPHPfCx4BTdE6fE=", "requires": { - "async": "2.5.0", + "async": "2.6.0", "wireless-tools": "0.19.0" }, "dependencies": { "async": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/async/-/async-2.5.0.tgz", - "integrity": "sha512-e+lJAJeNWuPCNyxZKOBdaJGyLGHugXVQtrAwtuAe2vhxTYxFTKE73p8JuTmdH0qdQZtDvI4dhJwjZc5zsfIsYw==", + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.0.tgz", + "integrity": "sha512-xAfGg1/NTLBBKlHFmnd7PlmUW9KhVQIUuSrYem9xzFUZy13ScvtyGGejaae9iAVRiRq9+Cx7DPFaAAhCpyxyPw==", "requires": { "lodash": "4.17.4" + }, + "dependencies": { + "lodash": { + "version": "4.17.4", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", + "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=" + } } } } }, "prebuild-install": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-2.2.2.tgz", - "integrity": "sha512-F46pcvDxtQhbV3B+dm+exHuKxIyJK26fVNiJRmbTW/5D7o0Z2yzc8CKeu7UWbo9XxQZoVOC88aKgySAsza+cWw==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-2.5.0.tgz", + "integrity": "sha512-3wlyZgmkeeyduOR8Ursu5gKr3yWAYObACa5aJOtt2farRRFV/+zXk/Y3wM6yQRMqmqHh+pHAwyKp5r82K699Rg==", "requires": { + "detect-libc": "1.0.3", "expand-template": "1.1.0", "github-from-package": "0.0.0", "minimist": "1.2.0", "mkdirp": "0.5.1", - "node-abi": "2.1.1", + "node-abi": "2.2.0", "noop-logger": "0.1.1", "npmlog": "4.1.2", "os-homedir": "1.0.2", - "pump": "1.0.2", - "rc": "1.2.1", + "pump": "1.0.3", + "rc": "1.2.5", "simple-get": "1.4.3", - "tar-fs": "1.15.3", + "tar-fs": "1.16.0", "tunnel-agent": "0.6.0", "xtend": "4.0.1" }, @@ -3978,11 +3800,6 @@ } } }, - "private": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/private/-/private-0.1.7.tgz", - "integrity": "sha1-aM5eih7woju1cMwoU3tTMqumPvE=" - }, "process": { "version": "0.8.0", "resolved": "https://registry.npmjs.org/process/-/process-0.8.0.tgz", @@ -4009,6 +3826,14 @@ "yargs": "3.32.0" } }, + "ps-tree": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/ps-tree/-/ps-tree-0.0.3.tgz", + "integrity": "sha1-2/jXUqf+Ivp9WGNWiUmWEOknbdw=", + "requires": { + "event-stream": "0.5.3" + } + }, "public-encrypt": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.0.tgz", @@ -4018,7 +3843,7 @@ "browserify-rsa": "4.0.1", "create-hash": "1.1.3", "parse-asn1": "5.1.0", - "randombytes": "2.0.5" + "randombytes": "2.0.6" } }, "pullstream": { @@ -4046,11 +3871,11 @@ } }, "pump": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pump/-/pump-1.0.2.tgz", - "integrity": "sha1-Oz7mUS+U8OV1U4wXmV+fFpkKXVE=", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/pump/-/pump-1.0.3.tgz", + "integrity": "sha512-8k0JupWme55+9tCVE+FS5ULT3K6AbgqrGa58lTT49RpyfwwcGedHqaC5LlQNdEAumn/wFsu6aPwkuPMioy8kqw==", "requires": { - "end-of-stream": "1.4.0", + "end-of-stream": "1.4.1", "once": "1.4.0" } }, @@ -4060,14 +3885,14 @@ "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" }, "q": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/q/-/q-1.5.0.tgz", - "integrity": "sha1-3QG6ydBtMObyGa7LglPunr3DCPE=" + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", + "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=" }, "qs": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz", - "integrity": "sha1-E+JtKK1rD/qpExLNO/cI7TUecjM=" + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", + "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==" }, "querystring": { "version": "0.2.0", @@ -4080,20 +3905,29 @@ "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=" }, "randombytes": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.5.tgz", - "integrity": "sha512-8T7Zn1AhMsQ/HI1SjcCfT/t4ii3eAqco3yOcSzS4mozsOz69lHLsoMXmF9nZgnFanYscnSlUSgs8uZyKzpE6kg==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.6.tgz", + "integrity": "sha512-CIQ5OFxf4Jou6uOKe9t1AOgqpeU5fd70A8NPdHSGeYXqXsPe6peOwI0cUl88RWZ6sP1vPMV3avd/R6cZ5/sP1A==", + "requires": { + "safe-buffer": "5.1.1" + } + }, + "randomfill": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.3.tgz", + "integrity": "sha512-YL6GrhrWoic0Eq8rXVbMptH7dAxCs0J+mh5Y0euNekPPYaxEmdVGim6GdoxoRzKW2yJoU8tueifS7mYxvcFDEQ==", "requires": { + "randombytes": "2.0.6", "safe-buffer": "5.1.1" } }, "rc": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.1.tgz", - "integrity": "sha1-LgPo5C7kULjLPc5lvhv4l04d/ZU=", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.5.tgz", + "integrity": "sha1-J1zWh/bjs2zHVrqibf7oCnkDAf0=", "requires": { "deep-extend": "0.4.2", - "ini": "1.3.4", + "ini": "1.3.5", "minimist": "1.2.0", "strip-json-comments": "2.0.1" }, @@ -4133,29 +3967,6 @@ "readable-stream": "1.1.14" } }, - "recast": { - "version": "0.10.43", - "resolved": "https://registry.npmjs.org/recast/-/recast-0.10.43.tgz", - "integrity": "sha1-uV1Q9tYHYaX2JS4V2AZ4FoSRzn8=", - "requires": { - "ast-types": "0.8.15", - "esprima-fb": "15001.1001.0-dev-harmony-fb", - "private": "0.1.7", - "source-map": "0.5.7" - }, - "dependencies": { - "esprima-fb": { - "version": "15001.1001.0-dev-harmony-fb", - "resolved": "https://registry.npmjs.org/esprima-fb/-/esprima-fb-15001.1001.0-dev-harmony-fb.tgz", - "integrity": "sha1-Q761fsJujPI3092LM+QlM1d/Jlk=" - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" - } - } - }, "rename-function-calls": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/rename-function-calls/-/rename-function-calls-0.1.1.tgz", @@ -4185,39 +3996,39 @@ "resolved": "https://registry.npmjs.org/replace-requires/-/replace-requires-1.0.4.tgz", "integrity": "sha1-AUtzMLa54lV7cQQ7ZvsCZgw79mc=", "requires": { - "detective": "4.5.0", + "detective": "4.7.1", "has-require": "1.2.2", "patch-text": "1.0.2", "xtend": "4.0.1" } }, "request": { - "version": "2.81.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.81.0.tgz", - "integrity": "sha1-xpKJRqDgbF+Nb4qTM0af/aRimKA=", + "version": "2.83.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.83.0.tgz", + "integrity": "sha512-lR3gD69osqm6EYLk9wB/G1W/laGWjzH90t1vEa2xuxHD5KUrSzp9pUSfTm+YC5Nxt2T8nMPEvKlhbQayU7bgFw==", "requires": { - "aws-sign2": "0.6.0", + "aws-sign2": "0.7.0", "aws4": "1.6.0", "caseless": "0.12.0", "combined-stream": "1.0.5", "extend": "3.0.1", "forever-agent": "0.6.1", - "form-data": "2.1.4", - "har-validator": "4.2.1", - "hawk": "3.1.3", - "http-signature": "1.1.1", + "form-data": "2.3.1", + "har-validator": "5.0.3", + "hawk": "6.0.2", + "http-signature": "1.2.0", "is-typedarray": "1.0.0", "isstream": "0.1.2", "json-stringify-safe": "5.0.1", "mime-types": "2.1.17", "oauth-sign": "0.8.2", - "performance-now": "0.2.0", - "qs": "6.4.0", + "performance-now": "2.1.0", + "qs": "6.5.1", "safe-buffer": "5.1.1", "stringstream": "0.0.5", - "tough-cookie": "2.3.2", + "tough-cookie": "2.3.3", "tunnel-agent": "0.6.0", - "uuid": "3.1.0" + "uuid": "3.2.1" } }, "resolve": { @@ -4242,9 +4053,9 @@ } }, "rimraf": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.1.tgz", - "integrity": "sha1-wjOOxkPfeht/5cVPqG9XQopV8z0=", + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", + "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", "requires": { "glob": "7.1.2" } @@ -4283,6 +4094,11 @@ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" }, + "semver": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", + "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==" + }, "set-blocking": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", @@ -4294,11 +4110,12 @@ "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=" }, "sha.js": { - "version": "2.4.8", - "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.8.tgz", - "integrity": "sha1-NwaMLEdra69ALRSknGf1l5IfY08=", + "version": "2.4.10", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.10.tgz", + "integrity": "sha512-vnwmrFDlOExK4Nm16J2KMWHLrp14lBrjxMxBJpu++EnsuBmpiYaM/MEs46Vxxm/4FvdP5yTwuCTO9it5FSjrqA==", "requires": { - "inherits": "2.0.3" + "inherits": "2.0.3", + "safe-buffer": "5.1.1" } }, "shallow-copy": { @@ -4312,17 +4129,7 @@ "integrity": "sha1-5wEjENj0F/TetXEhUOVni4euVl8=", "requires": { "json-stable-stringify": "0.0.1", - "sha.js": "2.4.8" - }, - "dependencies": { - "json-stable-stringify": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-0.0.1.tgz", - "integrity": "sha1-YRwj6BTbN1Un34URk9tZ3Sryf0U=", - "requires": { - "jsonify": "0.0.0" - } - } + "sha.js": "2.4.10" } }, "shell-quote": { @@ -4426,11 +4233,11 @@ } }, "sntp": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", - "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/sntp/-/sntp-2.1.0.tgz", + "integrity": "sha512-FL1b58BDrqS3A11lJ0zEdnJ3UOKqVxawAkF3k7F0CVN7VQ34aZrV+G8BZ1WC9ZL7NyrwsW0oviwsWDgRuVYtJg==", "requires": { - "hoek": "2.16.3" + "hoek": "4.2.0" } }, "source-map": { @@ -4459,13 +4266,6 @@ "getpass": "0.1.7", "jsbn": "0.1.1", "tweetnacl": "0.14.5" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" - } } }, "stream-browserify": { @@ -4546,6 +4346,11 @@ "through2": "1.1.1" } }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + }, "string-width": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", @@ -4556,11 +4361,6 @@ "strip-ansi": "3.0.1" } }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" - }, "stringstream": { "version": "0.0.5", "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", @@ -4608,23 +4408,23 @@ } }, "tar-fs": { - "version": "1.15.3", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-1.15.3.tgz", - "integrity": "sha1-7M+TXpQUk9gVECjmNuUc5MPKfyA=", + "version": "1.16.0", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-1.16.0.tgz", + "integrity": "sha512-I9rb6v7mjWLtOfCau9eH5L7sLJyU2BnxtEZRQ5Mt+eRKmf1F0ohXmT/Jc3fr52kDvjJ/HV5MH3soQfPL5bQ0Yg==", "requires": { "chownr": "1.0.1", "mkdirp": "0.5.1", - "pump": "1.0.2", - "tar-stream": "1.5.4" + "pump": "1.0.3", + "tar-stream": "1.5.5" } }, "tar-stream": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.5.4.tgz", - "integrity": "sha1-NlSc8E7RrumyowwBQyUiONr5QBY=", + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.5.5.tgz", + "integrity": "sha512-mQdgLPc/Vjfr3VWqWbfxW8yQNiJCbAZ+Gf6GDu1Cy0bdb33ofyiNGBtAY96jHFhDuivCwgW1H9DgTON+INiXgg==", "requires": { "bl": "1.2.1", - "end-of-stream": "1.4.0", + "end-of-stream": "1.4.1", "readable-stream": "2.3.3", "xtend": "4.0.1" }, @@ -4703,9 +4503,9 @@ "integrity": "sha1-TcGeZk38y+Jb2NtQiwDG2hWCVdE=" }, "tough-cookie": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.2.tgz", - "integrity": "sha1-8IH3bkyFcg5sN6X6ztc3FQ2EByo=", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.3.tgz", + "integrity": "sha1-C2GKVWW23qkL80JdBNVe3EdadWE=", "requires": { "punycode": "1.4.1" } @@ -4724,14 +4524,14 @@ "integrity": "sha1-cXuPIgzAu3tE5AUUwisui7xw2Lk=" }, "tree-kill": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.1.0.tgz", - "integrity": "sha1-yWPc8DciiS7FnLpWnpQLcZVNFyk=" + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.0.tgz", + "integrity": "sha512-DlX6dR0lOIRDFxI0mjL9IYg6OTncLm/Zt+JiBhE5OlFcAR8yc9S7FFXU9so0oda47frdM/JFsk7UjNt9vscKcg==" }, "tty-browserify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", - "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=" + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.1.tgz", + "integrity": "sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw==" }, "tunnel-agent": { "version": "0.6.0", @@ -4757,7 +4557,7 @@ "resolved": "https://registry.npmjs.org/typechecker/-/typechecker-4.4.1.tgz", "integrity": "sha1-+XuV9RsDhBchLWd9RaNz7nvO1+Y=", "requires": { - "editions": "1.3.3" + "editions": "1.3.4" } }, "typedarray": { @@ -4843,38 +4643,6 @@ "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.4.4.tgz", "integrity": "sha1-YaajIBBiKvoHljvzJSA88SI51gQ=" }, - "unreachable-branch-transform": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/unreachable-branch-transform/-/unreachable-branch-transform-0.3.0.tgz", - "integrity": "sha1-2ZzExudG0mSSiEW2EdtUsPNHTKo=", - "requires": { - "esmangle-evaluator": "1.0.1", - "recast": "0.10.43", - "through2": "0.6.5" - }, - "dependencies": { - "readable-stream": { - "version": "1.0.34", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", - "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", - "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "0.0.1", - "string_decoder": "0.10.31" - } - }, - "through2": { - "version": "0.6.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", - "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", - "requires": { - "readable-stream": "1.0.34", - "xtend": "4.0.1" - } - } - } - }, "unzip-response": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/unzip-response/-/unzip-response-1.0.2.tgz", @@ -4893,25 +4661,6 @@ "setimmediate": "1.0.5" }, "dependencies": { - "fstream": { - "version": "0.1.31", - "resolved": "https://registry.npmjs.org/fstream/-/fstream-0.1.31.tgz", - "integrity": "sha1-czfwWPu7vvqMn1YaKMqwhJICyYg=", - "requires": { - "graceful-fs": "3.0.11", - "inherits": "2.0.3", - "mkdirp": "0.5.1", - "rimraf": "2.6.1" - } - }, - "graceful-fs": { - "version": "3.0.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-3.0.11.tgz", - "integrity": "sha1-dhPHeKGv6mLyXGMKCG1/Osu92Bg=", - "requires": { - "natives": "1.1.0" - } - }, "readable-stream": { "version": "1.0.34", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", @@ -4962,9 +4711,9 @@ "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" }, "uuid": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.1.0.tgz", - "integrity": "sha512-DIWtzUkw04M4k3bf1IcpS2tngXEL26YUD2M0tMDUpnUrz2hgzUBlD55a4FjdLGPvfHxS6uluGWvaVEqgBcVa+g==" + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.2.1.tgz", + "integrity": "sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA==" }, "verror": { "version": "1.10.0", @@ -4974,13 +4723,6 @@ "assert-plus": "1.0.0", "core-util-is": "1.0.2", "extsprintf": "1.3.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" - } } }, "vm-browserify": { @@ -5014,14 +4756,14 @@ "resolved": "https://registry.npmjs.org/wmic/-/wmic-0.1.0.tgz", "integrity": "sha1-eLQasR0VTLgSgZ4SkWdNrVXY4dc=", "requires": { - "async": "2.5.0", - "iconv-lite": "0.4.18" + "async": "2.6.0", + "iconv-lite": "0.4.19" }, "dependencies": { "async": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/async/-/async-2.5.0.tgz", - "integrity": "sha512-e+lJAJeNWuPCNyxZKOBdaJGyLGHugXVQtrAwtuAe2vhxTYxFTKE73p8JuTmdH0qdQZtDvI4dhJwjZc5zsfIsYw==", + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.0.tgz", + "integrity": "sha512-xAfGg1/NTLBBKlHFmnd7PlmUW9KhVQIUuSrYem9xzFUZy13ScvtyGGejaae9iAVRiRq9+Cx7DPFaAAhCpyxyPw==", "requires": { "lodash": "4.17.4" } @@ -5048,9 +4790,9 @@ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, "ws": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/ws/-/ws-1.1.2.tgz", - "integrity": "sha1-iiRPoFJAHgjJiGz0SoUYnh/UBn8=", + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/ws/-/ws-1.1.5.tgz", + "integrity": "sha512-o3KqipXNUdS7wpQzBHSe180lBGO60SoK0yVo3CYJgb2MkobuWuBX6dhkYP5ORCLd55y+SaflMOV5fqAB53ux4w==", "requires": { "options": "0.0.6", "ultron": "1.0.2" @@ -5105,8 +4847,8 @@ "resolved": "https://registry.npmjs.org/zeromq/-/zeromq-4.6.0.tgz", "integrity": "sha512-sU7pQqQj7f/C6orJZAXls+NEKaVMZZtnZqpMPTq5d5dP78CmdC0g15XIviFAN6poPuKl9qlGt74vipOUUuNeWg==", "requires": { - "nan": "2.7.0", - "prebuild-install": "2.2.2" + "nan": "2.8.0", + "prebuild-install": "2.5.0" } } } diff --git a/proto b/proto index 59f72b78..919ea1c0 160000 --- a/proto +++ b/proto @@ -1 +1 @@ -Subproject commit 59f72b786494b76eebfabfe7f1a06b4ff7d92f3a +Subproject commit 919ea1c024daa503078e030875ac77c14bd1e87f From 7f355e55c6b85c4df8fe1ae6ef6bc9f2ccb2bc7b Mon Sep 17 00:00:00 2001 From: Sean Canton Date: Thu, 1 Feb 2018 14:31:32 -0800 Subject: [PATCH 42/42] fix test --- lib/service/grpc.js | 1 + package-lock.json | 156 ++++++++++++++++++++++---------------------- package.json | 2 +- test/app.test.js | 4 -- 4 files changed, 80 insertions(+), 83 deletions(-) diff --git a/lib/service/grpc.js b/lib/service/grpc.js index 706e5c5f..e3eb4b48 100644 --- a/lib/service/grpc.js +++ b/lib/service/grpc.js @@ -2,6 +2,7 @@ var grpc = require('grpc'); var protos = require('matrix-protos').proto; + var client = grpc.loadObject(protos, { protobufjsVersion: 6 }).matrix_io; // TODO: Parse versions for newest. Provide for stable vs building. diff --git a/package-lock.json b/package-lock.json index 20866982..ffeb171e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -68,6 +68,29 @@ "resolved": "https://registry.npmjs.org/@types/node/-/node-8.5.9.tgz", "integrity": "sha512-s+c3AjymyAccTI4hcgNFK4mToH8l+hyPDhu4LIkn71lRy56FLijGu00fyLgldjM/846Pmk9N4KFUs2P8GDs0pA==" }, + "Base64": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/Base64/-/Base64-0.2.1.tgz", + "integrity": "sha1-ujpCMHCOGGcFBl5mur3Uw1z2ACg=" + }, + "JSONStream": { + "version": "0.8.4", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-0.8.4.tgz", + "integrity": "sha1-kWV9/m/4V0gwZhMrRhi2Lo9Ih70=", + "requires": { + "jsonparse": "0.0.5", + "through": "2.3.8" + } + }, + "MD5": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/MD5/-/MD5-1.2.2.tgz", + "integrity": "sha1-2QPI7FuiI80rgEMoJIgdBLuYQcA=", + "requires": { + "charenc": "0.0.2", + "crypt": "0.0.2" + } + }, "accessory": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/accessory/-/accessory-1.1.0.tgz", @@ -262,11 +285,6 @@ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" }, - "Base64": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/Base64/-/Base64-0.2.1.tgz", - "integrity": "sha1-ujpCMHCOGGcFBl5mur3Uw1z2ACg=" - }, "base64-arraybuffer": { "version": "0.1.5", "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.5.tgz", @@ -390,10 +408,10 @@ "resolved": "https://registry.npmjs.org/browser-pack/-/browser-pack-3.2.0.tgz", "integrity": "sha1-+qHLxBSHsazEdH43PhFIrf/Q4tk=", "requires": { + "JSONStream": "0.8.4", "combine-source-map": "0.3.0", "concat-stream": "1.4.10", "defined": "0.0.0", - "JSONStream": "0.8.4", "through2": "0.5.1", "umd": "2.1.0" }, @@ -445,6 +463,7 @@ "resolved": "https://registry.npmjs.org/browserify/-/browserify-6.3.4.tgz", "integrity": "sha1-V7XRlcxWgTnpcTAuXNnVjdr7VNg=", "requires": { + "JSONStream": "0.8.4", "assert": "1.1.2", "browser-pack": "3.2.0", "browser-resolve": "1.11.2", @@ -468,7 +487,6 @@ "inherits": "2.0.3", "insert-module-globals": "6.6.3", "isarray": "0.0.1", - "JSONStream": "0.8.4", "labeled-stream-splicer": "1.0.2", "module-deps": "3.9.1", "os-browserify": "0.1.2", @@ -967,11 +985,6 @@ "through2": "1.1.1" }, "dependencies": { - "jsonparse": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", - "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=" - }, "JSONStream": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.2.tgz", @@ -980,6 +993,11 @@ "jsonparse": "1.3.1", "through": "2.3.8" } + }, + "jsonparse": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", + "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=" } } }, @@ -2210,13 +2228,6 @@ } } }, - "string_decoder": { - "version": "1.0.3", - "bundled": true, - "requires": { - "safe-buffer": "5.1.1" - } - }, "string-width": { "version": "1.0.2", "bundled": true, @@ -2226,6 +2237,13 @@ "strip-ansi": "3.0.1" } }, + "string_decoder": { + "version": "1.0.3", + "bundled": true, + "requires": { + "safe-buffer": "5.1.1" + } + }, "stringstream": { "version": "0.0.5", "bundled": true @@ -2446,9 +2464,9 @@ }, "dependencies": { "assert-plus": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz", - "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=" + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" } } }, @@ -2519,16 +2537,25 @@ "resolved": "https://registry.npmjs.org/insert-module-globals/-/insert-module-globals-6.6.3.tgz", "integrity": "sha1-IGOOKaMPntHKLjqCX7wsulJG3fw=", "requires": { + "JSONStream": "1.3.2", "combine-source-map": "0.6.1", "concat-stream": "1.4.10", "is-buffer": "1.1.6", - "JSONStream": "1.3.2", "lexical-scope": "1.2.0", "process": "0.11.10", "through2": "1.1.1", "xtend": "4.0.1" }, "dependencies": { + "JSONStream": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.2.tgz", + "integrity": "sha1-wQI3G27Dp887hHygDCC7D85Mbeo=", + "requires": { + "jsonparse": "1.3.1", + "through": "2.3.8" + } + }, "combine-source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.6.1.tgz", @@ -2558,15 +2585,6 @@ "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=" }, - "JSONStream": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.2.tgz", - "integrity": "sha1-wQI3G27Dp887hHygDCC7D85Mbeo=", - "requires": { - "jsonparse": "1.3.1", - "through": "2.3.8" - } - }, "process": { "version": "0.11.10", "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", @@ -2702,15 +2720,6 @@ "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-0.0.5.tgz", "integrity": "sha1-MwVCrT8KZUZlt3jz6y2an6UHrGQ=" }, - "JSONStream": { - "version": "0.8.4", - "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-0.8.4.tgz", - "integrity": "sha1-kWV9/m/4V0gwZhMrRhi2Lo9Ih70=", - "requires": { - "jsonparse": "0.0.5", - "through": "2.3.8" - } - }, "jsonwebtoken": { "version": "5.7.0", "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-5.7.0.tgz", @@ -2958,6 +2967,15 @@ "xunit-file": "0.0.6" }, "dependencies": { + "JSONStream": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.2.tgz", + "integrity": "sha1-wQI3G27Dp887hHygDCC7D85Mbeo=", + "requires": { + "jsonparse": "1.3.1", + "through": "2.3.8" + } + }, "assert": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/assert/-/assert-1.3.0.tgz", @@ -2981,9 +2999,9 @@ "resolved": "https://registry.npmjs.org/browser-pack/-/browser-pack-5.0.1.tgz", "integrity": "sha1-QZdxmyDG4KqglFHFER5T77b7wY0=", "requires": { + "JSONStream": "1.3.2", "combine-source-map": "0.6.1", "defined": "1.0.0", - "JSONStream": "1.3.2", "through2": "1.1.1", "umd": "3.0.1" } @@ -2993,6 +3011,7 @@ "resolved": "https://registry.npmjs.org/browserify/-/browserify-11.2.0.tgz", "integrity": "sha1-oRu53SCdeVcrgT9+7q+Cil9cDk4=", "requires": { + "JSONStream": "1.3.2", "assert": "1.3.0", "browser-pack": "5.0.1", "browser-resolve": "1.11.2", @@ -3016,7 +3035,6 @@ "inherits": "2.0.3", "insert-module-globals": "6.6.3", "isarray": "0.0.1", - "JSONStream": "1.3.2", "labeled-stream-splicer": "1.0.2", "module-deps": "3.9.1", "os-browserify": "0.1.2", @@ -3141,15 +3159,6 @@ "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=" }, - "JSONStream": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.2.tgz", - "integrity": "sha1-wQI3G27Dp887hHygDCC7D85Mbeo=", - "requires": { - "jsonparse": "1.3.1", - "through": "2.3.8" - } - }, "minimatch": { "version": "2.0.10", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz", @@ -3267,15 +3276,6 @@ } } }, - "MD5": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/MD5/-/MD5-1.2.2.tgz", - "integrity": "sha1-2QPI7FuiI80rgEMoJIgdBLuYQcA=", - "requires": { - "charenc": "0.0.2", - "crypt": "0.0.2" - } - }, "md5.js": { "version": "1.3.4", "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.4.tgz", @@ -3414,11 +3414,11 @@ "resolved": "https://registry.npmjs.org/mockfirebase/-/mockfirebase-0.12.0.tgz", "integrity": "sha1-chLO10WH9iJTaHsGU3HqqgVWfhs=", "requires": { + "MD5": "1.2.2", "browserify": "6.3.4", "browserify-shim": "3.8.14", "firebase-auto-ids": "1.1.0", - "lodash": "2.4.2", - "MD5": "1.2.2" + "lodash": "2.4.2" }, "dependencies": { "lodash": { @@ -3433,13 +3433,13 @@ "resolved": "https://registry.npmjs.org/module-deps/-/module-deps-3.9.1.tgz", "integrity": "sha1-6nXK+RmQkNJbDVUStaysuW5/h/M=", "requires": { + "JSONStream": "1.3.2", "browser-resolve": "1.11.2", "concat-stream": "1.4.10", "defined": "1.0.0", "detective": "4.7.1", "duplexer2": "0.0.2", "inherits": "2.0.3", - "JSONStream": "1.3.2", "parents": "1.0.1", "readable-stream": "1.1.14", "resolve": "1.5.0", @@ -3449,6 +3449,15 @@ "xtend": "4.0.1" }, "dependencies": { + "JSONStream": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.2.tgz", + "integrity": "sha1-wQI3G27Dp887hHygDCC7D85Mbeo=", + "requires": { + "jsonparse": "1.3.1", + "through": "2.3.8" + } + }, "defined": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", @@ -3459,15 +3468,6 @@ "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=" }, - "JSONStream": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.2.tgz", - "integrity": "sha1-wQI3G27Dp887hHygDCC7D85Mbeo=", - "requires": { - "jsonparse": "1.3.1", - "through": "2.3.8" - } - }, "parents": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parents/-/parents-1.0.1.tgz", @@ -4353,11 +4353,6 @@ "through2": "1.1.1" } }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" - }, "string-width": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", @@ -4368,6 +4363,11 @@ "strip-ansi": "3.0.1" } }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + }, "stringstream": { "version": "0.0.5", "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", diff --git a/package.json b/package.json index 2a1ac5b1..e6b2cceb 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "debug": "^2.2.0", "engine.io-client": "^1.6.8", "fs-extra": "^0.30.0", - "grpc": "^1.0.0", + "grpc": "^1.8.4", "js-yaml": "^3.6.1", "jsonwebtoken": "^5.7.0", "lodash": "^4.13.1", diff --git a/test/app.test.js b/test/app.test.js index db085fa5..7bbdf095 100644 --- a/test/app.test.js +++ b/test/app.test.js @@ -33,14 +33,10 @@ describe('Matrix Applications', function () { }); it('should save a reference to the sensors', function (done) { appRecord.should.have.property('sensors'); - log(appRecord); - appRecord.sensors[0].should.equal('temperature'); done(); }); it('should save a reference to the services', function (done) { appRecord.should.have.property('services'); - appRecord.services.should.have.property('faceSvc'); - appRecord.services.faceSvc.should.have.keys('engine', 'type'); done(); }); it('should save a reference to the pid', function (done) {