From 755111012e7db78eeed2e2a78ac23eb72e614074 Mon Sep 17 00:00:00 2001 From: Jinwoo Lee Date: Wed, 18 Apr 2018 09:39:09 -0700 Subject: [PATCH 1/2] feat: Log when error occurs while pushing And upgrade `h2-auto-push` to v0.4.0. Also update other packages. --- package-lock.json | 1254 +++++++++++++++++++++++-- package.json | 10 +- samples/static-page/package-lock.json | 27 +- ts/src/index.ts | 5 +- 4 files changed, 1185 insertions(+), 111 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5e6a754..b540f6b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -163,9 +163,9 @@ "dev": true }, "@types/node": { - "version": "9.4.6", - "resolved": "https://registry.npmjs.org/@types/node/-/node-9.4.6.tgz", - "integrity": "sha512-CTUtLb6WqCCgp6P59QintjHWqzf4VL1uPA27bipLAPxFqrtK1gEYllePzTICGqQ8rYsCbpnsNypXjjDzGAAjEQ==", + "version": "9.6.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-9.6.5.tgz", + "integrity": "sha512-NOLEgsT6UiDTjnWG5Hd2Mg25LRyz/oe8ql3wbjzgSFeRzRROhPmtlsvIrei4B46UjERF0td9SZ1ZXPLOdcrBHg==", "dev": true }, "@types/pino": { @@ -175,7 +175,7 @@ "dev": true, "requires": { "@types/events": "1.2.0", - "@types/node": "9.4.6" + "@types/node": "9.6.5" } }, "@types/send": { @@ -185,7 +185,7 @@ "dev": true, "requires": { "@types/mime": "2.0.0", - "@types/node": "9.4.6" + "@types/node": "9.6.5" } }, "abstract-logging": { @@ -1451,14 +1451,14 @@ "dev": true }, "clang-format": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/clang-format/-/clang-format-1.2.1.tgz", - "integrity": "sha512-AdmYODau6wAdbZtMMeq0kICR3VTEPO4austhr1+U1izMlgz3mnFRBhXTE98Bq+q2Xf+xpzaW9geqdsJRL9ML7Q==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/clang-format/-/clang-format-1.2.2.tgz", + "integrity": "sha512-6X9u1JBMak/9VbC0IZajEDvp19/PbjCanbRO3Z2xsluypQtbPPAGDvGGovLOWoUpXIvJH9vJExmzlqWvwItZxA==", "dev": true, "requires": { "async": "1.5.2", "glob": "7.1.2", - "resolve": "1.5.0" + "resolve": "1.7.1" } }, "clean-stack": { @@ -1567,9 +1567,9 @@ } }, "commander": { - "version": "2.12.2", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.12.2.tgz", - "integrity": "sha512-BFnaq5ZOGcDN7FlrtBT4xxkgIToalIIxwjxLWVJ8bGTpe1LroqMiqQXdA7ygc7CRvaYS+9zfPGFnJqFSayx+AA==", + "version": "2.15.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz", + "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==", "dev": true }, "common-path-prefix": { @@ -1802,9 +1802,9 @@ } }, "diff": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.4.0.tgz", - "integrity": "sha512-QpVuMTEoJMF7cKzi6bvWhRulU1fZqZnvyVQgNhPaxxuTYwyjn/j1v9falseQ/uXWwPnO56RBfwtg4h/EQXmucA==", + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", "dev": true }, "dot-prop": { @@ -1977,13 +1977,13 @@ "dev": true }, "external-editor": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.1.0.tgz", - "integrity": "sha512-E44iT5QVOUJBKij4IIV3uvxuNlbKS38Tw1HiupxEIHPv9qtC2PrDYohbXV5U+1jnfIXttny8gUhj+oZvflFlzA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.2.0.tgz", + "integrity": "sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==", "dev": true, "requires": { "chardet": "0.4.2", - "iconv-lite": "0.4.19", + "iconv-lite": "0.4.21", "tmp": "0.0.33" } }, @@ -3334,26 +3334,26 @@ "dev": true }, "gts": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/gts/-/gts-0.5.3.tgz", - "integrity": "sha512-MiC5I1cAYjuGq68Xc9esn1qQcfl/on154+Oux8y6xWv03Ql9DGGsAokFVzgqNFDV65wd38uXYcPNaeeIl/EOjg==", + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/gts/-/gts-0.5.4.tgz", + "integrity": "sha512-bDxE/NvHu+v0uW0qbUMYClrGCi81Ug4Wa7BsV/yUtdEh67C3K56BiqAk8yBOttLH1k4XYks+7QSJy7XOf3vaQw==", "dev": true, "requires": { "chalk": "2.3.0", - "clang-format": "1.2.1", + "clang-format": "1.2.2", "inquirer": "3.3.0", "meow": "4.0.0", "pify": "3.0.0", "rimraf": "2.6.2", - "tslint": "5.8.0", + "tslint": "5.9.1", "update-notifier": "2.3.0", "write-file-atomic": "2.3.0" } }, "h2-auto-push": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/h2-auto-push/-/h2-auto-push-0.3.1.tgz", - "integrity": "sha512-VBFt3CTIrM27HjFwXmBjSl8qYTzRZZ+nvS3AMtLV41MIFM9GbkdP1Z/7f1HL0JM2LVHZA+Q8/HsNao2RX+AYcw==", + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/h2-auto-push/-/h2-auto-push-0.4.0.tgz", + "integrity": "sha512-xA+SX6l4jccQyRSi07bvSqnnafTPVEvhBtkkC8W4EBmioR5IeMAmIvnExxIU+vTMPJ97ys188IiVT5PLdr6K3Q==", "requires": { "bloomfilter": "0.0.16" } @@ -3488,10 +3488,13 @@ } }, "iconv-lite": { - "version": "0.4.19", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", - "integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==", - "dev": true + "version": "0.4.21", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.21.tgz", + "integrity": "sha512-En5V9za5mBt2oUA03WGD3TwDv0MKAruqsuxstbMUZaj9W9k/m1CV/9py3l0L5kw9Bln8fdHQmzHSYtvpvTLpKw==", + "dev": true, + "requires": { + "safer-buffer": "2.1.2" + } }, "ignore-by-default": { "version": "1.0.1", @@ -3558,7 +3561,7 @@ "chalk": "2.3.0", "cli-cursor": "2.1.0", "cli-width": "2.2.0", - "external-editor": "2.1.0", + "external-editor": "2.2.0", "figures": "2.0.0", "lodash": "4.17.4", "mute-stream": "0.0.7", @@ -4377,9 +4380,9 @@ "dev": true }, "nyc": { - "version": "11.5.0", - "resolved": "https://registry.npmjs.org/nyc/-/nyc-11.5.0.tgz", - "integrity": "sha512-xIYK189By0YiM5/T4TviHu3J7bV7lCj5WYJfyZK3z03QgAaQ60WcLaJuXf0zhKoI6PBnUR92ZpSwBICCrgSBGg==", + "version": "11.7.1", + "resolved": "https://registry.npmjs.org/nyc/-/nyc-11.7.1.tgz", + "integrity": "sha512-EGePURSKUEpS1jWnEKAMhY+GWZzi7JC+f8iBDOATaOsLZW5hM/9eYx2dHGaEXa1ITvMm44CJugMksvP3NwMQMw==", "dev": true, "requires": { "archy": "1.0.0", @@ -4392,12 +4395,12 @@ "find-up": "2.1.0", "foreground-child": "1.5.6", "glob": "7.1.2", - "istanbul-lib-coverage": "1.1.2", + "istanbul-lib-coverage": "1.2.0", "istanbul-lib-hook": "1.1.0", - "istanbul-lib-instrument": "1.9.2", + "istanbul-lib-instrument": "1.10.1", "istanbul-lib-report": "1.1.3", "istanbul-lib-source-maps": "1.2.3", - "istanbul-reports": "1.1.4", + "istanbul-reports": "1.4.0", "md5-hex": "1.3.0", "merge-source-map": "1.1.0", "micromatch": "2.3.11", @@ -4406,8 +4409,8 @@ "rimraf": "2.6.2", "signal-exit": "3.0.2", "spawn-wrap": "1.4.2", - "test-exclude": "4.2.0", - "yargs": "10.1.2", + "test-exclude": "4.2.1", + "yargs": "11.1.0", "yargs-parser": "8.1.0" }, "dependencies": { @@ -4462,6 +4465,11 @@ "bundled": true, "dev": true }, + "arr-union": { + "version": "3.1.0", + "bundled": true, + "dev": true + }, "array-unique": { "version": "0.2.1", "bundled": true, @@ -4472,11 +4480,21 @@ "bundled": true, "dev": true }, + "assign-symbols": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, "async": { "version": "1.5.2", "bundled": true, "dev": true }, + "atob": { + "version": "2.1.0", + "bundled": true, + "dev": true + }, "babel-code-frame": { "version": "6.26.0", "bundled": true, @@ -4515,7 +4533,7 @@ "bundled": true, "dev": true, "requires": { - "core-js": "2.5.3", + "core-js": "2.5.5", "regenerator-runtime": "0.11.1" } }, @@ -4543,7 +4561,7 @@ "babylon": "6.18.0", "debug": "2.6.9", "globals": "9.18.0", - "invariant": "2.2.2", + "invariant": "2.2.4", "lodash": "4.17.5" } }, @@ -4568,6 +4586,66 @@ "bundled": true, "dev": true }, + "base": { + "version": "0.11.2", + "bundled": true, + "dev": true, + "requires": { + "cache-base": "1.0.1", + "class-utils": "0.3.6", + "component-emitter": "1.2.1", + "define-property": "1.0.0", + "isobject": "3.0.1", + "mixin-deep": "1.3.1", + "pascalcase": "0.1.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "is-descriptor": "1.0.2" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "6.0.2" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "6.0.2" + } + }, + "is-descriptor": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" + } + }, + "isobject": { + "version": "3.0.1", + "bundled": true, + "dev": true + }, + "kind-of": { + "version": "6.0.2", + "bundled": true, + "dev": true + } + } + }, "brace-expansion": { "version": "1.1.11", "bundled": true, @@ -4592,6 +4670,29 @@ "bundled": true, "dev": true }, + "cache-base": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "requires": { + "collection-visit": "1.0.0", + "component-emitter": "1.2.1", + "get-value": "2.0.6", + "has-value": "1.0.0", + "isobject": "3.0.1", + "set-value": "2.0.0", + "to-object-path": "0.3.0", + "union-value": "1.0.0", + "unset-value": "1.0.0" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "bundled": true, + "dev": true + } + } + }, "caching-transform": { "version": "1.0.1", "bundled": true, @@ -4630,6 +4731,32 @@ "supports-color": "2.0.0" } }, + "class-utils": { + "version": "0.3.6", + "bundled": true, + "dev": true, + "requires": { + "arr-union": "3.1.0", + "define-property": "0.2.5", + "isobject": "3.0.1", + "static-extend": "0.1.2" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "bundled": true, + "dev": true, + "requires": { + "is-descriptor": "0.1.6" + } + }, + "isobject": { + "version": "3.0.1", + "bundled": true, + "dev": true + } + } + }, "cliui": { "version": "2.1.0", "bundled": true, @@ -4654,11 +4781,25 @@ "bundled": true, "dev": true }, + "collection-visit": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "map-visit": "1.0.0", + "object-visit": "1.0.1" + } + }, "commondir": { "version": "1.0.1", "bundled": true, "dev": true }, + "component-emitter": { + "version": "1.2.1", + "bundled": true, + "dev": true + }, "concat-map": { "version": "0.0.1", "bundled": true, @@ -4669,8 +4810,13 @@ "bundled": true, "dev": true }, + "copy-descriptor": { + "version": "0.1.1", + "bundled": true, + "dev": true + }, "core-js": { - "version": "2.5.3", + "version": "2.5.5", "bundled": true, "dev": true }, @@ -4679,7 +4825,7 @@ "bundled": true, "dev": true, "requires": { - "lru-cache": "4.1.1", + "lru-cache": "4.1.2", "which": "1.3.0" } }, @@ -4701,6 +4847,11 @@ "bundled": true, "dev": true }, + "decode-uri-component": { + "version": "0.2.0", + "bundled": true, + "dev": true + }, "default-require-extensions": { "version": "1.0.0", "bundled": true, @@ -4709,6 +4860,53 @@ "strip-bom": "2.0.0" } }, + "define-property": { + "version": "2.0.2", + "bundled": true, + "dev": true, + "requires": { + "is-descriptor": "1.0.2", + "isobject": "3.0.1" + }, + "dependencies": { + "is-accessor-descriptor": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "6.0.2" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "6.0.2" + } + }, + "is-descriptor": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" + } + }, + "isobject": { + "version": "3.0.1", + "bundled": true, + "dev": true + }, + "kind-of": { + "version": "6.0.2", + "bundled": true, + "dev": true + } + } + }, "detect-indent": { "version": "4.0.0", "bundled": true, @@ -4754,7 +4952,7 @@ "bundled": true, "dev": true, "requires": { - "lru-cache": "4.1.1", + "lru-cache": "4.1.2", "shebang-command": "1.2.0", "which": "1.3.0" } @@ -4777,6 +4975,25 @@ "fill-range": "2.2.3" } }, + "extend-shallow": { + "version": "3.0.2", + "bundled": true, + "dev": true, + "requires": { + "assign-symbols": "1.0.0", + "is-extendable": "1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "requires": { + "is-plain-object": "2.0.4" + } + } + } + }, "extglob": { "version": "0.3.2", "bundled": true, @@ -4842,6 +5059,14 @@ "signal-exit": "3.0.2" } }, + "fragment-cache": { + "version": "0.2.1", + "bundled": true, + "dev": true, + "requires": { + "map-cache": "0.2.2" + } + }, "fs.realpath": { "version": "1.0.0", "bundled": true, @@ -4857,6 +5082,11 @@ "bundled": true, "dev": true }, + "get-value": { + "version": "2.0.6", + "bundled": true, + "dev": true + }, "glob": { "version": "7.1.2", "bundled": true, @@ -4931,8 +5161,62 @@ "bundled": true, "dev": true }, + "has-value": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "get-value": "2.0.6", + "has-values": "1.0.0", + "isobject": "3.0.1" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "bundled": true, + "dev": true + } + } + }, + "has-values": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "is-number": "3.0.0", + "kind-of": "4.0.0" + }, + "dependencies": { + "is-number": { + "version": "3.0.0", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "bundled": true, + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "kind-of": { + "version": "4.0.0", + "bundled": true, + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, "hosted-git-info": { - "version": "2.5.0", + "version": "2.6.0", "bundled": true, "dev": true }, @@ -4956,7 +5240,7 @@ "dev": true }, "invariant": { - "version": "2.2.2", + "version": "2.2.4", "bundled": true, "dev": true, "requires": { @@ -4968,6 +5252,14 @@ "bundled": true, "dev": true }, + "is-accessor-descriptor": { + "version": "0.1.6", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "3.2.2" + } + }, "is-arrayish": { "version": "0.2.1", "bundled": true, @@ -4986,6 +5278,31 @@ "builtin-modules": "1.1.1" } }, + "is-data-descriptor": { + "version": "0.1.4", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "3.2.2" + } + }, + "is-descriptor": { + "version": "0.1.6", + "bundled": true, + "dev": true, + "requires": { + "is-accessor-descriptor": "0.1.6", + "is-data-descriptor": "0.1.4", + "kind-of": "5.1.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "bundled": true, + "dev": true + } + } + }, "is-dotfile": { "version": "1.0.3", "bundled": true, @@ -5038,6 +5355,36 @@ "kind-of": "3.2.2" } }, + "is-odd": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "is-number": "4.0.0" + }, + "dependencies": { + "is-number": { + "version": "4.0.0", + "bundled": true, + "dev": true + } + } + }, + "is-plain-object": { + "version": "2.0.4", + "bundled": true, + "dev": true, + "requires": { + "isobject": "3.0.1" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "bundled": true, + "dev": true + } + } + }, "is-posix-bracket": { "version": "0.1.1", "bundled": true, @@ -5058,7 +5405,12 @@ "bundled": true, "dev": true }, - "isarray": { + "is-windows": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "isarray": { "version": "1.0.0", "bundled": true, "dev": true @@ -5077,7 +5429,7 @@ } }, "istanbul-lib-coverage": { - "version": "1.1.2", + "version": "1.2.0", "bundled": true, "dev": true }, @@ -5090,7 +5442,7 @@ } }, "istanbul-lib-instrument": { - "version": "1.9.2", + "version": "1.10.1", "bundled": true, "dev": true, "requires": { @@ -5099,7 +5451,7 @@ "babel-traverse": "6.26.0", "babel-types": "6.26.0", "babylon": "6.18.0", - "istanbul-lib-coverage": "1.1.2", + "istanbul-lib-coverage": "1.2.0", "semver": "5.5.0" } }, @@ -5108,7 +5460,7 @@ "bundled": true, "dev": true, "requires": { - "istanbul-lib-coverage": "1.1.2", + "istanbul-lib-coverage": "1.2.0", "mkdirp": "0.5.1", "path-parse": "1.0.5", "supports-color": "3.2.3" @@ -5130,7 +5482,7 @@ "dev": true, "requires": { "debug": "3.1.0", - "istanbul-lib-coverage": "1.1.2", + "istanbul-lib-coverage": "1.2.0", "mkdirp": "0.5.1", "rimraf": "2.6.2", "source-map": "0.5.7" @@ -5147,7 +5499,7 @@ } }, "istanbul-reports": { - "version": "1.1.4", + "version": "1.4.0", "bundled": true, "dev": true, "requires": { @@ -5233,7 +5585,7 @@ } }, "lru-cache": { - "version": "4.1.1", + "version": "4.1.2", "bundled": true, "dev": true, "requires": { @@ -5241,6 +5593,19 @@ "yallist": "2.1.2" } }, + "map-cache": { + "version": "0.2.2", + "bundled": true, + "dev": true + }, + "map-visit": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "object-visit": "1.0.1" + } + }, "md5-hex": { "version": "1.3.0", "bundled": true, @@ -5315,6 +5680,25 @@ "bundled": true, "dev": true }, + "mixin-deep": { + "version": "1.3.1", + "bundled": true, + "dev": true, + "requires": { + "for-in": "1.0.2", + "is-extendable": "1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "requires": { + "is-plain-object": "2.0.4" + } + } + } + }, "mkdirp": { "version": "0.5.1", "bundled": true, @@ -5328,15 +5712,51 @@ "bundled": true, "dev": true }, + "nanomatch": { + "version": "1.2.9", + "bundled": true, + "dev": true, + "requires": { + "arr-diff": "4.0.0", + "array-unique": "0.3.2", + "define-property": "2.0.2", + "extend-shallow": "3.0.2", + "fragment-cache": "0.2.1", + "is-odd": "2.0.0", + "is-windows": "1.0.2", + "kind-of": "6.0.2", + "object.pick": "1.3.0", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" + }, + "dependencies": { + "arr-diff": { + "version": "4.0.0", + "bundled": true, + "dev": true + }, + "array-unique": { + "version": "0.3.2", + "bundled": true, + "dev": true + }, + "kind-of": { + "version": "6.0.2", + "bundled": true, + "dev": true + } + } + }, "normalize-package-data": { "version": "2.4.0", "bundled": true, "dev": true, "requires": { - "hosted-git-info": "2.5.0", + "hosted-git-info": "2.6.0", "is-builtin-module": "1.0.0", "semver": "5.5.0", - "validate-npm-package-license": "3.0.1" + "validate-npm-package-license": "3.0.3" } }, "normalize-path": { @@ -5365,6 +5785,41 @@ "bundled": true, "dev": true }, + "object-copy": { + "version": "0.1.0", + "bundled": true, + "dev": true, + "requires": { + "copy-descriptor": "0.1.1", + "define-property": "0.2.5", + "kind-of": "3.2.2" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "bundled": true, + "dev": true, + "requires": { + "is-descriptor": "0.1.6" + } + } + } + }, + "object-visit": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "requires": { + "isobject": "3.0.1" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "bundled": true, + "dev": true + } + } + }, "object.omit": { "version": "2.0.1", "bundled": true, @@ -5374,6 +5829,21 @@ "is-extendable": "0.1.1" } }, + "object.pick": { + "version": "1.3.0", + "bundled": true, + "dev": true, + "requires": { + "isobject": "3.0.1" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "bundled": true, + "dev": true + } + } + }, "once": { "version": "1.4.0", "bundled": true, @@ -5451,6 +5921,11 @@ "error-ex": "1.3.1" } }, + "pascalcase": { + "version": "0.1.1", + "bundled": true, + "dev": true + }, "path-exists": { "version": "2.1.0", "bundled": true, @@ -5521,6 +5996,11 @@ } } }, + "posix-character-classes": { + "version": "0.1.1", + "bundled": true, + "dev": true + }, "preserve": { "version": "0.2.0", "bundled": true, @@ -5611,6 +6091,15 @@ "is-equal-shallow": "0.1.3" } }, + "regex-not": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "extend-shallow": "3.0.2", + "safe-regex": "1.1.0" + } + }, "remove-trailing-separator": { "version": "1.1.0", "bundled": true, @@ -5649,6 +6138,16 @@ "bundled": true, "dev": true }, + "resolve-url": { + "version": "0.2.1", + "bundled": true, + "dev": true + }, + "ret": { + "version": "0.1.15", + "bundled": true, + "dev": true + }, "right-align": { "version": "0.1.3", "bundled": true, @@ -5666,6 +6165,14 @@ "glob": "7.1.2" } }, + "safe-regex": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "requires": { + "ret": "0.1.15" + } + }, "semver": { "version": "5.5.0", "bundled": true, @@ -5676,6 +6183,27 @@ "bundled": true, "dev": true }, + "set-value": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "extend-shallow": "2.0.1", + "is-extendable": "0.1.1", + "is-plain-object": "2.0.4", + "split-string": "3.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "is-extendable": "0.1.1" + } + } + } + }, "shebang-command": { "version": "1.2.0", "bundled": true, @@ -5699,11 +6227,125 @@ "bundled": true, "dev": true }, + "snapdragon": { + "version": "0.8.2", + "bundled": true, + "dev": true, + "requires": { + "base": "0.11.2", + "debug": "2.6.9", + "define-property": "0.2.5", + "extend-shallow": "2.0.1", + "map-cache": "0.2.2", + "source-map": "0.5.7", + "source-map-resolve": "0.5.1", + "use": "3.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "bundled": true, + "dev": true, + "requires": { + "is-descriptor": "0.1.6" + } + }, + "extend-shallow": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "is-extendable": "0.1.1" + } + } + } + }, + "snapdragon-node": { + "version": "2.1.1", + "bundled": true, + "dev": true, + "requires": { + "define-property": "1.0.0", + "isobject": "3.0.1", + "snapdragon-util": "3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "is-descriptor": "1.0.2" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "6.0.2" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "6.0.2" + } + }, + "is-descriptor": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" + } + }, + "isobject": { + "version": "3.0.1", + "bundled": true, + "dev": true + }, + "kind-of": { + "version": "6.0.2", + "bundled": true, + "dev": true + } + } + }, + "snapdragon-util": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "3.2.2" + } + }, "source-map": { "version": "0.5.7", "bundled": true, "dev": true }, + "source-map-resolve": { + "version": "0.5.1", + "bundled": true, + "dev": true, + "requires": { + "atob": "2.1.0", + "decode-uri-component": "0.2.0", + "resolve-url": "0.2.1", + "source-map-url": "0.4.0", + "urix": "0.1.0" + } + }, + "source-map-url": { + "version": "0.4.0", + "bundled": true, + "dev": true + }, "spawn-wrap": { "version": "1.4.2", "bundled": true, @@ -5718,23 +6360,60 @@ } }, "spdx-correct": { - "version": "1.0.2", + "version": "3.0.0", "bundled": true, "dev": true, "requires": { - "spdx-license-ids": "1.2.2" + "spdx-expression-parse": "3.0.0", + "spdx-license-ids": "3.0.0" } }, - "spdx-expression-parse": { - "version": "1.0.4", + "spdx-exceptions": { + "version": "2.1.0", "bundled": true, "dev": true }, + "spdx-expression-parse": { + "version": "3.0.0", + "bundled": true, + "dev": true, + "requires": { + "spdx-exceptions": "2.1.0", + "spdx-license-ids": "3.0.0" + } + }, "spdx-license-ids": { - "version": "1.2.2", + "version": "3.0.0", "bundled": true, "dev": true }, + "split-string": { + "version": "3.1.0", + "bundled": true, + "dev": true, + "requires": { + "extend-shallow": "3.0.2" + } + }, + "static-extend": { + "version": "0.1.2", + "bundled": true, + "dev": true, + "requires": { + "define-property": "0.2.5", + "object-copy": "0.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "bundled": true, + "dev": true, + "requires": { + "is-descriptor": "0.1.6" + } + } + } + }, "string-width": { "version": "2.1.1", "bundled": true, @@ -5786,15 +6465,265 @@ "dev": true }, "test-exclude": { - "version": "4.2.0", + "version": "4.2.1", "bundled": true, "dev": true, "requires": { "arrify": "1.0.1", - "micromatch": "2.3.11", + "micromatch": "3.1.10", "object-assign": "4.1.1", "read-pkg-up": "1.0.1", "require-main-filename": "1.0.1" + }, + "dependencies": { + "arr-diff": { + "version": "4.0.0", + "bundled": true, + "dev": true + }, + "array-unique": { + "version": "0.3.2", + "bundled": true, + "dev": true + }, + "braces": { + "version": "2.3.2", + "bundled": true, + "dev": true, + "requires": { + "arr-flatten": "1.1.0", + "array-unique": "0.3.2", + "extend-shallow": "2.0.1", + "fill-range": "4.0.0", + "isobject": "3.0.1", + "repeat-element": "1.1.2", + "snapdragon": "0.8.2", + "snapdragon-node": "2.1.1", + "split-string": "3.1.0", + "to-regex": "3.0.2" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "is-extendable": "0.1.1" + } + } + } + }, + "expand-brackets": { + "version": "2.1.4", + "bundled": true, + "dev": true, + "requires": { + "debug": "2.6.9", + "define-property": "0.2.5", + "extend-shallow": "2.0.1", + "posix-character-classes": "0.1.1", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "bundled": true, + "dev": true, + "requires": { + "is-descriptor": "0.1.6" + } + }, + "extend-shallow": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "is-extendable": "0.1.1" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "bundled": true, + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "bundled": true, + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "bundled": true, + "dev": true, + "requires": { + "is-accessor-descriptor": "0.1.6", + "is-data-descriptor": "0.1.4", + "kind-of": "5.1.0" + } + }, + "kind-of": { + "version": "5.1.0", + "bundled": true, + "dev": true + } + } + }, + "extglob": { + "version": "2.0.4", + "bundled": true, + "dev": true, + "requires": { + "array-unique": "0.3.2", + "define-property": "1.0.0", + "expand-brackets": "2.1.4", + "extend-shallow": "2.0.1", + "fragment-cache": "0.2.1", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "is-descriptor": "1.0.2" + } + }, + "extend-shallow": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "is-extendable": "0.1.1" + } + } + } + }, + "fill-range": { + "version": "4.0.0", + "bundled": true, + "dev": true, + "requires": { + "extend-shallow": "2.0.1", + "is-number": "3.0.0", + "repeat-string": "1.6.1", + "to-regex-range": "2.1.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "is-extendable": "0.1.1" + } + } + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "6.0.2" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "6.0.2" + } + }, + "is-descriptor": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" + } + }, + "is-number": { + "version": "3.0.0", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "bundled": true, + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "isobject": { + "version": "3.0.1", + "bundled": true, + "dev": true + }, + "kind-of": { + "version": "6.0.2", + "bundled": true, + "dev": true + }, + "micromatch": { + "version": "3.1.10", + "bundled": true, + "dev": true, + "requires": { + "arr-diff": "4.0.0", + "array-unique": "0.3.2", + "braces": "2.3.2", + "define-property": "2.0.2", + "extend-shallow": "3.0.2", + "extglob": "2.0.4", + "fragment-cache": "0.2.1", + "kind-of": "6.0.2", + "nanomatch": "1.2.9", + "object.pick": "1.3.0", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" + } + } } }, "to-fast-properties": { @@ -5802,6 +6731,44 @@ "bundled": true, "dev": true }, + "to-object-path": { + "version": "0.3.0", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "3.2.2" + } + }, + "to-regex": { + "version": "3.0.2", + "bundled": true, + "dev": true, + "requires": { + "define-property": "2.0.2", + "extend-shallow": "3.0.2", + "regex-not": "1.0.2", + "safe-regex": "1.1.0" + } + }, + "to-regex-range": { + "version": "2.1.1", + "bundled": true, + "dev": true, + "requires": { + "is-number": "3.0.0", + "repeat-string": "1.6.1" + }, + "dependencies": { + "is-number": { + "version": "3.0.0", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "3.2.2" + } + } + } + }, "trim-right": { "version": "1.0.1", "bundled": true, @@ -5838,13 +6805,106 @@ "dev": true, "optional": true }, + "union-value": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "arr-union": "3.1.0", + "get-value": "2.0.6", + "is-extendable": "0.1.1", + "set-value": "0.4.3" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "is-extendable": "0.1.1" + } + }, + "set-value": { + "version": "0.4.3", + "bundled": true, + "dev": true, + "requires": { + "extend-shallow": "2.0.1", + "is-extendable": "0.1.1", + "is-plain-object": "2.0.4", + "to-object-path": "0.3.0" + } + } + } + }, + "unset-value": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "has-value": "0.3.1", + "isobject": "3.0.1" + }, + "dependencies": { + "has-value": { + "version": "0.3.1", + "bundled": true, + "dev": true, + "requires": { + "get-value": "2.0.6", + "has-values": "0.1.4", + "isobject": "2.1.0" + }, + "dependencies": { + "isobject": { + "version": "2.1.0", + "bundled": true, + "dev": true, + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "has-values": { + "version": "0.1.4", + "bundled": true, + "dev": true + }, + "isobject": { + "version": "3.0.1", + "bundled": true, + "dev": true + } + } + }, + "urix": { + "version": "0.1.0", + "bundled": true, + "dev": true + }, + "use": { + "version": "3.1.0", + "bundled": true, + "dev": true, + "requires": { + "kind-of": "6.0.2" + }, + "dependencies": { + "kind-of": { + "version": "6.0.2", + "bundled": true, + "dev": true + } + } + }, "validate-npm-package-license": { - "version": "3.0.1", + "version": "3.0.3", "bundled": true, "dev": true, "requires": { - "spdx-correct": "1.0.2", - "spdx-expression-parse": "1.0.4" + "spdx-correct": "3.0.0", + "spdx-expression-parse": "3.0.0" } }, "which": { @@ -5926,7 +6986,7 @@ "dev": true }, "yargs": { - "version": "10.1.2", + "version": "11.1.0", "bundled": true, "dev": true, "requires": { @@ -5941,7 +7001,7 @@ "string-width": "2.1.1", "which-module": "2.0.0", "y18n": "3.2.1", - "yargs-parser": "8.1.0" + "yargs-parser": "9.0.2" }, "dependencies": { "ansi-regex": { @@ -5949,6 +7009,11 @@ "bundled": true, "dev": true }, + "camelcase": { + "version": "4.1.0", + "bundled": true, + "dev": true + }, "cliui": { "version": "4.0.0", "bundled": true, @@ -5966,6 +7031,14 @@ "requires": { "ansi-regex": "3.0.0" } + }, + "yargs-parser": { + "version": "9.0.2", + "bundled": true, + "dev": true, + "requires": { + "camelcase": "4.1.0" + } } } }, @@ -6655,9 +7728,9 @@ "dev": true }, "resolve": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.5.0.tgz", - "integrity": "sha512-hgoSGrc3pjzAPHNBg+KnFcK2HwlHTs/YrAGUr6qgTVUZmXv1UEXXl0bZNBKMA9fud6lRYFdPGz0xXxycPzmmiw==", + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.7.1.tgz", + "integrity": "sha512-c7rwLofp8g1U+h1KNyHL/jicrKg1Ek4q+Lr33AL65uZTinUZHe30D5HlyN5V9NW0JX1D5dXQ4jqW5l7Sy/kGfw==", "dev": true, "requires": { "path-parse": "1.0.5" @@ -6732,6 +7805,12 @@ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, "semver": { "version": "5.4.1", "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", @@ -7205,37 +8284,38 @@ "dev": true }, "tslib": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.8.1.tgz", - "integrity": "sha1-aUavLR1lGnsYY7Ux1uWvpBqkTqw=", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.0.tgz", + "integrity": "sha512-f/qGG2tUkrISBlQZEjEqoZ3B2+npJjIf04H1wuAv9iA8i04Icp+61KRXxFdha22670NJopsZCIjhC3SnjPRKrQ==", "dev": true }, "tslint": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.8.0.tgz", - "integrity": "sha1-H0mtWy53x2w69N3K5VKuTjYS6xM=", + "version": "5.9.1", + "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.9.1.tgz", + "integrity": "sha1-ElX4ej/1frCw4fDmEKi0dIBGya4=", "dev": true, "requires": { "babel-code-frame": "6.26.0", "builtin-modules": "1.1.1", "chalk": "2.3.0", - "commander": "2.12.2", - "diff": "3.4.0", + "commander": "2.15.1", + "diff": "3.5.0", "glob": "7.1.2", + "js-yaml": "3.10.0", "minimatch": "3.0.4", - "resolve": "1.5.0", + "resolve": "1.7.1", "semver": "5.4.1", - "tslib": "1.8.1", - "tsutils": "2.13.1" + "tslib": "1.9.0", + "tsutils": "2.26.1" } }, "tsutils": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.13.1.tgz", - "integrity": "sha512-XMOEvc2TiYesVSOJMI7OYPnBMSgcvERuGW5Li/J+2A0TuH607BPQnOLQ82oSPZCssB8c9+QGi6qhTBa/f1xQRA==", + "version": "2.26.1", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.26.1.tgz", + "integrity": "sha512-bnm9bcjOqOr1UljleL94wVCDlpa6KjfGaTkefeLch4GRafgDkROxPizbB/FxTEdI++5JqhxczRy/Qub0syNqZA==", "dev": true, "requires": { - "tslib": "1.8.1" + "tslib": "1.9.0" } }, "tunnel-agent": { diff --git a/package.json b/package.json index 1d8bbc8..2fbdc9b 100644 --- a/package.json +++ b/package.json @@ -49,20 +49,20 @@ "cookie": "^0.3.1", "fastify-plugin": "^1.0.0", "fastify-static": "^0.10.1", - "h2-auto-push": "^0.3.1" + "h2-auto-push": "^0.4.0" }, "devDependencies": { "@types/cookie": "^0.3.1", "@types/get-port": "^3.2.0", - "@types/node": "^9.4.6", + "@types/node": "^9.6.5", "@types/send": "^0.14.4", "ava": "^0.25.0", "codecov": "^3.0.0", "fastify": "^1.0.0", "get-port": "^3.2.0", - "gts": "^0.5.3", + "gts": "^0.5.4", "js-green-licenses": "^0.5.0", - "nyc": "^11.5.0", - "typescript": "^2.7.2" + "nyc": "^11.7.1", + "typescript": "~2.7.2" } } diff --git a/samples/static-page/package-lock.json b/samples/static-page/package-lock.json index 0fb6ee7..cf35387 100644 --- a/samples/static-page/package-lock.json +++ b/samples/static-page/package-lock.json @@ -206,23 +206,14 @@ } }, "fastify-auto-push": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/fastify-auto-push/-/fastify-auto-push-0.3.1.tgz", - "integrity": "sha512-pChzYkc3gJf+m8u14aKGpU5eiLAJHqZUkOwHJ599zizzFaUOtmJnNLNI07w2rEOhavXAnQasoB3YynsZ/zWUzw==", + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/fastify-auto-push/-/fastify-auto-push-0.3.2.tgz", + "integrity": "sha512-N/k4Cq8hC+m2P3Q5evIGFbJse35KaUdU+G5EEgCPOnVmOaMdjn54KGBy/AZHjXv0Li/dJqD84PRu1cMmQ6MUfA==", "requires": { "cookie": "0.3.1", - "fastify-plugin": "0.2.2", - "h2-auto-push": "0.3.0" - }, - "dependencies": { - "fastify-plugin": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/fastify-plugin/-/fastify-plugin-0.2.2.tgz", - "integrity": "sha512-oRJdjdudgCkQQUARNeh2rkbxFAmj2OhCJSVBNBLUbhS0orF+IMQ4u/bc661N1jh/wDI2J+YKmXmmHSVFQI4e7A==", - "requires": { - "semver": "5.5.0" - } - } + "fastify-plugin": "1.0.0", + "fastify-static": "0.10.1", + "h2-auto-push": "0.3.1" } }, "fastify-plugin": { @@ -270,9 +261,9 @@ "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" }, "h2-auto-push": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/h2-auto-push/-/h2-auto-push-0.3.0.tgz", - "integrity": "sha512-Stj2Eq6/ud1RdPHvtVn8C5Pue7J8mPArHOuf5wIqPS+Z8H8Tsj2JUOaDZmOu11EJxlRpEWxhUaAsPePZX55k8Q==", + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/h2-auto-push/-/h2-auto-push-0.3.1.tgz", + "integrity": "sha512-VBFt3CTIrM27HjFwXmBjSl8qYTzRZZ+nvS3AMtLV41MIFM9GbkdP1Z/7f1HL0JM2LVHZA+Q8/HsNao2RX+AYcw==", "requires": { "bloomfilter": "0.0.16" } diff --git a/ts/src/index.ts b/ts/src/index.ts index 7329b2c..5d2bb1f 100644 --- a/ts/src/index.ts +++ b/ts/src/index.ts @@ -70,7 +70,10 @@ async function staticServeFn( 'set-cookie', cookie.serialize(CACHE_COOKIE_KEY, newCacheCookie, {path: '/'})); - pushFn(reqStream).then(noop, noop); + reqStream.on('pushError', (err) => { + app.log.error('Error while pushing', err); + }); + pushFn().then(noop, noop); } }); From dc6eccbe5de097f28ce9742b3d18503bc92706e1 Mon Sep 17 00:00:00 2001 From: Jinwoo Lee Date: Wed, 18 Apr 2018 09:55:53 -0700 Subject: [PATCH 2/2] `req.log` instead of `app.log` --- ts/src/index.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ts/src/index.ts b/ts/src/index.ts index 5d2bb1f..3a0a3b3 100644 --- a/ts/src/index.ts +++ b/ts/src/index.ts @@ -20,13 +20,15 @@ import * as autoPush from 'h2-auto-push'; import * as http from 'http'; import * as http2 from 'http2'; import * as https from 'https'; +import * as pino from 'pino'; import * as stream from 'stream'; export {AssetCacheConfig} from 'h2-auto-push'; export type HttpServer = http.Server|https.Server|http2.Http2Server|http2.Http2SecureServer; -export type RawRequest = http.IncomingMessage|http2.Http2ServerRequest; +export type RawRequest = + (http.IncomingMessage|http2.Http2ServerRequest)&{log?: pino.Logger}; export type RawResponse = http.ServerResponse|http2.Http2ServerResponse; type Request = fastify.FastifyRequest; type Response = fastify.FastifyReply; @@ -71,7 +73,7 @@ async function staticServeFn( cookie.serialize(CACHE_COOKIE_KEY, newCacheCookie, {path: '/'})); reqStream.on('pushError', (err) => { - app.log.error('Error while pushing', err); + req.log!.error('Error while pushing', err); }); pushFn().then(noop, noop); }