diff --git a/package-lock.json b/package-lock.json index 88441af9..da60d54f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4625,14 +4625,14 @@ "dependencies": { "abbrev": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.0.tgz", + "resolved": false, "integrity": "sha1-0FVMIlZjbi9W58LlrRg/hZQo2B8=", "dev": true, "optional": true }, "ajv": { "version": "4.11.8", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz", + "resolved": false, "integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=", "dev": true, "optional": true, @@ -4643,20 +4643,20 @@ }, "ansi-regex": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "resolved": false, "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", "dev": true }, "aproba": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.1.1.tgz", + "resolved": false, "integrity": "sha1-ldNgDwdxCqDpKYxyatXs8urLq6s=", "dev": true, "optional": true }, "are-we-there-yet": { "version": "1.1.4", - "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz", + "resolved": false, "integrity": "sha1-u13KOCu5TwXhUZQ3PRb9O6HKEQ0=", "dev": true, "optional": true, @@ -4667,48 +4667,48 @@ }, "asn1": { "version": "0.2.3", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", + "resolved": false, "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=", "dev": true, "optional": true }, "assert-plus": { "version": "0.2.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz", + "resolved": false, "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=", "dev": true, "optional": true }, "asynckit": { "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "resolved": false, "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", "dev": true, "optional": true }, "aws-sign2": { "version": "0.6.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz", + "resolved": false, "integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8=", "dev": true, "optional": true }, "aws4": { "version": "1.6.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.6.0.tgz", + "resolved": false, "integrity": "sha1-g+9cqGCysy5KDe7e6MdxudtXRx4=", "dev": true, "optional": true }, "balanced-match": { "version": "0.4.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz", + "resolved": false, "integrity": "sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg=", "dev": true }, "bcrypt-pbkdf": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz", + "resolved": false, "integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=", "dev": true, "optional": true, @@ -4718,7 +4718,7 @@ }, "block-stream": { "version": "0.0.9", - "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz", + "resolved": false, "integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=", "dev": true, "requires": { @@ -4727,7 +4727,7 @@ }, "boom": { "version": "2.10.1", - "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", + "resolved": false, "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=", "dev": true, "requires": { @@ -4736,7 +4736,7 @@ }, "brace-expansion": { "version": "1.1.7", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.7.tgz", + "resolved": false, "integrity": "sha1-Pv/DxQ4ABTH7cg6v+A8K6O8jz1k=", "dev": true, "requires": { @@ -4746,33 +4746,33 @@ }, "buffer-shims": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz", + "resolved": false, "integrity": "sha1-mXjOMXOIxkmth5MCjDR37wRKi1E=", "dev": true }, "caseless": { "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "resolved": false, "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", "dev": true, "optional": true }, "co": { "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "resolved": false, "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", "dev": true, "optional": true }, "code-point-at": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "resolved": false, "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", "dev": true }, "combined-stream": { "version": "1.0.5", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz", + "resolved": false, "integrity": "sha1-k4NwpXtKUd6ix3wV1cX9+JUWQAk=", "dev": true, "requires": { @@ -4781,25 +4781,25 @@ }, "concat-map": { "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "resolved": false, "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "dev": true }, "console-control-strings": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", + "resolved": false, "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", "dev": true }, "core-util-is": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "resolved": false, "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", "dev": true }, "cryptiles": { "version": "2.0.5", - "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", + "resolved": false, "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=", "dev": true, "requires": { @@ -4808,7 +4808,7 @@ }, "dashdash": { "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "resolved": false, "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", "dev": true, "optional": true, @@ -4818,7 +4818,7 @@ "dependencies": { "assert-plus": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "resolved": false, "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", "dev": true, "optional": true @@ -4827,7 +4827,7 @@ }, "debug": { "version": "2.6.8", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz", + "resolved": false, "integrity": "sha1-5zFTHKLt4n0YgiJCfaF4IdaP9Pw=", "dev": true, "optional": true, @@ -4837,34 +4837,34 @@ }, "deep-extend": { "version": "0.4.2", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.4.2.tgz", + "resolved": false, "integrity": "sha1-SLaZwn4zS/ifEIkr5DL25MfTSn8=", "dev": true, "optional": true }, "delayed-stream": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "resolved": false, "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", "dev": true }, "delegates": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "resolved": false, "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", "dev": true, "optional": true }, "detect-libc": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.2.tgz", + "resolved": false, "integrity": "sha1-ca1dIEvxempsqPRQxhRUBm70YeE=", "dev": true, "optional": true }, "ecc-jsbn": { "version": "0.1.1", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", + "resolved": false, "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", "dev": true, "optional": true, @@ -4874,27 +4874,27 @@ }, "extend": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", + "resolved": false, "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=", "dev": true, "optional": true }, "extsprintf": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.0.2.tgz", + "resolved": false, "integrity": "sha1-4QgOBljjALBilJkMxw4VAiNf1VA=", "dev": true }, "forever-agent": { "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "resolved": false, "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", "dev": true, "optional": true }, "form-data": { "version": "2.1.4", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz", + "resolved": false, "integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=", "dev": true, "optional": true, @@ -4906,13 +4906,13 @@ }, "fs.realpath": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "resolved": false, "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "dev": true }, "fstream": { "version": "1.0.11", - "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz", + "resolved": false, "integrity": "sha1-XB+x8RdHcRTwYyoOtLcbPLD9MXE=", "dev": true, "requires": { @@ -4924,7 +4924,7 @@ }, "fstream-ignore": { "version": "1.0.5", - "resolved": "https://registry.npmjs.org/fstream-ignore/-/fstream-ignore-1.0.5.tgz", + "resolved": false, "integrity": "sha1-nDHa40dnAY/h0kmyTa2mfQktoQU=", "dev": true, "optional": true, @@ -4936,7 +4936,7 @@ }, "gauge": { "version": "2.7.4", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", + "resolved": false, "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", "dev": true, "optional": true, @@ -4953,7 +4953,7 @@ }, "getpass": { "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "resolved": false, "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", "dev": true, "optional": true, @@ -4963,7 +4963,7 @@ "dependencies": { "assert-plus": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "resolved": false, "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", "dev": true, "optional": true @@ -4972,7 +4972,7 @@ }, "glob": { "version": "7.1.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "resolved": false, "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", "dev": true, "requires": { @@ -4986,20 +4986,20 @@ }, "graceful-fs": { "version": "4.1.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "resolved": false, "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", "dev": true }, "har-schema": { "version": "1.0.5", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-1.0.5.tgz", + "resolved": false, "integrity": "sha1-0mMTX0MwfALGAq/I/pWXDAFRNp4=", "dev": true, "optional": true }, "har-validator": { "version": "4.2.1", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-4.2.1.tgz", + "resolved": false, "integrity": "sha1-M0gdDxu/9gDdID11gSpqX7oALio=", "dev": true, "optional": true, @@ -5010,14 +5010,14 @@ }, "has-unicode": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "resolved": false, "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", "dev": true, "optional": true }, "hawk": { "version": "3.1.3", - "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz", + "resolved": false, "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=", "dev": true, "requires": { @@ -5029,13 +5029,13 @@ }, "hoek": { "version": "2.16.3", - "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", + "resolved": false, "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=", "dev": true }, "http-signature": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz", + "resolved": false, "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=", "dev": true, "optional": true, @@ -5047,7 +5047,7 @@ }, "inflight": { "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "resolved": false, "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "dev": true, "requires": { @@ -5057,20 +5057,20 @@ }, "inherits": { "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "resolved": false, "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", "dev": true }, "ini": { "version": "1.3.4", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.4.tgz", + "resolved": false, "integrity": "sha1-BTfLedr1m1mhpRff9wbIbsA5Fi4=", "dev": true, "optional": true }, "is-fullwidth-code-point": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "resolved": false, "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", "dev": true, "requires": { @@ -5079,27 +5079,27 @@ }, "is-typedarray": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "resolved": false, "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", "dev": true, "optional": true }, "isarray": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "resolved": false, "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", "dev": true }, "isstream": { "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "resolved": false, "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", "dev": true, "optional": true }, "jodid25519": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/jodid25519/-/jodid25519-1.0.2.tgz", + "resolved": false, "integrity": "sha1-BtSRIlUJNBlHfUJWM2BuDpB4KWc=", "dev": true, "optional": true, @@ -5109,21 +5109,21 @@ }, "jsbn": { "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "resolved": false, "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", "dev": true, "optional": true }, "json-schema": { "version": "0.2.3", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "resolved": false, "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", "dev": true, "optional": true }, "json-stable-stringify": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", + "resolved": false, "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", "dev": true, "optional": true, @@ -5133,21 +5133,21 @@ }, "json-stringify-safe": { "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "resolved": false, "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", "dev": true, "optional": true }, "jsonify": { "version": "0.0.0", - "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", + "resolved": false, "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", "dev": true, "optional": true }, "jsprim": { "version": "1.4.0", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.0.tgz", + "resolved": false, "integrity": "sha1-o7h+QCmNjDgFUtjMdiigu5WiKRg=", "dev": true, "optional": true, @@ -5160,7 +5160,7 @@ "dependencies": { "assert-plus": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "resolved": false, "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", "dev": true, "optional": true @@ -5169,13 +5169,13 @@ }, "mime-db": { "version": "1.27.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.27.0.tgz", + "resolved": false, "integrity": "sha1-gg9XIpa70g7CXtVeW13oaeVDbrE=", "dev": true }, "mime-types": { "version": "2.1.15", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.15.tgz", + "resolved": false, "integrity": "sha1-pOv1BkCUVpI3uM9wBGd20J/JKu0=", "dev": true, "requires": { @@ -5184,7 +5184,7 @@ }, "minimatch": { "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "resolved": false, "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "dev": true, "requires": { @@ -5193,13 +5193,13 @@ }, "minimist": { "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "resolved": false, "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", "dev": true }, "mkdirp": { "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "resolved": false, "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "dev": true, "requires": { @@ -5208,14 +5208,14 @@ }, "ms": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "resolved": false, "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", "dev": true, "optional": true }, "node-pre-gyp": { "version": "0.6.39", - "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.6.39.tgz", + "resolved": false, "integrity": "sha512-OsJV74qxnvz/AMGgcfZoDaeDXKD3oY3QVIbBmwszTFkRisTSXbMQyn4UWzUMOtA5SVhrBZOTp0wcoSBgfMfMmQ==", "dev": true, "optional": true, @@ -5235,7 +5235,7 @@ }, "nopt": { "version": "4.0.1", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz", + "resolved": false, "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=", "dev": true, "optional": true, @@ -5246,7 +5246,7 @@ }, "npmlog": { "version": "4.1.0", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.0.tgz", + "resolved": false, "integrity": "sha512-ocolIkZYZt8UveuiDS0yAkkIjid1o7lPG8cYm05yNYzBn8ykQtaiPMEGp8fY9tKdDgm8okpdKzkvu1y9hUYugA==", "dev": true, "optional": true, @@ -5259,27 +5259,27 @@ }, "number-is-nan": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "resolved": false, "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", "dev": true }, "oauth-sign": { "version": "0.8.2", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", + "resolved": false, "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=", "dev": true, "optional": true }, "object-assign": { "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "resolved": false, "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", "dev": true, "optional": true }, "once": { "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "resolved": false, "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "dev": true, "requires": { @@ -5288,21 +5288,21 @@ }, "os-homedir": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "resolved": false, "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", "dev": true, "optional": true }, "os-tmpdir": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "resolved": false, "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", "dev": true, "optional": true }, "osenv": { "version": "0.1.4", - "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.4.tgz", + "resolved": false, "integrity": "sha1-Qv5tWVPfBsgGS+bxdsPQWqqjRkQ=", "dev": true, "optional": true, @@ -5313,40 +5313,40 @@ }, "path-is-absolute": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "resolved": false, "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true }, "performance-now": { "version": "0.2.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-0.2.0.tgz", + "resolved": false, "integrity": "sha1-M+8wxcd9TqIcWlOGnZG1bY8lVeU=", "dev": true, "optional": true }, "process-nextick-args": { "version": "1.0.7", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "resolved": false, "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=", "dev": true }, "punycode": { "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "resolved": false, "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", "dev": true, "optional": true }, "qs": { "version": "6.4.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz", + "resolved": false, "integrity": "sha1-E+JtKK1rD/qpExLNO/cI7TUecjM=", "dev": true, "optional": true }, "rc": { "version": "1.2.1", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.1.tgz", + "resolved": false, "integrity": "sha1-LgPo5C7kULjLPc5lvhv4l04d/ZU=", "dev": true, "optional": true, @@ -5359,7 +5359,7 @@ "dependencies": { "minimist": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "resolved": false, "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true, "optional": true @@ -5368,7 +5368,7 @@ }, "readable-stream": { "version": "2.2.9", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.9.tgz", + "resolved": false, "integrity": "sha1-z3jsb0ptHrQ9JkiMrJfwQudLf8g=", "dev": true, "requires": { @@ -5383,7 +5383,7 @@ }, "request": { "version": "2.81.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.81.0.tgz", + "resolved": false, "integrity": "sha1-xpKJRqDgbF+Nb4qTM0af/aRimKA=", "dev": true, "optional": true, @@ -5414,7 +5414,7 @@ }, "rimraf": { "version": "2.6.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.1.tgz", + "resolved": false, "integrity": "sha1-wjOOxkPfeht/5cVPqG9XQopV8z0=", "dev": true, "requires": { @@ -5423,34 +5423,34 @@ }, "safe-buffer": { "version": "5.0.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.0.1.tgz", + "resolved": false, "integrity": "sha1-0mPKVGls2KMGtcplUekt5XkY++c=", "dev": true }, "semver": { "version": "5.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", + "resolved": false, "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=", "dev": true, "optional": true }, "set-blocking": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "resolved": false, "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", "dev": true, "optional": true }, "signal-exit": { "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "resolved": false, "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", "dev": true, "optional": true }, "sntp": { "version": "1.0.9", - "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", + "resolved": false, "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=", "dev": true, "requires": { @@ -5459,7 +5459,7 @@ }, "sshpk": { "version": "1.13.0", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.13.0.tgz", + "resolved": false, "integrity": "sha1-/yo+T9BEl1Vf7Zezmg/YL6+zozw=", "dev": true, "optional": true, @@ -5477,7 +5477,7 @@ "dependencies": { "assert-plus": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "resolved": false, "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", "dev": true, "optional": true @@ -5486,7 +5486,7 @@ }, "string-width": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "resolved": false, "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "dev": true, "requires": { @@ -5497,7 +5497,7 @@ }, "string_decoder": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.1.tgz", + "resolved": false, "integrity": "sha1-YuIA8DmVWmgQ2N8KM//A8BNmLZg=", "dev": true, "requires": { @@ -5506,14 +5506,14 @@ }, "stringstream": { "version": "0.0.5", - "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", + "resolved": false, "integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg=", "dev": true, "optional": true }, "strip-ansi": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "resolved": false, "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { @@ -5522,14 +5522,14 @@ }, "strip-json-comments": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "resolved": false, "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", "dev": true, "optional": true }, "tar": { "version": "2.2.1", - "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz", + "resolved": false, "integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=", "dev": true, "requires": { @@ -5540,7 +5540,7 @@ }, "tar-pack": { "version": "3.4.0", - "resolved": "https://registry.npmjs.org/tar-pack/-/tar-pack-3.4.0.tgz", + "resolved": false, "integrity": "sha1-I74tf2cagzk3bL2wuP4/3r8xeYQ=", "dev": true, "optional": true, @@ -5557,7 +5557,7 @@ }, "tough-cookie": { "version": "2.3.2", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.2.tgz", + "resolved": false, "integrity": "sha1-8IH3bkyFcg5sN6X6ztc3FQ2EByo=", "dev": true, "optional": true, @@ -5567,7 +5567,7 @@ }, "tunnel-agent": { "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "resolved": false, "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", "dev": true, "optional": true, @@ -5577,34 +5577,34 @@ }, "tweetnacl": { "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "resolved": false, "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", "dev": true, "optional": true }, "uid-number": { "version": "0.0.6", - "resolved": "https://registry.npmjs.org/uid-number/-/uid-number-0.0.6.tgz", + "resolved": false, "integrity": "sha1-DqEOgDXo61uOREnwbaHHMGY7qoE=", "dev": true, "optional": true }, "util-deprecate": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "resolved": false, "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", "dev": true }, "uuid": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.0.1.tgz", + "resolved": false, "integrity": "sha1-ZUS7ot/ajBzxfmKaOjBeK7H+5sE=", "dev": true, "optional": true }, "verror": { "version": "1.3.6", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.3.6.tgz", + "resolved": false, "integrity": "sha1-z/XfEpRtKX0rqu+qJoniW+AcAFw=", "dev": true, "optional": true, @@ -5614,7 +5614,7 @@ }, "wide-align": { "version": "1.1.2", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.2.tgz", + "resolved": false, "integrity": "sha512-ijDLlyQ7s6x1JgCLur53osjm/UXUYD9+0PbYKrBsYisYXzCxN+HC3mYDNy/dWdmf3AwqwU3CXwDCvsNgGK1S0w==", "dev": true, "optional": true, @@ -5624,7 +5624,7 @@ }, "wrappy": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "resolved": false, "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "dev": true } @@ -16744,6 +16744,12 @@ "resolved": "https://registry.npmjs.org/yn/-/yn-2.0.0.tgz", "integrity": "sha1-5a2ryKz0CPY4X8dklWhMiOavaJo=", "dev": true + }, + "zone.js": { + "version": "0.8.26", + "resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.8.26.tgz", + "integrity": "sha512-W9Nj+UmBJG251wkCacIkETgra4QgBo/vgoEkb4a2uoLzpQG7qF9nzwoLXWU5xj3Fg2mxGvEDh47mg24vXccYjA==", + "dev": true } } } diff --git a/src/@ionic-native/plugins/bluetooth-le/index.ts b/src/@ionic-native/plugins/bluetooth-le/index.ts new file mode 100644 index 00000000..555d7ef6 --- /dev/null +++ b/src/@ionic-native/plugins/bluetooth-le/index.ts @@ -0,0 +1,1065 @@ +import { Injectable } from '@angular/core'; +import { Cordova, CordovaProperty, IonicNativePlugin, Plugin } from '@ionic-native/core'; +import { Observable } from 'rxjs'; + +/* Available status of device */ +export type Status = + | 'scanStarted' + | 'scanStopped' + | 'scanResult' + | 'connected' + | 'disconnected' + | 'bonding' + | 'bonded' + | 'unbonded' + | 'closed' + | 'services' + | 'discovered' + | 'characteristics' + | 'descriptors' + | 'read' + | 'subscribed' + | 'unsubscribed' + | 'subscribedResult' + | 'written' + | 'readDescriptor' + | 'writeDescriptor' + | 'rssi' + | 'mtu' + | 'connectionPriorityRequested' + | 'enabled' + | 'disabled' + | 'readRequested' + | 'writeRequested' + | 'mtuChanged' + | 'notifyReady' + | 'notifySent' + | 'serviceAdded' + | 'serviceRemoved' + | 'allServicesRemoved' + | 'advertisingStarted' + | 'advertisingStopped' + | 'responded' + | 'notified'; + +/** Available connection priorities */ +export type ConnectionPriority = 'low' | 'balanced' | 'high'; + +export interface Params { + /** The address/identifier provided by the scan's return object */ + address: string; + /** The service's ID */ + service: string; +} + +export interface InitPeripheralParams { + /** Should user be prompted to enable Bluetooth */ + request?: boolean; + /* A unique string to identify your app. Bluetooth Central background mode is required to use this, but background mode doesn't seem to require specifying the restoreKey */ + restoreKey?: string; +} + +export interface InitParams extends InitPeripheralParams { + /** Should change in Bluetooth status notifications be sent */ + statusReceiver?: boolean; +} + +export interface ScanParams { + /* An array of service IDs to filter the scan or empty array / null. This parameter is not supported on Windows platform yet */ + services?: string[]; + /** True/false to allow duplicate advertisement packets, defaults to false (iOS)*/ + allowDuplicates?: boolean; + /** Defaults to Low Power. Available from API21 / API 23 (Android) */ + scanMode?: BluetoothScanMode; + /** Defaults to Aggressive. Available from API23 (Android) */ + matchMode?: BluetoothMatchMode; + /** Defaults to One Advertisement. Available from API23 (Android) */ + matchNum?: BluetoothMatchNum; + /** Defaults to All Matches. Available from API21 / API 23. (Android) */ + callbackType?: BluetoothCallbackType; +} + +export interface NotifyParams { + /** Service's UUID */ + service: string; + /** Characteristic's UUID */ + characteristic: string; + /** Base64 encoded string, number or string */ + value: string; +} + +export interface RespondParams { + /** This integer value will be incremented every read/writeRequested */ + requestId: number; + /** base64 string */ + value: string; + /** not documented */ + offset?: number; +} + +export interface CharacteristicParams extends Params { + /** An array of characteristic IDs to discover or empty array / null */ + characteristics?: string[]; +} + +export interface DescriptorParams extends Params { + /** The characteristic's ID */ + characteristic: string; +} + +export interface OperationDescriptorParams extends DescriptorParams { + /** The descriptor's ID */ + descriptor: string; +} + +export interface WriteCharacteristicParams extends DescriptorParams { + /* Base64 encoded string */ + value: string; + /* Set to "noResponse" to enable write without response, all other values will write normally. */ + type?: string; +} + +export interface WriteDescriptorParams extends DescriptorParams { + /** The descriptor's ID */ + descriptor: string; + /** Base64 encoded string, number or string */ + value: string; +} + +export type AdvertisingParams = AdvertisingParamsAndroid | AdvertisingParamsIOS; +export type AdvertiseMode = 'balanced' | 'lowLatency' | 'lowPower'; +export type TxPowerLevel = 'high' | 'low' | 'ultralow' | 'medium'; + +export interface AdvertisingParamsAndroid { + /** Service UUID on Android */ + service: string; + /** not documented */ + mode?: AdvertiseMode; + /** not documented */ + connectable?: boolean; + /** not documented */ + timeout?: number; + /** not documented */ + txPowerLevel?: TxPowerLevel; + /** not documented */ + manufacturerId?: number; + /** not documented */ + manufacturerSpecificData?: any; + /** not documented */ + includeDeviceName: boolean; + /** not documented */ + includeTxPowerLevel: boolean; +} + +export interface AdvertisingParamsIOS { + /** Array of service UUIDs on iOS */ + services: string[]; + /** device's name */ + name?: string; +} + +export interface CommonInfo { + /** The device's display name */ + name: string; + /** The device's address / identifier for connecting to the object */ + address: string; +} + +export interface DeviceInfo extends CommonInfo { + /** Device's status */ + status: Status; +} + +export interface RSSI extends DeviceInfo { + /** signal strength */ + rssi: number; +} + +export interface MTU extends DeviceInfo { + /* mtu value */ + mtu: number; +} + +export interface BondedStatus extends CommonInfo { + /** Bonded status*/ + isBonded: boolean; +} + +export interface PrevConnectionStatus extends CommonInfo { + /** Determine whether the device was connected */ + wasConnected: boolean; +} + +export interface CurrConnectionStatus extends CommonInfo { + /** Determine whether the device is connected */ + isConnected: boolean; +} + +export interface DiscoverStatus extends CommonInfo { + /** Determine whether the device's characteristics and descriptors have been discovered */ + isDiscovered: boolean; +} + +export interface ScanStatus extends DeviceInfo { + /** signal strength */ + rssi: number; + /** + * advertisement data in encoded string of bytes, use bluetoothle.encodedStringToBytes() (Android) + * advertisement hash with the keys (iOS) + * empty (Windows) + */ + advertisement: + | { + /** An array of service UUIDs */ + serviceUuids: string[]; + /** A string representing the name of the manufacturer of the device */ + manufacturerData: string; + /** A number containing the transmit power of a peripheral */ + txPowerLevel: number; + /** An array of one or more CBUUID objects, representing CBService UUIDs that were found in the “overflow” area of the advertisement data */ + overflowServiceUuids: string[]; + /** A boolean value that indicates whether the advertising event type is connectable */ + isConnectable: boolean; + /** An array of one or more CBUUID objects, representing CBService UUIDs */ + solicitedServiceUuids: string[]; + /* A dictionary containing service-specific advertisement data */ + serviceData: any; + /* A string containing the local name of a peripheral */ + localName: string; + } + | string; +} + +export interface Service { + /** Service's uuid */ + uuid: string; + /** Array of characteristics */ + characteristics: Characteristic[]; +} + +export interface Characteristic { + /* Array of descriptors */ + descriptors?: Descriptor[]; + /** Characteristic's uuid */ + uuid: string; + /** + * Characteristic's properties + * If the property is defined as a key, the characteristic has that property + */ + properties?: { + write?: boolean; + broadcast?: boolean; + extendedProps?: boolean; + writeWithoutResponse?: boolean; + writeNoResponse?: boolean; + signedWrite?: boolean; + read?: boolean; + notify?: boolean; + indicate?: boolean; + authenticatedSignedWrites?: boolean; + notifyEncryptionRequired?: boolean; + indicateEncryptionRequired?: boolean; + }; + /** + * If the permission is defined as a key, the character has that permission + */ + permissions?: { + read?: boolean; + readEncrypted?: boolean; + readEncryptedMITM?: boolean; + write?: boolean; + writeSigned?: boolean; + writeSignedMITM?: boolean; + writeEncryptedMITM?: boolean; + readEncryptionRequired?: boolean; + writeEncryptionRequired?: boolean; + }; +} + +export interface Descriptor { + uuid: string; +} + +export interface Device extends DeviceInfo { + /** Device's services */ + services: Service[]; +} + +export interface Services extends DeviceInfo { + /** Array of service UUIDS */ + services: string[]; +} + +export interface Descriptors extends DeviceInfo { + /** Characteristic's UUID */ + characteristic: string; + /** Service's UUID */ + service: string; + /* Array of descriptor UUIDs */ + descriptors: string[]; +} + +export interface OperationResult extends DeviceInfo { + /** Characteristic UUID */ + characteristic: string; + /** Service's UUID */ + service: string; + /** Base64 encoded string of bytes */ + value: string; +} + +export interface UnsubscribeResult extends DeviceInfo { + /** Characteristic UUID */ + characteristic: string; + /** Service's UUID */ + service: string; +} + +export interface DescriptorResult extends OperationResult { + descriptor: string; +} + +export interface Characteristics extends DeviceInfo { + /** Service's id */ + service: string; + /** Array of characteristic objects*/ + characteristics: Characteristic[]; +} + +export interface InitializeResult { + /** Device's status */ + status: Status; + /** The address/identifier provided by the scan's return object */ + address: string; + /** Service's UUID */ + service: string; + /** Characteristic UUID */ + characterisitc: string; + /** This integer value will be incremented every read/writeRequested */ + requestId: number; + /** Offset value */ + offset: number; + /** mtu value */ + mtu: number; + /** Base64 encoded string of bytes */ + value: string; +} + +export enum BluetoothScanMode { + SCAN_MODE_OPPORTUNISTIC = -1, + SCAN_MODE_LOW_POWER = 0, + SCAN_MODE_BALANCED = 1, + SCAN_MODE_LOW_LATENCY = 2 +} + +export enum BluetoothMatchMode { + MATCH_MODE_AGRESSIVE = 1, + MATCH_MODE_STICKY = 2 +} + +export enum BluetoothMatchNum { + MATCH_NUM_ONE_ADVERTISEMENT = 1, + MATCH_NUM_FEW_ADVERTISEMENT = 2, + MATCH_NUM_MAX_ADVERTISEMENT = 3 +} + +export enum BluetoothCallbackType { + CALLBACK_TYPE_ALL_MATCHES = 1, + CALLBACK_TYPE_FIRST_MATCH = 2, + CALLBACK_TYPE_MATCH_LOST = 4 +} + +export interface Error { + code: number; + message: string; +} + +/** + * @name BluetoothLE + * @description + * This plugin has the most complete implementation for interacting with Bluetooth LE devices on Android, iOS and partially Windows. + * It's a wrap around [randdusing/cordova-plugin-bluetoothle](https://github.com/randdusing/cordova-plugin-bluetoothle/blob/master/readme.md) cordova plugin for Ionic. + * It supports peripheral **and** central modes and covers most of the API methods available on Android and iOS. + * + * @usage + * ```typescript + * import { BluetoothLE } from '@ionic-native/bluetooth-le'; + * + * + * constructor(public bluetoothle: BluetoothLE, public plt: Platform) { + * + * this.plt.ready().then((readySource) => { + * + * console.log('Platform ready from', readySource); + * + * this.bluetoothle.initialize().then(ble => { + * console.log('ble', ble.status) // logs 'enabled' + * }); + * + * }); + * } + * + * ``` + * + */ +@Plugin({ + pluginName: 'BluetoothLE', + plugin: 'cordova-plugin-bluetoothle', // npm package name, example: cordova-plugin-camera + pluginRef: 'bluetoothle', // the variable reference to call the plugin, example: navigator.geolocation + repo: 'https://github.com/randdusing/cordova-plugin-bluetoothle', // the github repository URL for the plugin + install: 'ionic cordova plugin add cordova-plugin-bluetoothle', // OPTIONAL install command, in case the plugin requires variables + installVariables: [], // OPTIONAL the plugin requires variables + platforms: ['Android', 'iOS'] // Array of platforms supported, example: ['Android', 'iOS'] +}) +@Injectable() +export class BluetoothLE extends IonicNativePlugin { + /** + * @name initialize + * @description Initialize Bluetooth on the device + * @param {InitParams} [params] + * @returns {(Promise<{ status: 'enabled' | 'disabled'}>)} The callback that is passed initialize status (enabled/disabled) + */ + @Cordova({ callbackOrder: 'reverse' }) + initialize(params?: InitParams): Promise<{ status: 'enabled' | 'disabled' }> { + return; + } + + /** + * @name enable (Android) + * @description Enable Bluetooth on the device. Android support only + * @returns {Promise<{ status: boolean }>} + */ + @Cordova({ callbackOrder: 'reverse', sync: true }) + enable(): Promise<{ status: boolean }> { + return; + } + + /** + * @name disable (Android) + * @description Disable Bluetooth on the device. Android support only + * @returns void + */ + @Cordova({ callbackOrder: 'reverse', sync: true }) + disable() { + return; + } + + /** + * @name getAdapterInfo (Android) + * @description @todo + * @returns {Promise<{ name: string, address: string, isInitialized: boolean, isEnabled: boolean, isScanning: boolean, isDiscoverable: boolean}>} + */ + @Cordova({ callbackOrder: 'reverse' }) + getAdapterInfo(): Promise<{ + name: string; + address: string; + isInitialized: boolean; + isEnabled: boolean; + isScanning: boolean; + isDiscoverable: boolean; + }> { + return; + } + + /** + * @name startScan + * @description Scan for Bluetooth LE devices. + * Since scanning is expensive, stop as soon as possible. The Cordova app should use a timer to limit the scan interval. + * Android API >= 23 requires ACCESS_COARSE_LOCATION permissions to find unpaired devices. + * Permissions can be requested by using the hasPermission and requestPermission functions. + * Android API >= 23 also requires location services to be enabled. Use isLocationEnabled to determine whether location services are enabled. + * If not enabled, use requestLocation to prompt the location services settings page. + * @param params Scan params + * @returns {(Observable<{ status: ScanStatus }>)} + */ + @Cordova({ callbackOrder: 'reverse', observable: true }) + startScan(params: ScanParams): Observable<{ status: ScanStatus }> { + return; + } + + /** + * @name stopScan + * @description Stop scan for Bluetooth LE devices. Since scanning is expensive, stop as soon as possible + * The app should use a timer to limit the scanning time. + * @returns {Promise<{status: 'scanStopped'}>} + */ + @Cordova({ callbackOrder: 'reverse' }) + stopScan(): Promise<{ status: 'scanStopped' }> { + return; + } + + /** + * @name retrieveConnected + * @description Retrieved paired Bluetooth LE devices. In iOS, devices that are "paired" to will not return during a normal scan. + * Callback is "instant" compared to a scan. + * @param {{ services: string[] }} An array of service IDs to filter the retrieval by. If no service IDs are specified, no devices will be returned. + * @returns {Promise<{ devices: DeviceInfo[] }>} + */ + @Cordova({ callbackOrder: 'reverse' }) + retrieveConnected(params?: { + services?: string[]; + }): Promise<{ devices: DeviceInfo[] }> { + return; + } + + /** + * @name bond (Android) + * @description Bond with a device. + * The device doesn't need to be connected to initiate bonding. Android support only. + * @param {{ address: string }} params The address/identifier provided by the scan's return object + * @returns {(Observable<{ status: DeviceInfo }>)} + * success: + * The first success callback should always return with status == bonding. + * If the bond is created, the callback will return again with status == bonded. + * If the bonding popup is canceled or the wrong code is entered, the callback will return again with status == unbonded. + * error: + * The callback that will be triggered when the bond operation fails + */ + @Cordova({ callbackOrder: 'reverse', observable: true }) + bond(params: { address: string }): Observable<{ status: DeviceInfo }> { + return; + } + + /** + * @name unbond (Android) + * @description Unbond with a device. The device doesn't need to be connected to initiate bonding. Android support only. + * @param {{address: string}} params The address/identifier + * @returns {Promise<{ status: DeviceInfo }>} + * success: The success callback should always return with status == unbonded, that is passed with device object + * error: The callback that will be triggered when the unbond operation fails + */ + @Cordova({ callbackOrder: 'reverse' }) + unbond(params: { address: string }): Promise<{ status: DeviceInfo }> { + return; + } + + /** + * @name connect + * @description Connect to a Bluetooth LE device + * @param connectSuccess The success callback that is passed with device object + * @param connectError The callback that will be triggered when the connect operation fails + * @param params The address/identifier + * + * @param {{address: string, autoConnect: boolean}} params + * @returns {(Observable<{ status: DeviceInfo }>)} + * success: device object with status + * error: The callback that will be triggered when the unbond operation fails + */ + @Cordova({ callbackOrder: 'reverse', observable: true }) + connect(params: { + address: string; + autoConnect?: boolean; + }): Observable<{ status: DeviceInfo }> { + return; + } + + /** + * @name reconnect + * @description Reconnect to a previously connected Bluetooth device + * @param {{address: string}} params The address/identifier + * @returns {(Observable<{ status: DeviceInfo }>)} + */ + @Cordova({ callbackOrder: 'reverse', observable: true }) + reconnect(params: { address: string }): Observable<{ status: DeviceInfo }> { + return; + } + + /** + * @name disconnect + * @description Disconnect from a Bluetooth LE device. + * Note: It's simpler to just call close(). Starting with iOS 10, disconnecting before closing seems required! + * @param {{address: string}} params The address/identifier + * @returns {Promise<{ status: DeviceInfo }>} + */ + @Cordova({ callbackOrder: 'reverse' }) + disconnect(params: { address: string }): Promise<{ status: DeviceInfo }> { + return; + } + + /** + * @name close + * @description Close/dispose a Bluetooth LE device. + * Prior to 2.7.0, you needed to disconnect to the device before closing, but this is no longer the case. + * Starting with iOS 10, disconnecting before closing seems required! + * @param {{ address: string }} params The address/identifier + * @returns {Promise<{ status: DeviceInfo }>} + */ + @Cordova({ callbackOrder: 'reverse' }) + close(params: { address: string }): Promise<{ status: DeviceInfo }> { + return; + } + + /** + * @name discover + * @description Discover all the devices services, characteristics and descriptors. + * Doesn't need to be called again after disconnecting and then reconnecting. + * If using iOS, you shouldn't use discover and services/characteristics/descriptors on the same device. + * There seems to be an issue with calling discover on iOS8 devices, so use with caution. + * On some Android versions, the discovered services may be cached for a device. + * Subsequent discover events will make use of this cache. + * If your device's services change, set the clearCache parameter to force Android to re-discover services. + * @param {{ address: string, clearCache: boolean }} params The address/identifier + * @returns {Promise<{ device: Device }>} + * success: device object (contains array of service objects) + * error: The callback that will be triggered when the unbond operation fails + */ + @Cordova({ callbackOrder: 'reverse' }) + discover(params: { + address: string; + clearCache?: boolean; + }): Promise<{ device: Device }> { + return; + } + + /** + * @name services (iOS) + * @description Discover the device's services. + * Not providing an array of services will return all services and take longer to discover. iOS support only. + * @param {{address: string, services: string[]}} params + * @returns {Promise<{ services: Services }>} + */ + @Cordova({ callbackOrder: 'reverse' }) + services(params: { + address: string; + services?: string[]; + }): Promise<{ services: Services }> { + return; + } + + /** + * @name characteristics (iOS) + * @description Discover the service's characteristics. + * Not providing an array of characteristics will return all characteristics and take longer to discover. iOS support only. + * @param {CharacteristicParams} params Characteristic params + * @returns {Promise<{ characteristics: Characteristics }>} The service id and an Array of characteristics + */ + @Cordova({ callbackOrder: 'reverse' }) + characteristics( + params: CharacteristicParams + ): Promise<{ characteristics: Characteristics }> { + return; + } + + /** + * @name descriptors (iOS) + * @description Discover the characteristic's descriptors. iOS support only. + * @param {DescriptorParams} params + * @returns {Promise<{ descriptors: Descriptors }>} + */ + @Cordova({ callbackOrder: 'reverse' }) + descriptors(params: DescriptorParams): Promise<{ descriptors: Descriptors }> { + return; + } + + /** + * @name read + * @description Read a particular service's characteristic once + * @param {DescriptorParams} params + * @returns {Promise} + */ + @Cordova({ callbackOrder: 'reverse' }) + read(params: DescriptorParams): Promise { + return; + } + + /** + * @name subscribe + * @description Subscribe to a particular service's characteristic. + * Once a subscription is no longer needed, execute unsubscribe in a similar fashion. + * The Client Configuration descriptor will automatically be written to enable notification/indication based on the characteristic's properties. + * @param {DescriptorParams} params + * @returns {Promise} + */ + @Cordova({ callbackOrder: 'reverse', observable: true }) + subscribe(params: DescriptorParams): Observable { + return; + } + + /** + * @name unsubscribe + * @description Unsubscribe to a particular service's characteristic. + * @param {DescriptorParams} params + * @returns {Promise} + */ + @Cordova({ callbackOrder: 'reverse' }) + unsubscribe(params: DescriptorParams): Promise { + return; + } + + /** + * @name write (limitation on iOS, read below) + * @description Write a particular service's characteristic + * Note: no callback will occur on write without response on iOS. + * @param {WriteCharacteristicParams} params + * @returns {Promise} + */ + @Cordova({ callbackOrder: 'reverse' }) + write(params: WriteCharacteristicParams): Promise { + return; + } + + /** + * @name write (limitation on iOS, read below) + * @description Write Quick / Queue, use this method to quickly execute write without response commands when writing more than 20 bytes at a time. + * Note: no callback will occur on write without response on iOS. + * @param {WriteCharacteristicParams} params + * @returns {Promise} + */ + @Cordova({ callbackOrder: 'reverse' }) + writeQ(params: WriteCharacteristicParams): Promise { + return; + } + + /** + * @name readDescriptor + * @description Read a particular characterist's descriptor + * @param {OperationDescriptorParams} params + * @returns {Promise} + */ + @Cordova({ callbackOrder: 'reverse' }) + readDescriptor(params: OperationDescriptorParams): Promise { + return; + } + + /** + * @name writeDescriptor + * @description Write a particular characteristic's descriptor. Unable to write characteristic configuration directly to keep in line with iOS implementation. + * Instead use subscribe/unsubscribe, which will automatically enable/disable notification. + * @param {WriteDescriptorParams} params + * @returns {Promise} + */ + @Cordova({ callbackOrder: 'reverse' }) + writeDescriptor(params: WriteDescriptorParams): Promise { + return; + } + + /** + * @name rssi + * @description Read RSSI of a connected device. RSSI is also returned with scanning. + * @param {{ address: string }} params + * @returns {Promise<{ rssi: RSSI }>} + */ + @Cordova({ callbackOrder: 'reverse' }) + rssi(params: { address: string }): Promise<{ rssi: RSSI }> { + return; + } + + /** + * @name mtu (Android, Android 5+) + * @description Set MTU of a connected device. Android only. + * @param {{ address: string, mtu: number }} params + * @returns {Promise<{ mtu: MTU }>} + */ + @Cordova({ callbackOrder: 'reverse' }) + mtu(params: { address: string; mtu?: number }): Promise<{ mtu: MTU }> { + return; + } + + /** + * @name requestConnectionPriority (Android, Android 5+) + * @description Request a change in the connection priority to improve throughput when transfer large amounts of data via BLE. + * Android support only. iOS will return error. + * @param {{ address: string, connectionPriority: ConnectionPriority }} params + * @returns {Promise} + */ + @Cordova({ callbackOrder: 'reverse' }) + requestConnectionPriority(params: { + address: string; + connectionPriority: ConnectionPriority; + }): Promise { + return; + } + + /** + * @name isInitialized + * @description Determine whether the adapter is initialized. No error callback. Returns true or false + * @returns {Promise<{ isInitialized: boolean }>} + */ + @Cordova({ callbackOrder: 'reverse' }) + isInitialized(): Promise<{ isInitialized: boolean }> { + return; + } + + /** + * @name isEnabled + * @description Determine whether the adapter is enabled. No error callback + * @returns {Promise<{ isEnabled: boolean }>} + */ + @Cordova({ callbackOrder: 'reverse' }) + isEnabled(): Promise<{ isEnabled: boolean }> { + return; + } + + /** + * @name isScanning + * @description Determine whether the adapter is scanning. No error callback. Returns true or false + * @returns {Promise<{ isScanning: boolean }>} + */ + @Cordova({ callbackOrder: 'reverse' }) + isScanning(): Promise<{ isScanning: boolean }> { + return; + } + + /** + * @name isBonded (Android) + * @description Determine whether the device is bonded or not, or error if not initialized. Android support only. + * @param {{ address: string }} params + * @returns {Promise} + */ + @Cordova({ callbackOrder: 'reverse' }) + isBonded(params: { address: string }): Promise { + return; + } + + /** + * @name wasConnected + * @description Determine whether the device was connected, or error if not initialized. + * @param {{ address: string }} params + * @returns {Promise} + */ + @Cordova({ callbackOrder: 'reverse' }) + wasConnected(params: { address: string }): Promise { + return; + } + + /** + * @name isConnected + * @description Determine whether the device is connected, or error if not initialized or never connected to device + * @param {{ address: string }} params + * @returns {Promise} + */ + @Cordova({ callbackOrder: 'reverse' }) + isConnected(params: { address: string }): Promise { + return; + } + + /** + * @name isDiscovered + * @description Determine whether the device's characteristics and descriptors have been discovered, or error if not initialized or not connected to device. + * @param {{ address: string }} params + * @returns {Promise} + */ + @Cordova({ callbackOrder: 'reverse' }) + isDiscovered(params: { address: string }): Promise { + return; + } + + /** + * @name hasPermission (useful only for Android 6+ / API 23) + * @description Determine whether coarse location privileges are granted since scanning for unpaired devices requires it in Android API 23 + * @returns {Promise<{ hasPermission: boolean }>} + */ + @Cordova({ callbackOrder: 'reverse' }) + hasPermission(): Promise<{ hasPermission: boolean }> { + return; + } + + /** + * @name requestPermission (useful only for Android 6+ / API 23) + * @description Request coarse location privileges since scanning for unpaired devices requires it in Android API 23. + * Will return an error if called on iOS or Android versions prior to 6.0. + * @returns {Promise<{ requestPermission: boolean }>} + */ + @Cordova({ callbackOrder: 'reverse' }) + requestPermission(): Promise<{ requestPermission: boolean }> { + return; + } + + /** + * @name isLocationEnabled (useful only for Android 6+ / API 23) + * @description Determine if location services are enabled or not. Location Services are required to find devices in Android API 23 + * @returns {Promise<{ isLocationEnabled: boolean }>} + */ + @Cordova({ callbackOrder: 'reverse' }) + isLocationEnabled(): Promise<{ isLocationEnabled: boolean }> { + return; + } + + /** + * @name requestLocation (useful only for Android 6+ / API 23) + * @description Prompt location services settings pages. requestLocation property returns whether location services are enabled or disabled. + * Location Services are required to find devices in Android API 23. + * @returns {Promise<{ requestLocation: boolean }>} + */ + @Cordova({ callbackOrder: 'reverse' }) + requestLocation(): Promise<{ requestLocation: boolean }> { + return; + } + + /** + * @name initializePeripheral + * @description Initialize Bluetooth on the device. Must be called before anything else. + * Callback will continuously be used whenever Bluetooth is enabled or disabled. + * @param {InitPeripheralParams} [params] + * @returns {Observable} + */ + @Cordova({ callbackOrder: 'reverse' }) + initializePeripheral( + params?: InitPeripheralParams + ): Observable { + return; + } + + /** + * @name addService + * @description Add a service with characteristics and descriptors. If more than one service is added, add them sequentially + * @param {{ service: string, characteristics: Characteristic[] }} params + * @returns {Promise<{ service: string, status: Status }>} + */ + @Cordova({ callbackOrder: 'reverse' }) + addService(params: { + service: string; + characteristics: Characteristic[]; + }): Promise<{ service: string; status: Status }> { + return; + } + + /** + * @name removeService + * @description Remove a service + * @param {{ service: string }} params + * @returns {Promise<{ service: string, status: Status }>} + */ + @Cordova({ callbackOrder: 'reverse' }) + removeService(params: { + service: string; + }): Promise<{ service: string; status: Status }> { + return; + } + + /** + * @name removeAllServices + * @description Remove all services + * @returns {Promise<{ status: Status }>} + */ + @Cordova({ callbackOrder: 'reverse' }) + removeAllServices(): Promise<{ status: Status }> { + return; + } + + /** + * @name startAdvertising (different behavior on Android/iOS, read below) + * @description Start advertising as a BLE device. + * Note: This needs to be improved so services can be used for both Android and iOS. + * On iOS, the advertising devices likes to rename itself back to the name of the device, i.e. Rand' iPhone + * @param {AdvertisingParams} params + * @returns {Promise<{ status: Status }>} + */ + @Cordova({ callbackOrder: 'reverse' }) + startAdvertising(params: AdvertisingParams): Promise<{ status: Status }> { + return; + } + + /** + * @name stopAdvertising + * @description Stop advertising + * @returns {Promise<{ status: Status }>} + */ + @Cordova({ callbackOrder: 'reverse' }) + stopAdvertising(): Promise<{ status: Status }> { + return; + } + + /** + * @name isAdvertising + * @description Determine if app is advertising or not. + * @returns {Promise<{ status: boolean }>} + */ + @Cordova({ callbackOrder: 'reverse' }) + isAdvertising(): Promise<{ status: boolean }> { + return; + } + + /** + * @name respond + * @description Respond to a read or write request + * @param {RespondParams} params + * @returns {Promise<{ status: Status }>} + */ + @Cordova({ callbackOrder: 'reverse' }) + respond(params: RespondParams): Promise<{ status: Status }> { + return; + } + + /** + * @name notify + * @description Update a value for a subscription. Currently all subscribed devices will receive update. + * Device specific updates will be added in the future. + * If sent equals false in the return value, you must wait for the peripheralManagerIsReadyToUpdateSubscribers event before sending more updates. + * @param {NotifyParams} params + * @returns {Promise<{ status: Status, sent: boolean }>} + */ + @Cordova({ callbackOrder: 'reverse' }) + notify(params: NotifyParams): Promise<{ status: Status; sent: boolean }> { + return; + } + + /** + * @name encodedStringToBytes + * @description Helper function to convert a base64 encoded string from a characteristic or descriptor value into a uint8Array object + * @param {string} str + * @returns {Uint8Array} + */ + @Cordova({ sync: true }) + encodedStringToBytes(value: string): Uint8Array { + return; + } + + /** + * @name bytesToEncodedString + * @description Helper function to convert a unit8Array to a base64 encoded string for a characteric or descriptor write + * @param {Uint8Array} bytes + * @returns {string} + */ + @Cordova({ sync: true }) + bytesToEncodedString(value: Uint8Array): string { + return; + } + + /** + * @name stringToBytes + * @description Helper function to convert a string to bytes + * @param {Uint8Array} value + * @returns {string} + */ + @Cordova({ sync: true }) + stringToBytes(value: Uint8Array): string { + return; + } + + /** + * @name bytesToString + * @description Helper function to convert bytes to a string. + * @param {Uint8Array} value + * @returns {string} + */ + @Cordova({ sync: true }) + bytesToString(value: Uint8Array): string { + return; + } + + @CordovaProperty() + SCAN_MODE_OPPORTUNISTIC: number; + @CordovaProperty() + SCAN_MODE_LOW_POWER: number; + @CordovaProperty() + SCAN_MODE_BALANCED: number; + @CordovaProperty() + SCAN_MODE_LOW_LATENCY: number; + @CordovaProperty() + MATCH_MODE_AGRESSIVE: number; + @CordovaProperty() + MATCH_MODE_STICKY: number; + @CordovaProperty() + MATCH_NUM_ONE_ADVERTISEMENT: number; + @CordovaProperty() + MATCH_NUM_FEW_ADVERTISEMENT: number; + @CordovaProperty() + MATCH_NUM_MAX_ADVERTISEMENT: number; + @CordovaProperty() + CALLBACK_TYPE_ALL_MATCHES: number; + @CordovaProperty() + CALLBACK_TYPE_FIRST_MATCH: number; + @CordovaProperty() + CALLBACK_TYPE_MATCH_LOST: number; +} diff --git a/src/@ionic-native/plugins/http/index.ts b/src/@ionic-native/plugins/http/index.ts index 3407f22f..1f2a32f6 100644 --- a/src/@ionic-native/plugins/http/index.ts +++ b/src/@ionic-native/plugins/http/index.ts @@ -154,7 +154,9 @@ export class HTTP extends IonicNativePlugin { * @param url {string} */ @Cordova({ sync: true }) - getCookieString(url: string): string { return; } + getCookieString(url: string): string { + return; + } /** * Get global request timeout value in seconds. @@ -173,26 +175,15 @@ export class HTTP extends IonicNativePlugin { setRequestTimeout(timeout: number): void {} /** - * Enable or disable SSL Pinning. This defaults to false. - * - * To use SSL pinning you must include at least one .cer SSL certificate in your app project. You can pin to your server certificate or to one of the issuing CA certificates. For ios include your certificate in the root level of your bundle (just add the .cer file to your project/target at the root level). For android include your certificate in your project's platforms/android/assets folder. In both cases all .cer files found will be loaded automatically. If you only have a .pem certificate see this [stackoverflow answer](https://stackoverflow.com/questions/16583428/how-to-convert-an-ssl-certificate-in-linux/16583429#16583429). You want to convert it to a DER encoded certificate with a .cer extension. - * - * As an alternative, you can store your .cer files in the www/certificates folder. - * @param enable {boolean} Set to true to enable - * @returns {Promise} returns a promise that will resolve on success, and reject on failure + * Set SSL Cert handling mode, being one of the following values + * default: default SSL cert handling using system's CA certs + * nocheck: disable SSL cert checking, trusting all certs (meant to be used only for testing purposes) + * pinned: trust only provided certs + * @see https://github.com/silkimen/cordova-plugin-advanced-http#setsslcertmode + * @param {'default' | 'nocheck' | 'pinned'} mode SSL Cert handling mode */ @Cordova() - enableSSLPinning(enable: boolean): Promise { - return; - } - - /** - * Accept all SSL certificates. Or disabled accepting all certificates. Defaults to false. - * @param accept {boolean} Set to true to accept - * @returns {Promise} returns a promise that will resolve on success, and reject on failure - */ - @Cordova() - acceptAllCerts(accept: boolean): Promise { + setSSLCertMode(mode: 'default' | 'nocheck' | 'pinned'): Promise { return; } @@ -202,7 +193,9 @@ export class HTTP extends IonicNativePlugin { * @returns {Promise} returns a promise that will resolve on success, and reject on failure */ @Cordova() - disableRedirect(disable: boolean): Promise { return; } + disableRedirect(disable: boolean): Promise { + return; + } /** * Make a POST request