Skip to content

Instantly share code, notes, and snippets.

@domharrington
Forked from duyquach-castr/server-ext.js
Last active May 24, 2022 13:21
Show Gist options
  • Save domharrington/1ce8b18337f03ecd40a7ddffdac5cc17 to your computer and use it in GitHub Desktop.
Save domharrington/1ce8b18337f03ecd40a7ddffdac5cc17 to your computer and use it in GitHub Desktop.
HapiJS sample code
node_modules

LiveAPI Metrics Hapi Demo

Download and install dependencies

git clone git@gist.github.com:1ce8b18337f03ecd40a7ddffdac5cc17.git
cd 1ce8b18337f03ecd40a7ddffdac5cc17
npm install

Run the application with your api key as an env variable

README_API_KEY=<insert your api key here> npm start
{
"name": "1ce8b18337f03ecd40a7ddffdac5cc17",
"version": "1.0.0",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "1ce8b18337f03ecd40a7ddffdac5cc17",
"version": "1.0.0",
"license": "ISC",
"dependencies": {
"@hapi/hapi": "^20.2.2",
"lodash": "^4.17.21",
"readmeio": "^5.1.2"
}
},
"node_modules/@hapi/accept": {
"version": "5.0.2",
"resolved": "https://registry.npmjs.org/@hapi/accept/-/accept-5.0.2.tgz",
"integrity": "sha512-CmzBx/bXUR8451fnZRuZAJRlzgm0Jgu5dltTX/bszmR2lheb9BpyN47Q1RbaGTsvFzn0PXAEs+lXDKfshccYZw==",
"dependencies": {
"@hapi/boom": "9.x.x",
"@hapi/hoek": "9.x.x"
}
},
"node_modules/@hapi/ammo": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/@hapi/ammo/-/ammo-5.0.1.tgz",
"integrity": "sha512-FbCNwcTbnQP4VYYhLNGZmA76xb2aHg9AMPiy18NZyWMG310P5KdFGyA9v2rm5ujrIny77dEEIkMOwl0Xv+fSSA==",
"dependencies": {
"@hapi/hoek": "9.x.x"
}
},
"node_modules/@hapi/b64": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/@hapi/b64/-/b64-5.0.0.tgz",
"integrity": "sha512-ngu0tSEmrezoiIaNGG6rRvKOUkUuDdf4XTPnONHGYfSGRmDqPZX5oJL6HAdKTo1UQHECbdB4OzhWrfgVppjHUw==",
"dependencies": {
"@hapi/hoek": "9.x.x"
}
},
"node_modules/@hapi/boom": {
"version": "9.1.4",
"resolved": "https://registry.npmjs.org/@hapi/boom/-/boom-9.1.4.tgz",
"integrity": "sha512-Ls1oH8jaN1vNsqcaHVYJrKmgMcKsC1wcp8bujvXrHaAqD2iDYq3HoOwsxwo09Cuda5R5nC0o0IxlrlTuvPuzSw==",
"dependencies": {
"@hapi/hoek": "9.x.x"
}
},
"node_modules/@hapi/bounce": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/@hapi/bounce/-/bounce-2.0.0.tgz",
"integrity": "sha512-JesW92uyzOOyuzJKjoLHM1ThiOvHPOLDHw01YV8yh5nCso7sDwJho1h0Ad2N+E62bZyz46TG3xhAi/78Gsct6A==",
"dependencies": {
"@hapi/boom": "9.x.x",
"@hapi/hoek": "9.x.x"
}
},
"node_modules/@hapi/bourne": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/@hapi/bourne/-/bourne-2.1.0.tgz",
"integrity": "sha512-i1BpaNDVLJdRBEKeJWkVO6tYX6DMFBuwMhSuWqLsY4ufeTKGVuV5rBsUhxPayXqnnWHgXUAmWK16H/ykO5Wj4Q=="
},
"node_modules/@hapi/call": {
"version": "8.0.1",
"resolved": "https://registry.npmjs.org/@hapi/call/-/call-8.0.1.tgz",
"integrity": "sha512-bOff6GTdOnoe5b8oXRV3lwkQSb/LAWylvDMae6RgEWWntd0SHtkYbQukDHKlfaYtVnSAgIavJ0kqszF/AIBb6g==",
"dependencies": {
"@hapi/boom": "9.x.x",
"@hapi/hoek": "9.x.x"
}
},
"node_modules/@hapi/catbox": {
"version": "11.1.1",
"resolved": "https://registry.npmjs.org/@hapi/catbox/-/catbox-11.1.1.tgz",
"integrity": "sha512-u/8HvB7dD/6X8hsZIpskSDo4yMKpHxFd7NluoylhGrL6cUfYxdQPnvUp9YU2C6F9hsyBVLGulBd9vBN1ebfXOQ==",
"dependencies": {
"@hapi/boom": "9.x.x",
"@hapi/hoek": "9.x.x",
"@hapi/podium": "4.x.x",
"@hapi/validate": "1.x.x"
}
},
"node_modules/@hapi/catbox-memory": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/@hapi/catbox-memory/-/catbox-memory-5.0.1.tgz",
"integrity": "sha512-QWw9nOYJq5PlvChLWV8i6hQHJYfvdqiXdvTupJFh0eqLZ64Xir7mKNi96d5/ZMUAqXPursfNDIDxjFgoEDUqeQ==",
"dependencies": {
"@hapi/boom": "9.x.x",
"@hapi/hoek": "9.x.x"
}
},
"node_modules/@hapi/content": {
"version": "5.0.2",
"resolved": "https://registry.npmjs.org/@hapi/content/-/content-5.0.2.tgz",
"integrity": "sha512-mre4dl1ygd4ZyOH3tiYBrOUBzV7Pu/EOs8VLGf58vtOEECWed8Uuw6B4iR9AN/8uQt42tB04qpVaMyoMQh0oMw==",
"dependencies": {
"@hapi/boom": "9.x.x"
}
},
"node_modules/@hapi/cryptiles": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/@hapi/cryptiles/-/cryptiles-5.1.0.tgz",
"integrity": "sha512-fo9+d1Ba5/FIoMySfMqPBR/7Pa29J2RsiPrl7bkwo5W5o+AN1dAYQRi4SPrPwwVxVGKjgLOEWrsvt1BonJSfLA==",
"dependencies": {
"@hapi/boom": "9.x.x"
},
"engines": {
"node": ">=12.0.0"
}
},
"node_modules/@hapi/file": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/@hapi/file/-/file-2.0.0.tgz",
"integrity": "sha512-WSrlgpvEqgPWkI18kkGELEZfXr0bYLtr16iIN4Krh9sRnzBZN6nnWxHFxtsnP684wueEySBbXPDg/WfA9xJdBQ=="
},
"node_modules/@hapi/hapi": {
"version": "20.2.2",
"resolved": "https://registry.npmjs.org/@hapi/hapi/-/hapi-20.2.2.tgz",
"integrity": "sha512-crhU6TIKt7QsksWLYctDBAXogk9PYAm7UzdpETyuBHC2pCa6/+B5NykiOVLG/3FCIgHo/raPVtan8bYtByHORQ==",
"dependencies": {
"@hapi/accept": "^5.0.1",
"@hapi/ammo": "^5.0.1",
"@hapi/boom": "^9.1.0",
"@hapi/bounce": "^2.0.0",
"@hapi/call": "^8.0.0",
"@hapi/catbox": "^11.1.1",
"@hapi/catbox-memory": "^5.0.0",
"@hapi/heavy": "^7.0.1",
"@hapi/hoek": "^9.0.4",
"@hapi/mimos": "^6.0.0",
"@hapi/podium": "^4.1.1",
"@hapi/shot": "^5.0.5",
"@hapi/somever": "^3.0.0",
"@hapi/statehood": "^7.0.4",
"@hapi/subtext": "^7.0.3",
"@hapi/teamwork": "^5.1.1",
"@hapi/topo": "^5.0.0",
"@hapi/validate": "^1.1.1"
},
"engines": {
"node": ">=12.0.0"
}
},
"node_modules/@hapi/heavy": {
"version": "7.0.1",
"resolved": "https://registry.npmjs.org/@hapi/heavy/-/heavy-7.0.1.tgz",
"integrity": "sha512-vJ/vzRQ13MtRzz6Qd4zRHWS3FaUc/5uivV2TIuExGTM9Qk+7Zzqj0e2G7EpE6KztO9SalTbiIkTh7qFKj/33cA==",
"dependencies": {
"@hapi/boom": "9.x.x",
"@hapi/hoek": "9.x.x",
"@hapi/validate": "1.x.x"
}
},
"node_modules/@hapi/hoek": {
"version": "9.3.0",
"resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.3.0.tgz",
"integrity": "sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ=="
},
"node_modules/@hapi/iron": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/@hapi/iron/-/iron-6.0.0.tgz",
"integrity": "sha512-zvGvWDufiTGpTJPG1Y/McN8UqWBu0k/xs/7l++HVU535NLHXsHhy54cfEMdW7EjwKfbBfM9Xy25FmTiobb7Hvw==",
"dependencies": {
"@hapi/b64": "5.x.x",
"@hapi/boom": "9.x.x",
"@hapi/bourne": "2.x.x",
"@hapi/cryptiles": "5.x.x",
"@hapi/hoek": "9.x.x"
}
},
"node_modules/@hapi/mimos": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/@hapi/mimos/-/mimos-6.0.0.tgz",
"integrity": "sha512-Op/67tr1I+JafN3R3XN5DucVSxKRT/Tc+tUszDwENoNpolxeXkhrJ2Czt6B6AAqrespHoivhgZBWYSuANN9QXg==",
"dependencies": {
"@hapi/hoek": "9.x.x",
"mime-db": "1.x.x"
}
},
"node_modules/@hapi/nigel": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/@hapi/nigel/-/nigel-4.0.2.tgz",
"integrity": "sha512-ht2KoEsDW22BxQOEkLEJaqfpoKPXxi7tvabXy7B/77eFtOyG5ZEstfZwxHQcqAiZhp58Ae5vkhEqI03kawkYNw==",
"dependencies": {
"@hapi/hoek": "^9.0.4",
"@hapi/vise": "^4.0.0"
},
"engines": {
"node": ">=12.0.0"
}
},
"node_modules/@hapi/pez": {
"version": "5.0.3",
"resolved": "https://registry.npmjs.org/@hapi/pez/-/pez-5.0.3.tgz",
"integrity": "sha512-mpikYRJjtrbJgdDHG/H9ySqYqwJ+QU/D7FXsYciS9P7NYBXE2ayKDAy3H0ou6CohOCaxPuTV4SZ0D936+VomHA==",
"dependencies": {
"@hapi/b64": "5.x.x",
"@hapi/boom": "9.x.x",
"@hapi/content": "^5.0.2",
"@hapi/hoek": "9.x.x",
"@hapi/nigel": "4.x.x"
}
},
"node_modules/@hapi/podium": {
"version": "4.1.3",
"resolved": "https://registry.npmjs.org/@hapi/podium/-/podium-4.1.3.tgz",
"integrity": "sha512-ljsKGQzLkFqnQxE7qeanvgGj4dejnciErYd30dbrYzUOF/FyS/DOF97qcrT3bhoVwCYmxa6PEMhxfCPlnUcD2g==",
"dependencies": {
"@hapi/hoek": "9.x.x",
"@hapi/teamwork": "5.x.x",
"@hapi/validate": "1.x.x"
}
},
"node_modules/@hapi/shot": {
"version": "5.0.5",
"resolved": "https://registry.npmjs.org/@hapi/shot/-/shot-5.0.5.tgz",
"integrity": "sha512-x5AMSZ5+j+Paa8KdfCoKh+klB78otxF+vcJR/IoN91Vo2e5ulXIW6HUsFTCU+4W6P/Etaip9nmdAx2zWDimB2A==",
"dependencies": {
"@hapi/hoek": "9.x.x",
"@hapi/validate": "1.x.x"
}
},
"node_modules/@hapi/somever": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/@hapi/somever/-/somever-3.0.1.tgz",
"integrity": "sha512-4ZTSN3YAHtgpY/M4GOtHUXgi6uZtG9nEZfNI6QrArhK0XN/RDVgijlb9kOmXwCR5VclDSkBul9FBvhSuKXx9+w==",
"dependencies": {
"@hapi/bounce": "2.x.x",
"@hapi/hoek": "9.x.x"
}
},
"node_modules/@hapi/statehood": {
"version": "7.0.4",
"resolved": "https://registry.npmjs.org/@hapi/statehood/-/statehood-7.0.4.tgz",
"integrity": "sha512-Fia6atroOVmc5+2bNOxF6Zv9vpbNAjEXNcUbWXavDqhnJDlchwUUwKS5LCi5mGtCTxRhUKKHwuxuBZJkmLZ7fw==",
"dependencies": {
"@hapi/boom": "9.x.x",
"@hapi/bounce": "2.x.x",
"@hapi/bourne": "2.x.x",
"@hapi/cryptiles": "5.x.x",
"@hapi/hoek": "9.x.x",
"@hapi/iron": "6.x.x",
"@hapi/validate": "1.x.x"
}
},
"node_modules/@hapi/subtext": {
"version": "7.0.3",
"resolved": "https://registry.npmjs.org/@hapi/subtext/-/subtext-7.0.3.tgz",
"integrity": "sha512-CekDizZkDGERJ01C0+TzHlKtqdXZxzSWTOaH6THBrbOHnsr3GY+yiMZC+AfNCypfE17RaIakGIAbpL2Tk1z2+A==",
"dependencies": {
"@hapi/boom": "9.x.x",
"@hapi/bourne": "2.x.x",
"@hapi/content": "^5.0.2",
"@hapi/file": "2.x.x",
"@hapi/hoek": "9.x.x",
"@hapi/pez": "^5.0.1",
"@hapi/wreck": "17.x.x"
}
},
"node_modules/@hapi/teamwork": {
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/@hapi/teamwork/-/teamwork-5.1.1.tgz",
"integrity": "sha512-1oPx9AE5TIv+V6Ih54RP9lTZBso3rP8j4Xhb6iSVwPXtAM+sDopl5TFMv5Paw73UnpZJ9gjcrTE1BXrWt9eQrg==",
"engines": {
"node": ">=12.0.0"
}
},
"node_modules/@hapi/topo": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/@hapi/topo/-/topo-5.1.0.tgz",
"integrity": "sha512-foQZKJig7Ob0BMAYBfcJk8d77QtOe7Wo4ox7ff1lQYoNNAb6jwcY1ncdoy2e9wQZzvNy7ODZCYJkK8kzmcAnAg==",
"dependencies": {
"@hapi/hoek": "^9.0.0"
}
},
"node_modules/@hapi/validate": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/@hapi/validate/-/validate-1.1.3.tgz",
"integrity": "sha512-/XMR0N0wjw0Twzq2pQOzPBZlDzkekGcoCtzO314BpIEsbXdYGthQUbxgkGDf4nhk1+IPDAsXqWjMohRQYO06UA==",
"dependencies": {
"@hapi/hoek": "^9.0.0",
"@hapi/topo": "^5.0.0"
}
},
"node_modules/@hapi/vise": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/@hapi/vise/-/vise-4.0.0.tgz",
"integrity": "sha512-eYyLkuUiFZTer59h+SGy7hUm+qE9p+UemePTHLlIWppEd+wExn3Df5jO04bFQTm7nleF5V8CtuYQYb+VFpZ6Sg==",
"dependencies": {
"@hapi/hoek": "9.x.x"
}
},
"node_modules/@hapi/wreck": {
"version": "17.2.0",
"resolved": "https://registry.npmjs.org/@hapi/wreck/-/wreck-17.2.0.tgz",
"integrity": "sha512-pJ5kjYoRPYDv+eIuiLQqhGon341fr2bNIYZjuotuPJG/3Ilzr/XtI+JAp0A86E2bYfsS3zBPABuS2ICkaXFT8g==",
"dependencies": {
"@hapi/boom": "9.x.x",
"@hapi/bourne": "2.x.x",
"@hapi/hoek": "9.x.x"
}
},
"node_modules/abort-controller": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz",
"integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==",
"dependencies": {
"event-target-shim": "^5.0.0"
},
"engines": {
"node": ">=6.5"
}
},
"node_modules/balanced-match": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
},
"node_modules/brace-expansion": {
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
"dependencies": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
}
},
"node_modules/commondir": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz",
"integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs="
},
"node_modules/concat-map": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
},
"node_modules/content-type": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz",
"integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/event-target-shim": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz",
"integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==",
"engines": {
"node": ">=6"
}
},
"node_modules/find-cache-dir": {
"version": "3.3.2",
"resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz",
"integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==",
"dependencies": {
"commondir": "^1.0.1",
"make-dir": "^3.0.2",
"pkg-dir": "^4.1.0"
},
"engines": {
"node": ">=8"
},
"funding": {
"url": "https://github.com/avajs/find-cache-dir?sponsor=1"
}
},
"node_modules/find-up": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
"integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
"dependencies": {
"locate-path": "^5.0.0",
"path-exists": "^4.0.0"
},
"engines": {
"node": ">=8"
}
},
"node_modules/flat-cache": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz",
"integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==",
"dependencies": {
"flatted": "^3.1.0",
"rimraf": "^3.0.2"
},
"engines": {
"node": "^10.12.0 || >=12.0.0"
}
},
"node_modules/flatted": {
"version": "3.2.5",
"resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.5.tgz",
"integrity": "sha512-WIWGi2L3DyTUvUrwRKgGi9TwxQMUEqPOPQBVi71R96jZXJdFskXEmf54BoZaS1kknGODoIGASGEzBUYdyMCBJg=="
},
"node_modules/fs.realpath": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
},
"node_modules/glob": {
"version": "7.2.3",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
"integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
"dependencies": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
"inherits": "2",
"minimatch": "^3.1.1",
"once": "^1.3.0",
"path-is-absolute": "^1.0.0"
},
"engines": {
"node": "*"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/inflight": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
"integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
"dependencies": {
"once": "^1.3.0",
"wrappy": "1"
}
},
"node_modules/inherits": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
},
"node_modules/locate-path": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
"integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
"dependencies": {
"p-locate": "^4.1.0"
},
"engines": {
"node": ">=8"
}
},
"node_modules/lodash": {
"version": "4.17.21",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
},
"node_modules/make-dir": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz",
"integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==",
"dependencies": {
"semver": "^6.0.0"
},
"engines": {
"node": ">=8"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/mime-db": {
"version": "1.52.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
"integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/minimatch": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
"integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
"dependencies": {
"brace-expansion": "^1.1.7"
},
"engines": {
"node": "*"
}
},
"node_modules/node-fetch": {
"version": "2.6.7",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz",
"integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==",
"dependencies": {
"whatwg-url": "^5.0.0"
},
"engines": {
"node": "4.x || >=6.0.0"
},
"peerDependencies": {
"encoding": "^0.1.0"
},
"peerDependenciesMeta": {
"encoding": {
"optional": true
}
}
},
"node_modules/once": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
"dependencies": {
"wrappy": "1"
}
},
"node_modules/p-limit": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
"integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
"dependencies": {
"p-try": "^2.0.0"
},
"engines": {
"node": ">=6"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/p-locate": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
"integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
"dependencies": {
"p-limit": "^2.2.0"
},
"engines": {
"node": ">=8"
}
},
"node_modules/p-try": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
"integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==",
"engines": {
"node": ">=6"
}
},
"node_modules/path-exists": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
"integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
"engines": {
"node": ">=8"
}
},
"node_modules/path-is-absolute": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/pkg-dir": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz",
"integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==",
"dependencies": {
"find-up": "^4.0.0"
},
"engines": {
"node": ">=8"
}
},
"node_modules/readmeio": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/readmeio/-/readmeio-5.1.2.tgz",
"integrity": "sha512-4mwjJ08ZOo+8EHLq8w/aOLOnYhPEBvwZ9UULAfuQDtDDWobVDwhaFARoatLAZPF/pVbKHSvSkBtqIqS8aAuISg==",
"dependencies": {
"content-type": "^1.0.4",
"find-cache-dir": "^3.3.1",
"flat-cache": "^3.0.4",
"lodash": "^4.17.15",
"node-fetch": "^2.6.7",
"timeout-signal": "^1.1.0",
"uuid": "^8.2.0"
},
"engines": {
"node": ">=14"
}
},
"node_modules/rimraf": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
"integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
"dependencies": {
"glob": "^7.1.3"
},
"bin": {
"rimraf": "bin.js"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/semver": {
"version": "6.3.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
"integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
"bin": {
"semver": "bin/semver.js"
}
},
"node_modules/timeout-signal": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/timeout-signal/-/timeout-signal-1.1.0.tgz",
"integrity": "sha512-fuWY4tM1njcHCiOB7XkTmP0EOxzBkPbuQwPN+ZCzM6G0Tj4fMVgEffG/OPgiNUX48o+FhQEa2Oh4qjEDBCy5WQ==",
"dependencies": {
"abort-controller": "^3.0.0"
},
"engines": {
"node": ">=10"
}
},
"node_modules/tr46": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
"integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o="
},
"node_modules/uuid": {
"version": "8.3.2",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
"integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==",
"bin": {
"uuid": "dist/bin/uuid"
}
},
"node_modules/webidl-conversions": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
"integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE="
},
"node_modules/whatwg-url": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
"integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=",
"dependencies": {
"tr46": "~0.0.3",
"webidl-conversions": "^3.0.0"
}
},
"node_modules/wrappy": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
}
},
"dependencies": {
"@hapi/accept": {
"version": "5.0.2",
"resolved": "https://registry.npmjs.org/@hapi/accept/-/accept-5.0.2.tgz",
"integrity": "sha512-CmzBx/bXUR8451fnZRuZAJRlzgm0Jgu5dltTX/bszmR2lheb9BpyN47Q1RbaGTsvFzn0PXAEs+lXDKfshccYZw==",
"requires": {
"@hapi/boom": "9.x.x",
"@hapi/hoek": "9.x.x"
}
},
"@hapi/ammo": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/@hapi/ammo/-/ammo-5.0.1.tgz",
"integrity": "sha512-FbCNwcTbnQP4VYYhLNGZmA76xb2aHg9AMPiy18NZyWMG310P5KdFGyA9v2rm5ujrIny77dEEIkMOwl0Xv+fSSA==",
"requires": {
"@hapi/hoek": "9.x.x"
}
},
"@hapi/b64": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/@hapi/b64/-/b64-5.0.0.tgz",
"integrity": "sha512-ngu0tSEmrezoiIaNGG6rRvKOUkUuDdf4XTPnONHGYfSGRmDqPZX5oJL6HAdKTo1UQHECbdB4OzhWrfgVppjHUw==",
"requires": {
"@hapi/hoek": "9.x.x"
}
},
"@hapi/boom": {
"version": "9.1.4",
"resolved": "https://registry.npmjs.org/@hapi/boom/-/boom-9.1.4.tgz",
"integrity": "sha512-Ls1oH8jaN1vNsqcaHVYJrKmgMcKsC1wcp8bujvXrHaAqD2iDYq3HoOwsxwo09Cuda5R5nC0o0IxlrlTuvPuzSw==",
"requires": {
"@hapi/hoek": "9.x.x"
}
},
"@hapi/bounce": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/@hapi/bounce/-/bounce-2.0.0.tgz",
"integrity": "sha512-JesW92uyzOOyuzJKjoLHM1ThiOvHPOLDHw01YV8yh5nCso7sDwJho1h0Ad2N+E62bZyz46TG3xhAi/78Gsct6A==",
"requires": {
"@hapi/boom": "9.x.x",
"@hapi/hoek": "9.x.x"
}
},
"@hapi/bourne": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/@hapi/bourne/-/bourne-2.1.0.tgz",
"integrity": "sha512-i1BpaNDVLJdRBEKeJWkVO6tYX6DMFBuwMhSuWqLsY4ufeTKGVuV5rBsUhxPayXqnnWHgXUAmWK16H/ykO5Wj4Q=="
},
"@hapi/call": {
"version": "8.0.1",
"resolved": "https://registry.npmjs.org/@hapi/call/-/call-8.0.1.tgz",
"integrity": "sha512-bOff6GTdOnoe5b8oXRV3lwkQSb/LAWylvDMae6RgEWWntd0SHtkYbQukDHKlfaYtVnSAgIavJ0kqszF/AIBb6g==",
"requires": {
"@hapi/boom": "9.x.x",
"@hapi/hoek": "9.x.x"
}
},
"@hapi/catbox": {
"version": "11.1.1",
"resolved": "https://registry.npmjs.org/@hapi/catbox/-/catbox-11.1.1.tgz",
"integrity": "sha512-u/8HvB7dD/6X8hsZIpskSDo4yMKpHxFd7NluoylhGrL6cUfYxdQPnvUp9YU2C6F9hsyBVLGulBd9vBN1ebfXOQ==",
"requires": {
"@hapi/boom": "9.x.x",
"@hapi/hoek": "9.x.x",
"@hapi/podium": "4.x.x",
"@hapi/validate": "1.x.x"
}
},
"@hapi/catbox-memory": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/@hapi/catbox-memory/-/catbox-memory-5.0.1.tgz",
"integrity": "sha512-QWw9nOYJq5PlvChLWV8i6hQHJYfvdqiXdvTupJFh0eqLZ64Xir7mKNi96d5/ZMUAqXPursfNDIDxjFgoEDUqeQ==",
"requires": {
"@hapi/boom": "9.x.x",
"@hapi/hoek": "9.x.x"
}
},
"@hapi/content": {
"version": "5.0.2",
"resolved": "https://registry.npmjs.org/@hapi/content/-/content-5.0.2.tgz",
"integrity": "sha512-mre4dl1ygd4ZyOH3tiYBrOUBzV7Pu/EOs8VLGf58vtOEECWed8Uuw6B4iR9AN/8uQt42tB04qpVaMyoMQh0oMw==",
"requires": {
"@hapi/boom": "9.x.x"
}
},
"@hapi/cryptiles": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/@hapi/cryptiles/-/cryptiles-5.1.0.tgz",
"integrity": "sha512-fo9+d1Ba5/FIoMySfMqPBR/7Pa29J2RsiPrl7bkwo5W5o+AN1dAYQRi4SPrPwwVxVGKjgLOEWrsvt1BonJSfLA==",
"requires": {
"@hapi/boom": "9.x.x"
}
},
"@hapi/file": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/@hapi/file/-/file-2.0.0.tgz",
"integrity": "sha512-WSrlgpvEqgPWkI18kkGELEZfXr0bYLtr16iIN4Krh9sRnzBZN6nnWxHFxtsnP684wueEySBbXPDg/WfA9xJdBQ=="
},
"@hapi/hapi": {
"version": "20.2.2",
"resolved": "https://registry.npmjs.org/@hapi/hapi/-/hapi-20.2.2.tgz",
"integrity": "sha512-crhU6TIKt7QsksWLYctDBAXogk9PYAm7UzdpETyuBHC2pCa6/+B5NykiOVLG/3FCIgHo/raPVtan8bYtByHORQ==",
"requires": {
"@hapi/accept": "^5.0.1",
"@hapi/ammo": "^5.0.1",
"@hapi/boom": "^9.1.0",
"@hapi/bounce": "^2.0.0",
"@hapi/call": "^8.0.0",
"@hapi/catbox": "^11.1.1",
"@hapi/catbox-memory": "^5.0.0",
"@hapi/heavy": "^7.0.1",
"@hapi/hoek": "^9.0.4",
"@hapi/mimos": "^6.0.0",
"@hapi/podium": "^4.1.1",
"@hapi/shot": "^5.0.5",
"@hapi/somever": "^3.0.0",
"@hapi/statehood": "^7.0.4",
"@hapi/subtext": "^7.0.3",
"@hapi/teamwork": "^5.1.1",
"@hapi/topo": "^5.0.0",
"@hapi/validate": "^1.1.1"
}
},
"@hapi/heavy": {
"version": "7.0.1",
"resolved": "https://registry.npmjs.org/@hapi/heavy/-/heavy-7.0.1.tgz",
"integrity": "sha512-vJ/vzRQ13MtRzz6Qd4zRHWS3FaUc/5uivV2TIuExGTM9Qk+7Zzqj0e2G7EpE6KztO9SalTbiIkTh7qFKj/33cA==",
"requires": {
"@hapi/boom": "9.x.x",
"@hapi/hoek": "9.x.x",
"@hapi/validate": "1.x.x"
}
},
"@hapi/hoek": {
"version": "9.3.0",
"resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.3.0.tgz",
"integrity": "sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ=="
},
"@hapi/iron": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/@hapi/iron/-/iron-6.0.0.tgz",
"integrity": "sha512-zvGvWDufiTGpTJPG1Y/McN8UqWBu0k/xs/7l++HVU535NLHXsHhy54cfEMdW7EjwKfbBfM9Xy25FmTiobb7Hvw==",
"requires": {
"@hapi/b64": "5.x.x",
"@hapi/boom": "9.x.x",
"@hapi/bourne": "2.x.x",
"@hapi/cryptiles": "5.x.x",
"@hapi/hoek": "9.x.x"
}
},
"@hapi/mimos": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/@hapi/mimos/-/mimos-6.0.0.tgz",
"integrity": "sha512-Op/67tr1I+JafN3R3XN5DucVSxKRT/Tc+tUszDwENoNpolxeXkhrJ2Czt6B6AAqrespHoivhgZBWYSuANN9QXg==",
"requires": {
"@hapi/hoek": "9.x.x",
"mime-db": "1.x.x"
}
},
"@hapi/nigel": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/@hapi/nigel/-/nigel-4.0.2.tgz",
"integrity": "sha512-ht2KoEsDW22BxQOEkLEJaqfpoKPXxi7tvabXy7B/77eFtOyG5ZEstfZwxHQcqAiZhp58Ae5vkhEqI03kawkYNw==",
"requires": {
"@hapi/hoek": "^9.0.4",
"@hapi/vise": "^4.0.0"
}
},
"@hapi/pez": {
"version": "5.0.3",
"resolved": "https://registry.npmjs.org/@hapi/pez/-/pez-5.0.3.tgz",
"integrity": "sha512-mpikYRJjtrbJgdDHG/H9ySqYqwJ+QU/D7FXsYciS9P7NYBXE2ayKDAy3H0ou6CohOCaxPuTV4SZ0D936+VomHA==",
"requires": {
"@hapi/b64": "5.x.x",
"@hapi/boom": "9.x.x",
"@hapi/content": "^5.0.2",
"@hapi/hoek": "9.x.x",
"@hapi/nigel": "4.x.x"
}
},
"@hapi/podium": {
"version": "4.1.3",
"resolved": "https://registry.npmjs.org/@hapi/podium/-/podium-4.1.3.tgz",
"integrity": "sha512-ljsKGQzLkFqnQxE7qeanvgGj4dejnciErYd30dbrYzUOF/FyS/DOF97qcrT3bhoVwCYmxa6PEMhxfCPlnUcD2g==",
"requires": {
"@hapi/hoek": "9.x.x",
"@hapi/teamwork": "5.x.x",
"@hapi/validate": "1.x.x"
}
},
"@hapi/shot": {
"version": "5.0.5",
"resolved": "https://registry.npmjs.org/@hapi/shot/-/shot-5.0.5.tgz",
"integrity": "sha512-x5AMSZ5+j+Paa8KdfCoKh+klB78otxF+vcJR/IoN91Vo2e5ulXIW6HUsFTCU+4W6P/Etaip9nmdAx2zWDimB2A==",
"requires": {
"@hapi/hoek": "9.x.x",
"@hapi/validate": "1.x.x"
}
},
"@hapi/somever": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/@hapi/somever/-/somever-3.0.1.tgz",
"integrity": "sha512-4ZTSN3YAHtgpY/M4GOtHUXgi6uZtG9nEZfNI6QrArhK0XN/RDVgijlb9kOmXwCR5VclDSkBul9FBvhSuKXx9+w==",
"requires": {
"@hapi/bounce": "2.x.x",
"@hapi/hoek": "9.x.x"
}
},
"@hapi/statehood": {
"version": "7.0.4",
"resolved": "https://registry.npmjs.org/@hapi/statehood/-/statehood-7.0.4.tgz",
"integrity": "sha512-Fia6atroOVmc5+2bNOxF6Zv9vpbNAjEXNcUbWXavDqhnJDlchwUUwKS5LCi5mGtCTxRhUKKHwuxuBZJkmLZ7fw==",
"requires": {
"@hapi/boom": "9.x.x",
"@hapi/bounce": "2.x.x",
"@hapi/bourne": "2.x.x",
"@hapi/cryptiles": "5.x.x",
"@hapi/hoek": "9.x.x",
"@hapi/iron": "6.x.x",
"@hapi/validate": "1.x.x"
}
},
"@hapi/subtext": {
"version": "7.0.3",
"resolved": "https://registry.npmjs.org/@hapi/subtext/-/subtext-7.0.3.tgz",
"integrity": "sha512-CekDizZkDGERJ01C0+TzHlKtqdXZxzSWTOaH6THBrbOHnsr3GY+yiMZC+AfNCypfE17RaIakGIAbpL2Tk1z2+A==",
"requires": {
"@hapi/boom": "9.x.x",
"@hapi/bourne": "2.x.x",
"@hapi/content": "^5.0.2",
"@hapi/file": "2.x.x",
"@hapi/hoek": "9.x.x",
"@hapi/pez": "^5.0.1",
"@hapi/wreck": "17.x.x"
}
},
"@hapi/teamwork": {
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/@hapi/teamwork/-/teamwork-5.1.1.tgz",
"integrity": "sha512-1oPx9AE5TIv+V6Ih54RP9lTZBso3rP8j4Xhb6iSVwPXtAM+sDopl5TFMv5Paw73UnpZJ9gjcrTE1BXrWt9eQrg=="
},
"@hapi/topo": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/@hapi/topo/-/topo-5.1.0.tgz",
"integrity": "sha512-foQZKJig7Ob0BMAYBfcJk8d77QtOe7Wo4ox7ff1lQYoNNAb6jwcY1ncdoy2e9wQZzvNy7ODZCYJkK8kzmcAnAg==",
"requires": {
"@hapi/hoek": "^9.0.0"
}
},
"@hapi/validate": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/@hapi/validate/-/validate-1.1.3.tgz",
"integrity": "sha512-/XMR0N0wjw0Twzq2pQOzPBZlDzkekGcoCtzO314BpIEsbXdYGthQUbxgkGDf4nhk1+IPDAsXqWjMohRQYO06UA==",
"requires": {
"@hapi/hoek": "^9.0.0",
"@hapi/topo": "^5.0.0"
}
},
"@hapi/vise": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/@hapi/vise/-/vise-4.0.0.tgz",
"integrity": "sha512-eYyLkuUiFZTer59h+SGy7hUm+qE9p+UemePTHLlIWppEd+wExn3Df5jO04bFQTm7nleF5V8CtuYQYb+VFpZ6Sg==",
"requires": {
"@hapi/hoek": "9.x.x"
}
},
"@hapi/wreck": {
"version": "17.2.0",
"resolved": "https://registry.npmjs.org/@hapi/wreck/-/wreck-17.2.0.tgz",
"integrity": "sha512-pJ5kjYoRPYDv+eIuiLQqhGon341fr2bNIYZjuotuPJG/3Ilzr/XtI+JAp0A86E2bYfsS3zBPABuS2ICkaXFT8g==",
"requires": {
"@hapi/boom": "9.x.x",
"@hapi/bourne": "2.x.x",
"@hapi/hoek": "9.x.x"
}
},
"abort-controller": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz",
"integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==",
"requires": {
"event-target-shim": "^5.0.0"
}
},
"balanced-match": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
},
"brace-expansion": {
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
}
},
"commondir": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz",
"integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs="
},
"concat-map": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
},
"content-type": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz",
"integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA=="
},
"event-target-shim": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz",
"integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ=="
},
"find-cache-dir": {
"version": "3.3.2",
"resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz",
"integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==",
"requires": {
"commondir": "^1.0.1",
"make-dir": "^3.0.2",
"pkg-dir": "^4.1.0"
}
},
"find-up": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
"integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
"requires": {
"locate-path": "^5.0.0",
"path-exists": "^4.0.0"
}
},
"flat-cache": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz",
"integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==",
"requires": {
"flatted": "^3.1.0",
"rimraf": "^3.0.2"
}
},
"flatted": {
"version": "3.2.5",
"resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.5.tgz",
"integrity": "sha512-WIWGi2L3DyTUvUrwRKgGi9TwxQMUEqPOPQBVi71R96jZXJdFskXEmf54BoZaS1kknGODoIGASGEzBUYdyMCBJg=="
},
"fs.realpath": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
},
"glob": {
"version": "7.2.3",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
"integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
"requires": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
"inherits": "2",
"minimatch": "^3.1.1",
"once": "^1.3.0",
"path-is-absolute": "^1.0.0"
}
},
"inflight": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
"integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
"requires": {
"once": "^1.3.0",
"wrappy": "1"
}
},
"inherits": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
},
"locate-path": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
"integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
"requires": {
"p-locate": "^4.1.0"
}
},
"lodash": {
"version": "4.17.21",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
},
"make-dir": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz",
"integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==",
"requires": {
"semver": "^6.0.0"
}
},
"mime-db": {
"version": "1.52.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
"integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg=="
},
"minimatch": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
"integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
"requires": {
"brace-expansion": "^1.1.7"
}
},
"node-fetch": {
"version": "2.6.7",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz",
"integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==",
"requires": {
"whatwg-url": "^5.0.0"
}
},
"once": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
"requires": {
"wrappy": "1"
}
},
"p-limit": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
"integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
"requires": {
"p-try": "^2.0.0"
}
},
"p-locate": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
"integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
"requires": {
"p-limit": "^2.2.0"
}
},
"p-try": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
"integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ=="
},
"path-exists": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
"integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w=="
},
"path-is-absolute": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18="
},
"pkg-dir": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz",
"integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==",
"requires": {
"find-up": "^4.0.0"
}
},
"readmeio": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/readmeio/-/readmeio-5.1.2.tgz",
"integrity": "sha512-4mwjJ08ZOo+8EHLq8w/aOLOnYhPEBvwZ9UULAfuQDtDDWobVDwhaFARoatLAZPF/pVbKHSvSkBtqIqS8aAuISg==",
"requires": {
"content-type": "^1.0.4",
"find-cache-dir": "^3.3.1",
"flat-cache": "^3.0.4",
"lodash": "^4.17.15",
"node-fetch": "^2.6.7",
"timeout-signal": "^1.1.0",
"uuid": "^8.2.0"
}
},
"rimraf": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
"integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
"requires": {
"glob": "^7.1.3"
}
},
"semver": {
"version": "6.3.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
"integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw=="
},
"timeout-signal": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/timeout-signal/-/timeout-signal-1.1.0.tgz",
"integrity": "sha512-fuWY4tM1njcHCiOB7XkTmP0EOxzBkPbuQwPN+ZCzM6G0Tj4fMVgEffG/OPgiNUX48o+FhQEa2Oh4qjEDBCy5WQ==",
"requires": {
"abort-controller": "^3.0.0"
}
},
"tr46": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
"integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o="
},
"uuid": {
"version": "8.3.2",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
"integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg=="
},
"webidl-conversions": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
"integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE="
},
"whatwg-url": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
"integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=",
"requires": {
"tr46": "~0.0.3",
"webidl-conversions": "^3.0.0"
}
},
"wrappy": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
}
}
}
{
"name": "1ce8b18337f03ecd40a7ddffdac5cc17",
"version": "1.0.0",
"description": "",
"main": "server-ext.js",
"scripts": {
"start": "npx node-dev --respawn server-ext.js"
},
"repository": {
"type": "git",
"url": "git+ssh://git@gist.github.com/1ce8b18337f03ecd40a7ddffdac5cc17.git"
},
"keywords": [],
"author": "",
"license": "ISC",
"bugs": {
"url": "https://gist.github.com/1ce8b18337f03ecd40a7ddffdac5cc17"
},
"homepage": "https://gist.github.com/1ce8b18337f03ecd40a7ddffdac5cc17",
"dependencies": {
"@hapi/hapi": "^20.2.2",
"lodash": "^4.17.21",
"readmeio": "^5.1.2"
}
}
const _ = require('lodash')
const Hapi = require('@hapi/hapi');
const readme = require('readmeio');
if (!process.env.README_API_KEY) {
// eslint-disable-next-line no-console
console.error('Missing `README_API_KEY` environment variable');
process.exit(1);
}
const init = async () => {
const server = Hapi.server({
port: 4040,
host: 'localhost'
});
function handler(req, h) {
const { response, info } = req
readme.log(process.env.README_API_KEY, req.raw.req, req.raw.res, {
apiKey: 'users-api-key-or-id',
label: req.auth.userId,
startedDateTime: new Date(info?.received),
responseEndDateTime: new Date(info?.responded),
requestBody: Object.assign(req.params, req.payload),
responseBody: response.source
}, {})
if (response.isBoom) { return h.continue }
if (req.method === 'options') {
const allowedHeaders = [..._.keys(req.headers), 'content-type', 'auth-token', 'x-requested-with']
response.header('Access-Control-Allow-Origin', '*')
response.header('Access-Control-Allow-Methods', 'OPTIONS, PUT, POST, HEAD, GET, DELETE')
response.header('Access-Control-Allow-Headers', allowedHeaders.join(', '))
}
console.timeEnd(`request time: ${req.info.id} ${req.path} :`)
return response
}
server.ext('onPostResponse', handler);
server.route({
method: 'GET',
path: '/',
handler: (req, h) => {
return { message: 'hello world!' };
}
});
await server.start();
console.log('Server running on %s', server.info.uri);
};
process.on('unhandledRejection', (err) => {
console.log(err);
process.exit(1);
});
init();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment