hof 20.3.11 → 21.0.0-axios-beta
Sign up to get free protection for your applications and to get access to all the features.
- package/.nyc_output/b841d018-49f0-462a-8e8f-acb3d722cd3b.json +1 -0
- package/.nyc_output/processinfo/b841d018-49f0-462a-8e8f-acb3d722cd3b.json +1 -0
- package/.nyc_output/processinfo/index.json +1 -1
- package/components/date/templates/date.html +1 -1
- package/config/hof-defaults.js +2 -5
- package/frontend/template-mixins/partials/forms/checkbox-group.html +1 -1
- package/frontend/template-mixins/partials/forms/option-group.html +1 -1
- package/frontend/template-mixins/partials/forms/textarea-group.html +4 -2
- package/frontend/template-partials/views/layout.html +1 -1
- package/frontend/template-partials/views/partials/cookie-banner.html +2 -2
- package/lib/health.js +1 -1
- package/lib/sessions.js +0 -2
- package/middleware/rate-limiter.js +1 -3
- package/model/index.js +27 -28
- package/package.json +5 -4
- package/sandbox/apps/sandbox/fields.js +0 -6
- package/sandbox/apps/sandbox/translations/src/en/fields.json +5 -5
- package/sandbox/apps/sandbox/translations/src/en/pages.json +1 -1
- package/sandbox/config.js +1 -2
- package/sandbox/server.js +1 -4
- package/sandbox/yarn.lock +3 -3
- package/.nyc_output/b924df42-9cb6-4618-9a07-4f58f67ae28a.json +0 -1
- package/.nyc_output/processinfo/b924df42-9cb6-4618-9a07-4f58f67ae28a.json +0 -1
- package/sandbox/apps/sandbox/translations/en/default.json +0 -220
- package/sandbox/dump.rdb +0 -0
- package/sandbox/public/css/app.css +0 -9387
- package/sandbox/public/images/icons/icon-caret-left.png +0 -0
- package/sandbox/public/images/icons/icon-complete.png +0 -0
- package/sandbox/public/images/icons/icon-cross-remove-sign.png +0 -0
- package/sandbox/public/js/bundle.js +0 -35664
@@ -0,0 +1 @@
|
|
1
|
+
{"parent":null,"pid":46581,"argv":["/Users/savantdhindsa/.nvm/versions/node/v18.12.1/bin/node","/Users/savantdhindsa/git/hof/node_modules/.bin/_mocha","test/**/*.spec.js","sandbox/test/**/*.spec.js"],"execArgv":[],"cwd":"/Users/savantdhindsa/git/hof","time":1698230735025,"ppid":46580,"coverageFilename":"/Users/savantdhindsa/git/hof/.nyc_output/b841d018-49f0-462a-8e8f-acb3d722cd3b.json","externalId":"","uuid":"b841d018-49f0-462a-8e8f-acb3d722cd3b","files":["/Users/savantdhindsa/git/hof/model/index.js","/Users/savantdhindsa/git/hof/components/index.js","/Users/savantdhindsa/git/hof/components/address-lookup/index.js","/Users/savantdhindsa/git/hof/components/address-lookup/default-model.js","/Users/savantdhindsa/git/hof/components/address-lookup/defaults.js","/Users/savantdhindsa/git/hof/components/clear-session/index.js","/Users/savantdhindsa/git/hof/components/combine-and-loop-fields/index.js","/Users/savantdhindsa/git/hof/components/date/index.js","/Users/savantdhindsa/git/hof/components/date/fields.js","/Users/savantdhindsa/git/hof/components/emailer/index.js","/Users/savantdhindsa/git/hof/components/emailer/email-service.js","/Users/savantdhindsa/git/hof/components/emailer/emailer.js","/Users/savantdhindsa/git/hof/components/emailer/transports/index.js","/Users/savantdhindsa/git/hof/components/emailer/transports/smtp.js","/Users/savantdhindsa/git/hof/components/emailer/transports/ses.js","/Users/savantdhindsa/git/hof/components/emailer/transports/stub.js","/Users/savantdhindsa/git/hof/components/emailer/transports/debug.js","/Users/savantdhindsa/git/hof/components/homeoffice-countries/index.js","/Users/savantdhindsa/git/hof/config/component-defaults.js","/Users/savantdhindsa/git/hof/components/notify/index.js","/Users/savantdhindsa/git/hof/components/notify/notify.js","/Users/savantdhindsa/git/hof/components/summary/index.js","/Users/savantdhindsa/git/hof/config/rate-limits.js","/Users/savantdhindsa/git/hof/middleware/rate-limiter.js","/Users/savantdhindsa/git/hof/config/hof-defaults.js","/Users/savantdhindsa/git/hof/controller/base-controller.js","/Users/savantdhindsa/git/hof/controller/formatting/index.js","/Users/savantdhindsa/git/hof/controller/validation/index.js","/Users/savantdhindsa/git/hof/controller/validation/validators.js","/Users/savantdhindsa/git/hof/controller/validation/email.js","/Users/savantdhindsa/git/hof/controller/validation-error.js","/Users/savantdhindsa/git/hof/utilities/index.js","/Users/savantdhindsa/git/hof/utilities/autofill/index.js","/Users/savantdhindsa/git/hof/utilities/autofill/inputs.js","/Users/savantdhindsa/git/hof/utilities/test-data/index.js","/Users/savantdhindsa/git/hof/utilities/countries.js","/Users/savantdhindsa/git/hof/utilities/helpers/index.js","/Users/savantdhindsa/git/hof/utilities/reqres/index.js","/Users/savantdhindsa/git/hof/config/sanitisation-rules.js","/Users/savantdhindsa/git/hof/controller/formatting/formatters.js","/Users/savantdhindsa/git/hof/controller/index.js","/Users/savantdhindsa/git/hof/controller/behaviour-session.js","/Users/savantdhindsa/git/hof/controller/behaviour-hooks.js","/Users/savantdhindsa/git/hof/controller/controller.js","/Users/savantdhindsa/git/hof/sandbox/apps/sandbox/behaviours/country-select.js","/Users/savantdhindsa/git/hof/frontend/template-mixins/mixins/index.js","/Users/savantdhindsa/git/hof/frontend/template-mixins/mixins/template-mixins.js","/Users/savantdhindsa/git/hof/frontend/template-mixins/mixins/render.js","/Users/savantdhindsa/git/hof/frontend/template-mixins/mixins/helpers.js","/Users/savantdhindsa/git/hof/index.js","/Users/savantdhindsa/git/hof/frontend/index.js","/Users/savantdhindsa/git/hof/frontend/govuk-template/index.js","/Users/savantdhindsa/git/hof/frontend/govuk-template/build/index.js","/Users/savantdhindsa/git/hof/frontend/govuk-template/build/config.js","/Users/savantdhindsa/git/hof/frontend/template-partials/index.js","/Users/savantdhindsa/git/hof/frontend/template-partials/translations/index.js","/Users/savantdhindsa/git/hof/frontend/themes/index.js","/Users/savantdhindsa/git/hof/frontend/themes/gov-uk/index.js","/Users/savantdhindsa/git/hof/frontend/toolkit/index.js","/Users/savantdhindsa/git/hof/frontend/toolkit/assets/javascript/helpers.js","/Users/savantdhindsa/git/hof/frontend/toolkit/assets/javascript/form-focus.js","/Users/savantdhindsa/git/hof/frontend/toolkit/assets/javascript/progressive-reveal.js","/Users/savantdhindsa/git/hof/frontend/toolkit/assets/javascript/validation.js","/Users/savantdhindsa/git/hof/frontend/toolkit/assets/javascript/character-count.js","/Users/savantdhindsa/git/hof/middleware/index.js","/Users/savantdhindsa/git/hof/middleware/cookies.js","/Users/savantdhindsa/git/hof/middleware/errors.js","/Users/savantdhindsa/git/hof/middleware/not-found.js","/Users/savantdhindsa/git/hof/middleware/deep-translate.js","/Users/savantdhindsa/git/hof/lib/markdown.js","/Users/savantdhindsa/git/hof/lib/router.js","/Users/savantdhindsa/git/hof/wizard/index.js","/Users/savantdhindsa/git/hof/wizard/behaviours/index.js","/Users/savantdhindsa/git/hof/wizard/behaviours/complete.js","/Users/savantdhindsa/git/hof/wizard/util/constants.js","/Users/savantdhindsa/git/hof/lib/helpers.js","/Users/savantdhindsa/git/hof/lib/health.js","/Users/savantdhindsa/git/hof/lib/serve-static.js","/Users/savantdhindsa/git/hof/lib/ga-tag.js","/Users/savantdhindsa/git/hof/lib/sessions.js","/Users/savantdhindsa/git/hof/lib/settings.js","/Users/savantdhindsa/git/hof/lib/logger.js","/Users/savantdhindsa/git/hof/build/index.js","/Users/savantdhindsa/git/hof/config/builder-defaults.js","/Users/savantdhindsa/git/hof/transpiler/index.js","/Users/savantdhindsa/git/hof/transpiler/lib/compile.js","/Users/savantdhindsa/git/hof/transpiler/lib/build.js","/Users/savantdhindsa/git/hof/transpiler/lib/expand-dirs.js","/Users/savantdhindsa/git/hof/transpiler/lib/aggregate.js","/Users/savantdhindsa/git/hof/transpiler/lib/write-files.js","/Users/savantdhindsa/git/hof/model/apis/index.js","/Users/savantdhindsa/git/hof/model/apis/html-to-pdf-converter.js","/Users/savantdhindsa/git/hof/wizard/model.js","/Users/savantdhindsa/git/hof/wizard/middleware/back-links.js","/Users/savantdhindsa/git/hof/wizard/util/helpers.js","/Users/savantdhindsa/git/hof/wizard/middleware/check-complete.js","/Users/savantdhindsa/git/hof/wizard/middleware/check-progress.js","/Users/savantdhindsa/git/hof/wizard/middleware/check-session.js","/Users/savantdhindsa/git/hof/wizard/middleware/csrf.js","/Users/savantdhindsa/git/hof/sandbox/test/_unit/example_app/sections/summary-data-sections.spec.js","/Users/savantdhindsa/git/hof/sandbox/apps/sandbox/sections/summary-data-sections.js","/Users/savantdhindsa/git/hof/sandbox/apps/sandbox/lib/staticAppealStages.js","/Users/savantdhindsa/git/hof/sandbox/apps/sandbox/fields.js","/Users/savantdhindsa/git/hof/sandbox/test/helpers/utilities.js","/Users/savantdhindsa/git/hof/sandbox/apps/sandbox/behaviours/international-number.js","/Users/savantdhindsa/git/hof/lib/encryption.js","/Users/savantdhindsa/git/hof/wizard/middleware/session.js","/Users/savantdhindsa/git/hof/wizard/middleware/session-model.js"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"processes":{"b924df42-9cb6-4618-9a07-4f58f67ae28a":{"parent":null,"children":[]}},"files":{"/Users/chisomoguibe/Projects/hof/model/index.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/components/index.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/components/address-lookup/index.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/components/address-lookup/default-model.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/components/address-lookup/defaults.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/components/clear-session/index.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/components/combine-and-loop-fields/index.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/components/date/index.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/components/date/fields.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/components/emailer/index.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/components/emailer/email-service.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/components/emailer/emailer.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/components/emailer/transports/index.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/components/emailer/transports/smtp.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/components/emailer/transports/ses.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/components/emailer/transports/stub.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/components/emailer/transports/debug.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/components/homeoffice-countries/index.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/config/component-defaults.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/components/notify/index.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/components/notify/notify.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/components/summary/index.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/config/rate-limits.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/middleware/rate-limiter.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/config/hof-defaults.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/controller/base-controller.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/controller/formatting/index.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/controller/validation/index.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/controller/validation/validators.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/controller/validation/email.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/controller/validation-error.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/utilities/index.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/utilities/autofill/index.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/utilities/autofill/inputs.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/utilities/test-data/index.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/utilities/countries.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/utilities/helpers/index.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/utilities/reqres/index.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/config/sanitisation-rules.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/controller/formatting/formatters.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/controller/index.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/controller/behaviour-session.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/controller/behaviour-hooks.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/controller/controller.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/sandbox/apps/sandbox/behaviours/country-select.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/frontend/template-mixins/mixins/index.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/frontend/template-mixins/mixins/template-mixins.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/frontend/template-mixins/mixins/render.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/frontend/template-mixins/mixins/helpers.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/index.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/frontend/index.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/frontend/govuk-template/index.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/frontend/govuk-template/build/index.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/frontend/govuk-template/build/config.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/frontend/template-partials/index.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/frontend/template-partials/translations/index.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/frontend/themes/index.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/frontend/themes/gov-uk/index.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/frontend/toolkit/index.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/frontend/toolkit/assets/javascript/helpers.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/frontend/toolkit/assets/javascript/form-focus.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/frontend/toolkit/assets/javascript/progressive-reveal.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/frontend/toolkit/assets/javascript/validation.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/frontend/toolkit/assets/javascript/character-count.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/middleware/index.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/middleware/cookies.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/middleware/errors.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/middleware/not-found.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/middleware/deep-translate.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/lib/markdown.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/lib/router.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/wizard/index.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/wizard/behaviours/index.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/wizard/behaviours/complete.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/wizard/util/constants.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/lib/helpers.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/lib/health.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/lib/serve-static.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/lib/ga-tag.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/lib/sessions.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/lib/settings.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/lib/logger.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/build/index.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/config/builder-defaults.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/transpiler/index.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/transpiler/lib/compile.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/transpiler/lib/build.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/transpiler/lib/expand-dirs.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/transpiler/lib/aggregate.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/transpiler/lib/write-files.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/model/apis/index.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/model/apis/html-to-pdf-converter.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/wizard/model.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/wizard/middleware/back-links.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/wizard/util/helpers.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/wizard/middleware/check-complete.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/wizard/middleware/check-progress.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/wizard/middleware/check-session.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/wizard/middleware/csrf.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/sandbox/test/_unit/example_app/sections/summary-data-sections.spec.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/sandbox/apps/sandbox/sections/summary-data-sections.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/sandbox/apps/sandbox/lib/staticAppealStages.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/sandbox/apps/sandbox/fields.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/sandbox/test/helpers/utilities.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/sandbox/apps/sandbox/behaviours/international-number.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/lib/encryption.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/wizard/middleware/session.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"],"/Users/chisomoguibe/Projects/hof/wizard/middleware/session-model.js":["b924df42-9cb6-4618-9a07-4f58f67ae28a"]},"externalIds":{}}
|
1
|
+
{"processes":{"b841d018-49f0-462a-8e8f-acb3d722cd3b":{"parent":null,"children":[]}},"files":{"/Users/savantdhindsa/git/hof/model/index.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/components/index.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/components/address-lookup/index.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/components/address-lookup/default-model.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/components/address-lookup/defaults.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/components/clear-session/index.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/components/combine-and-loop-fields/index.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/components/date/index.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/components/date/fields.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/components/emailer/index.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/components/emailer/email-service.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/components/emailer/emailer.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/components/emailer/transports/index.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/components/emailer/transports/smtp.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/components/emailer/transports/ses.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/components/emailer/transports/stub.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/components/emailer/transports/debug.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/components/homeoffice-countries/index.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/config/component-defaults.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/components/notify/index.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/components/notify/notify.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/components/summary/index.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/config/rate-limits.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/middleware/rate-limiter.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/config/hof-defaults.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/controller/base-controller.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/controller/formatting/index.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/controller/validation/index.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/controller/validation/validators.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/controller/validation/email.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/controller/validation-error.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/utilities/index.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/utilities/autofill/index.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/utilities/autofill/inputs.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/utilities/test-data/index.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/utilities/countries.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/utilities/helpers/index.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/utilities/reqres/index.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/config/sanitisation-rules.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/controller/formatting/formatters.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/controller/index.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/controller/behaviour-session.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/controller/behaviour-hooks.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/controller/controller.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/sandbox/apps/sandbox/behaviours/country-select.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/frontend/template-mixins/mixins/index.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/frontend/template-mixins/mixins/template-mixins.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/frontend/template-mixins/mixins/render.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/frontend/template-mixins/mixins/helpers.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/index.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/frontend/index.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/frontend/govuk-template/index.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/frontend/govuk-template/build/index.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/frontend/govuk-template/build/config.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/frontend/template-partials/index.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/frontend/template-partials/translations/index.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/frontend/themes/index.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/frontend/themes/gov-uk/index.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/frontend/toolkit/index.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/frontend/toolkit/assets/javascript/helpers.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/frontend/toolkit/assets/javascript/form-focus.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/frontend/toolkit/assets/javascript/progressive-reveal.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/frontend/toolkit/assets/javascript/validation.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/frontend/toolkit/assets/javascript/character-count.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/middleware/index.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/middleware/cookies.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/middleware/errors.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/middleware/not-found.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/middleware/deep-translate.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/lib/markdown.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/lib/router.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/wizard/index.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/wizard/behaviours/index.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/wizard/behaviours/complete.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/wizard/util/constants.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/lib/helpers.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/lib/health.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/lib/serve-static.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/lib/ga-tag.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/lib/sessions.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/lib/settings.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/lib/logger.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/build/index.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/config/builder-defaults.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/transpiler/index.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/transpiler/lib/compile.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/transpiler/lib/build.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/transpiler/lib/expand-dirs.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/transpiler/lib/aggregate.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/transpiler/lib/write-files.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/model/apis/index.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/model/apis/html-to-pdf-converter.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/wizard/model.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/wizard/middleware/back-links.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/wizard/util/helpers.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/wizard/middleware/check-complete.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/wizard/middleware/check-progress.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/wizard/middleware/check-session.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/wizard/middleware/csrf.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/sandbox/test/_unit/example_app/sections/summary-data-sections.spec.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/sandbox/apps/sandbox/sections/summary-data-sections.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/sandbox/apps/sandbox/lib/staticAppealStages.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/sandbox/apps/sandbox/fields.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/sandbox/test/helpers/utilities.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/sandbox/apps/sandbox/behaviours/international-number.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/lib/encryption.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/wizard/middleware/session.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"],"/Users/savantdhindsa/git/hof/wizard/middleware/session-model.js":["b841d018-49f0-462a-8e8f-acb3d722cd3b"]},"externalIds":{}}
|
package/config/hof-defaults.js
CHANGED
@@ -26,11 +26,8 @@ const defaults = {
|
|
26
26
|
loglevel: process.env.LOG_LEVEL || 'info',
|
27
27
|
ignoreMiddlewareLogs: ['/healthz'],
|
28
28
|
redis: {
|
29
|
-
|
30
|
-
|
31
|
-
host: process.env.REDIS_HOST || '127.0.0.1'
|
32
|
-
},
|
33
|
-
legacyMode: true
|
29
|
+
port: process.env.REDIS_PORT || '6379',
|
30
|
+
host: process.env.REDIS_HOST || '127.0.0.1'
|
34
31
|
},
|
35
32
|
session: {
|
36
33
|
ttl: process.env.SESSION_TTL || 1800,
|
@@ -29,7 +29,7 @@
|
|
29
29
|
type="{{type}}"
|
30
30
|
name="{{key}}"
|
31
31
|
id="{{key}}-{{value}}"
|
32
|
-
value="{{value}}"
|
32
|
+
value="{{value}}"
|
33
33
|
{{#toggle}} data-toggle="{{toggle}}"{{/toggle}}
|
34
34
|
{{#selected}} checked="checked"{{/selected}}
|
35
35
|
{{^error}}{{#optionHint}} aria-describedby="{{key}}-{{value}}-hint"{{/optionHint}}{{^optionHint}}{{#hint}} aria-describedby="{{key}}-hint"{{/hint}}{{/optionHint}}{{/error}}
|
@@ -28,7 +28,7 @@
|
|
28
28
|
value="{{value}}"
|
29
29
|
{{#toggle}} data-toggle="{{toggle}}"{{/toggle}}
|
30
30
|
{{#selected}} checked="checked"{{/selected}}
|
31
|
-
{{^error}}{{#optionHint}} aria-describedby="{{key}}-{{value}}-item-hint"{{/optionHint}}{{^optionHint}}{{#hint}} aria-describedby="{{key}}-
|
31
|
+
{{^error}}{{#optionHint}} aria-describedby="{{key}}-{{value}}-item-hint"{{/optionHint}}{{^optionHint}}{{#hint}} aria-describedby="{{key}}-hint"{{/hint}}{{/optionHint}}{{/error}}
|
32
32
|
{{#error}} aria-describedby="{{key}}-error" aria-invalid="true"{{/error}}
|
33
33
|
>
|
34
34
|
<label class="govuk-label govuk-radios__label" for="{{key}}-{{value}}">
|
@@ -17,9 +17,11 @@
|
|
17
17
|
{{#renderChild}}{{/renderChild}}
|
18
18
|
<textarea name="{{id}}" id="{{id}}"
|
19
19
|
class="govuk-textarea {{#isMaxlengthOrMaxword}}govuk-js-character-count{{/isMaxlengthOrMaxword}} {{#className}}{{className}}{{/className}} {{#error}}govuk-input--error{{/error}}"
|
20
|
+
{{#isMaxlengthOrMaxword}}
|
20
21
|
aria-describedby="{{id}}-info"
|
21
|
-
{{
|
22
|
-
|
22
|
+
{{/isMaxlengthOrMaxword}}
|
23
|
+
{{#attributes}}
|
24
|
+
{{attribute}}="{{value}}"
|
23
25
|
{{/attributes}}
|
24
26
|
{{^error}}{{#hintId}}{{#maxlength}} aria-describedby="{{id}}-maxlength-hint {{hintId}}"{{/maxlength}}{{/hintId}}{{/error}}
|
25
27
|
{{^error}}{{#hintId}}{{^maxlength}} aria-describedby="{{hintId}}"{{/maxlength}}{{/hintId}}{{/error}}
|
@@ -19,7 +19,7 @@
|
|
19
19
|
<span class="govuk-phase-banner__text">This is a new service – your <a href="{{feedbackUrl}}{{^feedbackUrl}}https://eforms.homeoffice.gov.uk/outreach/feedback.ofml{{/feedbackUrl}}" class="govuk-link" id="feedback-link" target="_blank">feedback</a> will help us to improve it.</span>
|
20
20
|
</p>
|
21
21
|
</div>
|
22
|
-
{{/feedbackUrl}}
|
22
|
+
{{/feedbackUrl}}
|
23
23
|
<span id="step">
|
24
24
|
{{> partials-back}} <span>{{$step}}{{/step}}</span>
|
25
25
|
</span>
|
@@ -10,9 +10,9 @@
|
|
10
10
|
</div>
|
11
11
|
</div>
|
12
12
|
</div>
|
13
|
-
<div id="cookie-banner-actions" class="govuk-button-group">
|
13
|
+
<div id="cookie-banner-actions" class="govuk-button-group">
|
14
14
|
<button id="accept-cookies-button" class="gem-c-button govuk-button" type="submit" data-module="gem-track-click" data-accept-cookies="true" data-track-category="cookieBanner" data-track-action="Cookie banner accepted" data-cookie-types="all">Accept additional cookies</button>
|
15
|
-
|
15
|
+
|
16
16
|
<button id="reject-cookies-button" class="gem-c-button govuk-button" type="submit" data-module="gem-track-click" data-reject-cookies="true" data-track-category="cookieBanner" data-track-action="Cookie banner rejected">Reject additional cookies</button>
|
17
17
|
|
18
18
|
<a class="govuk-link" href="/cookies">View cookies</a>
|
package/lib/health.js
CHANGED
package/lib/sessions.js
CHANGED
@@ -25,11 +25,9 @@ module.exports = (options, rateLimitType) => {
|
|
25
25
|
}
|
26
26
|
|
27
27
|
const closeConnection = async err => {
|
28
|
-
await redisClient.
|
28
|
+
await redisClient.quit();
|
29
29
|
return next(err);
|
30
30
|
};
|
31
|
-
redisClient.on('error', err => logger.log('error', err));
|
32
|
-
await redisClient.connect();
|
33
31
|
|
34
32
|
try {
|
35
33
|
// fetch records of current user using IP address, returns null when no record is found
|
package/model/index.js
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
'use strict';
|
3
3
|
|
4
4
|
const _ = require('lodash');
|
5
|
-
const
|
5
|
+
const axios = require('axios').default;
|
6
6
|
const url = require('url');
|
7
7
|
const EventEmitter = require('events').EventEmitter;
|
8
8
|
|
@@ -27,7 +27,7 @@ module.exports = class Model extends EventEmitter {
|
|
27
27
|
this.set(attributes, {
|
28
28
|
silent: true
|
29
29
|
});
|
30
|
-
this._request =
|
30
|
+
this._request = axios;
|
31
31
|
}
|
32
32
|
|
33
33
|
save(options, callback) {
|
@@ -47,7 +47,6 @@ module.exports = class Model extends EventEmitter {
|
|
47
47
|
'Content-Type': 'application/json',
|
48
48
|
'Content-Length': Buffer.byteLength(data)
|
49
49
|
}, reqConf.headers || {});
|
50
|
-
|
51
50
|
return this.request(reqConf, data, callback);
|
52
51
|
});
|
53
52
|
}
|
@@ -91,25 +90,26 @@ module.exports = class Model extends EventEmitter {
|
|
91
90
|
callback = body;
|
92
91
|
body = undefined;
|
93
92
|
}
|
94
|
-
|
95
93
|
let settings = Object.assign({}, originalSettings);
|
96
94
|
settings.timeout = settings.timeout || this.options.timeout;
|
97
|
-
settings.
|
98
|
-
settings.
|
99
|
-
|
100
|
-
settings = _.omit(settings, urlKeys, 'data', 'url');
|
95
|
+
settings.url = settings.uri || settings.url || url.format(settings);
|
96
|
+
settings.data = settings.body || body || settings.data;
|
97
|
+
settings = _.omit(settings, urlKeys);
|
101
98
|
this.emit('sync', originalSettings);
|
102
99
|
|
103
100
|
const promise = Promise.resolve().then(() => this.auth()).then(authData => {
|
104
|
-
|
105
|
-
if (typeof
|
106
|
-
const auth =
|
107
|
-
|
101
|
+
let authVal = authData;
|
102
|
+
if (typeof authVal === 'string') {
|
103
|
+
const auth = authVal.split(':');
|
104
|
+
authVal = {
|
108
105
|
user: auth.shift(),
|
109
106
|
pass: auth.join(':'),
|
110
107
|
sendImmediately: true
|
111
108
|
};
|
112
109
|
}
|
110
|
+
if(authVal) {
|
111
|
+
settings.headers = Object.assign({}, settings.headers, {Authorization: `Bearer ${authVal.bearer}`});
|
112
|
+
}
|
113
113
|
})
|
114
114
|
.then(() => {
|
115
115
|
const startTime = process.hrtime();
|
@@ -124,7 +124,6 @@ module.exports = class Model extends EventEmitter {
|
|
124
124
|
|
125
125
|
const endTime = process.hrtime();
|
126
126
|
const responseTime = timeDiff(startTime, endTime);
|
127
|
-
|
128
127
|
if (err) {
|
129
128
|
this.emit('fail', err, data, originalSettings, statusCode, responseTime);
|
130
129
|
} else {
|
@@ -137,22 +136,22 @@ module.exports = class Model extends EventEmitter {
|
|
137
136
|
}
|
138
137
|
};
|
139
138
|
|
140
|
-
this._request(settings
|
141
|
-
|
139
|
+
this._request(settings)
|
140
|
+
.then(response => {
|
141
|
+
return this.handleResponse(response, (error, data, status) => {
|
142
|
+
if (error) {
|
143
|
+
error.headers = response.headers;
|
144
|
+
}
|
145
|
+
_callback(error, data, status);
|
146
|
+
});
|
147
|
+
}).catch(err => {
|
142
148
|
if (err.code === 'ETIMEDOUT' || err.code === 'ESOCKETTIMEDOUT') {
|
143
149
|
err.message = 'Connection timed out';
|
144
150
|
err.status = 504;
|
145
151
|
}
|
146
|
-
err.status = err.status ||
|
152
|
+
err.status = err.status || 503;
|
147
153
|
return _callback(err, null, err.status);
|
148
|
-
}
|
149
|
-
return this.handleResponse(response, (error, data, status) => {
|
150
|
-
if (error) {
|
151
|
-
error.headers = response.headers;
|
152
|
-
}
|
153
|
-
_callback(error, data, status);
|
154
154
|
});
|
155
|
-
});
|
156
155
|
});
|
157
156
|
});
|
158
157
|
|
@@ -165,13 +164,13 @@ module.exports = class Model extends EventEmitter {
|
|
165
164
|
handleResponse(response, callback) {
|
166
165
|
let data = {};
|
167
166
|
try {
|
168
|
-
data = JSON.parse(response.
|
167
|
+
data = typeof response.data === 'object' ? response.data : JSON.parse(response.data || '{}');
|
169
168
|
} catch (err) {
|
170
|
-
err.status = response.
|
171
|
-
err.body = response.
|
172
|
-
return callback(err, null, response.
|
169
|
+
err.status = response.status;
|
170
|
+
err.body = response.data;
|
171
|
+
return callback(err, null, response.status);
|
173
172
|
}
|
174
|
-
return this.parseResponse(response.
|
173
|
+
return this.parseResponse(response.status, data, callback);
|
175
174
|
}
|
176
175
|
|
177
176
|
parseResponse(statusCode, data, callback) {
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "hof",
|
3
3
|
"description": "A bootstrap for HOF projects",
|
4
|
-
"version": "
|
4
|
+
"version": "21.0.0-axios-beta",
|
5
5
|
"license": "MIT",
|
6
6
|
"main": "index.js",
|
7
7
|
"author": "HomeOffice",
|
@@ -32,10 +32,12 @@
|
|
32
32
|
"test:acceptance_browser": "ACCEPTANCE_WITH_BROWSER=true TAGS=\"${TAGS:=@feature}\" yarn run test:cucumber",
|
33
33
|
"test:cucumber": "cucumber-js -f @cucumber/pretty-formatter \"sandbox/test/_features/**/*.feature\" --require sandbox/test/_features/test.setup.js --require \"sandbox/test/_features/step_definitions/**/*.js\" --tags $TAGS",
|
34
34
|
"ci": "travis-conditions",
|
35
|
-
"postversion": "git push && git push --tags"
|
35
|
+
"postversion": "git push && git push --tags",
|
36
|
+
"test-single":"mocha"
|
36
37
|
},
|
37
38
|
"dependencies": {
|
38
39
|
"aliasify": "^2.1.0",
|
40
|
+
"axios": "^1.5.1",
|
39
41
|
"bluebird": "^3.7.2",
|
40
42
|
"body-parser": "^1.15.1",
|
41
43
|
"browserify": "^17.0.0",
|
@@ -80,9 +82,8 @@
|
|
80
82
|
"nodemailer-smtp-transport": "^2.7.4",
|
81
83
|
"nodemailer-stub-transport": "^1.1.0",
|
82
84
|
"notifications-node-client": "^6.0.0",
|
83
|
-
"redis": "^
|
85
|
+
"redis": "^3.1.2",
|
84
86
|
"reqres": "^3.0.1",
|
85
|
-
"request": "^2.79.0",
|
86
87
|
"rimraf": "^3.0.2",
|
87
88
|
"sass": "^1.56.2",
|
88
89
|
"serve-static": "^1.14.1",
|
@@ -16,9 +16,6 @@ module.exports = {
|
|
16
16
|
},
|
17
17
|
name: {
|
18
18
|
validate: ['required', 'notUrl', { type: 'maxlength', arguments: 200 }],
|
19
|
-
// need to remove this for the heading to go
|
20
|
-
labelClassName: ['govuk-label--l'],
|
21
|
-
isPageHeading: 'true'
|
22
19
|
},
|
23
20
|
'dateOfBirth': dateComponent('dateOfBirth', {
|
24
21
|
mixin: 'input-date',
|
@@ -70,8 +67,6 @@ module.exports = {
|
|
70
67
|
]
|
71
68
|
},
|
72
69
|
email: {
|
73
|
-
isPageHeading: 'true',
|
74
|
-
labelClassName: ['govuk-label--l'],
|
75
70
|
validate: ['required', 'email']
|
76
71
|
},
|
77
72
|
phone: {
|
@@ -114,7 +109,6 @@ module.exports = {
|
|
114
109
|
// apply the other default formatters
|
115
110
|
formatter: ['trim', 'hyphens'],
|
116
111
|
isPageHeading: 'true',
|
117
|
-
labelClassName: ['govuk-label--l'],
|
118
112
|
// attributes here are passed to the field element
|
119
113
|
validate: ['required', { type: 'maxword', arguments: 10 }],
|
120
114
|
attributes: [{
|
@@ -18,7 +18,7 @@
|
|
18
18
|
"label": "Full name"
|
19
19
|
},
|
20
20
|
"dateOfBirth": {
|
21
|
-
"legend": "
|
21
|
+
"legend": "What is your date of birth?",
|
22
22
|
"hint": "For example, 31 10 1990"
|
23
23
|
},
|
24
24
|
"building": {
|
@@ -29,8 +29,8 @@
|
|
29
29
|
},
|
30
30
|
"townOrCity": {
|
31
31
|
"label": "Town or city"
|
32
|
-
},
|
33
|
-
"postcode": {
|
32
|
+
},
|
33
|
+
"postcode": {
|
34
34
|
"label": "Postcode"
|
35
35
|
},
|
36
36
|
"incomeTypes" : {
|
@@ -66,8 +66,8 @@
|
|
66
66
|
},
|
67
67
|
"northernIreland": {
|
68
68
|
"label": "Northern Ireland"
|
69
|
-
}
|
70
|
-
}
|
69
|
+
}
|
70
|
+
}
|
71
71
|
},
|
72
72
|
"email" : {
|
73
73
|
"label": "Email address"
|
@@ -50,7 +50,7 @@
|
|
50
50
|
},
|
51
51
|
"confirmation": {
|
52
52
|
"title": "Application sent",
|
53
|
-
"alert": "Application sent",
|
53
|
+
"alert": "Application sent",
|
54
54
|
"subheader": "What happens next",
|
55
55
|
"content": "We’ll contact you with the decision of your application or if we need more information from you."
|
56
56
|
}
|
package/sandbox/config.js
CHANGED
@@ -2,7 +2,6 @@
|
|
2
2
|
|
3
3
|
/* eslint no-process-env: 0 */
|
4
4
|
module.exports = {
|
5
|
-
port: 8082,
|
6
5
|
email: {
|
7
6
|
caseworker: process.env.CASEWORKER_EMAIL || '',
|
8
7
|
from: process.env.FROM_ADDRESS || '',
|
@@ -13,6 +12,6 @@ module.exports = {
|
|
13
12
|
region: process.env.EMAIL_REGION || ''
|
14
13
|
},
|
15
14
|
hosts: {
|
16
|
-
acceptanceTests: process.env.ACCEPTANCE_HOST_NAME || `http://localhost:${process.env.PORT ||
|
15
|
+
acceptanceTests: process.env.ACCEPTANCE_HOST_NAME || `http://localhost:${process.env.PORT || 8080}`
|
17
16
|
}
|
18
17
|
};
|
package/sandbox/server.js
CHANGED
@@ -2,7 +2,6 @@
|
|
2
2
|
'use strict';
|
3
3
|
|
4
4
|
const bootstrap = require('../');
|
5
|
-
const config = require('./config')
|
6
5
|
|
7
6
|
bootstrap({
|
8
7
|
translations: './apps/sandbox/translations',
|
@@ -15,7 +14,5 @@ bootstrap({
|
|
15
14
|
}
|
16
15
|
},
|
17
16
|
getAccessibility: true,
|
18
|
-
"port":
|
17
|
+
"port": 8082
|
19
18
|
});
|
20
|
-
|
21
|
-
console.log(`Running on port ${config.port}`);
|
package/sandbox/yarn.lock
CHANGED
@@ -202,9 +202,9 @@ sass@^1.53.0:
|
|
202
202
|
source-map-js ">=0.6.2 <2.0.0"
|
203
203
|
|
204
204
|
semver@^5.7.1:
|
205
|
-
version "5.7.
|
206
|
-
resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.
|
207
|
-
integrity sha512-
|
205
|
+
version "5.7.2"
|
206
|
+
resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.2.tgz#48d55db737c3287cd4835e17fa13feace1c41ef8"
|
207
|
+
integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==
|
208
208
|
|
209
209
|
semver@~7.0.0:
|
210
210
|
version "7.0.0"
|