diff --git a/package-lock.json b/package-lock.json index aa82aa4..c479619 100644 --- a/package-lock.json +++ b/package-lock.json @@ -66,9 +66,9 @@ } }, "@octokit/rest": { - "version": "15.2.6", - "resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-15.2.6.tgz", - "integrity": "sha512-KcqG0zjnjzUqn7wczz/fKiueNpTLiAI7erhUG6bXWAsYKJJlqnwYonFSXrMW/nmes5y+qOk4uSyHBh1mdRXdVQ==", + "version": "15.2.7", + "resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-15.2.7.tgz", + "integrity": "sha512-uAON7+eNEs1Mfxin3ELgZ6FbJ+VR6o3mRZLrSCUl1dLEbsqnL6CcWI7uRB5cmGwaOMG3dMDneTHnRONcrEDADA==", "dev": true, "requires": { "before-after-hook": "1.1.0", @@ -117,17 +117,17 @@ "dev": true }, "@semantic-release/github": { - "version": "4.2.13", - "resolved": "https://registry.npmjs.org/@semantic-release/github/-/github-4.2.13.tgz", - "integrity": "sha512-A0oT5sHi3KLLUGs7qbXroYXcxSzPIhTU1m/6CqoFOQkhaKixP7CPg4pqFo4OB1/HhNAvW+qJ9b+Kfd8Pd3vKOA==", + "version": "4.2.15", + "resolved": "https://registry.npmjs.org/@semantic-release/github/-/github-4.2.15.tgz", + "integrity": "sha512-4U4TV6rWGhIr8bTeX7agCnXP35bQYbVFOjgSfylhZdenmqSLGqZ69J5+uOK6bRQBvwOp731n8LkmMCJeEk2EWQ==", "dev": true, "requires": { - "@octokit/rest": "15.2.6", + "@octokit/rest": "15.2.7", "@semantic-release/error": "2.2.0", "aggregate-error": "1.0.0", "bottleneck": "2.3.0", "debug": "3.1.0", - "fs-extra": "5.0.0", + "fs-extra": "6.0.0", "globby": "8.0.1", "issue-parser": "2.0.0", "lodash": "4.17.10", @@ -139,9 +139,9 @@ }, "dependencies": { "fs-extra": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-5.0.0.tgz", - "integrity": "sha512-66Pm4RYbjzdyeuqudYqhFiNBbCIuI9kgRqLPSHIlXHidW8NIQtVdkM1yeZ4lXwuhbTETv3EUGMNHAAw6hiundQ==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-6.0.0.tgz", + "integrity": "sha512-lk2cUCo8QzbiEWEbt7Cw3m27WMiRG321xsssbcIpfMhpRjrlC08WBOVQqj1/nQYYNnPtyIhP1oqLO3QwT2tPCw==", "dev": true, "requires": { "graceful-fs": "4.1.11", @@ -167,15 +167,15 @@ } }, "@semantic-release/npm": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/@semantic-release/npm/-/npm-3.2.4.tgz", - "integrity": "sha512-Kkl5nwRGw0yRg6B4qr8LIi+BkcdK3tJ67ziTzo65SZLEpuV8NLVsm7OAiOMK34rOL3Utkno+BA3AGTg7fhm/nw==", + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/@semantic-release/npm/-/npm-3.2.5.tgz", + "integrity": "sha512-I40tCW1S3QY4hStrg5PGnRI7Y8N5XVnsG9grEkEKSZmcuBPWC1ag5YcSPxnlsOzbsb94wRPwJTKuzNo7/nA2iQ==", "dev": true, "requires": { "@semantic-release/error": "2.2.0", "aggregate-error": "1.0.0", "execa": "0.10.0", - "fs-extra": "5.0.0", + "fs-extra": "6.0.0", "lodash": "4.17.10", "nerf-dart": "1.0.0", "normalize-url": "2.0.1", @@ -212,9 +212,9 @@ } }, "fs-extra": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-5.0.0.tgz", - "integrity": "sha512-66Pm4RYbjzdyeuqudYqhFiNBbCIuI9kgRqLPSHIlXHidW8NIQtVdkM1yeZ4lXwuhbTETv3EUGMNHAAw6hiundQ==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-6.0.0.tgz", + "integrity": "sha512-lk2cUCo8QzbiEWEbt7Cw3m27WMiRG321xsssbcIpfMhpRjrlC08WBOVQqj1/nQYYNnPtyIhP1oqLO3QwT2tPCw==", "dev": true, "requires": { "graceful-fs": "4.1.11", @@ -325,7 +325,7 @@ "dev": true, "requires": { "@types/connect": "3.4.32", - "@types/node": "10.0.1" + "@types/node": "10.0.4" } }, "@types/connect": { @@ -334,7 +334,7 @@ "integrity": "sha512-4r8qa0quOvh7lGD0pre62CAb1oni1OO6ecJLGCezTmhQ8Fz50Arx9RUszryR8KlgK6avuSXvviL6yWyViQABOg==", "dev": true, "requires": { - "@types/node": "10.0.1" + "@types/node": "10.0.4" } }, "@types/debug": { @@ -373,7 +373,7 @@ "dev": true, "requires": { "@types/events": "1.2.0", - "@types/node": "10.0.1" + "@types/node": "10.0.4" } }, "@types/express-session": { @@ -384,7 +384,7 @@ "requires": { "@types/events": "1.2.0", "@types/express": "4.11.1", - "@types/node": "10.0.1" + "@types/node": "10.0.4" } }, "@types/fs-extra": { @@ -393,7 +393,7 @@ "integrity": "sha512-h3wnflb+jMTipvbbZnClgA2BexrT4w0GcfoCz5qyxd0IRsbqhLSyesM6mqZTAnhbVmhyTm5tuxfRu9R+8l+lGw==", "dev": true, "requires": { - "@types/node": "10.0.1" + "@types/node": "10.0.4" } }, "@types/glob": { @@ -404,7 +404,7 @@ "requires": { "@types/events": "1.2.0", "@types/minimatch": "3.0.3", - "@types/node": "10.0.1" + "@types/node": "10.0.4" } }, "@types/handlebars": { @@ -450,9 +450,9 @@ "dev": true }, "@types/node": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.0.1.tgz", - "integrity": "sha512-HKTs07TC1RJRBd9z0Kf/cy37j2HCbUfcVKS6Xm9orZVcLqZ1JXWe/JTDLw6AwxmLOxV45fDpOMPXyqXU3TfOPQ==", + "version": "10.0.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.0.4.tgz", + "integrity": "sha512-RisaZmcmCLjRipAY7nVi3fmkIk4Z0JMn8YHdGF6qYMsIDpD0dfzz+3yy2dL5Q5aHWOnqPx51IRxkA44myknJvw==", "dev": true }, "@types/serve-static": { @@ -472,7 +472,7 @@ "dev": true, "requires": { "@types/glob": "5.0.35", - "@types/node": "10.0.1" + "@types/node": "10.0.4" } }, "JSONStream": { @@ -911,12 +911,6 @@ "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=", - "dev": true - }, "argv-formatter": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/argv-formatter/-/argv-formatter-1.0.0.tgz", @@ -1258,7 +1252,7 @@ "requires": { "babel-core": "6.26.3", "babel-runtime": "6.26.0", - "core-js": "2.5.5", + "core-js": "2.5.6", "home-or-tmp": "2.0.0", "lodash": "4.17.10", "mkdirp": "0.5.1", @@ -1288,7 +1282,7 @@ "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", "dev": true, "requires": { - "core-js": "2.5.5", + "core-js": "2.5.6", "regenerator-runtime": "0.11.1" } }, @@ -1846,9 +1840,9 @@ "dev": true }, "colors": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.2.1.tgz", - "integrity": "sha512-s8+wktIuDSLffCywiwSxQOMqtPxML11a/dtHE17tMn4B1MSWw/C22EKf7M2KGUBcDaVFEGT+S8N02geDXeuNKg==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.2.4.tgz", + "integrity": "sha512-6Y+iBnWmXL+AWtlOp2Vr6R2w5MUlNJRwR0ShVFaAb1CqWzhPOpQg4L0jxD+xpw/Nc8QJwaq3KM79QUCriY8CWQ==", "dev": true }, "colour": { @@ -2035,9 +2029,9 @@ "dev": true }, "core-js": { - "version": "2.5.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.5.tgz", - "integrity": "sha1-sU3ek2xkDAV5prUMq8wTLdYSfjs=", + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.6.tgz", + "integrity": "sha512-lQUVfQi0aLix2xpyjrrJEvfuYCqPc/HwmTKsC/VNf8q0zsjX7SQZtp4+oRONN5Tsur9GDETPjj+Ub2iDiGZfSQ==", "dev": true }, "core-util-is": { @@ -2496,9 +2490,9 @@ "dev": true }, "env-ci": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/env-ci/-/env-ci-2.0.1.tgz", - "integrity": "sha512-xLPWzqSbKOaP1HJQbG2B1+XwfbPNaM/7jJ73HDfSa4seWgDquwV7d8EEY8l0tGr8WKd/ed0ewJUlbcUQ1202nw==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/env-ci/-/env-ci-2.1.0.tgz", + "integrity": "sha512-ekorGVu0ubSzShUdyALj9y/4GRyaupvf8yKgbUDvR8FClHpVmg36v0oYzZj2MsZh44T80PcUWzcwkhbsR+eyvw==", "dev": true, "requires": { "execa": "0.10.0", @@ -2630,9 +2624,9 @@ "dev": true }, "estree-walker": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.5.1.tgz", - "integrity": "sha512-7HgCgz1axW7w5aOvgOQkoR1RMBkllygJrssU3BvymKQ95lxXYv6Pon17fBRDm9qhkvXZGijOULoSF9ShOk/ZLg==", + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.5.2.tgz", + "integrity": "sha512-XpCnW/AE10ws/kDAs37cngSkvgIR8aN3G0MS85m7dUpuK2EREo9VJ00uvw6Dg/hXEpfsE1I1TvJOJr+Z+TL+ig==", "dev": true }, "esutils": { @@ -2642,13 +2636,13 @@ "dev": true }, "etcd3": { - "version": "0.2.9", - "resolved": "https://registry.npmjs.org/etcd3/-/etcd3-0.2.9.tgz", - "integrity": "sha512-QMos6SxKV4QUk91eLv0GjvjwXcxaTrbuJAheKL+AvQxmLyZR3x10jRybL/ycWWcubXbDFdrBT01Mf3/rW/8LZA==", + "version": "0.2.10", + "resolved": "https://registry.npmjs.org/etcd3/-/etcd3-0.2.10.tgz", + "integrity": "sha512-VXC3BKzIAWoZbp/dzH9cVZC+sLIZtaUX8hIYQA+D48SGH69epL+7NzpG5RxbfkTFmsh0TfsYWE21M0iMT8N1jA==", "dev": true, "requires": { "bignumber.js": "4.1.0", - "grpc": "1.8.4" + "grpc": "1.11.3" } }, "exec-sh": { @@ -2841,7 +2835,7 @@ "@mrmlnc/readdir-enhanced": "2.2.1", "glob-parent": "3.1.0", "is-glob": "4.0.0", - "merge2": "1.2.1", + "merge2": "1.2.2", "micromatch": "3.1.10" }, "dependencies": { @@ -3589,15 +3583,14 @@ "dev": true }, "grpc": { - "version": "1.8.4", - "resolved": "https://registry.npmjs.org/grpc/-/grpc-1.8.4.tgz", - "integrity": "sha1-gdG0nM3SWnFJ8Ynzw2sSPKRsqpU=", + "version": "1.11.3", + "resolved": "https://registry.npmjs.org/grpc/-/grpc-1.11.3.tgz", + "integrity": "sha512-7fJ40USpnP7hxGK0uRoEhJz6unA5VUdwInfwAY2rK2+OVxdDJSdTZQ/8/M+1tW68pHZYgHvg2ohvJ+clhW3ANg==", "dev": true, "requires": { - "arguejs": "0.2.3", "lodash": "4.17.2", "nan": "2.10.0", - "node-pre-gyp": "0.6.39", + "node-pre-gyp": "0.10.0", "protobufjs": "5.0.2" }, "dependencies": { @@ -3606,15 +3599,6 @@ "bundled": true, "dev": true }, - "ajv": { - "version": "4.11.8", - "bundled": true, - "dev": true, - "requires": { - "co": "4.6.0", - "json-stable-stringify": "1.0.1" - } - }, "ansi-regex": { "version": "2.1.1", "bundled": true, @@ -3631,66 +3615,16 @@ "dev": true, "requires": { "delegates": "1.0.0", - "readable-stream": "2.3.3" + "readable-stream": "2.3.6" } }, - "asn1": { - "version": "0.2.3", - "bundled": true, - "dev": true - }, - "assert-plus": { - "version": "0.2.0", - "bundled": true, - "dev": true - }, - "asynckit": { - "version": "0.4.0", - "bundled": true, - "dev": true - }, - "aws-sign2": { - "version": "0.6.0", - "bundled": true, - "dev": true - }, - "aws4": { - "version": "1.6.0", - "bundled": true, - "dev": true - }, "balanced-match": { "version": "1.0.0", "bundled": true, "dev": true }, - "bcrypt-pbkdf": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "tweetnacl": "0.14.5" - } - }, - "block-stream": { - "version": "0.0.9", - "bundled": true, - "dev": true, - "requires": { - "inherits": "2.0.3" - } - }, - "boom": { - "version": "2.10.1", - "bundled": true, - "dev": true, - "requires": { - "hoek": "2.16.3" - } - }, "brace-expansion": { - "version": "1.1.8", + "version": "1.1.11", "bundled": true, "dev": true, "requires": { @@ -3698,13 +3632,8 @@ "concat-map": "0.0.1" } }, - "caseless": { - "version": "0.12.0", - "bundled": true, - "dev": true - }, - "co": { - "version": "4.6.0", + "chownr": { + "version": "1.0.1", "bundled": true, "dev": true }, @@ -3713,14 +3642,6 @@ "bundled": true, "dev": true }, - "combined-stream": { - "version": "1.0.5", - "bundled": true, - "dev": true, - "requires": { - "delayed-stream": "1.0.0" - } - }, "concat-map": { "version": "0.0.1", "bundled": true, @@ -3736,31 +3657,8 @@ "bundled": true, "dev": true }, - "cryptiles": { - "version": "2.0.5", - "bundled": true, - "dev": true, - "requires": { - "boom": "2.10.1" - } - }, - "dashdash": { - "version": "1.14.1", - "bundled": true, - "dev": true, - "requires": { - "assert-plus": "1.0.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "bundled": true, - "dev": true - } - } - }, "debug": { - "version": "2.6.8", + "version": "2.6.9", "bundled": true, "dev": true, "requires": { @@ -3768,12 +3666,7 @@ } }, "deep-extend": { - "version": "0.4.2", - "bundled": true, - "dev": true - }, - "delayed-stream": { - "version": "1.0.0", + "version": "0.5.1", "bundled": true, "dev": true }, @@ -3787,38 +3680,12 @@ "bundled": true, "dev": true }, - "ecc-jsbn": { - "version": "0.1.1", + "fs-minipass": { + "version": "1.2.5", "bundled": true, "dev": true, - "optional": true, "requires": { - "jsbn": "0.1.1" - } - }, - "extend": { - "version": "3.0.1", - "bundled": true, - "dev": true - }, - "extsprintf": { - "version": "1.3.0", - "bundled": true, - "dev": true - }, - "forever-agent": { - "version": "0.6.1", - "bundled": true, - "dev": true - }, - "form-data": { - "version": "2.1.4", - "bundled": true, - "dev": true, - "requires": { - "asynckit": "0.4.0", - "combined-stream": "1.0.5", - "mime-types": "2.1.17" + "minipass": "2.2.4" } }, "fs.realpath": { @@ -3826,27 +3693,6 @@ "bundled": true, "dev": true }, - "fstream": { - "version": "1.0.11", - "bundled": true, - "dev": true, - "requires": { - "graceful-fs": "4.1.11", - "inherits": "2.0.3", - "mkdirp": "0.5.1", - "rimraf": "2.6.2" - } - }, - "fstream-ignore": { - "version": "1.0.5", - "bundled": true, - "dev": true, - "requires": { - "fstream": "1.0.11", - "inherits": "2.0.3", - "minimatch": "3.0.4" - } - }, "gauge": { "version": "2.7.4", "bundled": true, @@ -3862,21 +3708,6 @@ "wide-align": "1.1.2" } }, - "getpass": { - "version": "0.1.7", - "bundled": true, - "dev": true, - "requires": { - "assert-plus": "1.0.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "bundled": true, - "dev": true - } - } - }, "glob": { "version": "7.1.2", "bundled": true, @@ -3890,54 +3721,22 @@ "path-is-absolute": "1.0.1" } }, - "graceful-fs": { - "version": "4.1.11", - "bundled": true, - "dev": true - }, - "har-schema": { - "version": "1.0.5", - "bundled": true, - "dev": true - }, - "har-validator": { - "version": "4.2.1", - "bundled": true, - "dev": true, - "requires": { - "ajv": "4.11.8", - "har-schema": "1.0.5" - } - }, "has-unicode": { "version": "2.0.1", "bundled": true, "dev": true }, - "hawk": { - "version": "3.1.3", - "bundled": true, - "dev": true, - "requires": { - "boom": "2.10.1", - "cryptiles": "2.0.5", - "hoek": "2.16.3", - "sntp": "1.0.9" - } - }, - "hoek": { - "version": "2.16.3", + "iconv-lite": { + "version": "0.4.19", "bundled": true, "dev": true }, - "http-signature": { - "version": "1.1.1", + "ignore-walk": { + "version": "3.0.1", "bundled": true, "dev": true, "requires": { - "assert-plus": "0.2.0", - "jsprim": "1.4.1", - "sshpk": "1.13.1" + "minimatch": "3.0.4" } }, "inflight": { @@ -3967,100 +3766,54 @@ "number-is-nan": "1.0.1" } }, - "is-typedarray": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, "isarray": { "version": "1.0.0", "bundled": true, "dev": true }, - "isstream": { - "version": "0.1.2", - "bundled": true, - "dev": true - }, - "jsbn": { - "version": "0.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "json-schema": { - "version": "0.2.3", - "bundled": true, - "dev": true - }, - "json-stable-stringify": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "requires": { - "jsonify": "0.0.0" - } - }, - "json-stringify-safe": { - "version": "5.0.1", - "bundled": true, - "dev": true - }, - "jsonify": { - "version": "0.0.0", - "bundled": true, - "dev": true - }, - "jsprim": { - "version": "1.4.1", + "minimatch": { + "version": "3.0.4", "bundled": true, "dev": true, "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", - "bundled": true, - "dev": true - } + "brace-expansion": "1.1.11" } }, - "mime-db": { - "version": "1.30.0", + "minimist": { + "version": "1.2.0", "bundled": true, "dev": true }, - "mime-types": { - "version": "2.1.17", + "minipass": { + "version": "2.2.4", "bundled": true, "dev": true, "requires": { - "mime-db": "1.30.0" + "safe-buffer": "5.1.1", + "yallist": "3.0.2" } }, - "minimatch": { - "version": "3.0.4", + "minizlib": { + "version": "1.1.0", "bundled": true, "dev": true, "requires": { - "brace-expansion": "1.1.8" + "minipass": "2.2.4" } }, - "minimist": { - "version": "0.0.8", - "bundled": true, - "dev": true - }, "mkdirp": { "version": "0.5.1", "bundled": true, "dev": true, "requires": { "minimist": "0.0.8" + }, + "dependencies": { + "minimist": { + "version": "0.0.8", + "bundled": true, + "dev": true + } } }, "ms": { @@ -4068,22 +3821,31 @@ "bundled": true, "dev": true }, + "needle": { + "version": "2.2.1", + "bundled": true, + "dev": true, + "requires": { + "debug": "2.6.9", + "iconv-lite": "0.4.19", + "sax": "1.2.4" + } + }, "node-pre-gyp": { - "version": "0.6.39", + "version": "0.10.0", "bundled": true, "dev": true, "requires": { "detect-libc": "1.0.3", - "hawk": "3.1.3", "mkdirp": "0.5.1", + "needle": "2.2.1", "nopt": "4.0.1", + "npm-packlist": "1.1.10", "npmlog": "4.1.2", - "rc": "1.2.3", - "request": "2.81.0", + "rc": "1.2.7", "rimraf": "2.6.2", - "semver": "5.4.1", - "tar": "2.2.1", - "tar-pack": "3.4.1" + "semver": "5.5.0", + "tar": "4.4.2" } }, "nopt": { @@ -4092,7 +3854,21 @@ "dev": true, "requires": { "abbrev": "1.1.1", - "osenv": "0.1.4" + "osenv": "0.1.5" + } + }, + "npm-bundled": { + "version": "1.0.3", + "bundled": true, + "dev": true + }, + "npm-packlist": { + "version": "1.1.10", + "bundled": true, + "dev": true, + "requires": { + "ignore-walk": "3.0.1", + "npm-bundled": "1.0.3" } }, "npmlog": { @@ -4111,11 +3887,6 @@ "bundled": true, "dev": true }, - "oauth-sign": { - "version": "0.8.2", - "bundled": true, - "dev": true - }, "object-assign": { "version": "4.1.1", "bundled": true, @@ -4140,7 +3911,7 @@ "dev": true }, "osenv": { - "version": "0.1.4", + "version": "0.1.5", "bundled": true, "dev": true, "requires": { @@ -4153,87 +3924,36 @@ "bundled": true, "dev": true }, - "performance-now": { - "version": "0.2.0", - "bundled": true, - "dev": true - }, "process-nextick-args": { - "version": "1.0.7", - "bundled": true, - "dev": true - }, - "punycode": { - "version": "1.4.1", - "bundled": true, - "dev": true - }, - "qs": { - "version": "6.4.0", + "version": "2.0.0", "bundled": true, "dev": true }, "rc": { - "version": "1.2.3", + "version": "1.2.7", "bundled": true, "dev": true, "requires": { - "deep-extend": "0.4.2", + "deep-extend": "0.5.1", "ini": "1.3.5", "minimist": "1.2.0", "strip-json-comments": "2.0.1" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "bundled": true, - "dev": true - } } }, "readable-stream": { - "version": "2.3.3", + "version": "2.3.6", "bundled": true, "dev": true, "requires": { "core-util-is": "1.0.2", "inherits": "2.0.3", "isarray": "1.0.0", - "process-nextick-args": "1.0.7", + "process-nextick-args": "2.0.0", "safe-buffer": "5.1.1", - "string_decoder": "1.0.3", + "string_decoder": "1.1.1", "util-deprecate": "1.0.2" } }, - "request": { - "version": "2.81.0", - "bundled": true, - "dev": true, - "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.3", - "tunnel-agent": "0.6.0", - "uuid": "3.1.0" - } - }, "rimraf": { "version": "2.6.2", "bundled": true, @@ -4247,8 +3967,13 @@ "bundled": true, "dev": true }, + "sax": { + "version": "1.2.4", + "bundled": true, + "dev": true + }, "semver": { - "version": "5.4.1", + "version": "5.5.0", "bundled": true, "dev": true }, @@ -4262,36 +3987,6 @@ "bundled": true, "dev": true }, - "sntp": { - "version": "1.0.9", - "bundled": true, - "dev": true, - "requires": { - "hoek": "2.16.3" - } - }, - "sshpk": { - "version": "1.13.1", - "bundled": true, - "dev": true, - "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", - "bundled": true, - "dev": true - } - } - }, "string-width": { "version": "1.0.2", "bundled": true, @@ -4303,18 +3998,13 @@ } }, "string_decoder": { - "version": "1.0.3", + "version": "1.1.1", "bundled": true, "dev": true, "requires": { "safe-buffer": "5.1.1" } }, - "stringstream": { - "version": "0.0.5", - "bundled": true, - "dev": true - }, "strip-ansi": { "version": "3.0.1", "bundled": true, @@ -4329,84 +4019,31 @@ "dev": true }, "tar": { - "version": "2.2.1", - "bundled": true, - "dev": true, - "requires": { - "block-stream": "0.0.9", - "fstream": "1.0.11", - "inherits": "2.0.3" - } - }, - "tar-pack": { - "version": "3.4.1", - "bundled": true, - "dev": 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.2", - "tar": "2.2.1", - "uid-number": "0.0.6" - } - }, - "tough-cookie": { - "version": "2.3.3", + "version": "4.4.2", "bundled": true, "dev": true, "requires": { - "punycode": "1.4.1" - } - }, - "tunnel-agent": { - "version": "0.6.0", - "bundled": true, - "dev": true, - "requires": { - "safe-buffer": "5.1.1" - } - }, - "tweetnacl": { - "version": "0.14.5", - "bundled": true, - "dev": true, - "optional": true - }, - "uid-number": { - "version": "0.0.6", - "bundled": true, - "dev": true - }, - "util-deprecate": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "uuid": { - "version": "3.1.0", - "bundled": true, - "dev": true - }, - "verror": { - "version": "1.10.0", - "bundled": true, - "dev": true, - "requires": { - "assert-plus": "1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "1.3.0" + "chownr": "1.0.1", + "fs-minipass": "1.2.5", + "minipass": "2.2.4", + "minizlib": "1.1.0", + "mkdirp": "0.5.1", + "safe-buffer": "5.1.2", + "yallist": "3.0.2" }, "dependencies": { - "assert-plus": { - "version": "1.0.0", + "safe-buffer": { + "version": "5.1.2", "bundled": true, "dev": true } } }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, "wide-align": { "version": "1.1.2", "bundled": true, @@ -4419,6 +4056,11 @@ "version": "1.0.2", "bundled": true, "dev": true + }, + "yallist": { + "version": "3.0.2", + "bundled": true, + "dev": true } } }, @@ -5595,7 +5237,7 @@ "jest-serializer": "22.4.3", "jest-worker": "22.4.3", "micromatch": "2.3.11", - "sane": "2.5.0" + "sane": "2.5.1" } }, "jest-jasmine2": { @@ -6338,9 +5980,9 @@ } }, "lint-staged": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-7.0.5.tgz", - "integrity": "sha512-dCzqskhum0WXQBE0RawBkOlRjg2pc7PkAJD4yRB12+ct5CMTOU9tvzzbsyqJwaGHjTdSFUxiT8n+sww77p2r7w==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-7.1.0.tgz", + "integrity": "sha512-0l+PRD21v2zBRcfEIxjFMo2DiQ94wykRXH/aEw3aTMYUmnpTRPS1rc3DryPWf+qtK1Pjd51pLigHGopxgDMK5A==", "dev": true, "requires": { "app-root-path": "2.0.1", @@ -6352,6 +5994,7 @@ "execa": "0.9.0", "find-parent-dir": "0.3.0", "is-glob": "4.0.0", + "is-windows": "1.0.2", "jest-validate": "22.4.3", "listr": "0.13.0", "lodash": "4.17.10", @@ -6673,6 +6316,12 @@ } } }, + "is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true + }, "isobject": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", @@ -7146,9 +6795,9 @@ } }, "merge2": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.2.1.tgz", - "integrity": "sha512-wUqcG5pxrAcaFI1lkqkMnk3Q7nUxV/NWfpAFSeWUwG9TRODnBDCUHa75mi3o3vLWQ5N4CQERWCauSlP0I3ZqUg==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.2.2.tgz", + "integrity": "sha512-bgM8twH86rWni21thii6WCMQMRMmwqqdW3sGWi9IipnVAszdLXRjwDwAnyrVXo6DuP3AjRMMttZKUB48QWIFGg==", "dev": true }, "micromatch": { @@ -7991,7 +7640,7 @@ "integrity": "sha1-jlcSPDlquYiJf7Mn/Trtw+c15P4=", "dev": true, "requires": { - "colors": "1.2.1", + "colors": "1.2.4", "pkginfo": "0.4.1", "read": "1.0.7", "revalidator": "0.1.8", @@ -8036,9 +7685,9 @@ "dev": true }, "qs": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", - "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==", + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", "dev": true }, "query-string": { @@ -8467,7 +8116,7 @@ "mime-types": "2.1.18", "oauth-sign": "0.8.2", "performance-now": "2.1.0", - "qs": "6.5.1", + "qs": "6.5.2", "safe-buffer": "5.1.2", "stringstream": "0.0.5", "tough-cookie": "2.3.4", @@ -8613,16 +8262,16 @@ "dev": true, "requires": { "@types/estree": "0.0.38", - "@types/node": "10.0.1" + "@types/node": "10.0.4" } }, "rollup-plugin-commonjs": { - "version": "9.1.2", - "resolved": "https://registry.npmjs.org/rollup-plugin-commonjs/-/rollup-plugin-commonjs-9.1.2.tgz", - "integrity": "sha512-Fp0Wjix0Qf4kFIJEQRCUj61nf+O6SYf/VsvtPSf5J92vVGrjpLMSfN8sL83XFd3MXVPjo2Q/X9JtK94jvIWDjw==", + "version": "9.1.3", + "resolved": "https://registry.npmjs.org/rollup-plugin-commonjs/-/rollup-plugin-commonjs-9.1.3.tgz", + "integrity": "sha512-g91ZZKZwTW7F7vL6jMee38I8coj/Q9GBdTmXXeFL7ldgC1Ky5WJvHgbKlAiXXTh762qvohhExwUgeQGFh9suGg==", "dev": true, "requires": { - "estree-walker": "0.5.1", + "estree-walker": "0.5.2", "magic-string": "0.22.5", "resolve": "1.7.1", "rollup-pluginutils": "2.0.1" @@ -8757,9 +8406,9 @@ } }, "sane": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/sane/-/sane-2.5.0.tgz", - "integrity": "sha512-glfKd7YH4UCrh/7dD+UESsr8ylKWRE7UQPoXuz28FgmcF0ViJQhCTCCZHICRKxf8G8O1KdLEn20dcICK54c7ew==", + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/sane/-/sane-2.5.1.tgz", + "integrity": "sha1-pVzucHS+0yE7VLQIie55H6L1AXY=", "dev": true, "requires": { "anymatch": "2.0.0", @@ -9063,21 +8712,21 @@ "dev": true }, "semantic-release": { - "version": "15.1.8", - "resolved": "https://registry.npmjs.org/semantic-release/-/semantic-release-15.1.8.tgz", - "integrity": "sha512-IzN2RGfb5GyMtE/bICqySHeeOQ1NaXIe2/dIn/yZc2xuIhU4jcCmR6nrjWsXPDkSZr+a6e0V6vEI5GGJ1j5YIw==", + "version": "15.3.1", + "resolved": "https://registry.npmjs.org/semantic-release/-/semantic-release-15.3.1.tgz", + "integrity": "sha512-Fbi7w2bRXnjOeqlioUecpCGa2t49EdobwcBkjsePAKypBHGShfzhBI374LjsO96GnVKkCy/AqyhCS2uzuf4D6Q==", "dev": true, "requires": { "@semantic-release/commit-analyzer": "5.0.3", "@semantic-release/error": "2.2.0", - "@semantic-release/github": "4.2.13", - "@semantic-release/npm": "3.2.4", + "@semantic-release/github": "4.2.15", + "@semantic-release/npm": "3.2.5", "@semantic-release/release-notes-generator": "6.0.10", "aggregate-error": "1.0.0", "chalk": "2.4.1", - "cosmiconfig": "4.0.0", + "cosmiconfig": "5.0.1", "debug": "3.1.0", - "env-ci": "2.0.1", + "env-ci": "2.1.0", "execa": "0.10.0", "get-stream": "3.0.0", "git-log-parser": "1.2.0", @@ -9138,6 +8787,17 @@ "wrap-ansi": "2.1.0" } }, + "cosmiconfig": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.0.1.tgz", + "integrity": "sha512-Kb8por4Jn2HbgGMmQoS2glS7FipYnNxIDccjLr1y9jRjonlSeHrciUfa2y5D6ucahMnKj5oUAToLU6cRXUfOpg==", + "dev": true, + "requires": { + "is-directory": "0.3.1", + "js-yaml": "3.11.0", + "parse-json": "4.0.0" + } + }, "cross-spawn": { "version": "6.0.5", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", @@ -10379,9 +10039,9 @@ "dev": true }, "ts-jest": { - "version": "22.4.4", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-22.4.4.tgz", - "integrity": "sha512-v9pO7u4HNMDSBCN9IEvlR6taDAGm2mo7nHEDLWyoFDgYeZ4aHm8JHEPrthd8Pmcl4eCM8J4Ata4ROR/cwFRV2A==", + "version": "22.4.5", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-22.4.5.tgz", + "integrity": "sha512-3LkEkPzKutk+klOxtAhvTdYc9ZK7lHugyPg4VNj+l8jg7CCOBgAHqp009MWdT6WllYeSoWHcQaB3aJ6/JbTMJg==", "dev": true, "requires": { "babel-core": "6.26.3", @@ -10389,8 +10049,9 @@ "babel-plugin-transform-es2015-modules-commonjs": "6.26.2", "babel-preset-jest": "22.4.3", "cpx": "1.5.0", - "fs-extra": "4.0.3", + "fs-extra": "6.0.0", "jest-config": "22.4.3", + "lodash": "4.17.10", "pkg-dir": "2.0.0", "yargs": "11.0.0" }, @@ -10419,9 +10080,9 @@ } }, "fs-extra": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz", - "integrity": "sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-6.0.0.tgz", + "integrity": "sha512-lk2cUCo8QzbiEWEbt7Cw3m27WMiRG321xsssbcIpfMhpRjrlC08WBOVQqj1/nQYYNnPtyIhP1oqLO3QwT2tPCw==", "dev": true, "requires": { "graceful-fs": "4.1.11", @@ -10444,6 +10105,12 @@ "graceful-fs": "4.1.11" } }, + "lodash": { + "version": "4.17.10", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz", + "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==", + "dev": true + }, "os-locale": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz", @@ -10506,9 +10173,9 @@ } }, "ts-node": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-6.0.2.tgz", - "integrity": "sha512-H/KWK27B3JJAc5WFOBBUxN638DukbV8PptdQgiHWPO2SGDVJzuVOl8Ye0XJ5+FiZIdFtgUuGOJRV4c/XBQ5dBg==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-6.0.3.tgz", + "integrity": "sha512-ARaOMNFEPKg2ZuC1qJddFvHxHNFVckR0g9xLxMIoMqSSIkDc8iS4/LoV53EdDWWNq2FGwqcEf0bVVGJIWpsznw==", "dev": true, "requires": { "arrify": "1.0.1", @@ -10559,9 +10226,9 @@ "dev": true }, "tslint": { - "version": "5.9.1", - "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.9.1.tgz", - "integrity": "sha1-ElX4ej/1frCw4fDmEKi0dIBGya4=", + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.10.0.tgz", + "integrity": "sha1-EeJrzLiK+gLdDZlWyuPUVAtfVMM=", "dev": true, "requires": { "babel-code-frame": "6.26.0", diff --git a/package.json b/package.json index 8d889e4..3c386e8 100644 --- a/package.json +++ b/package.json @@ -86,7 +86,7 @@ }, "peerDependencies": { "express-session": "^1.15.6", - "etcd3": "^0.2.9" + "etcd3": "^0.2.10" }, "devDependencies": { "@types/debug": "0.0.30", @@ -97,7 +97,7 @@ "commitizen": "^2.9.6", "cross-env": "^5.1.4", "cz-conventional-changelog": "^2.1.0", - "etcd3": "^0.2.9", + "etcd3": "^0.2.10", "express-session": "^1.15.6", "husky": "^0.14.3", "jest": "^22.4.3", diff --git a/src/express-session-etcd3.ts b/src/express-session-etcd3.ts index 120901d..046ec9b 100644 --- a/src/express-session-etcd3.ts +++ b/src/express-session-etcd3.ts @@ -97,11 +97,17 @@ export default class Etcd3Store extends Store { const ttl = this.getTTL(session, sid) this.debug('SET "%s" ttl:%s %O', sid, ttl, session) try { - this.client - .lease(ttl) + const leasing = this.client.lease(ttl) + leasing .put(this.key(sid)) .value(JSON.stringify(session)) - .then(() => this.callbackWithLog(callback), err => this.callbackWithLog(callback, err)) + .then( + () => { + leasing.release() + this.callbackWithLog(callback) + }, + err => this.callbackWithLog(callback, err) + ) } catch (err) { callback(err) } diff --git a/test/express-session-etcd3.test.ts b/test/express-session-etcd3.test.ts index d7bbe21..924a4b1 100644 --- a/test/express-session-etcd3.test.ts +++ b/test/express-session-etcd3.test.ts @@ -12,6 +12,7 @@ import { anotherPrefix, createTestClientAndKeys, sessionData, tearDownTestClient describe('Etcd3Store test suit', () => { let client: Etcd3 const newSid = 'newTestSid' + const ETCD_CLEAR_TIME = 1500 async function createSubject( options: Partial = undefined, @@ -133,21 +134,36 @@ describe('Etcd3Store test suit', () => { }) }) - it('should lease the session with the giving ttl', async done => { - const { subject } = await createSubject({ prefix: anotherPrefix }) + it('should automatically delete the session using ETCD lease with the giving ttl', async done => { + const { subject } = await createSubject() const ttl = 1 jest.spyOn(subject, 'getTTL' as any).mockReturnValue(ttl) - jest.spyOn(client, 'lease') subject.set(newSid, sessionData, err => { expect(err).toBeNull() - expect(client.lease).toHaveBeenCalledWith(ttl) - client - .get(anotherPrefix + '/' + newSid) - .exec() - .then(data => { - expect(data.kvs[0]).toBeTruthy() + setTimeout(() => { + client.get(defaultOptions.prefix + '/' + newSid).then(data => { + expect(data).toBeNull() done() }) + }, ttl * 1000 + ETCD_CLEAR_TIME) + }) + }) + + it('should not delete the session before the ttl', async done => { + const { subject } = await createSubject() + const ttl = 1 + jest.spyOn(subject, 'getTTL' as any).mockReturnValue(ttl) + subject.set(newSid, sessionData, err => { + expect(err).toBeNull() + setTimeout(() => { + client + .get(defaultOptions.prefix + '/' + newSid) + .json() + .then(data => { + expect(data).toEqual(sessionData) + done() + }) + }, ttl * 900) }) }) @@ -190,6 +206,49 @@ describe('Etcd3Store test suit', () => { expect(subject.set).not.toHaveBeenCalled() expect(callback).toBeCalledWith(null) }) + + it('should keep the session alive even after the first leasing cycle', async done => { + const { subject } = await createSubject() + const ttl = 1 + jest.spyOn(subject, 'getTTL' as any).mockReturnValue(ttl) + subject.set(newSid, sessionData, err => { + expect(err).toBeNull() + setTimeout(() => { + subject.touch(newSid, sessionData, () => { + /**/ + }) + }, ttl * 900) + setTimeout(() => { + client + .get(defaultOptions.prefix + '/' + newSid) + .json() + .then(data => { + expect(data).toEqual(sessionData) + done() + }) + }, ttl * 1000 + ETCD_CLEAR_TIME) + }) + }) + + it('should not prevent the leasing cycle if skipTouch is true at the adapter config', async done => { + const { subject } = await createSubject({ skipTouch: true }) + const ttl = 1 + jest.spyOn(subject, 'getTTL' as any).mockReturnValue(ttl) + subject.set(newSid, sessionData, err => { + expect(err).toBeNull() + setTimeout(() => { + subject.touch(newSid, sessionData, () => { + /**/ + }) + }, ttl * 900) + setTimeout(() => { + client.get(defaultOptions.prefix + '/' + newSid).then(data => { + expect(data).toBeNull() + done() + }) + }, ttl * 1000 + ETCD_CLEAR_TIME) + }) + }) }) describe('when getting all the sessions', () => {