From 8cf483f7aed54aefb4b6b39e9da51569b6390e61 Mon Sep 17 00:00:00 2001 From: AdamChrimes Date: Wed, 6 Nov 2019 15:27:42 +0000 Subject: [PATCH 01/27] display the search bar and enable the search functionality --- app.js | 8 +- app/scripts/main.js | 2 +- app/views/includes/header.njk | 4 +- package-lock.json | 342 +++++++++------------------------- package.json | 1 - 5 files changed, 93 insertions(+), 264 deletions(-) diff --git a/app.js b/app.js index 7dd9b59f7..2d63e12e2 100755 --- a/app.js +++ b/app.js @@ -80,9 +80,8 @@ app.get('/service-manual/design-example/:example', (req, res) => { res.render(baseTemplate, { body: exampleHtml }); }); -/* app.get('/service-manual/search', (req, res) => { - var query = req.query['search-field'] || ''; + const query = req.query['search-field'] || ''; res.render('includes/search.njk', { results: pageIndex.search(query), query: query }); }); @@ -90,7 +89,6 @@ app.get('/service-manual/suggestions', (req, res) => { res.set({ 'Content-Type': 'application/json' }); res.send(JSON.stringify(pageIndex.search(req.query.search))); }); -*/ app.get('/', (req, res) => { res.redirect('/service-manual'); @@ -157,10 +155,8 @@ if (config.env === 'development') { app.listen(config.port); } -/* -setTimeout(function(){ +setTimeout(() => { pageIndex.init(); }, 2000); -*/ module.exports = app; diff --git a/app/scripts/main.js b/app/scripts/main.js index ab1772df2..4630706c9 100644 --- a/app/scripts/main.js +++ b/app/scripts/main.js @@ -3,7 +3,7 @@ import './polyfills'; // NHS.UK frontend import nhsuk_skipLink from '../../node_modules/nhsuk-frontend/packages/components/skip-link/skip-link'; /* eslint-disable-line camelcase */ -// import './search'; +import './search'; import DesignExample from './design-example'; // Initialise components diff --git a/app/views/includes/header.njk b/app/views/includes/header.njk index 0af0c8d7e..fabf1cc00 100755 --- a/app/views/includes/header.njk +++ b/app/views/includes/header.njk @@ -9,7 +9,7 @@ "longName": "true" }, "showNav": "false", - "showSearch": "false", + "showSearch": "true", "searchAction": "/service-manual/search/" }) }} @@ -22,7 +22,7 @@ "longName": "true" }, "showNav": "false", - "showSearch": "false", + "showSearch": "true", "searchAction": "/service-manual/search/" }) }} diff --git a/package-lock.json b/package-lock.json index 52a28587c..8f23d963b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1520,8 +1520,7 @@ "abbrev": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", - "dev": true + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" }, "accepts": { "version": "1.3.7", @@ -1587,8 +1586,7 @@ "after": { "version": "0.8.2", "resolved": "https://registry.npmjs.org/after/-/after-0.8.2.tgz", - "integrity": "sha1-/ts5T58OAqqXaOcCvaI7UF+ufh8=", - "dev": true + "integrity": "sha1-/ts5T58OAqqXaOcCvaI7UF+ufh8=" }, "ajv": { "version": "6.10.0", @@ -1784,8 +1782,7 @@ "arraybuffer.slice": { "version": "0.0.7", "resolved": "https://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.7.tgz", - "integrity": "sha512-wGUIVQXuehL5TCqQun8OW81jGzAWycqzFF8lFp+GOM5BXLYj3bKNsYC4daB7n6XjCqxQA/qgTJ+8ANR3acjrog==", - "dev": true + "integrity": "sha512-wGUIVQXuehL5TCqQun8OW81jGzAWycqzFF8lFp+GOM5BXLYj3bKNsYC4daB7n6XjCqxQA/qgTJ+8ANR3acjrog==" }, "asap": { "version": "2.0.6", @@ -1859,8 +1856,7 @@ "async": { "version": "1.5.2", "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", - "dev": true + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=" }, "async-each": { "version": "1.0.1", @@ -1870,8 +1866,7 @@ "async-each-series": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/async-each-series/-/async-each-series-0.1.1.tgz", - "integrity": "sha1-dhfBkXQB/Yykooqtzj266Yr+tDI=", - "dev": true + "integrity": "sha1-dhfBkXQB/Yykooqtzj266Yr+tDI=" }, "async-foreach": { "version": "0.1.3", @@ -1882,8 +1877,7 @@ "async-limiter": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.0.tgz", - "integrity": "sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg==", - "dev": true + "integrity": "sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg==" }, "asynckit": { "version": "0.4.0", @@ -2012,14 +2006,12 @@ "backo2": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/backo2/-/backo2-1.0.2.tgz", - "integrity": "sha1-MasayLEpNjRj41s+u2n038+6eUc=", - "dev": true + "integrity": "sha1-MasayLEpNjRj41s+u2n038+6eUc=" }, "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "dev": true + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" }, "base": { "version": "0.11.2", @@ -2074,8 +2066,7 @@ "base64-arraybuffer": { "version": "0.1.5", "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.5.tgz", - "integrity": "sha1-c5JncZI7Whl0etZmqlzUv5xunOg=", - "dev": true + "integrity": "sha1-c5JncZI7Whl0etZmqlzUv5xunOg=" }, "base64-js": { "version": "1.3.1", @@ -2086,8 +2077,7 @@ "base64id": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/base64id/-/base64id-1.0.0.tgz", - "integrity": "sha1-R2iMuZu2gE8OBtPnY7HDLlfY5rY=", - "dev": true + "integrity": "sha1-R2iMuZu2gE8OBtPnY7HDLlfY5rY=" }, "basic-auth": { "version": "2.0.1", @@ -2107,8 +2097,7 @@ "batch": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz", - "integrity": "sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY=", - "dev": true + "integrity": "sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY=" }, "bcrypt-pbkdf": { "version": "1.0.2", @@ -2123,7 +2112,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/better-assert/-/better-assert-1.0.2.tgz", "integrity": "sha1-QIZrnhueC1W0gYlDEeaPr/rrxSI=", - "dev": true, "requires": { "callsite": "1.0.0" } @@ -2142,8 +2130,7 @@ "blob": { "version": "0.0.5", "resolved": "https://registry.npmjs.org/blob/-/blob-0.0.5.tgz", - "integrity": "sha512-gaqbzQPqOoamawKg0LGVd7SzLgXS+JH61oWprSLH+P+abTczqJbhTR8CmJ2u9/bUYNmHTGJx/UEmn6doAvvuig==", - "dev": true + "integrity": "sha512-gaqbzQPqOoamawKg0LGVd7SzLgXS+JH61oWprSLH+P+abTczqJbhTR8CmJ2u9/bUYNmHTGJx/UEmn6doAvvuig==" }, "block-stream": { "version": "0.0.9", @@ -2253,7 +2240,6 @@ "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -2319,7 +2305,6 @@ "version": "2.26.7", "resolved": "https://registry.npmjs.org/browser-sync/-/browser-sync-2.26.7.tgz", "integrity": "sha512-lY3emme0OyvA2ujEMpRmyRy9LY6gHLuTr2/ABxhIm3lADOiRXzP4dgekvnDrQqZ/Ec2Fz19lEjm6kglSG5766w==", - "dev": true, "requires": { "browser-sync-client": "^2.26.6", "browser-sync-ui": "^2.26.4", @@ -2356,14 +2341,12 @@ "camelcase": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", - "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", - "dev": true + "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=" }, "http-errors": { "version": "1.6.3", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", - "dev": true, "requires": { "depd": "~1.1.2", "inherits": "2.0.3", @@ -2374,14 +2357,12 @@ "mime": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz", - "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==", - "dev": true + "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==" }, "send": { "version": "0.16.2", "resolved": "https://registry.npmjs.org/send/-/send-0.16.2.tgz", "integrity": "sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw==", - "dev": true, "requires": { "debug": "2.6.9", "depd": "~1.1.2", @@ -2402,7 +2383,6 @@ "version": "1.13.2", "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.13.2.tgz", "integrity": "sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw==", - "dev": true, "requires": { "encodeurl": "~1.0.2", "escape-html": "~1.0.3", @@ -2413,32 +2393,27 @@ "setprototypeof": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", - "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==", - "dev": true + "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==" }, "statuses": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", - "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==", - "dev": true + "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==" }, "which-module": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", - "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=", - "dev": true + "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=" }, "window-size": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.2.0.tgz", - "integrity": "sha1-tDFbtCFKPXBY6+7okuE/ok2YsHU=", - "dev": true + "integrity": "sha1-tDFbtCFKPXBY6+7okuE/ok2YsHU=" }, "yargs": { "version": "6.4.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-6.4.0.tgz", "integrity": "sha1-gW4ahm1VmMzzTlWW3c4i2S2kkNQ=", - "dev": true, "requires": { "camelcase": "^3.0.0", "cliui": "^3.2.0", @@ -2460,7 +2435,6 @@ "version": "4.2.1", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-4.2.1.tgz", "integrity": "sha1-KczqwNxPA8bIe0qfIX3RjJ90hxw=", - "dev": true, "requires": { "camelcase": "^3.0.0" } @@ -2471,7 +2445,6 @@ "version": "2.26.6", "resolved": "https://registry.npmjs.org/browser-sync-client/-/browser-sync-client-2.26.6.tgz", "integrity": "sha512-mGrkZdNzttKdf/16I+y+2dTQxoMCIpKbVIMJ/uP8ZpnKu9f9qa/2CYVtLtbjZG8nsM14EwiCrjuFTGBEnT3Gjw==", - "dev": true, "requires": { "etag": "1.8.1", "fresh": "0.5.2", @@ -2483,7 +2456,6 @@ "version": "5.5.12", "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.5.12.tgz", "integrity": "sha512-xx2itnL5sBbqeeiVgNPVuQQ1nC8Jp2WfNJhXWHmElW9YmrpS9UVnNzhP3EH3HFqexO5Tlp8GhYY+WEcqcVMvGw==", - "dev": true, "requires": { "symbol-observable": "1.0.1" } @@ -2494,7 +2466,6 @@ "version": "2.26.4", "resolved": "https://registry.npmjs.org/browser-sync-ui/-/browser-sync-ui-2.26.4.tgz", "integrity": "sha512-u20P3EsZoM8Pt+puoi3BU3KlbQAH1lAcV+/O4saF26qokrBqIDotmGonfWwoRbUmdxZkM9MBmA0K39ZTG1h4sA==", - "dev": true, "requires": { "async-each-series": "0.1.1", "connect-history-api-fallback": "^1", @@ -2597,14 +2568,12 @@ "bs-recipes": { "version": "1.3.4", "resolved": "https://registry.npmjs.org/bs-recipes/-/bs-recipes-1.3.4.tgz", - "integrity": "sha1-DS1NSKcYyMBEdp/cT4lZLci2lYU=", - "dev": true + "integrity": "sha1-DS1NSKcYyMBEdp/cT4lZLci2lYU=" }, "bs-snippet-injector": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/bs-snippet-injector/-/bs-snippet-injector-2.0.1.tgz", - "integrity": "sha1-YbU5PxH1JVntEgaTEANDtu2wTdU=", - "dev": true + "integrity": "sha1-YbU5PxH1JVntEgaTEANDtu2wTdU=" }, "bser": { "version": "2.1.0", @@ -2641,8 +2610,7 @@ "builtin-modules": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", - "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", - "dev": true + "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=" }, "builtin-status-codes": { "version": "3.0.0", @@ -2757,8 +2725,7 @@ "callsite": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz", - "integrity": "sha1-KAOY5dZkvXQDi28JBRU+borxvCA=", - "dev": true + "integrity": "sha1-KAOY5dZkvXQDi28JBRU+borxvCA=" }, "callsites": { "version": "3.1.0", @@ -3004,8 +2971,7 @@ "commander": { "version": "2.19.0", "resolved": "https://registry.npmjs.org/commander/-/commander-2.19.0.tgz", - "integrity": "sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg==", - "dev": true + "integrity": "sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg==" }, "commondir": { "version": "1.0.1", @@ -3016,8 +2982,7 @@ "component-bind": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/component-bind/-/component-bind-1.0.0.tgz", - "integrity": "sha1-AMYIq33Nk4l8AAllGx06jh5zu9E=", - "dev": true + "integrity": "sha1-AMYIq33Nk4l8AAllGx06jh5zu9E=" }, "component-emitter": { "version": "1.2.1", @@ -3027,8 +2992,7 @@ "component-inherit": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/component-inherit/-/component-inherit-0.0.3.tgz", - "integrity": "sha1-ZF/ErfWLcrZJ1crmUTVhnbJv8UM=", - "dev": true + "integrity": "sha1-ZF/ErfWLcrZJ1crmUTVhnbJv8UM=" }, "compressible": { "version": "2.0.17", @@ -3067,8 +3031,7 @@ "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" }, "concat-stream": { "version": "1.6.2", @@ -3111,7 +3074,6 @@ "version": "1.1.12", "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.12.tgz", "integrity": "sha512-a1eOIcu8+7lUInge4Rpf/n4Krkf3Dd9lqhljRzII1/Zno/kRtUWnznPO3jOKBmTEktkt3fkxisUcivoj0ebzoA==", - "dev": true, "requires": { "ini": "^1.3.4", "proto-list": "~1.2.1" @@ -3141,7 +3103,6 @@ "version": "3.6.6", "resolved": "https://registry.npmjs.org/connect/-/connect-3.6.6.tgz", "integrity": "sha1-Ce/2xVr3I24TcTWnJXSFi2eG9SQ=", - "dev": true, "requires": { "debug": "2.6.9", "finalhandler": "1.1.0", @@ -3153,7 +3114,6 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.0.tgz", "integrity": "sha1-zgtoVbRYU+eRsvzGgARtiCU91/U=", - "dev": true, "requires": { "debug": "2.6.9", "encodeurl": "~1.0.1", @@ -3167,16 +3127,14 @@ "statuses": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz", - "integrity": "sha1-+vUbnrdKrvOzrPStX2Gr8ky3uT4=", - "dev": true + "integrity": "sha1-+vUbnrdKrvOzrPStX2Gr8ky3uT4=" } } }, "connect-history-api-fallback": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/connect-history-api-fallback/-/connect-history-api-fallback-1.6.0.tgz", - "integrity": "sha512-e54B99q/OUoH64zYYRf3HBP5z24G38h5D3qXu23JGRoigpX5Ss4r9ZnDk3g0Z8uQC2x2lPaJ+UlWBc1ZWBWdLg==", - "dev": true + "integrity": "sha512-e54B99q/OUoH64zYYRf3HBP5z24G38h5D3qXu23JGRoigpX5Ss4r9ZnDk3g0Z8uQC2x2lPaJ+UlWBc1ZWBWdLg==" }, "console-browserify": { "version": "1.1.0", @@ -3746,8 +3704,7 @@ "dev-ip": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/dev-ip/-/dev-ip-1.0.1.tgz", - "integrity": "sha1-p2o+0YVb56ASu4rBbLgPPADcKPA=", - "dev": true + "integrity": "sha1-p2o+0YVb56ASu4rBbLgPPADcKPA=" }, "diff-sequences": { "version": "24.9.0", @@ -3858,7 +3815,6 @@ "version": "2.3.4", "resolved": "https://registry.npmjs.org/easy-extender/-/easy-extender-2.3.4.tgz", "integrity": "sha512-8cAwm6md1YTiPpOvDULYJL4ZS6WfM5/cTeVVh4JsvyYZAoqlRVUpHL9Gr5Fy7HA6xcSZicUia3DeAgO3Us8E+Q==", - "dev": true, "requires": { "lodash": "^4.17.10" } @@ -3867,7 +3823,6 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/eazy-logger/-/eazy-logger-3.0.2.tgz", "integrity": "sha1-oyWqXlPROiIliJsqxBE7K5Y29Pw=", - "dev": true, "requires": { "tfunk": "^3.0.1" } @@ -3886,7 +3841,6 @@ "version": "0.15.3", "resolved": "https://registry.npmjs.org/editorconfig/-/editorconfig-0.15.3.tgz", "integrity": "sha512-M9wIMFx96vq0R4F+gRpY3o2exzb8hEj/n9S8unZtHSvYjibBp/iMufSzvmOcV/laG0ZtuTVGtiJggPOSW2r93g==", - "dev": true, "requires": { "commander": "^2.19.0", "lru-cache": "^4.1.5", @@ -3898,7 +3852,6 @@ "version": "4.1.5", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", - "dev": true, "requires": { "pseudomap": "^1.0.2", "yallist": "^2.1.2" @@ -3907,8 +3860,7 @@ "semver": { "version": "5.7.0", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", - "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", - "dev": true + "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==" } } }, @@ -3979,7 +3931,6 @@ "version": "3.2.1", "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-3.2.1.tgz", "integrity": "sha512-+VlKzHzMhaU+GsCIg4AoXF1UdDFjHHwMmMKqMJNDNLlUlejz58FCy4LBqB2YVJskHGYl06BatYWKP2TVdVXE5w==", - "dev": true, "requires": { "accepts": "~1.3.4", "base64id": "1.0.0", @@ -3992,14 +3943,12 @@ "cookie": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz", - "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=", - "dev": true + "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=" }, "debug": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, "requires": { "ms": "2.0.0" } @@ -4008,7 +3957,6 @@ "version": "3.3.3", "resolved": "https://registry.npmjs.org/ws/-/ws-3.3.3.tgz", "integrity": "sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA==", - "dev": true, "requires": { "async-limiter": "~1.0.0", "safe-buffer": "~5.1.0", @@ -4021,7 +3969,6 @@ "version": "3.3.2", "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-3.3.2.tgz", "integrity": "sha512-y0CPINnhMvPuwtqXfsGuWE8BB66+B6wTtCofQDRecMQPYX3MYUZXFNKDhdrSe3EVjgOu4V3rxdeqN/Tr91IgbQ==", - "dev": true, "requires": { "component-emitter": "1.2.1", "component-inherit": "0.0.3", @@ -4040,7 +3987,6 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, "requires": { "ms": "2.0.0" } @@ -4051,7 +3997,6 @@ "version": "2.1.3", "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-2.1.3.tgz", "integrity": "sha512-6HXPre2O4Houl7c4g7Ic/XzPnHBvaEmN90vtRO9uLmwtRqQmTOw0QMevL1TOfL2Cpu1VzsaTmMotQgMdkzGkVA==", - "dev": true, "requires": { "after": "0.8.2", "arraybuffer.slice": "~0.0.7", @@ -4089,7 +4034,6 @@ "version": "1.3.2", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dev": true, "requires": { "is-arrayish": "^0.2.1" } @@ -4198,8 +4142,7 @@ "escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" }, "escodegen": { "version": "1.12.0", @@ -4816,8 +4759,7 @@ "eventemitter3": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-1.2.0.tgz", - "integrity": "sha1-HIaZHYFq0eUEdQ5zh0Ik7PO+xQg=", - "dev": true + "integrity": "sha1-HIaZHYFq0eUEdQ5zh0Ik7PO+xQg=" }, "events": { "version": "3.0.0", @@ -5406,7 +5348,6 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-3.0.1.tgz", "integrity": "sha1-N5TzeMWLNC6n27sjCVEJxLO2IpE=", - "dev": true, "requires": { "graceful-fs": "^4.1.2", "jsonfile": "^3.0.0", @@ -5437,8 +5378,7 @@ "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, "fsevents": { "version": "1.2.4", @@ -6031,8 +5971,7 @@ "get-caller-file": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", - "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", - "dev": true + "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==" }, "get-stdin": { "version": "4.0.1", @@ -6064,7 +6003,6 @@ "version": "7.1.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", - "dev": true, "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -6295,7 +6233,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", - "dev": true, "requires": { "ansi-regex": "^2.0.0" } @@ -6304,7 +6241,6 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-binary2/-/has-binary2-1.0.3.tgz", "integrity": "sha512-G1LWKhDSvhGeAQ8mPVQlqNcOB2sJdwATtZKl2pDKKHfpf/rYj24lkinxf69blJbnsvtqqNU+L3SL50vzZhXOnw==", - "dev": true, "requires": { "isarray": "2.0.1" }, @@ -6312,16 +6248,14 @@ "isarray": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz", - "integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4=", - "dev": true + "integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4=" } } }, "has-cors": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/has-cors/-/has-cors-1.1.0.tgz", - "integrity": "sha1-XkdHk/fqmEPRu5nCPu9J/xJv/zk=", - "dev": true + "integrity": "sha1-XkdHk/fqmEPRu5nCPu9J/xJv/zk=" }, "has-flag": { "version": "3.0.0", @@ -6393,8 +6327,7 @@ "highlight.js": { "version": "9.15.10", "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-9.15.10.tgz", - "integrity": "sha512-RoV7OkQm0T3os3Dd2VHLNMoaoDVx77Wygln3n9l5YV172XonWG6rgQD3XnF/BuFFZw9A0TJgmMSO8FEWQgvcXw==", - "dev": true + "integrity": "sha512-RoV7OkQm0T3os3Dd2VHLNMoaoDVx77Wygln3n9l5YV172XonWG6rgQD3XnF/BuFFZw9A0TJgmMSO8FEWQgvcXw==" }, "hmac-drbg": { "version": "1.0.1", @@ -6419,8 +6352,7 @@ "hosted-git-info": { "version": "2.7.1", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz", - "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==", - "dev": true + "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==" }, "html-encoding-sniffer": { "version": "1.0.2", @@ -6472,7 +6404,6 @@ "version": "1.15.2", "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.15.2.tgz", "integrity": "sha1-ZC/cr/5S00SNK9o7AHnpQJBk2jE=", - "dev": true, "requires": { "eventemitter3": "1.x.x", "requires-port": "1.x.x" @@ -6536,8 +6467,7 @@ "immutable": { "version": "3.8.2", "resolved": "https://registry.npmjs.org/immutable/-/immutable-3.8.2.tgz", - "integrity": "sha1-wkOZUUVbs5kT2vKBN28VMOEErfM=", - "dev": true + "integrity": "sha1-wkOZUUVbs5kT2vKBN28VMOEErfM=" }, "import-fresh": { "version": "3.0.0", @@ -6589,8 +6519,7 @@ "indexof": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", - "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=", - "dev": true + "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=" }, "infer-owner": { "version": "1.0.4", @@ -6602,7 +6531,6 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dev": true, "requires": { "once": "^1.3.0", "wrappy": "1" @@ -6616,8 +6544,7 @@ "ini": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", - "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", - "dev": true + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==" }, "inquirer": { "version": "6.4.1", @@ -6747,8 +6674,7 @@ "is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", - "dev": true + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=" }, "is-binary-path": { "version": "1.0.1", @@ -6767,7 +6693,6 @@ "version": "1.0.0", "resolved": "http://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", - "dev": true, "requires": { "builtin-modules": "^1.0.0" } @@ -6941,7 +6866,6 @@ "version": "1.0.8", "resolved": "https://registry.npmjs.org/is-number-like/-/is-number-like-1.0.8.tgz", "integrity": "sha512-6rZi3ezCyFcn5L71ywzz2bS5b2Igl1En3eTlZlvKjpz1n3IZLAYMbKYAIQgFmEu0GENg92ziU/faEOA/aixjbA==", - "dev": true, "requires": { "lodash.isfinite": "^3.3.2" } @@ -7044,8 +6968,7 @@ "is-utf8": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", - "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", - "dev": true + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=" }, "is-windows": { "version": "1.0.2", @@ -7055,8 +6978,7 @@ "is-wsl": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz", - "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=", - "dev": true + "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=" }, "isarray": { "version": "1.0.0", @@ -8505,7 +8427,6 @@ "version": "1.10.2", "resolved": "https://registry.npmjs.org/js-beautify/-/js-beautify-1.10.2.tgz", "integrity": "sha512-ZtBYyNUYJIsBWERnQP0rPN9KjkrDfJcMjuVGcvXOUJrD1zmOGwhRwQ4msG+HJ+Ni/FA7+sRQEMYVzdTQDvnzvQ==", - "dev": true, "requires": { "config-chain": "^1.1.12", "editorconfig": "^0.15.3", @@ -8518,7 +8439,6 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz", "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=", - "dev": true, "requires": { "abbrev": "1", "osenv": "^0.1.4" @@ -8675,7 +8595,6 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-3.0.1.tgz", "integrity": "sha1-pezG9l9T9mLEQVx2daAzHQmS7GY=", - "dev": true, "requires": { "graceful-fs": "^4.1.6" } @@ -8763,14 +8682,12 @@ "limiter": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/limiter/-/limiter-1.1.4.tgz", - "integrity": "sha512-XCpr5bElgDI65vVgstP8TWjv6/QKWm9GU5UG0Pr5sLQ3QLo8NVKsioe+Jed5/3vFOe3IQuqE7DKwTvKQkjTHvg==", - "dev": true + "integrity": "sha512-XCpr5bElgDI65vVgstP8TWjv6/QKWm9GU5UG0Pr5sLQ3QLo8NVKsioe+Jed5/3vFOe3IQuqE7DKwTvKQkjTHvg==" }, "load-json-file": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", - "dev": true, "requires": { "graceful-fs": "^4.1.2", "parse-json": "^2.2.0", @@ -8783,7 +8700,6 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", - "dev": true, "requires": { "error-ex": "^1.2.0" } @@ -8791,8 +8707,7 @@ "pify": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" } } }, @@ -8828,7 +8743,6 @@ "version": "1.9.2", "resolved": "https://registry.npmjs.org/localtunnel/-/localtunnel-1.9.2.tgz", "integrity": "sha512-NEKF7bDJE9U3xzJu3kbayF0WTvng6Pww7tzqNb/XtEARYwqw7CKEX7BvOMg98FtE9es2CRizl61gkV3hS8dqYg==", - "dev": true, "requires": { "axios": "0.19.0", "debug": "4.1.1", @@ -8839,14 +8753,12 @@ "camelcase": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", - "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", - "dev": true + "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=" }, "debug": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "dev": true, "requires": { "ms": "^2.1.1" } @@ -8854,20 +8766,17 @@ "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "which-module": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", - "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=", - "dev": true + "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=" }, "yargs": { "version": "6.6.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-6.6.0.tgz", "integrity": "sha1-eC7CHvQDNF+DCoCMo9UTr1YGUgg=", - "dev": true, "requires": { "camelcase": "^3.0.0", "cliui": "^3.2.0", @@ -8888,7 +8797,6 @@ "version": "4.2.1", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-4.2.1.tgz", "integrity": "sha1-KczqwNxPA8bIe0qfIX3RjJ90hxw=", - "dev": true, "requires": { "camelcase": "^3.0.0" } @@ -8924,8 +8832,7 @@ "lodash.isfinite": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/lodash.isfinite/-/lodash.isfinite-3.3.2.tgz", - "integrity": "sha1-+4m2WpqAKBgz8LdHizpRBPiY67M=", - "dev": true + "integrity": "sha1-+4m2WpqAKBgz8LdHizpRBPiY67M=" }, "lodash.kebabcase": { "version": "4.1.1", @@ -9200,7 +9107,6 @@ "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, "requires": { "brace-expansion": "^1.1.7" } @@ -9265,8 +9171,7 @@ "mitt": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/mitt/-/mitt-1.1.3.tgz", - "integrity": "sha512-mUDCnVNsAi+eD6qA0HkRkwYczbLHJ49z17BGe2PYRhZL4wpZUFZGJHU7/5tmvohoma+Hdn0Vh/oJTiPEmgSruA==", - "dev": true + "integrity": "sha512-mUDCnVNsAi+eD6qA0HkRkwYczbLHJ49z17BGe2PYRhZL4wpZUFZGJHU7/5tmvohoma+Hdn0Vh/oJTiPEmgSruA==" }, "mixin-deep": { "version": "1.3.2", @@ -9291,7 +9196,6 @@ "version": "0.5.1", "resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "dev": true, "requires": { "minimist": "0.0.8" }, @@ -9299,8 +9203,7 @@ "minimist": { "version": "0.0.8", "resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" } } }, @@ -10228,7 +10131,6 @@ "version": "2.4.0", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", - "dev": true, "requires": { "hosted-git-info": "^2.1.4", "is-builtin-module": "^1.0.0", @@ -10326,8 +10228,7 @@ "object-component": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/object-component/-/object-component-0.0.3.tgz", - "integrity": "sha1-8MaapQ78lbhmwYb0AKM3acsvEpE=", - "dev": true + "integrity": "sha1-8MaapQ78lbhmwYb0AKM3acsvEpE=" }, "object-copy": { "version": "0.1.0", @@ -10366,8 +10267,7 @@ "object-path": { "version": "0.9.2", "resolved": "https://registry.npmjs.org/object-path/-/object-path-0.9.2.tgz", - "integrity": "sha1-D9mnT8X60a45aLWGvaXGMr1sBaU=", - "dev": true + "integrity": "sha1-D9mnT8X60a45aLWGvaXGMr1sBaU=" }, "object-visit": { "version": "1.0.1", @@ -10458,7 +10358,6 @@ "version": "1.3.3", "resolved": "https://registry.npmjs.org/once/-/once-1.3.3.tgz", "integrity": "sha1-suJhVXzkwxTsgwTz+oJmPkKXyiA=", - "dev": true, "requires": { "wrappy": "1" } @@ -10475,14 +10374,12 @@ "openurl": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/openurl/-/openurl-1.1.1.tgz", - "integrity": "sha1-OHW0sO96UsFW8NtB1GCduw+Us4c=", - "dev": true + "integrity": "sha1-OHW0sO96UsFW8NtB1GCduw+Us4c=" }, "opn": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/opn/-/opn-5.3.0.tgz", "integrity": "sha512-bYJHo/LOmoTd+pfiYhfZDnf9zekVJrY+cnS2a5F2x+w5ppvTqObojTP7WiFG+kVZs9Inw+qQ/lw7TroWwhdd2g==", - "dev": true, "requires": { "is-wsl": "^1.1.0" } @@ -10534,8 +10431,7 @@ "os-homedir": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", - "dev": true + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" }, "os-locale": { "version": "1.4.0", @@ -10548,14 +10444,12 @@ "os-tmpdir": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", - "dev": true + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" }, "osenv": { "version": "0.1.5", "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", - "dev": true, "requires": { "os-homedir": "^1.0.0", "os-tmpdir": "^1.0.0" @@ -10727,7 +10621,6 @@ "version": "0.0.5", "resolved": "https://registry.npmjs.org/parseqs/-/parseqs-0.0.5.tgz", "integrity": "sha1-1SCKNzjkZ2bikbouoXNoSSGouJ0=", - "dev": true, "requires": { "better-assert": "~1.0.0" } @@ -10736,7 +10629,6 @@ "version": "0.0.5", "resolved": "https://registry.npmjs.org/parseuri/-/parseuri-0.0.5.tgz", "integrity": "sha1-gCBKUNTbt3m/3G6+J3jZDkvOMgo=", - "dev": true, "requires": { "better-assert": "~1.0.0" } @@ -10809,7 +10701,6 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", - "dev": true, "requires": { "graceful-fs": "^4.1.2", "pify": "^2.0.0", @@ -10819,8 +10710,7 @@ "pify": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" } } }, @@ -10852,14 +10742,12 @@ "pinkie": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", - "dev": true + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=" }, "pinkie-promise": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", - "dev": true, "requires": { "pinkie": "^2.0.0" } @@ -10898,7 +10786,6 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/portscanner/-/portscanner-2.1.1.tgz", "integrity": "sha1-6rtAnk3iSVD1oqUW01rnaTQ/u5Y=", - "dev": true, "requires": { "async": "1.5.2", "is-number-like": "^1.0.3" @@ -10994,8 +10881,7 @@ "proto-list": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz", - "integrity": "sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk=", - "dev": true + "integrity": "sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk=" }, "proxy-addr": { "version": "2.0.5", @@ -11015,8 +10901,7 @@ "pseudomap": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", - "dev": true + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" }, "psl": { "version": "1.1.33", @@ -11094,8 +10979,7 @@ "qs": { "version": "6.2.3", "resolved": "https://registry.npmjs.org/qs/-/qs-6.2.3.tgz", - "integrity": "sha1-HPyyXBCpsrSDBT/zn138kjOQjP4=", - "dev": true + "integrity": "sha1-HPyyXBCpsrSDBT/zn138kjOQjP4=" }, "querystring": { "version": "0.2.0", @@ -11202,7 +11086,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", - "dev": true, "requires": { "find-up": "^1.0.0", "read-pkg": "^1.0.0" @@ -11212,7 +11095,6 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", - "dev": true, "requires": { "path-exists": "^2.0.0", "pinkie-promise": "^2.0.0" @@ -11222,7 +11104,6 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", - "dev": true, "requires": { "pinkie-promise": "^2.0.0" } @@ -11231,7 +11112,6 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", - "dev": true, "requires": { "load-json-file": "^1.0.0", "normalize-package-data": "^2.3.2", @@ -11501,14 +11381,12 @@ "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", - "dev": true + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" }, "require-main-filename": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", - "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", - "dev": true + "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=" }, "require-uncached": { "version": "1.0.3", @@ -11531,8 +11409,7 @@ "requires-port": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", - "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=", - "dev": true + "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=" }, "resolve": { "version": "1.11.1", @@ -11598,7 +11475,6 @@ "version": "6.0.2", "resolved": "https://registry.npmjs.org/resp-modifier/-/resp-modifier-6.0.2.tgz", "integrity": "sha1-sSTeXE+6/LpUH0j/pzlw9KpFa08=", - "dev": true, "requires": { "debug": "^2.2.0", "minimatch": "^3.0.2" @@ -11665,8 +11541,7 @@ "rx": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/rx/-/rx-4.1.0.tgz", - "integrity": "sha1-pfE/957zt0D+MKqAP7CfmIBdR4I=", - "dev": true + "integrity": "sha1-pfE/957zt0D+MKqAP7CfmIBdR4I=" }, "rx-lite": { "version": "3.1.2", @@ -12149,8 +12024,7 @@ "semver": { "version": "5.5.1", "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.1.tgz", - "integrity": "sha512-PqpAxfrEhlSUWge8dwIp4tZnQ25DIOthpiaHNIthsjEFQD6EvqUKUDM7L8O2rShkFccYo1VjJR0coWfNkCubRw==", - "dev": true + "integrity": "sha512-PqpAxfrEhlSUWge8dwIp4tZnQ25DIOthpiaHNIthsjEFQD6EvqUKUDM7L8O2rShkFccYo1VjJR0coWfNkCubRw==" }, "semver-diff": { "version": "2.1.0", @@ -12198,7 +12072,6 @@ "version": "1.9.1", "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz", "integrity": "sha1-03aNabHn2C5c4FD/9bRTvqEqkjk=", - "dev": true, "requires": { "accepts": "~1.3.4", "batch": "0.6.1", @@ -12213,7 +12086,6 @@ "version": "1.6.3", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", - "dev": true, "requires": { "depd": "~1.1.2", "inherits": "2.0.3", @@ -12224,8 +12096,7 @@ "setprototypeof": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", - "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==", - "dev": true + "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==" } } }, @@ -12243,14 +12114,12 @@ "server-destroy": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/server-destroy/-/server-destroy-1.0.1.tgz", - "integrity": "sha1-8Tv5KOQrnD55OD5hzDmYtdFObN0=", - "dev": true + "integrity": "sha1-8Tv5KOQrnD55OD5hzDmYtdFObN0=" }, "set-blocking": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", - "dev": true + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" }, "set-value": { "version": "2.0.1", @@ -12336,8 +12205,7 @@ "sigmund": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz", - "integrity": "sha1-P/IfGYytIXX587eBhT/ZTQ0ZtZA=", - "dev": true + "integrity": "sha1-P/IfGYytIXX587eBhT/ZTQ0ZtZA=" }, "signal-exit": { "version": "3.0.2", @@ -12477,7 +12345,6 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-2.1.1.tgz", "integrity": "sha512-rORqq9c+7W0DAK3cleWNSyfv/qKXV99hV4tZe+gGLfBECw3XEhBy7x85F3wypA9688LKjtwO9pX9L33/xQI8yA==", - "dev": true, "requires": { "debug": "~3.1.0", "engine.io": "~3.2.0", @@ -12491,7 +12358,6 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, "requires": { "ms": "2.0.0" } @@ -12500,7 +12366,6 @@ "version": "3.2.1", "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-3.2.1.tgz", "integrity": "sha512-y5AbkytWeM4jQr7m/koQLc5AxpRKC1hEVUb/s1FUAWEJq5AzJJ4NLvzuKPuxtDi5Mq755WuDvZ6Iv2rXj4PTzw==", - "dev": true, "requires": { "component-emitter": "1.2.1", "component-inherit": "0.0.3", @@ -12518,14 +12383,12 @@ "isarray": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz", - "integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4=", - "dev": true + "integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4=" }, "socket.io-client": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-2.1.1.tgz", "integrity": "sha512-jxnFyhAuFxYfjqIgduQlhzqTcOEQSn+OHKVfAxWaNWa7ecP7xSNk2Dx/3UEsDcY7NcFafxvNvKPmmO7HTwTxGQ==", - "dev": true, "requires": { "backo2": "1.0.2", "base64-arraybuffer": "0.1.5", @@ -12547,7 +12410,6 @@ "version": "3.2.0", "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.2.0.tgz", "integrity": "sha512-FYiBx7rc/KORMJlgsXysflWx/RIvtqZbyGLlHZvjfmPTPeuD/I8MaW7cfFrj5tRltICJdgwflhfZ3NVVbVLFQA==", - "dev": true, "requires": { "component-emitter": "1.2.1", "debug": "~3.1.0", @@ -12558,7 +12420,6 @@ "version": "3.3.3", "resolved": "https://registry.npmjs.org/ws/-/ws-3.3.3.tgz", "integrity": "sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA==", - "dev": true, "requires": { "async-limiter": "~1.0.0", "safe-buffer": "~5.1.0", @@ -12570,14 +12431,12 @@ "socket.io-adapter": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-1.1.1.tgz", - "integrity": "sha1-KoBeihTWNyEk3ZFZrUUC+MsH8Gs=", - "dev": true + "integrity": "sha1-KoBeihTWNyEk3ZFZrUUC+MsH8Gs=" }, "socket.io-client": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-2.2.0.tgz", "integrity": "sha512-56ZrkTDbdTLmBIyfFYesgOxsjcLnwAKoN4CiPyTVkMQj3zTUh0QAx3GbvIvLpFEOvQWu92yyWICxB0u7wkVbYA==", - "dev": true, "requires": { "backo2": "1.0.2", "base64-arraybuffer": "0.1.5", @@ -12599,7 +12458,6 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, "requires": { "ms": "2.0.0" } @@ -12610,7 +12468,6 @@ "version": "3.3.0", "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.3.0.tgz", "integrity": "sha512-hczmV6bDgdaEbVqhAeVMM/jfUfzuEZHsQg6eOmLgJht6G3mPKMxYm75w2+qhAQZ+4X+1+ATZ+QFKeOZD5riHng==", - "dev": true, "requires": { "component-emitter": "1.2.1", "debug": "~3.1.0", @@ -12621,7 +12478,6 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, "requires": { "ms": "2.0.0" } @@ -12629,8 +12485,7 @@ "isarray": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz", - "integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4=", - "dev": true + "integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4=" } } }, @@ -12690,7 +12545,6 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.2.tgz", "integrity": "sha512-q9hedtzyXHr5S0A1vEPoK/7l8NpfkFYTq6iCY+Pno2ZbdZR6WexZFtqeVGkGxW3TEJMN914Z55EnAGMmenlIQQ==", - "dev": true, "requires": { "spdx-expression-parse": "^3.0.0", "spdx-license-ids": "^3.0.0" @@ -12699,14 +12553,12 @@ "spdx-exceptions": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", - "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==", - "dev": true + "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==" }, "spdx-expression-parse": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", - "dev": true, "requires": { "spdx-exceptions": "^2.1.0", "spdx-license-ids": "^3.0.0" @@ -12715,8 +12567,7 @@ "spdx-license-ids": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.1.tgz", - "integrity": "sha512-TfOfPcYGBB5sDuPn3deByxPhmfegAhpDYKSOXZQN81Oyrrif8ZCodOLzK3AesELnCx03kikhyDwh0pfvvQvF8w==", - "dev": true + "integrity": "sha512-TfOfPcYGBB5sDuPn3deByxPhmfegAhpDYKSOXZQN81Oyrrif8ZCodOLzK3AesELnCx03kikhyDwh0pfvvQvF8w==" }, "split-string": { "version": "3.1.0", @@ -12846,7 +12697,6 @@ "version": "0.1.3", "resolved": "https://registry.npmjs.org/stream-throttle/-/stream-throttle-0.1.3.tgz", "integrity": "sha1-rdV8jXzHOoFjDTHNVdOWHPr7qcM=", - "dev": true, "requires": { "commander": "^2.2.0", "limiter": "^1.0.5" @@ -12909,7 +12759,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", - "dev": true, "requires": { "is-utf8": "^0.2.0" } @@ -12964,8 +12813,7 @@ "symbol-observable": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.1.tgz", - "integrity": "sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ=", - "dev": true + "integrity": "sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ=" }, "symbol-tree": { "version": "3.2.4", @@ -13201,7 +13049,6 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/tfunk/-/tfunk-3.1.0.tgz", "integrity": "sha1-OORBT8ZJd9h6/apy+sttKfgve1s=", - "dev": true, "requires": { "chalk": "^1.1.1", "object-path": "^0.9.0" @@ -13210,14 +13057,12 @@ "ansi-styles": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" }, "chalk": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dev": true, "requires": { "ansi-styles": "^2.2.1", "escape-string-regexp": "^1.0.2", @@ -13229,8 +13074,7 @@ "supports-color": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" } } }, @@ -13289,8 +13133,7 @@ "to-array": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/to-array/-/to-array-0.1.4.tgz", - "integrity": "sha1-F+bBH3PdTz10zaek/zI46a2b+JA=", - "dev": true + "integrity": "sha1-F+bBH3PdTz10zaek/zI46a2b+JA=" }, "to-arraybuffer": { "version": "1.0.1", @@ -13481,8 +13324,7 @@ "ua-parser-js": { "version": "0.7.17", "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.17.tgz", - "integrity": "sha512-uRdSdu1oA1rncCQL7sCj8vSyZkgtL7faaw9Tc9rZ3mGgraQ7+Pdx7w5mnOSF3gw9ZNG6oc+KXfkon3bKuROm0g==", - "dev": true + "integrity": "sha512-uRdSdu1oA1rncCQL7sCj8vSyZkgtL7faaw9Tc9rZ3mGgraQ7+Pdx7w5mnOSF3gw9ZNG6oc+KXfkon3bKuROm0g==" }, "uglify-js": { "version": "3.6.0", @@ -13514,8 +13356,7 @@ "ultron": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz", - "integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==", - "dev": true + "integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==" }, "undefsafe": { "version": "2.0.2", @@ -13595,8 +13436,7 @@ "universalify": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", - "dev": true + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" }, "unpipe": { "version": "1.0.0", @@ -13767,7 +13607,6 @@ "version": "3.0.4", "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", - "dev": true, "requires": { "spdx-correct": "^3.0.0", "spdx-expression-parse": "^3.0.0" @@ -14222,8 +14061,7 @@ "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, "write": { "version": "1.0.3", @@ -14249,7 +14087,6 @@ "version": "6.1.4", "resolved": "https://registry.npmjs.org/ws/-/ws-6.1.4.tgz", "integrity": "sha512-eqZfL+NE/YQc1/ZynhojeV8q+H050oR8AZ2uIev7RU10svA9ZnJUddHcOUZTJLinZ9yEfdA2kSATS2qZK5fhJA==", - "dev": true, "requires": { "async-limiter": "~1.0.0" } @@ -14269,8 +14106,7 @@ "xmlhttprequest-ssl": { "version": "1.5.5", "resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.5.tgz", - "integrity": "sha1-wodrBhaKrcQOV9l+gRkayPQ5iz4=", - "dev": true + "integrity": "sha1-wodrBhaKrcQOV9l+gRkayPQ5iz4=" }, "xtend": { "version": "4.0.1", @@ -14286,8 +14122,7 @@ "yallist": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", - "dev": true + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=" }, "yargs": { "version": "12.0.5", @@ -14400,8 +14235,7 @@ "yeast": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/yeast/-/yeast-0.1.2.tgz", - "integrity": "sha1-AI4G2AlDIMNy28L47XagymyKxBk=", - "dev": true + "integrity": "sha1-AI4G2AlDIMNy28L47XagymyKxBk=" } } } diff --git a/package.json b/package.json index c6ec1c1d1..dab93f7f0 100755 --- a/package.json +++ b/package.json @@ -54,7 +54,6 @@ "eslint-plugin-import": "^2.18.2", "iframe-resizer": "^3.6.6", "jest": "^24.9.0", - "nhsuk-frontend": "^2.3.2", "node-sass": "^4.12.0", "nodemon": "^1.19.4", From 1a0ddd9d3fae173d87aa92e9b2d48bf334ff8c5f Mon Sep 17 00:00:00 2001 From: Tom Doughty Date: Wed, 27 Nov 2019 12:04:25 +0000 Subject: [PATCH 02/27] Use autocomplete from library 3.x --- app.js | 21 ++++++++------------- app/scripts/main.js | 13 +++++++++++++ app/scripts/search.js | 28 ++++++++++++++++++++++++++++ app/views/includes/header.njk | 10 ++++++---- app/views/sitemap.njk | 2 +- 5 files changed, 56 insertions(+), 18 deletions(-) create mode 100644 app/scripts/search.js diff --git a/app.js b/app.js index 7dd9b59f7..8078b5d24 100755 --- a/app.js +++ b/app.js @@ -16,7 +16,7 @@ const locals = require('./app/locals'); const routing = require('./middleware/routing.js'); const PageIndex = require('./middleware/page-index.js'); -var pageIndex = new PageIndex(config); +const pageIndex = new PageIndex(config); // Initialise applications const app = express(); @@ -65,7 +65,7 @@ env.addFilter('highlight', (code, language) => { // Render standalone design examples app.get('/service-manual/design-example/:example', (req, res) => { - const displayFullPage = req.query.fullpage === "true"; + const displayFullPage = req.query.fullpage === 'true'; const example = req.params.example; const examplePath = path.join(__dirname, `/app/components/${example}.njk`); @@ -73,24 +73,21 @@ app.get('/service-manual/design-example/:example', (req, res) => { const exampleHtml = fileHelper.getHTMLCode(examplePath); // Wrap the example HTML in a basic html base template. - var baseTemplate = 'includes/design-example-wrapper.njk'; - if(displayFullPage) { - baseTemplate = 'includes/design-example-wrapper-full.njk'; - } + const baseTemplate = displayFullPage + ? 'includes/design-example-wrapper.njk' + : 'includes/design-example-wrapper-full.njk'; res.render(baseTemplate, { body: exampleHtml }); }); -/* app.get('/service-manual/search', (req, res) => { - var query = req.query['search-field'] || ''; - res.render('includes/search.njk', { results: pageIndex.search(query), query: query }); + const query = req.query['search-field'] || ''; + res.render('includes/search.njk', { query, results: pageIndex.search(query) }); }); app.get('/service-manual/suggestions', (req, res) => { res.set({ 'Content-Type': 'application/json' }); res.send(JSON.stringify(pageIndex.search(req.query.search))); }); -*/ app.get('/', (req, res) => { res.redirect('/service-manual'); @@ -157,10 +154,8 @@ if (config.env === 'development') { app.listen(config.port); } -/* -setTimeout(function(){ +setTimeout(() => { pageIndex.init(); }, 2000); -*/ module.exports = app; diff --git a/app/scripts/main.js b/app/scripts/main.js index 48f348745..d822910da 100644 --- a/app/scripts/main.js +++ b/app/scripts/main.js @@ -2,8 +2,10 @@ import './polyfills'; // NHS.UK frontend +import AutoComplete from 'nhsuk-frontend/packages/components/header/autoCompleteConfig'; import SkipLink from '../../node_modules/nhsuk-frontend/packages/components/skip-link/skip-link'; import DesignExample from './design-example'; +import { source, suggestion } from './search'; // Initialise components SkipLink(); @@ -11,3 +13,14 @@ SkipLink(); document.querySelectorAll(DesignExample.selector()).forEach((el) => { new DesignExample(el); }); + +// Header autocomplete +AutoComplete({ + containerId: 'autocomplete-container', + formId: 'search', + inputId: 'search-field', + source, + templates: { + suggestion, + }, +}); diff --git a/app/scripts/search.js b/app/scripts/search.js new file mode 100644 index 000000000..7033195cc --- /dev/null +++ b/app/scripts/search.js @@ -0,0 +1,28 @@ +/** + * Function to build truncated result with svg for search autocomplete + * @param {string} result String containing individual result from autocomplete source function + * @returns {string} String of HTML containing passed result +*/ +export const suggestion = result => ` + + ${result} +`; + +/** + * Function to populate the search autocomplete. + * @param {string} query Query to pass to search API + * @param {function} populateResults Callback function passed to source by autocomplete plugin +*/ +export const source = (query, populateResults) => { + // Build URL for search endpoint + const url = `/service-manual/suggestions/?search=${query}`; + const xhr = new XMLHttpRequest(); + xhr.open('GET', url); + xhr.onload = () => { + if (xhr.status === 200) { + const json = JSON.parse(xhr.responseText); + populateResults(json.map(({ title }) => title)); + } + }; + xhr.send(); +}; diff --git a/app/views/includes/header.njk b/app/views/includes/header.njk index 0af0c8d7e..b57499fff 100755 --- a/app/views/includes/header.njk +++ b/app/views/includes/header.njk @@ -9,8 +9,9 @@ "longName": "true" }, "showNav": "false", - "showSearch": "false", - "searchAction": "/service-manual/search/" + "showSearch": "true", + "searchAction": "/service-manual/search/", + "searchInputName": "search-field" }) }} {% else %} @@ -22,8 +23,9 @@ "longName": "true" }, "showNav": "false", - "showSearch": "false", - "searchAction": "/service-manual/search/" + "showSearch": "true", + "searchAction": "/service-manual/search/", + "searchInputName": "search-field" }) }} {% endif %} diff --git a/app/views/sitemap.njk b/app/views/sitemap.njk index d12d5b5ca..e7e7532d2 100644 --- a/app/views/sitemap.njk +++ b/app/views/sitemap.njk @@ -95,7 +95,7 @@
  • Numbers, measurements, dates and time
  • Formatting and punctuation
  • -
  • Links and PDFs
  • + {#
  • Links and PDFs
  • #}
  • From 2e0b028a91da2814552f38bebc1866c1c935683c Mon Sep 17 00:00:00 2001 From: Sabeeh UL-Hassan Date: Wed, 27 Nov 2019 13:09:13 +0000 Subject: [PATCH 03/27] Fix space and limit results to 10 --- app.js | 3 ++- middleware/page-index.js | 24 ++++++++++++------------ 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/app.js b/app.js index 8078b5d24..f31a9a0af 100755 --- a/app.js +++ b/app.js @@ -86,7 +86,8 @@ app.get('/service-manual/search', (req, res) => { app.get('/service-manual/suggestions', (req, res) => { res.set({ 'Content-Type': 'application/json' }); - res.send(JSON.stringify(pageIndex.search(req.query.search))); + resultsLimit = (pageIndex.search(req.query.search)) + res.send(JSON.stringify(resultsLimit.slice(0,10))); }); app.get('/', (req, res) => { diff --git a/middleware/page-index.js b/middleware/page-index.js index 17a70dd22..ee18210c0 100644 --- a/middleware/page-index.js +++ b/middleware/page-index.js @@ -88,19 +88,19 @@ class PageIndex { var results = [] if (query && this.index) { results = this.index.query(function(q) { - const exactMatch = query.toLowerCase() - const partialMatch = query.toLowerCase() + "*" - - q.term(exactMatch, { fields: [ 'title' ], boost: 100 }) - q.term(exactMatch, { fields: [ 'h2' ], boost: 80 }) - q.term(exactMatch, { fields: [ 'h3' ], boost: 60 }) - q.term(exactMatch, { fields: [ 'extra' ], boost: 40 }) - - q.term(partialMatch, { fields: [ 'title' ], boost: 90 }) - q.term(partialMatch, { fields: [ 'h2' ], boost: 70 }) - q.term(partialMatch, { fields: [ 'h3' ], boost: 50 }) - q.term(partialMatch, { fields: [ 'extra' ], boost: 30 }) + lunr.tokenizer(query).forEach(function (token) { + q.term(token.toString(), { fields: [ 'title' ], boost: 100 }) + q.term(token.toString(), { fields: [ 'h2' ], boost: 80 }) + q.term(token.toString(), { fields: [ 'h3' ], boost: 60 }) + q.term(token.toString(), { fields: [ 'extra' ], boost: 40 }) + + + q.term(`${token.toString()}*`, { fields: [ 'title' ], boost: 90 }) + q.term(`${token.toString()}*`, { fields: [ 'h2' ], boost: 70 }) + q.term(`${token.toString()}*`, { fields: [ 'h3' ], boost: 50 }) + q.term(`${token.toString()}*`, { fields: [ 'extra' ], boost: 30 }) }) + }) } return results } From e099789817c728b9cca166b4b2aee8b5fcd3bf1d Mon Sep 17 00:00:00 2001 From: Sabeeh UL-Hassan Date: Wed, 27 Nov 2019 13:54:11 +0000 Subject: [PATCH 04/27] Add search counter and pagination --- app.js | 15 ++++++++++++- app/scripts/search.js | 2 +- app/views/includes/search.njk | 41 +++++++++++++++++++++++++++++++++++ 3 files changed, 56 insertions(+), 2 deletions(-) diff --git a/app.js b/app.js index f31a9a0af..70febb10c 100755 --- a/app.js +++ b/app.js @@ -81,7 +81,20 @@ app.get('/service-manual/design-example/:example', (req, res) => { app.get('/service-manual/search', (req, res) => { const query = req.query['search-field'] || ''; - res.render('includes/search.njk', { query, results: pageIndex.search(query) }); + var resultsPerPage = 10; + var currentPage = parseInt(req.query['page']); + var results = pageIndex.search(query); + var maxPage = Math.ceil(results.length / resultsPerPage); + if (!Number.isInteger(currentPage)){ + currentPage = 1 + } else if(currentPage > maxPage || currentPage < 1){ + currentPage = 1 + } + + var startingIndex = resultsPerPage * (currentPage - 1) + var endingIndex = startingIndex + resultsPerPage + + res.render('includes/search.njk', { results: results.slice(startingIndex, endingIndex), resultsLen: results.length, query: query, currentPage: currentPage, maxPage: maxPage,}); }); app.get('/service-manual/suggestions', (req, res) => { diff --git a/app/scripts/search.js b/app/scripts/search.js index 7033195cc..7a5b4cceb 100644 --- a/app/scripts/search.js +++ b/app/scripts/search.js @@ -21,7 +21,7 @@ export const source = (query, populateResults) => { xhr.onload = () => { if (xhr.status === 200) { const json = JSON.parse(xhr.responseText); - populateResults(json.map(({ title }) => title)); + populateResults(json.map(({ title }) => title).filter(Boolean)); } }; xhr.send(); diff --git a/app/views/includes/search.njk b/app/views/includes/search.njk index b4a0991ff..72376a37d 100644 --- a/app/views/includes/search.njk +++ b/app/views/includes/search.njk @@ -22,6 +22,10 @@
    +

    + Found {{ resultsLen }} matching results. +

    + {% if results | length > 0 %}
      {% for item in results %} @@ -31,6 +35,43 @@ {% endfor %}
    + {% else %} {% if query != "" %}

    Your search - {{query}} - had no matching results.

    From e8d3bc7692c6c80ea5f126a2c171f6a649bdcf71 Mon Sep 17 00:00:00 2001 From: Tom Doughty Date: Mon, 2 Dec 2019 11:47:41 +0000 Subject: [PATCH 05/27] Add search functionality --- app.js | 53 ++++--- app/scripts/main.js | 9 +- app/scripts/search.js | 21 ++- middleware/file-helper.js | 48 +++--- middleware/page-index-additions.js | 11 +- middleware/page-index.js | 242 ++++++++++++++--------------- 6 files changed, 203 insertions(+), 181 deletions(-) diff --git a/app.js b/app.js index 70febb10c..de0c83521 100755 --- a/app.js +++ b/app.js @@ -81,51 +81,58 @@ app.get('/service-manual/design-example/:example', (req, res) => { app.get('/service-manual/search', (req, res) => { const query = req.query['search-field'] || ''; - var resultsPerPage = 10; - var currentPage = parseInt(req.query['page']); - var results = pageIndex.search(query); - var maxPage = Math.ceil(results.length / resultsPerPage); - if (!Number.isInteger(currentPage)){ - currentPage = 1 - } else if(currentPage > maxPage || currentPage < 1){ - currentPage = 1 + const resultsPerPage = 10; + let currentPage = parseInt(req.query.page, 10); + const results = pageIndex.search(query); + const maxPage = Math.ceil(results.length / resultsPerPage); + if (!Number.isInteger(currentPage)) { + currentPage = 1; + } else if (currentPage > maxPage || currentPage < 1) { + currentPage = 1; } - var startingIndex = resultsPerPage * (currentPage - 1) - var endingIndex = startingIndex + resultsPerPage - - res.render('includes/search.njk', { results: results.slice(startingIndex, endingIndex), resultsLen: results.length, query: query, currentPage: currentPage, maxPage: maxPage,}); + const startingIndex = resultsPerPage * (currentPage - 1); + const endingIndex = startingIndex + resultsPerPage; + + res.render('includes/search.njk', { + currentPage, + maxPage, + query, + results: results.slice(startingIndex, endingIndex), + resultsLen: results.length, + }); }); app.get('/service-manual/suggestions', (req, res) => { + const results = pageIndex.search(req.query.search); + const slicedResults = results.slice(0, 10); res.set({ 'Content-Type': 'application/json' }); - resultsLimit = (pageIndex.search(req.query.search)) - res.send(JSON.stringify(resultsLimit.slice(0,10))); + res.send(JSON.stringify(slicedResults)); }); -app.get('/', (req, res) => { +app.get('/', (_, res) => { res.redirect('/service-manual'); }); // The practices pages have moved or been deleted // Temporary redirects incase anyone still visits /practices pages -app.get('/service-manual/practices/create-content-for-users-with-low-health-literacy', (req, res) => { +app.get('/service-manual/practices/create-content-for-users-with-low-health-literacy', (_, res) => { res.redirect('/service-manual/content/health-literacy'); }); -app.get('/service-manual/practices/create-content-for-users-with-low-health-literacy/use-a-readability-tool-to-prioritise-content', (req, res) => { +app.get('/service-manual/practices/create-content-for-users-with-low-health-literacy/use-a-readability-tool-to-prioritise-content', (_, res) => { res.redirect('/service-manual/content/health-literacy/use-a-readability-tool-to-prioritise-content'); }); -app.get('/service-manual/practices', (req, res) => { +app.get('/service-manual/practices', (_, res) => { res.redirect('/service-manual'); }); -app.get('/service-manual/practices/make-your-service-accessible', (req, res) => { +app.get('/service-manual/practices/make-your-service-accessible', (_, res) => { res.redirect('/service-manual/accessibility'); }); -app.get('/service-manual/content/writing-for-accessibility', (req, res) => { +app.get('/service-manual/content/writing-for-accessibility', (_, res) => { res.redirect('/service-manual/accessibility/content'); }); @@ -135,19 +142,19 @@ app.get(/^([^.]+)$/, (req, res, next) => { }); // Render sitemap.xml in XML format -app.get('/service-manual/sitemap.xml', (req, res) => { +app.get('/service-manual/sitemap.xml', (_, res) => { res.set({ 'Content-Type': 'application/xml' }); res.render('sitemap.xml'); }); // Render robots.txt in text format -app.get('/service-manual/robots.txt', (req, res) => { +app.get('/service-manual/robots.txt', (_, res) => { res.set('text/plain'); res.render('robots.txt'); }); // Render 404 page -app.get('*', (req, res) => { +app.get('*', (_, res) => { res.statusCode = 404; res.render('page-not-found'); }); diff --git a/app/scripts/main.js b/app/scripts/main.js index d822910da..e8b18c0dd 100644 --- a/app/scripts/main.js +++ b/app/scripts/main.js @@ -5,7 +5,12 @@ import './polyfills'; import AutoComplete from 'nhsuk-frontend/packages/components/header/autoCompleteConfig'; import SkipLink from '../../node_modules/nhsuk-frontend/packages/components/skip-link/skip-link'; import DesignExample from './design-example'; -import { source, suggestion } from './search'; +import { + inputValue, + onConfirm, + source, + suggestion, +} from './search'; // Initialise components SkipLink(); @@ -19,8 +24,10 @@ AutoComplete({ containerId: 'autocomplete-container', formId: 'search', inputId: 'search-field', + onConfirm, source, templates: { + inputValue, suggestion, }, }); diff --git a/app/scripts/search.js b/app/scripts/search.js index 7a5b4cceb..c6033ba1d 100644 --- a/app/scripts/search.js +++ b/app/scripts/search.js @@ -3,10 +3,17 @@ * @param {string} result String containing individual result from autocomplete source function * @returns {string} String of HTML containing passed result */ -export const suggestion = result => ` - - ${result} -`; +export const suggestion = (obj) => { + return ` + + ${obj.title} + `; +}; + +export const inputValue = (obj) => { + if (obj && obj.title) return obj.title.trim(); + return ''; +}; /** * Function to populate the search autocomplete. @@ -21,8 +28,12 @@ export const source = (query, populateResults) => { xhr.onload = () => { if (xhr.status === 200) { const json = JSON.parse(xhr.responseText); - populateResults(json.map(({ title }) => title).filter(Boolean)); + populateResults(json); } }; xhr.send(); }; + +export const onConfirm = ({ url }) => { + window.location = url; +}; diff --git a/middleware/file-helper.js b/middleware/file-helper.js index 6daf5d653..5830b5f08 100644 --- a/middleware/file-helper.js +++ b/middleware/file-helper.js @@ -1,62 +1,60 @@ -var fs = require('fs') -const beautify = require('js-beautify').html -const nunjucks = require('nunjucks') +const fs = require('fs'); +const beautify = require('js-beautify').html; +const nunjucks = require('nunjucks'); // This helper function takes a path of a file and // returns the contents as string function getFileContents(path) { - let fileContents + let fileContents; try { - fileContents = fs.readFileSync(path) + fileContents = fs.readFileSync(path); } catch (err) { if (err.code === 'ENOENT') { - console.log(err.message) + console.log(err.message); } else { - throw err + throw err; } } - return fileContents.toString() + return fileContents.toString(); } - // This helper function takes a path of a *.md.njk file and // returns the Nunjucks syntax inside that file without markdown data and imports -exports.getNunjucksCode = function(path) { - let fileContents = getFileContents(path) +exports.getNunjucksCode = (path) => { + const fileContents = getFileContents(path); // Omit any `{% extends "foo.njk" %}` nunjucks code, because we extend // templates that only exist within the Design System – it's not useful to // include this in the code we expect others to copy. - let content = fileContents.replace( + const content = fileContents.replace( /{%\s*extends\s*\S*\s*%}\s+/, '' - ) - - return content -} + ); + return content; +}; // This helper function takes a path of a *.md.njk file and // returns the HTML rendered by Nunjucks without markdown data -exports.getHTMLCode = function(path) { - let fileContents = getFileContents(path) +exports.getHTMLCode = function (path) { + const fileContents = getFileContents(path); - let html + let html; try { - html = nunjucks.renderString(fileContents) + html = nunjucks.renderString(fileContents); } catch (err) { if (err) { - console.log('Could not get HTML code from ' + path) + console.log(`Could not get HTML code from ${ path}`); } } return beautify(html.trim(), { - indent_size: 2, end_with_newline: true, + indent_size: 2, // If there are multiple blank lines, reduce down to one blank new line. max_preserve_newlines: 1, // set unformatted to a small group of elements, not all inline (the default) // otherwise tags like label arent indented properly - unformatted: ['code', 'pre', 'em', 'strong'] - }) -} + unformatted: ['code', 'pre', 'em', 'strong'], + }); +}; diff --git a/middleware/page-index-additions.js b/middleware/page-index-additions.js index 0211f3090..2c7dd42eb 100644 --- a/middleware/page-index-additions.js +++ b/middleware/page-index-additions.js @@ -1,17 +1,16 @@ const additionalIndices = { - '/service-manual/accessibility/testing': [ 'svg' ] + '/service-manual/accessibility/testing': ['svg'], }; - const alternativeSpelling = { - 'alzheimer’s': [ 'alzheimers', 'alzheimer' ], - 'fever': [ 'temperature' ], - 'temperature': [ 'fever' ] + 'alzheimer’s': ['alzheimers', 'alzheimer'], + fever: ['temperature'], + temperature: ['fever'], }; const indexBlacklist = [ '/service-manual/', - 'https://nhsdigital.eu.qualtrics.com/jfe/form/SV_4SKczWOHvnneiWh' + 'https://nhsdigital.eu.qualtrics.com/jfe/form/SV_4SKczWOHvnneiWh', ]; module.exports = { additionalIndices, alternativeSpelling, indexBlacklist }; diff --git a/middleware/page-index.js b/middleware/page-index.js index ee18210c0..c133cc300 100644 --- a/middleware/page-index.js +++ b/middleware/page-index.js @@ -11,72 +11,70 @@ class PageIndex { } init() { - var startTime = new Date().getTime(); - const baseUrl = `http://localhost:${this.config.port}` - const config = this._getConnectionConfig() + const startTime = new Date().getTime(); + const baseUrl = `http://localhost:${this.config.port}`; + const config = this.getConnectionConfig(); axios.get(`${baseUrl}/service-manual/sitemap`, config) - .then((response) => { - var pages = []; - const $ = cheerio.load(response.data); - var links = $('#maincontent').find('a'); - links.each((i, el) => { - var href = $(el).attr('href'); - if (!indexBlacklist.includes(href)) { - var url = `${baseUrl}${href}`; - if (href.toLowerCase().includes('http')) { - url = href; + .then((response) => { + const pages = []; + const $ = cheerio.load(response.data); + const links = $('#maincontent').find('a'); + links.each((i, el) => { + const href = $(el).attr('href'); + if (!indexBlacklist.includes(href)) { + let url = `${baseUrl}${href}`; + if (href.toLowerCase().includes('http')) { + url = href; + } + pages.push(axios.get(url, config)); } - pages.push(axios.get(url, config)); - } - }) + }); - return axios.all(pages); - }) - .then((responses) => { - for (var response of responses) { - const $ = cheerio.load(response.data); - const url = response.request.path; - var description = this._parseDescription($); - if (this._isSpecialIndex($)) { - this._indexPageSpecial($, url, description) - } - else { - this._indexPageNormal($, url, description); - } - } + return axios.all(pages); + }) + .then((responses) => { + responses.forEach((response) => { + const $ = cheerio.load(response.data); + const url = response.request.path; + const description = this.parseDescription($); + if (this.isSpecialIndex($)) { + this.indexPageSpecial($, url, description); + } else { + this.indexPageNormal($, url, description); + } + }); - this.index = lunr((builder) => { - builder.ref('url'); - builder.field('title'); - builder.field('h2'); - builder.field('h3'); - builder.field('extra'); + this.index = lunr((builder) => { + builder.ref('url'); + builder.field('title'); + builder.field('h2'); + builder.field('h3'); + builder.field('extra'); - for (var i = 0; i < this.docs.length; i++) { - builder.add(this.docs[i]); - } + for (let i = 0; i < this.docs.length; i++) { + builder.add(this.docs[i]); + } + }); + const endTime = new Date().getTime(); + const indexTime = (endTime - startTime) / 1000; + console.log(`Page index finished in ${indexTime}s`); }) - var endTime = new Date().getTime(); - var indexTime = (endTime - startTime) / 1000; - console.log(`Page index finished in ${indexTime}s`); - }) - .catch((err) => { - var reason = '' - if (err.response) { - reason = `${err.message} URL: ${err.response.config.url}` - } - else { - reason = err.message - } - console.log(`Unable to index pages. Reason: ${reason}`); - }) + .catch((err) => { + let reason = ''; + if (err.response) { + reason = `${err.message} URL: ${err.response.config.url}`; + } else { + reason = err.message; + } + console.log(`Unable to index pages. Reason: ${reason}`); + }); } search(query) { - var results = this._searchIndex(query); - var output = []; - for (var i = 0; i < results.length; i++) { - var data = this._getData(results[i]); + const results = this.searchIndex(query); + const output = []; + for (let i = 0; i < results.length; i++) { + const data = this.getData(results[i]); if (data) { output.push(data); } @@ -84,29 +82,28 @@ class PageIndex { return output; } - _searchIndex(query) { - var results = [] + searchIndex(query) { + let results = []; if (query && this.index) { - results = this.index.query(function(q) { - lunr.tokenizer(query).forEach(function (token) { - q.term(token.toString(), { fields: [ 'title' ], boost: 100 }) - q.term(token.toString(), { fields: [ 'h2' ], boost: 80 }) - q.term(token.toString(), { fields: [ 'h3' ], boost: 60 }) - q.term(token.toString(), { fields: [ 'extra' ], boost: 40 }) - - - q.term(`${token.toString()}*`, { fields: [ 'title' ], boost: 90 }) - q.term(`${token.toString()}*`, { fields: [ 'h2' ], boost: 70 }) - q.term(`${token.toString()}*`, { fields: [ 'h3' ], boost: 50 }) - q.term(`${token.toString()}*`, { fields: [ 'extra' ], boost: 30 }) - }) - }) + results = this.index.query((q) => { + lunr.tokenizer(query).forEach((token) => { + q.term(token.toString(), { boost: 100, fields: ['title'] }); + q.term(token.toString(), { boost: 80, fields: ['h2'] }); + q.term(token.toString(), { boost: 60, fields: ['h3'] }); + q.term(token.toString(), { boost: 40, fields: ['extra'] }); + + q.term(`${token.toString()}*`, { boost: 90, fields: ['title'] }); + q.term(`${token.toString()}*`, { boost: 70, fields: ['h2'] }); + q.term(`${token.toString()}*`, { boost: 50, fields: ['h3'] }); + q.term(`${token.toString()}*`, { boost: 30, fields: ['extra'] }); + }); + }); } - return results + return results; } - _getData(result) { - for (var i = 0; i < this.docs.length; i++) { + getData(result) { + for (let i = 0; i < this.docs.length; i++) { if (result.ref === this.docs[i].url) { return this.docs[i]; } @@ -114,68 +111,71 @@ class PageIndex { return undefined; } - _indexPageNormal($, url, description) { - var title = this._parsePageHeadings($, 'h1').join(' '); - var h2 = this._getIndex($, 'h2'); - var h3 = this._getIndex($, 'h3'); - var extra = this._getAdditionalIndices(url).join(' '); + indexPageNormal($, url, description) { + const title = this.parsePageHeadings($, 'h1').join(' '); + const h2 = this.getIndex($, 'h2'); + const h3 = this.getIndex($, 'h3'); + const extra = this.getAdditionalIndices(url).join(' '); this.docs.push({ - url: url, - title: title, - h2: h2, - h3: h3, - extra: extra, - description: description + url, + title, + h2, + h3, + extra, + description, }); } - _indexPageSpecial($, url, description) { - var titles = this._parsePageHeadings($, 'h3'); - for (var rawTitle of titles) { - var formattedTitle = rawTitle.charAt(0).toUpperCase() + rawTitle.slice(1); - var extra = this._getAdditionalIndices(url).join(' '); - var h3 = this._getAltList([ rawTitle ]); - var formattedUrl = `${url}#${rawTitle.split(' ').join('-')}` + indexPageSpecial($, url, description) { + const titles = this.parsePageHeadings($, 'h3'); + titles.forEach((rawTitle) => { + const formattedTitle = rawTitle.charAt(0).toUpperCase() + rawTitle.slice(1); + const extra = this.getAdditionalIndices(url).join(' '); + const h3 = this.getAltList([rawTitle]); + const formattedUrl = `${url}#${rawTitle.split(' ').join('-')}`; this.docs.push({ url: formattedUrl, title: `${formattedTitle} - A to Z of NHS health writing`, h2: '', - h3: h3, - extra: extra, - description: description + h3, + extra, + description, }); - } + }); } - _getAdditionalIndices(url) { + getAdditionalIndices(url) { if (url in additionalIndices) { return additionalIndices[url]; } return []; } - _parsePageHeadings($, type) { - var headings = []; + parsePageHeadings($, type) { + const headings = []; $('#maincontent').find(type).each((i, el) => { - if($(el).children().length === 0) { - headings.push($(el).text()); + if ($(el).children().length === 0) { + headings.push($(el).text().trim()); + } else { + const title = $('title').text(); + headings.push(title.split(' - ')[0]); } - }) + }); return headings; } - _getIndex($, type) { - var headingsList = this._parsePageHeadings($, type); - var altList = this._getAltList(headingsList); + getIndex($, type) { + const headingsList = this.parsePageHeadings($, type); + const altList = this.getAltList(headingsList); return headingsList.concat(altList).join(' '); } - _getAltList(list) { - var listString = list.join(' ').toLowerCase(); - var altList = []; - for (var key in alternativeSpelling) { + getAltList(list) { + const listString = list.join(' ').toLowerCase(); + let altList = []; + for (const key in alternativeSpelling) { if (listString.includes(key.toLowerCase())) { altList = altList.concat(alternativeSpelling[key]); } @@ -183,31 +183,31 @@ class PageIndex { return altList; } - _parseDescription($) { - return this._parseMeta($, 'description'); + parseDescription($) { + return this.parseMeta($, 'description'); } - _isSpecialIndex($) { - if (this._parseMeta($, 'page-index') === 'special' ) { + isSpecialIndex($) { + if (this.parseMeta($, 'page-index') === 'special') { return true; } return false; } - _parseMeta($, name) { + parseMeta($, name) { return $(`meta[name='${name}']`).attr('content'); } - _getConnectionConfig() { + getConnectionConfig() { if (process.env.MANUAL_USERNAME || process.env.MANUAL_PASSWORD) { return { auth: { username: process.env.MANUAL_USERNAME, - password: process.env.MANUAL_PASSWORD - } - } + password: process.env.MANUAL_PASSWORD, + }, + }; } - return {} + return {}; } } From 855fb5b7178e66c55426ad9dcdce19c83c8ef530 Mon Sep 17 00:00:00 2001 From: Sabeeh UL-Hassan Date: Mon, 2 Dec 2019 13:02:22 +0000 Subject: [PATCH 06/27] hide search on search page --- app/views/includes/header.njk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/includes/header.njk b/app/views/includes/header.njk index b57499fff..fafe421d7 100755 --- a/app/views/includes/header.njk +++ b/app/views/includes/header.njk @@ -9,7 +9,7 @@ "longName": "true" }, "showNav": "false", - "showSearch": "true", + "showSearch": "false", "searchAction": "/service-manual/search/", "searchInputName": "search-field" }) From f8f2206bda7ece99f4bbffb1ea71536d5ecb478e Mon Sep 17 00:00:00 2001 From: Sabeeh UL-Hassan Date: Mon, 2 Dec 2019 13:24:03 +0000 Subject: [PATCH 07/27] fix linting --- app/scripts/search.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/app/scripts/search.js b/app/scripts/search.js index c6033ba1d..0df3b6777 100644 --- a/app/scripts/search.js +++ b/app/scripts/search.js @@ -3,12 +3,10 @@ * @param {string} result String containing individual result from autocomplete source function * @returns {string} String of HTML containing passed result */ -export const suggestion = (obj) => { - return ` - - ${obj.title} - `; -}; +export const suggestion = obj => ` + + ${obj.title} +`; export const inputValue = (obj) => { if (obj && obj.title) return obj.title.trim(); From 89e5806bc9902121ad164559e98dc5c01afb67f1 Mon Sep 17 00:00:00 2001 From: Sabeeh UL-Hassan Date: Mon, 2 Dec 2019 15:25:18 +0000 Subject: [PATCH 08/27] fix jest tests --- tests/page-index.spec.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/page-index.spec.js b/tests/page-index.spec.js index d86a2c721..7ed026019 100644 --- a/tests/page-index.spec.js +++ b/tests/page-index.spec.js @@ -12,7 +12,7 @@ test('test parse page description', () => { var pageData = '' const $ = cheerio.load(pageData) - expect(pageIndex._parseDescription($)).toBe('Design and build digital services for the NHS. Things you need to make consistent, usable services that put people first.') + expect(pageIndex.parseDescription($)).toBe('Design and build digital services for the NHS. Things you need to make consistent, usable services that put people first.') }) @@ -22,14 +22,14 @@ test('test get index', () => { const $ = cheerio.load(pageData) const expectedIndex = 'test fever temperature' - expect(pageIndex._getIndex($, 'h2')).toBe(expectedIndex) + expect(pageIndex.getIndex($, 'h2')).toBe(expectedIndex) }) test('test get alt list', () => { var list = [ 'fever' ] var pageIndex = new PageIndex(config) - expect(pageIndex._getAltList(list)).toEqual([ 'temperature' ]) + expect(pageIndex.getAltList(list)).toEqual([ 'temperature' ]) }) @@ -38,5 +38,5 @@ test('test parse page title', () => { var pageData = '

    title

    title2

    ' const $ = cheerio.load(pageData) - expect(pageIndex._parsePageHeadings($, 'h1')).toEqual(['title2']) + expect(pageIndex.parsePageHeadings($, 'h1')).toEqual(['title2']) }) From 9fc6e90a51b6c9ce91b6c0c972c578fc5d3cf9de Mon Sep 17 00:00:00 2001 From: AdamChrimes Date: Wed, 4 Dec 2019 15:58:15 +0000 Subject: [PATCH 09/27] include the header JavaScript for the search button on mobile --- app/scripts/main.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/scripts/main.js b/app/scripts/main.js index e8b18c0dd..e76c9f3ad 100644 --- a/app/scripts/main.js +++ b/app/scripts/main.js @@ -3,6 +3,7 @@ import './polyfills'; // NHS.UK frontend import AutoComplete from 'nhsuk-frontend/packages/components/header/autoCompleteConfig'; +import Header from '../../node_modules/nhsuk-frontend/packages/components/header/header'; import SkipLink from '../../node_modules/nhsuk-frontend/packages/components/skip-link/skip-link'; import DesignExample from './design-example'; import { @@ -13,6 +14,7 @@ import { } from './search'; // Initialise components +Header(); SkipLink(); document.querySelectorAll(DesignExample.selector()).forEach((el) => { From d2029c247dc0de9ef41ec2df926d2fd0828acc32 Mon Sep 17 00:00:00 2001 From: Sabeeh UL-Hassan Date: Thu, 5 Dec 2019 11:43:42 +0000 Subject: [PATCH 10/27] add result truncation --- app/scripts/search.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/app/scripts/search.js b/app/scripts/search.js index 0df3b6777..276b85943 100644 --- a/app/scripts/search.js +++ b/app/scripts/search.js @@ -3,10 +3,14 @@ * @param {string} result String containing individual result from autocomplete source function * @returns {string} String of HTML containing passed result */ -export const suggestion = obj => ` - - ${obj.title} -`; +export const suggestion = (obj) => { + const truncateLength = 36; + const dots = obj.title.length > truncateLength ? '...' : ''; + const resultTruncated = obj.title.substring(0, truncateLength) + dots; + return ` + ${resultTruncated} + `; +}; export const inputValue = (obj) => { if (obj && obj.title) return obj.title.trim(); From 420e145599ce6f001084c7600d14a6c08fddbd73 Mon Sep 17 00:00:00 2001 From: Sabeeh UL-Hassan Date: Thu, 5 Dec 2019 11:48:42 +0000 Subject: [PATCH 11/27] truncation cleanup --- app/scripts/search.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/scripts/search.js b/app/scripts/search.js index 276b85943..179154cff 100644 --- a/app/scripts/search.js +++ b/app/scripts/search.js @@ -3,10 +3,10 @@ * @param {string} result String containing individual result from autocomplete source function * @returns {string} String of HTML containing passed result */ -export const suggestion = (obj) => { +export const suggestion = ({title}) => { const truncateLength = 36; - const dots = obj.title.length > truncateLength ? '...' : ''; - const resultTruncated = obj.title.substring(0, truncateLength) + dots; + const dots = title.length > truncateLength ? '...' : ''; + const resultTruncated = title.substring(0, truncateLength) + dots; return ` ${resultTruncated} `; From 4d34a6aee17d7938f32f961ab1a0a4998d683cd1 Mon Sep 17 00:00:00 2001 From: davidhunter08 Date: Mon, 9 Dec 2019 10:10:51 +0000 Subject: [PATCH 12/27] update search results template and focus styles --- app/styles/app/_search.scss | 10 ++++++++-- app/views/includes/search.njk | 8 ++++---- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/app/styles/app/_search.scss b/app/styles/app/_search.scss index 22f7281c0..2ddd626db 100644 --- a/app/styles/app/_search.scss +++ b/app/styles/app/_search.scss @@ -59,7 +59,8 @@ width: 100%; /* [2] */ &:focus { - box-shadow: inset 0 0 0 $nhsuk-box-shadow-spread $nhsuk-focus-color; + border: $nhsuk-box-shadow-spread solid $nhsuk-focus-color; + box-shadow: inset 0 0 0 $nhsuk-box-shadow-spread $nhsuk-focus-text-color; } } @@ -95,7 +96,12 @@ } &:focus { - box-shadow: inset 0 0 0 $nhsuk-box-shadow-spread $nhsuk-focus-color; + background-color: $nhsuk-focus-color; + border-bottom: 4px solid #212b32; + + .nhsuk-icon__search { + fill: $nhsuk-focus-text-color; + } } &:active { diff --git a/app/views/includes/search.njk b/app/views/includes/search.njk index 72376a37d..ea516d1a7 100644 --- a/app/views/includes/search.njk +++ b/app/views/includes/search.njk @@ -22,16 +22,16 @@
    -

    - Found {{ resultsLen }} matching results. +

    + {{ resultsLen }} results

    - + {% if results | length > 0 %}
      {% for item in results %}
    • {{item.title}} -

      {{item.description}}

      +

      {{item.description}}

    • {% endfor %}
    From 8297c8adaf6c32661e822e78617fb220aabf7a13 Mon Sep 17 00:00:00 2001 From: Sabeeh UL-Hassan Date: Mon, 9 Dec 2019 14:02:55 +0000 Subject: [PATCH 13/27] add focus styles on results dropdown --- app/scripts/search.js | 2 +- app/styles/app/_search.scss | 19 +++++++++++++++++++ app/views/includes/search.njk | 2 +- 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/app/scripts/search.js b/app/scripts/search.js index 179154cff..ce35a866d 100644 --- a/app/scripts/search.js +++ b/app/scripts/search.js @@ -8,7 +8,7 @@ export const suggestion = ({title}) => { const dots = title.length > truncateLength ? '...' : ''; const resultTruncated = title.substring(0, truncateLength) + dots; return ` - ${resultTruncated} + ${resultTruncated} `; }; diff --git a/app/styles/app/_search.scss b/app/styles/app/_search.scss index 2ddd626db..617008d5b 100644 --- a/app/styles/app/_search.scss +++ b/app/styles/app/_search.scss @@ -126,3 +126,22 @@ .app-search-results-item::first-letter { text-transform: uppercase; } +.autocomplete__option { + text-decoration: none; + + &:focus { + .autocomplete__option-title { + @include nhsuk-focused-text; + } + } + + &:hover, &:focus { + .autocomplete__option-title { + text-decoration: none; + } + } + + &-title { + text-decoration: underline; + } +} \ No newline at end of file diff --git a/app/views/includes/search.njk b/app/views/includes/search.njk index ea516d1a7..6798398f6 100644 --- a/app/views/includes/search.njk +++ b/app/views/includes/search.njk @@ -23,7 +23,7 @@

    - {{ resultsLen }} results + {{ resultsLen }} result{%if results | length != 1%}s{%endif%}

    {% if results | length > 0 %} From ff244121058e3c82e61619b24c5923f50f46cf94 Mon Sep 17 00:00:00 2001 From: Sabeeh UL-Hassan Date: Mon, 9 Dec 2019 14:11:59 +0000 Subject: [PATCH 14/27] fix linting error --- app/scripts/search.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/scripts/search.js b/app/scripts/search.js index ce35a866d..31dc64026 100644 --- a/app/scripts/search.js +++ b/app/scripts/search.js @@ -3,12 +3,12 @@ * @param {string} result String containing individual result from autocomplete source function * @returns {string} String of HTML containing passed result */ -export const suggestion = ({title}) => { +export const suggestion = ({ title }) => { const truncateLength = 36; const dots = title.length > truncateLength ? '...' : ''; const resultTruncated = title.substring(0, truncateLength) + dots; return ` - ${resultTruncated} + ${resultTruncated} `; }; From ee9e9ed01bcedea057ac7da87b850b1ca20d272a Mon Sep 17 00:00:00 2001 From: davidhunter08 Date: Mon, 9 Dec 2019 14:12:22 +0000 Subject: [PATCH 15/27] autcomplete hotfixes --- app/styles/app/_search.scss | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/app/styles/app/_search.scss b/app/styles/app/_search.scss index 2ddd626db..ce935aed8 100644 --- a/app/styles/app/_search.scss +++ b/app/styles/app/_search.scss @@ -126,3 +126,21 @@ .app-search-results-item::first-letter { text-transform: uppercase; } + +// Autocomplete list hotfixes + +.autocomplete__option .nhsuk-icon__search { + margin: 2px 4px 2px 0; +} + +@include mq($from: tablet) { + + .autocomplete__option:last-child { + padding-bottom: 0; + } + + .autocomplete__menu { + padding: 16px 8px; + } + +} From 9247b0e2cf00c3be5456884c1e43d6206c079cda Mon Sep 17 00:00:00 2001 From: Sabeeh UL-Hassan Date: Mon, 9 Dec 2019 14:18:35 +0000 Subject: [PATCH 16/27] add span --- app/scripts/search.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/scripts/search.js b/app/scripts/search.js index 31dc64026..d56905fdb 100644 --- a/app/scripts/search.js +++ b/app/scripts/search.js @@ -8,7 +8,7 @@ export const suggestion = ({ title }) => { const dots = title.length > truncateLength ? '...' : ''; const resultTruncated = title.substring(0, truncateLength) + dots; return ` - ${resultTruncated} + ${resultTruncated} `; }; From 8a8c91bb8cddcafada2a3b1adf21475025723774 Mon Sep 17 00:00:00 2001 From: Sabeeh UL-Hassan Date: Mon, 9 Dec 2019 14:24:29 +0000 Subject: [PATCH 17/27] hide resuslts counter when no results --- app/views/includes/search.njk | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/app/views/includes/search.njk b/app/views/includes/search.njk index 6798398f6..e7f98670d 100644 --- a/app/views/includes/search.njk +++ b/app/views/includes/search.njk @@ -22,11 +22,10 @@
    -

    - {{ resultsLen }} result{%if results | length != 1%}s{%endif%} -

    - {% if results | length > 0 %} +

    + {{ resultsLen }} result{%if results | length != 1%}s{%endif%} +

      {% for item in results %}
    • From c4a195fa22fcb05ed6b33f6c8fb533f331cbd28b Mon Sep 17 00:00:00 2001 From: Sabeeh UL-Hassan Date: Tue, 10 Dec 2019 10:55:23 +0000 Subject: [PATCH 18/27] add synonyms --- middleware/page-index-additions.js | 70 +++++++++++++++++++++++++++++- 1 file changed, 68 insertions(+), 2 deletions(-) diff --git a/middleware/page-index-additions.js b/middleware/page-index-additions.js index 2c7dd42eb..b704c8de6 100644 --- a/middleware/page-index-additions.js +++ b/middleware/page-index-additions.js @@ -1,11 +1,77 @@ +// Page specific const additionalIndices = { '/service-manual/accessibility/testing': ['svg'], + '/service-manual/styles-components-patterns': ['elements'], + '/service-manual/styles-components-patterns/action-link': ['call to action, cta'], + '/service-manual/styles-components-patterns/back-link': ['return link, back button'], + '/service-manual/styles-components-patterns/breadcrumbs': ['navigation path, cookie crumb'], + '/service-manual/styles-components-patterns/care-cards': ['non-urgent care card, blue care card, red care card, immediate care card, emergency care card'], + '/service-manual/styles-components-patterns/checkboxes': ['check boxes, tickboxes, tick boxes'], + '/service-manual/styles-components-patterns/colour': ['palette'], + '/service-manual/styles-components-patterns/details': ['reveal, progressive disclosure, hidden text, show and hide'], + '/service-manual/styles-components-patterns/error-message': ['validation message'], + '/service-manual/styles-components-patterns/expander': ['reveal, accordion'], + '/service-manual/styles-components-patterns/header': ['banner'], + '/service-manual/styles-components-patterns/images': ['pictures, photos'], + '/service-manual/styles-components-patterns/inset-text': ['information, highlighted text, callout'], + '/service-manual/styles-components-patterns/layout': ['grid'], + '/service-manual/styles-components-patterns/pagination': ['previous page, next page'], + '/service-manual/styles-components-patterns/radios': ['radio buttons, option buttons'], + '/service-manual/styles-components-patterns/review-date': ['date updated'], + '/service-manual/styles-components-patterns/select': ['drop down menu, list box, drop down list, combo box, pop-up menu'], + '/service-manual/styles-components-patterns/skip-link': ['skip to body content, Skip navigation link'], + '/service-manual/styles-components-patterns/spacing': ['margin, padding'], + '/service-manual/styles-components-patterns/summary-list': ['definition list'], + '/service-manual/styles-components-patterns/text-input': ['text box, text field, input field, text entry box'], + '/service-manual/styles-components-patterns/textarea': ['big text box, multi-line text box, multi-line text field'], + '/service-manual/styles-components-patterns/typography': ['fonts'], + '/service-manual/styles-components-patterns/warning-callout': ['yellow callout, warning box, important'], }; +// Term specific const alternativeSpelling = { + 'components': ['elements'], 'alzheimer’s': ['alzheimers', 'alzheimer'], - fever: ['temperature'], - temperature: ['fever'], + 'fever': ['temperature'], + 'temperature': ['fever'], + 'foetus': ['fetus'], + 'A&E': ['accident and emergency'], + 'ageing': ['aging'], + 'alzheimer’s disease': ['Alzheimers disease'], + '&': ['ampersand'], + 'breast milk': ['breastmilk'], + 'dietitian': ['dietician'], + '5 A Day': ['Five A Day'], + 'faeces': ['feces'], + 'flu': ['influenza'], + 'GP surgery': ['GP practice'], + 'haemorrhage': ['hemorrhage'], + 'healthcare': ['health care'], + 'home help': ['homehelp'], + 'ie': ['i.e.'], + 'eg': ['e.g.'], + 'immunisation': ['immunization'], + 'inpatient': ['in-patient'], + 'lip-reading ': ['lipreading'], + 'mad cow disease': ['mad cow’s disease'], + 'microgram': ['mcg'], + 'OK': ['okay'], + 'organisations': ['organizations'], + 'outpatient': ['out-patient'], + 'PMS (premenstrual syndrome)': ['pre-menstrual syndrome'], + 'practice': ['practise'], + 'preconception care': ['pre-conception care'], + 'summary care record': ['SCR'], + 'tranquillise': ['tranquillize'], + 'tranquilliser': ['tranqullizer'], + 'urinary tract infections': ['UTIs'], + 'STI': ['STD'], + 'walk-in centre': ['walk in centre'], + 'wellbeing': ['well-being'], + 'X-ray': ['xray'], + 'zimmer frame': ['zimmerframe'], + 'filter questions': ['branch questions, Yes and No questions'], + 'sensitivities': ['sensitive questions'], }; const indexBlacklist = [ From f6696ef89556252cd0d3bb29e4e6fa4e00292e47 Mon Sep 17 00:00:00 2001 From: Sabeeh UL-Hassan Date: Tue, 10 Dec 2019 11:20:36 +0000 Subject: [PATCH 19/27] add details page to sitemap --- app/views/sitemap.njk | 1 + 1 file changed, 1 insertion(+) diff --git a/app/views/sitemap.njk b/app/views/sitemap.njk index 2e41942b8..7718ab408 100644 --- a/app/views/sitemap.njk +++ b/app/views/sitemap.njk @@ -39,6 +39,7 @@
    • Colour
    • Contents list
    • Date input
    • +
    • Details
    • Do and Don't lists
    • Error message
    • Error summary
    • From bc3d22ff268768f0cf8de9b4f991d31df2c322fe Mon Sep 17 00:00:00 2001 From: AdamChrimes Date: Tue, 10 Dec 2019 11:41:12 +0000 Subject: [PATCH 20/27] undo JavaScript refactoring as it broke the logic --- app.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app.js b/app.js index de0c83521..5c12296e1 100755 --- a/app.js +++ b/app.js @@ -73,9 +73,11 @@ app.get('/service-manual/design-example/:example', (req, res) => { const exampleHtml = fileHelper.getHTMLCode(examplePath); // Wrap the example HTML in a basic html base template. - const baseTemplate = displayFullPage - ? 'includes/design-example-wrapper.njk' - : 'includes/design-example-wrapper-full.njk'; + var baseTemplate = 'includes/design-example-wrapper.njk'; + if (displayFullPage) { + baseTemplate = 'includes/design-example-wrapper-full.njk'; + } + res.render(baseTemplate, { body: exampleHtml }); }); From 394a56731203d37cf47198c32f3cf724f5ef01a2 Mon Sep 17 00:00:00 2001 From: AdamChrimes Date: Tue, 10 Dec 2019 11:52:45 +0000 Subject: [PATCH 21/27] fix the CSS linting issues --- app/styles/app/_search.scss | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/styles/app/_search.scss b/app/styles/app/_search.scss index 9e5b35a52..ae421014f 100644 --- a/app/styles/app/_search.scss +++ b/app/styles/app/_search.scss @@ -97,7 +97,7 @@ &:focus { background-color: $nhsuk-focus-color; - border-bottom: 4px solid #212b32; + border-bottom: 4px solid $nhsuk-text-color; .nhsuk-icon__search { fill: $nhsuk-focus-text-color; @@ -136,7 +136,8 @@ } } - &:hover, &:focus { + &:hover, + &:focus { .autocomplete__option-title { text-decoration: none; } From 5f55b703b00e7abcc17f82c2fd24e6fac320de1f Mon Sep 17 00:00:00 2001 From: AdamChrimes Date: Tue, 10 Dec 2019 15:12:30 +0000 Subject: [PATCH 22/27] add missing Links page to the sitemap --- app/views/sitemap.njk | 1 + 1 file changed, 1 insertion(+) diff --git a/app/views/sitemap.njk b/app/views/sitemap.njk index 7718ab408..188024599 100644 --- a/app/views/sitemap.njk +++ b/app/views/sitemap.njk @@ -97,6 +97,7 @@
    • Numbers, measurements, dates and time
    • Formatting and punctuation
    • PDFs
    • +
    • Links
  • From 61bcb4bbaf6656be3f8e2af8425c76c6b3c5c0a8 Mon Sep 17 00:00:00 2001 From: AdamChrimes Date: Tue, 10 Dec 2019 15:13:22 +0000 Subject: [PATCH 23/27] use the correct accessibility statement page in sitemap --- app/views/sitemap.njk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/sitemap.njk b/app/views/sitemap.njk index 188024599..9c5ae025b 100644 --- a/app/views/sitemap.njk +++ b/app/views/sitemap.njk @@ -108,7 +108,7 @@
  • Work on a new thing
  • -
  • Accessibility
  • +
  • Accessibility statement
  • Terms and conditions
  • Privacy
  • From caa4af28311dd2a9b76e1d5e60acb79239b0d9d0 Mon Sep 17 00:00:00 2001 From: AdamChrimes Date: Tue, 10 Dec 2019 15:17:54 +0000 Subject: [PATCH 24/27] populate the change log for the 2.0.0 search release --- CHANGELOG.md | 10 ++++++++++ package-lock.json | 2 +- package.json | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 69cee4e42..1ff20ead5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,15 @@ # NHS digital service manual Changelog +## 2.0.0 - Unreleased + +:new: **New features** + +- Add search functionality to the service manual + ## 1.13.4 - 09 December 2019 +:wrench: **Fixes** + - Add missing Details component JavaScript polyfill - Use https on all external links and fix broken link on the test your questions page - Remove the unnecessary type attribute from JavaScript resources @@ -9,6 +17,8 @@ ## 1.13.3 - 25 November 2019 +:wrench: **Fixes** + - Made it clear in PDF guidance that PDFs can be used for a permanent record - Added an additional bullet point on PDFs being used as a permanent record. - Refactor CSS and HTML to clean up the code base and make the spacing more consistent diff --git a/package-lock.json b/package-lock.json index aefdd267e..3a8f2467f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "nhsuk-service-manual", - "version": "1.13.4", + "version": "2.0.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 88fdfba3e..7203a0b96 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nhsuk-service-manual", - "version": "1.13.4", + "version": "2.0.0", "description": "NHS digital service manual", "main": "app.js", "directories": { From a33686f595f3ba4157b6cd26d629f2ed627c6d60 Mon Sep 17 00:00:00 2001 From: AdamChrimes Date: Tue, 10 Dec 2019 15:18:47 +0000 Subject: [PATCH 25/27] update package dependencies to latest versions --- CHANGELOG.md | 4 +++ package-lock.json | 86 ++++++++++++++++++++++++++++++++++++----------- package.json | 2 +- 3 files changed, 72 insertions(+), 20 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1ff20ead5..0725f483d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ - Add search functionality to the service manual +:wrench: **Fixes** + +- Update package dependencies to latest versions + ## 1.13.4 - 09 December 2019 :wrench: **Fixes** diff --git a/package-lock.json b/package-lock.json index 3a8f2467f..150e8da82 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6114,9 +6114,9 @@ } }, "eslint": { - "version": "6.6.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.6.0.tgz", - "integrity": "sha512-PpEBq7b6qY/qrOmpYQ/jTMDYfuQMELR4g4WI1M/NaSDDD/bdcMb+dj4Hgks7p41kW2caXsPsEZAEAyAgjVVC0g==", + "version": "6.7.2", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.7.2.tgz", + "integrity": "sha512-qMlSWJaCSxDFr8fBPvJM9kJwbazrhNcBU3+DszDW1OlEwKBBRWsJc7NJFelvwQpanHCR14cOLD41x8Eqvo3Nng==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", @@ -6134,7 +6134,7 @@ "file-entry-cache": "^5.0.1", "functional-red-black-tree": "^1.0.1", "glob-parent": "^5.0.0", - "globals": "^11.7.0", + "globals": "^12.1.0", "ignore": "^4.0.6", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", @@ -6147,7 +6147,7 @@ "minimatch": "^3.0.4", "mkdirp": "^0.5.1", "natural-compare": "^1.4.0", - "optionator": "^0.8.2", + "optionator": "^0.8.3", "progress": "^2.0.0", "regexpp": "^2.0.1", "semver": "^6.1.2", @@ -6159,18 +6159,18 @@ }, "dependencies": { "ansi-escapes": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.2.1.tgz", - "integrity": "sha512-Cg3ymMAdN10wOk/VYfLV7KCQyv7EDirJ64500sU7n9UlmioEtDuU5Gd+hj73hXSU/ex7tHJSssmyftDdkMLO8Q==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.0.tgz", + "integrity": "sha512-EiYhwo0v255HUL6eDyuLrXEkTi7WwVCLAw+SeOQ7M7qdun1z1pum4DEm/nuqIVbPvi9RPPc9k9LbyBv6H0DwVg==", "dev": true, "requires": { - "type-fest": "^0.5.2" + "type-fest": "^0.8.1" } }, "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", "dev": true }, "cli-cursor": { @@ -6251,6 +6251,15 @@ } } }, + "globals": { + "version": "12.3.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-12.3.0.tgz", + "integrity": "sha512-wAfjdLgFsPZsklLJvOBUBmzYE8/CwhEqSBEMRXA3qxIiNtyqvjYurAtIfDh6chlEPUfmTY3MnZh5Hfh4q0UlIw==", + "dev": true, + "requires": { + "type-fest": "^0.8.1" + } + }, "inquirer": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.0.0.tgz", @@ -6313,6 +6322,20 @@ "mimic-fn": "^2.1.0" } }, + "optionator": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", + "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "dev": true, + "requires": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.6", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "word-wrap": "~1.2.3" + } + }, "restore-cursor": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", @@ -6330,14 +6353,25 @@ "dev": true }, "string-width": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.1.0.tgz", - "integrity": "sha512-NrX+1dVVh+6Y9dnQ19pR0pP4FiEIlUvdTGn8pw6CKTNq5sgib2nIhmUNT5TAmhWmvKr3WcxBcP3E8nWezuipuQ==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", + "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", "dev": true, "requires": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^5.2.0" + "strip-ansi": "^6.0.0" + }, + "dependencies": { + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + } } }, "strip-ansi": { @@ -6347,6 +6381,14 @@ "dev": true, "requires": { "ansi-regex": "^4.1.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + } } }, "strip-json-comments": { @@ -15391,9 +15433,9 @@ } }, "type-fest": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.5.2.tgz", - "integrity": "sha512-DWkS49EQKVX//Tbupb9TFa19c7+MK1XmzkrZUR8TAktmE/DizXoaoJV6TZ/tSIPXipqNiRI6CyAe7x69Jb6RSw==", + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", "dev": true }, "type-is": { @@ -16123,6 +16165,12 @@ "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.4.tgz", "integrity": "sha1-+OGqHuWlPsW/FR/6CXQqatdpeHY=" }, + "word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "dev": true + }, "wordwrap": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", diff --git a/package.json b/package.json index 7203a0b96..e89f66fb7 100755 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "babel-loader": "^8.0.6", "concurrently": "^4.1.2", "cpx": "^1.5.0", - "eslint": "^6.6.0", + "eslint": "^6.7.2", "eslint-config-airbnb-base": "^13.2.0", "eslint-config-nhsuk": "^0.17.0", "eslint-plugin-import": "^2.19.1", From 970180a19406611ed936b00e5fd565a0bcdf974b Mon Sep 17 00:00:00 2001 From: AdamChrimes Date: Thu, 12 Dec 2019 11:03:13 +0000 Subject: [PATCH 26/27] update the service standard page links on the sitemap --- app/views/sitemap.njk | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/app/views/sitemap.njk b/app/views/sitemap.njk index f9bda6f30..4179ca841 100644 --- a/app/views/sitemap.njk +++ b/app/views/sitemap.njk @@ -30,21 +30,21 @@
  • From 0e3c59b043c9c0c1085b3c2fe089719dbd8fb656 Mon Sep 17 00:00:00 2001 From: AdamChrimes Date: Thu, 12 Dec 2019 11:04:05 +0000 Subject: [PATCH 27/27] populate the changelog for the nhs service standard --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c76413060..eb2577cca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ - Add search functionality to the service manual +:new: **New content** + +- NHS service standard + :wrench: **Fixes** - Update package dependencies to latest versions