hof 21.0.0-axios-beta.3 → 21.0.0-axios-beta.5
Sign up to get free protection for your applications and to get access to all the features.
- package/.nyc_output/7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3.json +1 -0
- package/.nyc_output/processinfo/{436be523-b828-4eea-86b0-d3c7bbadd8e3.json → 7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3.json} +1 -1
- package/.nyc_output/processinfo/index.json +1 -1
- package/CHANGELOG.md +3 -0
- package/codeReviewChecklist.md +22 -0
- package/frontend/template-mixins/mixins/template-mixins.js +1 -0
- package/frontend/template-mixins/partials/forms/checkbox.html +5 -0
- package/frontend/template-mixins/partials/forms/input-text-group.html +1 -1
- package/frontend/template-mixins/partials/forms/select.html +6 -6
- package/frontend/template-mixins/partials/forms/textarea-group.html +1 -1
- package/model/apis/axios-settings.js +17 -5
- package/model/apis/html-to-pdf-converter.js +1 -0
- package/model/index.js +93 -79
- package/package.json +2 -3
- package/pull_request.md +16 -0
- package/sandbox/package.json +1 -1
- package/sandbox/public/css/app.css +10 -0
- package/sandbox/public/js/bundle.js +11872 -1154
- package/sandbox/yarn.lock +14 -9
- package/.nyc_output/436be523-b828-4eea-86b0-d3c7bbadd8e3.json +0 -1
@@ -1 +1 @@
|
|
1
|
-
{"parent":null,"pid":
|
1
|
+
{"parent":null,"pid":76016,"argv":["/Users/user/.nvm/versions/node/v20.9.0/bin/node","/Users/user/Documents/HO/HOF/hof/node_modules/.bin/_mocha","test/**/*.spec.js","sandbox/test/**/*.spec.js"],"execArgv":[],"cwd":"/Users/user/Documents/HO/HOF/hof","time":1720996464227,"ppid":76012,"coverageFilename":"/Users/user/Documents/HO/HOF/hof/.nyc_output/7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3.json","externalId":"","uuid":"7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3","files":["/Users/user/Documents/HO/HOF/hof/model/index.js","/Users/user/Documents/HO/HOF/hof/model/apis/axios-settings.js","/Users/user/Documents/HO/HOF/hof/components/index.js","/Users/user/Documents/HO/HOF/hof/components/address-lookup/index.js","/Users/user/Documents/HO/HOF/hof/components/address-lookup/default-model.js","/Users/user/Documents/HO/HOF/hof/components/address-lookup/defaults.js","/Users/user/Documents/HO/HOF/hof/components/clear-session/index.js","/Users/user/Documents/HO/HOF/hof/components/combine-and-loop-fields/index.js","/Users/user/Documents/HO/HOF/hof/components/date/index.js","/Users/user/Documents/HO/HOF/hof/components/date/fields.js","/Users/user/Documents/HO/HOF/hof/components/emailer/index.js","/Users/user/Documents/HO/HOF/hof/components/emailer/email-service.js","/Users/user/Documents/HO/HOF/hof/components/emailer/emailer.js","/Users/user/Documents/HO/HOF/hof/components/emailer/transports/index.js","/Users/user/Documents/HO/HOF/hof/components/emailer/transports/smtp.js","/Users/user/Documents/HO/HOF/hof/components/emailer/transports/ses.js","/Users/user/Documents/HO/HOF/hof/components/emailer/transports/stub.js","/Users/user/Documents/HO/HOF/hof/components/emailer/transports/debug.js","/Users/user/Documents/HO/HOF/hof/components/homeoffice-countries/index.js","/Users/user/Documents/HO/HOF/hof/config/component-defaults.js","/Users/user/Documents/HO/HOF/hof/components/notify/index.js","/Users/user/Documents/HO/HOF/hof/components/notify/notify.js","/Users/user/Documents/HO/HOF/hof/components/summary/index.js","/Users/user/Documents/HO/HOF/hof/config/rate-limits.js","/Users/user/Documents/HO/HOF/hof/middleware/rate-limiter.js","/Users/user/Documents/HO/HOF/hof/config/hof-defaults.js","/Users/user/Documents/HO/HOF/hof/controller/base-controller.js","/Users/user/Documents/HO/HOF/hof/controller/formatting/index.js","/Users/user/Documents/HO/HOF/hof/controller/validation/index.js","/Users/user/Documents/HO/HOF/hof/controller/validation/validators.js","/Users/user/Documents/HO/HOF/hof/controller/validation/email.js","/Users/user/Documents/HO/HOF/hof/controller/validation-error.js","/Users/user/Documents/HO/HOF/hof/utilities/index.js","/Users/user/Documents/HO/HOF/hof/utilities/autofill/index.js","/Users/user/Documents/HO/HOF/hof/utilities/autofill/inputs.js","/Users/user/Documents/HO/HOF/hof/utilities/test-data/index.js","/Users/user/Documents/HO/HOF/hof/utilities/countries.js","/Users/user/Documents/HO/HOF/hof/utilities/helpers/index.js","/Users/user/Documents/HO/HOF/hof/utilities/reqres/index.js","/Users/user/Documents/HO/HOF/hof/config/sanitisation-rules.js","/Users/user/Documents/HO/HOF/hof/controller/formatting/formatters.js","/Users/user/Documents/HO/HOF/hof/controller/index.js","/Users/user/Documents/HO/HOF/hof/controller/behaviour-session.js","/Users/user/Documents/HO/HOF/hof/controller/behaviour-hooks.js","/Users/user/Documents/HO/HOF/hof/controller/controller.js","/Users/user/Documents/HO/HOF/hof/sandbox/apps/sandbox/behaviours/country-select.js","/Users/user/Documents/HO/HOF/hof/frontend/template-mixins/mixins/index.js","/Users/user/Documents/HO/HOF/hof/frontend/template-mixins/mixins/template-mixins.js","/Users/user/Documents/HO/HOF/hof/frontend/template-mixins/mixins/render.js","/Users/user/Documents/HO/HOF/hof/frontend/template-mixins/mixins/helpers.js","/Users/user/Documents/HO/HOF/hof/index.js","/Users/user/Documents/HO/HOF/hof/frontend/index.js","/Users/user/Documents/HO/HOF/hof/frontend/govuk-template/index.js","/Users/user/Documents/HO/HOF/hof/frontend/govuk-template/build/index.js","/Users/user/Documents/HO/HOF/hof/frontend/govuk-template/build/config.js","/Users/user/Documents/HO/HOF/hof/frontend/template-partials/index.js","/Users/user/Documents/HO/HOF/hof/frontend/template-partials/translations/index.js","/Users/user/Documents/HO/HOF/hof/frontend/themes/index.js","/Users/user/Documents/HO/HOF/hof/frontend/themes/gov-uk/index.js","/Users/user/Documents/HO/HOF/hof/frontend/toolkit/index.js","/Users/user/Documents/HO/HOF/hof/frontend/toolkit/assets/javascript/helpers.js","/Users/user/Documents/HO/HOF/hof/frontend/toolkit/assets/javascript/form-focus.js","/Users/user/Documents/HO/HOF/hof/frontend/toolkit/assets/javascript/progressive-reveal.js","/Users/user/Documents/HO/HOF/hof/frontend/toolkit/assets/javascript/validation.js","/Users/user/Documents/HO/HOF/hof/frontend/toolkit/assets/javascript/character-count.js","/Users/user/Documents/HO/HOF/hof/middleware/index.js","/Users/user/Documents/HO/HOF/hof/middleware/cookies.js","/Users/user/Documents/HO/HOF/hof/middleware/errors.js","/Users/user/Documents/HO/HOF/hof/middleware/not-found.js","/Users/user/Documents/HO/HOF/hof/middleware/deep-translate.js","/Users/user/Documents/HO/HOF/hof/lib/markdown.js","/Users/user/Documents/HO/HOF/hof/lib/router.js","/Users/user/Documents/HO/HOF/hof/wizard/index.js","/Users/user/Documents/HO/HOF/hof/wizard/behaviours/index.js","/Users/user/Documents/HO/HOF/hof/wizard/behaviours/complete.js","/Users/user/Documents/HO/HOF/hof/wizard/util/constants.js","/Users/user/Documents/HO/HOF/hof/lib/helpers.js","/Users/user/Documents/HO/HOF/hof/lib/health.js","/Users/user/Documents/HO/HOF/hof/lib/serve-static.js","/Users/user/Documents/HO/HOF/hof/lib/ga-tag.js","/Users/user/Documents/HO/HOF/hof/lib/sessions.js","/Users/user/Documents/HO/HOF/hof/lib/settings.js","/Users/user/Documents/HO/HOF/hof/lib/logger.js","/Users/user/Documents/HO/HOF/hof/build/index.js","/Users/user/Documents/HO/HOF/hof/config/builder-defaults.js","/Users/user/Documents/HO/HOF/hof/transpiler/index.js","/Users/user/Documents/HO/HOF/hof/transpiler/lib/compile.js","/Users/user/Documents/HO/HOF/hof/transpiler/lib/build.js","/Users/user/Documents/HO/HOF/hof/transpiler/lib/expand-dirs.js","/Users/user/Documents/HO/HOF/hof/transpiler/lib/aggregate.js","/Users/user/Documents/HO/HOF/hof/transpiler/lib/write-files.js","/Users/user/Documents/HO/HOF/hof/model/apis/index.js","/Users/user/Documents/HO/HOF/hof/model/apis/html-to-pdf-converter.js","/Users/user/Documents/HO/HOF/hof/wizard/model.js","/Users/user/Documents/HO/HOF/hof/wizard/middleware/back-links.js","/Users/user/Documents/HO/HOF/hof/wizard/util/helpers.js","/Users/user/Documents/HO/HOF/hof/wizard/middleware/check-complete.js","/Users/user/Documents/HO/HOF/hof/wizard/middleware/check-progress.js","/Users/user/Documents/HO/HOF/hof/wizard/middleware/check-session.js","/Users/user/Documents/HO/HOF/hof/wizard/middleware/csrf.js","/Users/user/Documents/HO/HOF/hof/sandbox/test/_unit/example_app/sections/summary-data-sections.spec.js","/Users/user/Documents/HO/HOF/hof/sandbox/apps/sandbox/sections/summary-data-sections.js","/Users/user/Documents/HO/HOF/hof/sandbox/apps/sandbox/lib/staticAppealStages.js","/Users/user/Documents/HO/HOF/hof/sandbox/apps/sandbox/fields.js","/Users/user/Documents/HO/HOF/hof/sandbox/test/helpers/utilities.js"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"processes":{"436be523-b828-4eea-86b0-d3c7bbadd8e3":{"parent":null,"children":[]}},"files":{"/Users/user/Documents/HO/HOF/hof/model/index.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/model/apis/axios-settings.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/components/index.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/components/address-lookup/index.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/components/address-lookup/default-model.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/components/address-lookup/defaults.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/components/clear-session/index.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/components/combine-and-loop-fields/index.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/components/date/index.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/components/date/fields.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/components/emailer/index.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/components/emailer/email-service.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/components/emailer/emailer.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/components/emailer/transports/index.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/components/emailer/transports/smtp.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/components/emailer/transports/ses.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/components/emailer/transports/stub.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/components/emailer/transports/debug.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/components/homeoffice-countries/index.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/config/component-defaults.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/components/notify/index.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/components/notify/notify.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/components/summary/index.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/config/rate-limits.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/middleware/rate-limiter.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/config/hof-defaults.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/controller/base-controller.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/controller/formatting/index.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/controller/validation/index.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/controller/validation/validators.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/controller/validation/email.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/controller/validation-error.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/utilities/index.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/utilities/autofill/index.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/utilities/autofill/inputs.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/utilities/test-data/index.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/utilities/countries.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/utilities/helpers/index.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/utilities/reqres/index.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/config/sanitisation-rules.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/controller/formatting/formatters.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/controller/index.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/controller/behaviour-session.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/controller/behaviour-hooks.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/controller/controller.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/sandbox/apps/sandbox/behaviours/country-select.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/frontend/template-mixins/mixins/index.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/frontend/template-mixins/mixins/template-mixins.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/frontend/template-mixins/mixins/render.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/frontend/template-mixins/mixins/helpers.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/index.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/frontend/index.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/frontend/govuk-template/index.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/frontend/govuk-template/build/index.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/frontend/govuk-template/build/config.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/frontend/template-partials/index.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/frontend/template-partials/translations/index.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/frontend/themes/index.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/frontend/themes/gov-uk/index.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/frontend/toolkit/index.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/frontend/toolkit/assets/javascript/helpers.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/frontend/toolkit/assets/javascript/form-focus.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/frontend/toolkit/assets/javascript/progressive-reveal.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/frontend/toolkit/assets/javascript/validation.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/frontend/toolkit/assets/javascript/character-count.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/middleware/index.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/middleware/cookies.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/middleware/errors.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/middleware/not-found.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/middleware/deep-translate.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/lib/markdown.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/lib/router.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/wizard/index.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/wizard/behaviours/index.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/wizard/behaviours/complete.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/wizard/util/constants.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/lib/helpers.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/lib/health.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/lib/serve-static.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/lib/ga-tag.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/lib/sessions.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/lib/settings.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/lib/logger.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/build/index.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/config/builder-defaults.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/transpiler/index.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/transpiler/lib/compile.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/transpiler/lib/build.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/transpiler/lib/expand-dirs.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/transpiler/lib/aggregate.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/transpiler/lib/write-files.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/model/apis/index.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/model/apis/html-to-pdf-converter.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/wizard/model.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/wizard/middleware/back-links.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/wizard/util/helpers.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/wizard/middleware/check-complete.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/wizard/middleware/check-progress.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/wizard/middleware/check-session.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/wizard/middleware/csrf.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/sandbox/test/_unit/example_app/sections/summary-data-sections.spec.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/sandbox/apps/sandbox/sections/summary-data-sections.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/sandbox/apps/sandbox/lib/staticAppealStages.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/sandbox/apps/sandbox/fields.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/sandbox/test/helpers/utilities.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/sandbox/apps/sandbox/behaviours/international-number.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/lib/encryption.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/wizard/middleware/session.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"],"/Users/user/Documents/HO/HOF/hof/wizard/middleware/session-model.js":["436be523-b828-4eea-86b0-d3c7bbadd8e3"]},"externalIds":{}}
|
1
|
+
{"processes":{"7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3":{"parent":null,"children":[]}},"files":{"/Users/user/Documents/HO/HOF/hof/model/index.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/model/apis/axios-settings.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/components/index.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/components/address-lookup/index.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/components/address-lookup/default-model.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/components/address-lookup/defaults.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/components/clear-session/index.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/components/combine-and-loop-fields/index.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/components/date/index.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/components/date/fields.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/components/emailer/index.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/components/emailer/email-service.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/components/emailer/emailer.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/components/emailer/transports/index.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/components/emailer/transports/smtp.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/components/emailer/transports/ses.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/components/emailer/transports/stub.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/components/emailer/transports/debug.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/components/homeoffice-countries/index.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/config/component-defaults.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/components/notify/index.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/components/notify/notify.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/components/summary/index.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/config/rate-limits.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/middleware/rate-limiter.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/config/hof-defaults.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/controller/base-controller.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/controller/formatting/index.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/controller/validation/index.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/controller/validation/validators.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/controller/validation/email.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/controller/validation-error.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/utilities/index.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/utilities/autofill/index.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/utilities/autofill/inputs.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/utilities/test-data/index.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/utilities/countries.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/utilities/helpers/index.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/utilities/reqres/index.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/config/sanitisation-rules.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/controller/formatting/formatters.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/controller/index.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/controller/behaviour-session.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/controller/behaviour-hooks.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/controller/controller.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/sandbox/apps/sandbox/behaviours/country-select.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/frontend/template-mixins/mixins/index.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/frontend/template-mixins/mixins/template-mixins.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/frontend/template-mixins/mixins/render.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/frontend/template-mixins/mixins/helpers.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/index.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/frontend/index.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/frontend/govuk-template/index.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/frontend/govuk-template/build/index.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/frontend/govuk-template/build/config.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/frontend/template-partials/index.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/frontend/template-partials/translations/index.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/frontend/themes/index.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/frontend/themes/gov-uk/index.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/frontend/toolkit/index.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/frontend/toolkit/assets/javascript/helpers.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/frontend/toolkit/assets/javascript/form-focus.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/frontend/toolkit/assets/javascript/progressive-reveal.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/frontend/toolkit/assets/javascript/validation.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/frontend/toolkit/assets/javascript/character-count.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/middleware/index.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/middleware/cookies.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/middleware/errors.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/middleware/not-found.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/middleware/deep-translate.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/lib/markdown.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/lib/router.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/wizard/index.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/wizard/behaviours/index.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/wizard/behaviours/complete.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/wizard/util/constants.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/lib/helpers.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/lib/health.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/lib/serve-static.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/lib/ga-tag.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/lib/sessions.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/lib/settings.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/lib/logger.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/build/index.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/config/builder-defaults.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/transpiler/index.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/transpiler/lib/compile.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/transpiler/lib/build.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/transpiler/lib/expand-dirs.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/transpiler/lib/aggregate.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/transpiler/lib/write-files.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/model/apis/index.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/model/apis/html-to-pdf-converter.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/wizard/model.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/wizard/middleware/back-links.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/wizard/util/helpers.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/wizard/middleware/check-complete.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/wizard/middleware/check-progress.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/wizard/middleware/check-session.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/wizard/middleware/csrf.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/sandbox/test/_unit/example_app/sections/summary-data-sections.spec.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/sandbox/apps/sandbox/sections/summary-data-sections.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/sandbox/apps/sandbox/lib/staticAppealStages.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/sandbox/apps/sandbox/fields.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"],"/Users/user/Documents/HO/HOF/hof/sandbox/test/helpers/utilities.js":["7deb72dc-c10e-4230-8d51-4c9aaf4c6fb3"]},"externalIds":{}}
|
package/CHANGELOG.md
CHANGED
@@ -0,0 +1,22 @@
|
|
1
|
+
# HOF code review checklist v1.0
|
2
|
+
|
3
|
+
This is a general guide on what you should check for when reviewing another team member's code.
|
4
|
+
|
5
|
+
## Fundamental checks
|
6
|
+
- [ ] Check for code format
|
7
|
+
- [ ] Check for duplicate code
|
8
|
+
- [ ] Check for if there are existing components in the framework already
|
9
|
+
- [ ] Check for copy and paste
|
10
|
+
- [ ] Check code readability (if the class, function and variable names are making sense, avoid using acronyms, check for simplicity, avoid complexity)
|
11
|
+
- [ ] Check if user inputs are sanitized
|
12
|
+
- [ ] Check if errors are handled
|
13
|
+
- [ ] Check if null / undefined values are checked before actions are performed on a variable (May not always be necessary)
|
14
|
+
- [ ] Check for performance (are there logic in loops that doesn't have to be executed each time? Could some tasks be added to a queue and performed later? etc)
|
15
|
+
|
16
|
+
## Advanced (optional if the ticket is low / medium impact) checks
|
17
|
+
- [ ] Check if the code is following SOLID principle, code maintainability
|
18
|
+
- [ ] Check if none functional requirements are needed (for example, should an audit log be stored for an action performed)
|
19
|
+
- [ ] Check the performance and efficiency of the tests
|
20
|
+
- [ ] Check to avoid the use of operations that only work in javascript (e.g. using && to return the object on the right if the statement on the left is true)
|
21
|
+
|
22
|
+
|
@@ -319,6 +319,7 @@ module.exports = function (options) {
|
|
319
319
|
error: this.errors && this.errors[key],
|
320
320
|
invalid: this.errors && this.errors[key] && opts.required,
|
321
321
|
label: t(fieldLabel || 'fields.' + key + '.label'),
|
322
|
+
hint: conditionalTranslate(getTranslationKey(field, key, 'hint')),
|
322
323
|
selected: selected,
|
323
324
|
className: classNames(field) || 'govuk-label govuk-checkboxes__label',
|
324
325
|
child: field.child,
|
@@ -6,6 +6,11 @@
|
|
6
6
|
{{{label}}}
|
7
7
|
{{#error}}<span class="visuallyhidden">{{error.message}}</span>{{/error}}
|
8
8
|
</label>
|
9
|
+
{{#hint}}
|
10
|
+
<div id="{{key}}-hint" class="govuk-hint govuk-checkboxes__hint">
|
11
|
+
{{hint}}
|
12
|
+
</div>
|
13
|
+
{{/hint}}
|
9
14
|
</div>
|
10
15
|
{{#renderChild}}{{/renderChild}}
|
11
16
|
</div>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<div id="{{id}}-group" class="{{#compound}} form-group-compound{{/compound}}{{#formGroupClassName}}{{formGroupClassName}}{{/formGroupClassName}}{{#error}} govuk-form-group--error{{/error}}">
|
2
|
-
{{#isPageHeading}}<h1 class="govuk-label-wrapper">{{/isPageHeading}}<label for="{{id}}" class="{{labelClassName}}{{#isPageHeading}}govuk-label--l{{/isPageHeading}}">
|
2
|
+
{{#isPageHeading}}<h1 class="govuk-label-wrapper">{{/isPageHeading}}<label for="{{id}}" class="{{labelClassName}} {{#isPageHeading}}govuk-label--l{{/isPageHeading}}">
|
3
3
|
{{{label}}}
|
4
4
|
</label>
|
5
5
|
{{#isPageHeading}}</h1>{{/isPageHeading}}
|
@@ -1,14 +1,14 @@
|
|
1
1
|
<div id="{{id}}-group" class="{{#compound}} form-group-compound{{/compound}}{{#formGroupClassName}} {{formGroupClassName}}{{/formGroupClassName}}{{#error}} govuk-form-group--error{{/error}}">
|
2
2
|
{{#isPageHeading}}<h1 class="govuk-label-wrapper">{{/isPageHeading}}<label for="{{id}}" class="{{labelClassName}}{{#isPageHeading}}govuk-label--l{{/isPageHeading}}">
|
3
3
|
{{{label}}}
|
4
|
-
{{#hint}}<span {{$hintId}}id="{{hintId}}" {{/hintId}}class="govuk-hint">{{hint}}</span>{{/hint}}
|
5
|
-
{{#error}}
|
6
|
-
<p class="govuk-error-message">
|
7
|
-
<span class="govuk-visually-hidden">Error:</span> {{error.message}}
|
8
|
-
</p>
|
9
|
-
{{/error}}
|
10
4
|
</label>
|
11
5
|
{{#isPageHeading}}</h1>{{/isPageHeading}}
|
6
|
+
{{#hint}}<div {{$hintId}}id="{{hintId}}" {{/hintId}}class="govuk-hint">{{hint}}</div>{{/hint}}
|
7
|
+
{{#error}}
|
8
|
+
<p class="govuk-error-message">
|
9
|
+
<span class="govuk-visually-hidden">Error:</span> {{error.message}}
|
10
|
+
</p>
|
11
|
+
{{/error}}
|
12
12
|
<select id="{{id}}" class="govuk-select{{#className}} {{className}}{{/className}}{{#error}} govuk-select--error{{/error}}" name="{{id}}" aria-required="{{required}}">
|
13
13
|
{{#options}}
|
14
14
|
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{label}}</option>
|
@@ -4,7 +4,7 @@
|
|
4
4
|
<div id="{{id}}-group" class="govuk-form-group {{#formGroupClassName}}{{formGroupClassName}}{{/formGroupClassName}}{{#error}} govuk-form-group--error{{/error}}">
|
5
5
|
{{#isPageHeading}}<h1 class="govuk-label-wrapper">{{/isPageHeading}}
|
6
6
|
<label for="{{id}}"
|
7
|
-
class="{{labelClassName}}{{#isPageHeading}}govuk-label--l{{/isPageHeading}}">
|
7
|
+
class="{{labelClassName}} {{#isPageHeading}}govuk-label--l{{/isPageHeading}}">
|
8
8
|
{{{label}}}
|
9
9
|
{{#error}}
|
10
10
|
<p id="{{id}}-error" class="govuk-error-message">
|
@@ -1,9 +1,21 @@
|
|
1
1
|
'use strict';
|
2
|
-
const
|
2
|
+
const { format } = require('url'); // Destructure 'format' from 'url' module
|
3
3
|
|
4
|
-
module.exports = (settings, body) => {
|
5
|
-
|
6
|
-
|
7
|
-
|
4
|
+
module.exports = (settings = {}, body = null) => {
|
5
|
+
if (typeof settings !== 'object' || settings === null) {
|
6
|
+
throw new TypeError('settings must be a non-null object');
|
7
|
+
}
|
8
|
+
|
9
|
+
const {
|
10
|
+
uri,
|
11
|
+
url,
|
12
|
+
body: settingsBody,
|
13
|
+
data: settingsData,
|
14
|
+
...restSettings
|
15
|
+
} = settings;
|
16
|
+
|
17
|
+
return Object.assign({}, restSettings, {
|
18
|
+
url: uri || url || format(settings),
|
19
|
+
data: settingsBody || body || settingsData
|
8
20
|
});
|
9
21
|
};
|
package/model/index.js
CHANGED
@@ -5,9 +5,7 @@ const _ = require('lodash');
|
|
5
5
|
const axios = require('axios').default;
|
6
6
|
const url = require('url');
|
7
7
|
const EventEmitter = require('events').EventEmitter;
|
8
|
-
|
9
8
|
const axiosSetting = require('./apis/axios-settings');
|
10
|
-
|
11
9
|
const REFERENCE = /^\$ref:/;
|
12
10
|
|
13
11
|
function timeDiff(from, to, d) {
|
@@ -32,7 +30,7 @@ module.exports = class Model extends EventEmitter {
|
|
32
30
|
this._request = axios;
|
33
31
|
}
|
34
32
|
|
35
|
-
save(options, callback) {
|
33
|
+
async save(options, callback) {
|
36
34
|
if (typeof options === 'function' && arguments.length === 1) {
|
37
35
|
callback = options;
|
38
36
|
options = {};
|
@@ -40,20 +38,18 @@ module.exports = class Model extends EventEmitter {
|
|
40
38
|
options = {};
|
41
39
|
}
|
42
40
|
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
return this.request(reqConf, data, callback);
|
53
|
-
});
|
41
|
+
let data = await this.prepare();
|
42
|
+
data = JSON.stringify(data);
|
43
|
+
const reqConf = this.requestConfig(options);
|
44
|
+
reqConf.method = options.method || 'POST';
|
45
|
+
reqConf.headers = Object.assign({
|
46
|
+
'Content-Type': 'application/json',
|
47
|
+
'Content-Length': Buffer.byteLength(data)
|
48
|
+
}, reqConf.headers || {});
|
49
|
+
return await this.request(reqConf, data, callback);
|
54
50
|
}
|
55
51
|
|
56
|
-
fetch(options, callback) {
|
52
|
+
async fetch(options, callback) {
|
57
53
|
if (typeof options === 'function' && arguments.length === 1) {
|
58
54
|
callback = options;
|
59
55
|
options = {};
|
@@ -62,10 +58,10 @@ module.exports = class Model extends EventEmitter {
|
|
62
58
|
}
|
63
59
|
const reqConf = this.requestConfig(options);
|
64
60
|
reqConf.method = options.method || 'GET';
|
65
|
-
return this.request(reqConf, callback);
|
61
|
+
return await this.request(reqConf, callback);
|
66
62
|
}
|
67
63
|
|
68
|
-
delete(options, callback) {
|
64
|
+
async delete(options, callback) {
|
69
65
|
if (typeof options === 'function' && arguments.length === 1) {
|
70
66
|
callback = options;
|
71
67
|
options = {};
|
@@ -74,7 +70,7 @@ module.exports = class Model extends EventEmitter {
|
|
74
70
|
}
|
75
71
|
const reqConf = this.requestConfig(options);
|
76
72
|
reqConf.method = options.method || 'DELETE';
|
77
|
-
return this.request(reqConf, callback);
|
73
|
+
return await this.request(reqConf, callback);
|
78
74
|
}
|
79
75
|
|
80
76
|
requestConfig(options) {
|
@@ -87,7 +83,7 @@ module.exports = class Model extends EventEmitter {
|
|
87
83
|
});
|
88
84
|
}
|
89
85
|
|
90
|
-
request(originalSettings, body, callback) {
|
86
|
+
async request(originalSettings, body, callback) {
|
91
87
|
if (typeof body === 'function' && arguments.length === 2) {
|
92
88
|
callback = body;
|
93
89
|
body = undefined;
|
@@ -99,92 +95,110 @@ module.exports = class Model extends EventEmitter {
|
|
99
95
|
settings = _.omit(settings, urlKeys);
|
100
96
|
this.emit('sync', originalSettings);
|
101
97
|
|
102
|
-
|
98
|
+
try {
|
99
|
+
const authData = await this.auth();
|
103
100
|
let authVal = authData;
|
104
101
|
if (typeof authVal === 'string') {
|
105
|
-
const
|
102
|
+
const [user, ...rest] = authVal.split(':');
|
106
103
|
authVal = {
|
107
|
-
user
|
108
|
-
pass:
|
104
|
+
user,
|
105
|
+
pass: rest.join(':'),
|
109
106
|
sendImmediately: true
|
110
107
|
};
|
111
108
|
}
|
112
|
-
if(authVal) {
|
113
|
-
settings.headers =
|
109
|
+
if (authVal) {
|
110
|
+
settings.headers = {
|
111
|
+
...settings.headers,
|
112
|
+
Authorization: `Bearer ${authVal.bearer}`
|
113
|
+
};
|
114
114
|
}
|
115
|
-
})
|
116
|
-
.then(() => {
|
117
|
-
const startTime = process.hrtime();
|
118
|
-
let timeoutTimer;
|
119
|
-
|
120
|
-
return new Promise((resolve, reject) => {
|
121
|
-
const _callback = (err, data, statusCode) => {
|
122
|
-
if (timeoutTimer) {
|
123
|
-
clearTimeout(timeoutTimer);
|
124
|
-
timeoutTimer = null;
|
125
|
-
}
|
126
115
|
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
116
|
+
const startTime = process.hrtime();
|
117
|
+
let timeoutTimer;
|
118
|
+
|
119
|
+
if (timeoutTimer) {
|
120
|
+
clearTimeout(timeoutTimer);
|
121
|
+
timeoutTimer = null;
|
122
|
+
}
|
123
|
+
|
124
|
+
const data = await new Promise((resolve, reject) => {
|
125
|
+
const _callback = (err, responseData, statusCode) => {
|
126
|
+
if (timeoutTimer) {
|
127
|
+
clearTimeout(timeoutTimer);
|
128
|
+
timeoutTimer = null;
|
129
|
+
}
|
130
|
+
|
131
|
+
const endTime = process.hrtime();
|
132
|
+
const responseTime = timeDiff(startTime, endTime);
|
133
|
+
if (err) {
|
134
|
+
this.emit('fail', err, responseData, originalSettings, statusCode, responseTime);
|
135
|
+
reject(err);
|
136
|
+
} else {
|
137
|
+
this.emit('success', responseData, originalSettings, statusCode, responseTime);
|
138
|
+
resolve(responseData);
|
139
|
+
}
|
140
|
+
};
|
141
|
+
|
142
|
+
this._request(settings)
|
143
|
+
.then(response => {
|
144
|
+
return this.handleResponse(response)
|
145
|
+
.then(responseData => _callback(null, responseData, response.status))
|
146
|
+
.catch(error => {
|
147
|
+
error.headers = response.headers;
|
148
|
+
_callback(error, null, response.status);
|
148
149
|
});
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
150
|
+
})
|
151
|
+
.catch(err => {
|
152
|
+
if (err.code === 'ETIMEDOUT' || err.code === 'ESOCKETTIMEDOUT') {
|
153
|
+
err.message = 'Connection timed out';
|
154
|
+
err.status = 504;
|
155
|
+
}
|
156
|
+
err.status = err.status || 503;
|
157
|
+
return _callback(err, null, err.status);
|
158
|
+
});
|
158
159
|
});
|
159
160
|
|
160
|
-
|
161
|
-
|
161
|
+
if (typeof callback === 'function') {
|
162
|
+
callback(null, data);
|
163
|
+
}
|
164
|
+
return data;
|
165
|
+
} catch (error) {
|
166
|
+
if (typeof callback === 'function') {
|
167
|
+
callback(error);
|
168
|
+
}
|
169
|
+
return error;
|
162
170
|
}
|
163
|
-
return promise;
|
164
171
|
}
|
165
172
|
|
166
|
-
handleResponse(response
|
167
|
-
let data =
|
173
|
+
async handleResponse(response) {
|
174
|
+
let data = null;
|
168
175
|
try {
|
169
|
-
|
176
|
+
if (typeof response.data === 'object') {
|
177
|
+
data = response.data;
|
178
|
+
} else if (typeof response.data === 'string' && response.data.trim() !== '') {
|
179
|
+
data = JSON.parse(response.data);
|
180
|
+
} else {
|
181
|
+
data = {};
|
182
|
+
}
|
170
183
|
} catch (err) {
|
184
|
+
err.message = 'Failed to parse response data';
|
171
185
|
err.status = response.status;
|
172
186
|
err.body = response.data;
|
173
|
-
|
187
|
+
throw err;
|
174
188
|
}
|
175
|
-
return this.parseResponse(response.status, data
|
189
|
+
return await this.parseResponse(response.status, data);
|
176
190
|
}
|
177
191
|
|
178
|
-
parseResponse(statusCode, data
|
192
|
+
async parseResponse(statusCode, data) {
|
179
193
|
if (statusCode < 400) {
|
180
194
|
try {
|
181
|
-
data = this.parse(data);
|
182
|
-
|
195
|
+
data = await this.parse(data);
|
196
|
+
return data;
|
183
197
|
} catch (err) {
|
184
|
-
|
198
|
+
throw err;
|
185
199
|
}
|
186
200
|
} else {
|
187
|
-
|
201
|
+
throw this.parseError(statusCode, data);
|
188
202
|
}
|
189
203
|
}
|
190
204
|
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "hof",
|
3
3
|
"description": "A bootstrap for HOF projects",
|
4
|
-
"version": "21.0.0-axios-beta.
|
4
|
+
"version": "21.0.0-axios-beta.5",
|
5
5
|
"license": "MIT",
|
6
6
|
"main": "index.js",
|
7
7
|
"author": "HomeOffice",
|
@@ -32,8 +32,7 @@
|
|
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"
|
36
|
-
"test-single": "mocha"
|
35
|
+
"postversion": "git push && git push --tags"
|
37
36
|
},
|
38
37
|
"dependencies": {
|
39
38
|
"aliasify": "^2.1.0",
|
package/pull_request.md
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
## What?
|
2
|
+
## Why?
|
3
|
+
## How?
|
4
|
+
## Testing?
|
5
|
+
## Screenshots (optional)
|
6
|
+
## Anything Else? (optional)
|
7
|
+
## Check list
|
8
|
+
|
9
|
+
- [ ] I have reviewed my own pull request for linting issues (e.g. adding new lines)
|
10
|
+
- [ ] I have written tests (if relevant)
|
11
|
+
- [ ] I have created a JIRA number for my branch
|
12
|
+
- [ ] I have created a JIRA number for my commit
|
13
|
+
- [ ] I have followed the chris beams method for my commit https://cbea.ms/git-commit/
|
14
|
+
here is an [example commit](https://github.com/UKHomeOfficeForms/hof/commit/810959f391187c7c4af6db262bcd143b50093a6e)
|
15
|
+
- [ ] Ensure drone builds are green especially tests
|
16
|
+
- [ ] I will squash the commits before merging
|
package/sandbox/package.json
CHANGED
@@ -5627,6 +5627,11 @@ input[type=number] {
|
|
5627
5627
|
vertical-align: top;
|
5628
5628
|
}
|
5629
5629
|
|
5630
|
+
.govuk-header__logotype-crown[width="32"] {
|
5631
|
+
top: -3px;
|
5632
|
+
margin-right: 2px;
|
5633
|
+
}
|
5634
|
+
|
5630
5635
|
.govuk-header__logotype-crown-fallback-image {
|
5631
5636
|
width: 36px;
|
5632
5637
|
height: 32px;
|
@@ -5634,6 +5639,11 @@ input[type=number] {
|
|
5634
5639
|
vertical-align: bottom;
|
5635
5640
|
}
|
5636
5641
|
|
5642
|
+
.govuk-header__logotype-crown-fallback-image[width="32"] {
|
5643
|
+
width: 32px;
|
5644
|
+
height: 30px;
|
5645
|
+
}
|
5646
|
+
|
5637
5647
|
.govuk-header__product-name {
|
5638
5648
|
font-family: "GDS Transport", arial, sans-serif;
|
5639
5649
|
-webkit-font-smoothing: antialiased;
|