hof 21.0.0-instrumentation-beta.0 → 21.0.2-axios-beta

Sign up to get free protection for your applications and to get access to all the features.
Files changed (107) hide show
  1. package/.github/workflows/automate-publish.yml +1 -1
  2. package/.github/workflows/automate-tag.yml +4 -4
  3. package/.nyc_output/4fc007c9-d6c8-4614-89ce-04c7d6ce9fe5.json +1 -0
  4. package/.nyc_output/processinfo/4fc007c9-d6c8-4614-89ce-04c7d6ce9fe5.json +1 -0
  5. package/.nyc_output/processinfo/index.json +1 -1
  6. package/README.md +340 -256
  7. package/build/tasks/sass/index.js +3 -1
  8. package/build/tasks/watch/index.js +1 -1
  9. package/components/combine-and-loop-fields/Readme.md +42 -0
  10. package/components/combine-and-loop-fields/index.js +156 -0
  11. package/components/date/index.js +3 -1
  12. package/components/date/templates/date.html +15 -12
  13. package/components/homeoffice-countries/index.js +22 -0
  14. package/components/index.js +2 -0
  15. package/components/notify/notify.js +2 -2
  16. package/components/summary/index.js +3 -2
  17. package/config/builder-defaults.js +3 -1
  18. package/config/component-defaults.js +13 -0
  19. package/controller/controller.js +57 -1
  20. package/controller/formatting/formatters.js +12 -0
  21. package/controller/validation/index.js +2 -1
  22. package/controller/validation/validators.js +4 -0
  23. package/frontend/govuk-template/build/config.js +2 -2
  24. package/frontend/govuk-template/build/govuk_template.html +104 -0
  25. package/frontend/govuk-template/build/index.js +2 -2
  26. package/frontend/govuk-template/index.js +4 -4
  27. package/frontend/template-mixins/mixins/template-mixins.js +39 -11
  28. package/frontend/template-mixins/partials/forms/checkbox-group.html +47 -0
  29. package/frontend/template-mixins/partials/forms/checkbox.html +4 -4
  30. package/frontend/template-mixins/partials/forms/input-submit.html +1 -1
  31. package/frontend/template-mixins/partials/forms/input-text-date.html +37 -0
  32. package/frontend/template-mixins/partials/forms/input-text-group.html +15 -10
  33. package/frontend/template-mixins/partials/forms/option-group.html +42 -26
  34. package/frontend/template-mixins/partials/forms/select.html +10 -5
  35. package/frontend/template-mixins/partials/forms/textarea-group.html +37 -23
  36. package/frontend/template-mixins/partials/mixins/panel.html +3 -4
  37. package/frontend/template-partials/views/accessibility.html +4 -4
  38. package/frontend/template-partials/views/cookies.html +1 -1
  39. package/frontend/template-partials/views/layout.html +24 -17
  40. package/frontend/template-partials/views/partials/back.html +1 -1
  41. package/frontend/template-partials/views/partials/bullet-list.html +1 -1
  42. package/frontend/template-partials/views/partials/confirmation-alert.html +4 -3
  43. package/frontend/template-partials/views/partials/continue.html +1 -1
  44. package/frontend/template-partials/views/partials/cookie-banner.html +27 -24
  45. package/frontend/template-partials/views/partials/cookie-settings-radio.html +6 -6
  46. package/frontend/template-partials/views/partials/external-link.html +1 -1
  47. package/frontend/template-partials/views/partials/form.html +2 -1
  48. package/frontend/template-partials/views/partials/maincontent-left.html +4 -4
  49. package/frontend/template-partials/views/partials/navigation.html +7 -6
  50. package/frontend/template-partials/views/partials/session-cookies-table.html +6 -6
  51. package/frontend/template-partials/views/partials/summary-table-row.html +2 -2
  52. package/frontend/template-partials/views/partials/table.html +7 -7
  53. package/frontend/template-partials/views/partials/validation-list.html +2 -2
  54. package/frontend/template-partials/views/partials/validation-summary.html +14 -13
  55. package/frontend/template-partials/views/partials/warn.html +7 -0
  56. package/frontend/template-partials/views/session-timeout.html +3 -2
  57. package/frontend/themes/gov-uk/client-js/cookieSettings.js +1 -1
  58. package/frontend/themes/gov-uk/client-js/govuk-cookies.js +121 -0
  59. package/frontend/themes/gov-uk/client-js/index.js +6 -1
  60. package/frontend/themes/gov-uk/client-js/skip-to-main.js +19 -0
  61. package/frontend/themes/gov-uk/styles/_cookie-banner.scss +51 -1
  62. package/frontend/themes/gov-uk/styles/govuk.scss +4 -0
  63. package/frontend/themes/gov-uk/styles/modules/_validation.scss +5 -5
  64. package/frontend/toolkit/assets/javascript/character-count.js +4 -4
  65. package/frontend/toolkit/assets/javascript/progressive-reveal.js +3 -1
  66. package/frontend/toolkit/assets/javascript/validation.js +5 -1
  67. package/frontend/toolkit/assets/stylesheets/modules/_validation.scss +3 -3
  68. package/index.js +15 -2
  69. package/lib/ga-tag.js +1 -1
  70. package/lib/settings.js +18 -2
  71. package/middleware/errors.js +2 -3
  72. package/middleware/not-found.js +0 -3
  73. package/middleware/rate-limiter.js +1 -0
  74. package/model/apis/axios-settings.js +9 -0
  75. package/model/apis/html-to-pdf-converter.js +9 -8
  76. package/model/index.js +29 -28
  77. package/package.json +17 -14
  78. package/sandbox/README.md +3 -3
  79. package/sandbox/apps/sandbox/fields.js +33 -11
  80. package/sandbox/apps/sandbox/index.js +4 -0
  81. package/sandbox/apps/sandbox/sections/summary-data-sections.js +3 -0
  82. package/sandbox/apps/sandbox/translations/en/default.json +224 -0
  83. package/sandbox/apps/sandbox/translations/src/en/fields.json +11 -4
  84. package/sandbox/apps/sandbox/translations/src/en/journey.json +4 -1
  85. package/sandbox/apps/sandbox/translations/src/en/pages.json +7 -25
  86. package/sandbox/apps/sandbox/translations/src/en/validation.json +5 -1
  87. package/sandbox/assets/js/index.js +1 -1
  88. package/sandbox/assets/scss/app.scss +16 -16
  89. package/sandbox/package.json +6 -1
  90. package/sandbox/public/css/app.css +2793 -0
  91. package/sandbox/public/images/icons/icon-caret-left.png +0 -0
  92. package/sandbox/public/images/icons/icon-complete.png +0 -0
  93. package/sandbox/public/images/icons/icon-cross-remove-sign.png +0 -0
  94. package/sandbox/public/js/bundle.js +32888 -0
  95. package/sandbox/server.js +2 -1
  96. package/sandbox/yarn.lock +243 -1
  97. package/wizard/index.js +0 -13
  98. package/wizard/middleware/check-progress.js +36 -1
  99. package/.nyc_output/4d5a4574-78fc-4fcb-9412-3658f6ce33ff.json +0 -1
  100. package/.nyc_output/processinfo/4d5a4574-78fc-4fcb-9412-3658f6ce33ff.json +0 -1
  101. package/frontend/govuk-template/govuk_template.html +0 -109
  102. package/frontend/themes/gov-uk/views/partials/form.html +0 -9
  103. package/frontend/themes/gov-uk/views/partials/forms/option-group.html +0 -28
  104. package/frontend/themes/gov-uk/views/partials/mixins/panel.html +0 -3
  105. package/frontend/themes/gov-uk/views/partials/validation-summary.html +0 -24
  106. package/middleware/monitor.js +0 -20
  107. package/sandbox/apps/sandbox/views/confirmation.html +0 -15
package/sandbox/server.js CHANGED
@@ -13,5 +13,6 @@ bootstrap({
13
13
  active: true
14
14
  }
15
15
  },
16
- getAccessibility: true
16
+ getAccessibility: true,
17
+ "port": 8082
17
18
  });
package/sandbox/yarn.lock CHANGED
@@ -2,14 +2,256 @@
2
2
  # yarn lockfile v1
3
3
 
4
4
 
5
+ abbrev@1:
6
+ version "1.1.1"
7
+ resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8"
8
+ integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==
9
+
10
+ anymatch@~3.1.2:
11
+ version "3.1.2"
12
+ resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.2.tgz#c0557c096af32f106198f4f4e2a383537e378716"
13
+ integrity sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==
14
+ dependencies:
15
+ normalize-path "^3.0.0"
16
+ picomatch "^2.0.4"
17
+
18
+ balanced-match@^1.0.0:
19
+ version "1.0.2"
20
+ resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee"
21
+ integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==
22
+
23
+ binary-extensions@^2.0.0:
24
+ version "2.2.0"
25
+ resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d"
26
+ integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==
27
+
28
+ brace-expansion@^1.1.7:
29
+ version "1.1.11"
30
+ resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
31
+ integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==
32
+ dependencies:
33
+ balanced-match "^1.0.0"
34
+ concat-map "0.0.1"
35
+
36
+ braces@~3.0.2:
37
+ version "3.0.2"
38
+ resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107"
39
+ integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==
40
+ dependencies:
41
+ fill-range "^7.0.1"
42
+
43
+ "chokidar@>=3.0.0 <4.0.0", chokidar@^3.5.2:
44
+ version "3.5.3"
45
+ resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd"
46
+ integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==
47
+ dependencies:
48
+ anymatch "~3.1.2"
49
+ braces "~3.0.2"
50
+ glob-parent "~5.1.2"
51
+ is-binary-path "~2.1.0"
52
+ is-glob "~4.0.1"
53
+ normalize-path "~3.0.0"
54
+ readdirp "~3.6.0"
55
+ optionalDependencies:
56
+ fsevents "~2.3.2"
57
+
58
+ concat-map@0.0.1:
59
+ version "0.0.1"
60
+ resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
61
+ integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==
62
+
63
+ debug@^3.2.7:
64
+ version "3.2.7"
65
+ resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a"
66
+ integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==
67
+ dependencies:
68
+ ms "^2.1.1"
69
+
70
+ fill-range@^7.0.1:
71
+ version "7.0.1"
72
+ resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40"
73
+ integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==
74
+ dependencies:
75
+ to-regex-range "^5.0.1"
76
+
77
+ fsevents@~2.3.2:
78
+ version "2.3.2"
79
+ resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a"
80
+ integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==
81
+
82
+ glob-parent@~5.1.2:
83
+ version "5.1.2"
84
+ resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4"
85
+ integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==
86
+ dependencies:
87
+ is-glob "^4.0.1"
88
+
89
+ govuk-frontend@3.14:
90
+ version "3.14.0"
91
+ resolved "https://registry.yarnpkg.com/govuk-frontend/-/govuk-frontend-3.14.0.tgz#d3a9c54437c08f5188f87b1f4480ba60e95c8eb6"
92
+ integrity sha512-y7FTuihCSA8Hty+e9h0uPhCoNanCAN+CLioNFlPmlbeHXpbi09VMyxTcH+XfnMPY4Cp++7096v0rLwwdapTXnA==
93
+
94
+ has-flag@^3.0.0:
95
+ version "3.0.0"
96
+ resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd"
97
+ integrity sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==
98
+
99
+ ignore-by-default@^1.0.1:
100
+ version "1.0.1"
101
+ resolved "https://registry.yarnpkg.com/ignore-by-default/-/ignore-by-default-1.0.1.tgz#48ca6d72f6c6a3af00a9ad4ae6876be3889e2b09"
102
+ integrity sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==
103
+
104
+ immutable@^4.0.0:
105
+ version "4.1.0"
106
+ resolved "https://registry.yarnpkg.com/immutable/-/immutable-4.1.0.tgz#f795787f0db780183307b9eb2091fcac1f6fafef"
107
+ integrity sha512-oNkuqVTA8jqG1Q6c+UglTOD1xhC1BtjKI7XkCXRkZHrN5m18/XsnUp8Q89GkQO/z+0WjonSvl0FLhDYftp46nQ==
108
+
109
+ is-binary-path@~2.1.0:
110
+ version "2.1.0"
111
+ resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09"
112
+ integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==
113
+ dependencies:
114
+ binary-extensions "^2.0.0"
115
+
116
+ is-extglob@^2.1.1:
117
+ version "2.1.1"
118
+ resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2"
119
+ integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==
120
+
121
+ is-glob@^4.0.1, is-glob@~4.0.1:
122
+ version "4.0.3"
123
+ resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084"
124
+ integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==
125
+ dependencies:
126
+ is-extglob "^2.1.1"
127
+
128
+ is-number@^7.0.0:
129
+ version "7.0.0"
130
+ resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b"
131
+ integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==
132
+
5
133
  jquery@>=1.11, jquery@^3.6.0:
6
134
  version "3.6.0"
7
135
  resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.6.0.tgz#c72a09f15c1bdce142f49dbf1170bdf8adac2470"
8
136
  integrity sha512-JVzAR/AjBvVt2BmYhxRCSYysDsPcssdmTFnzyLEts9qNwmjmu4JTAMYubEfwVOSwpQ1I1sKKFcxhZCI2buerfw==
9
137
 
138
+ minimatch@^3.0.4:
139
+ version "3.1.2"
140
+ resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b"
141
+ integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==
142
+ dependencies:
143
+ brace-expansion "^1.1.7"
144
+
145
+ ms@^2.1.1:
146
+ version "2.1.3"
147
+ resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2"
148
+ integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==
149
+
150
+ nodemon@^2.0.15:
151
+ version "2.0.19"
152
+ resolved "https://registry.yarnpkg.com/nodemon/-/nodemon-2.0.19.tgz#cac175f74b9cb8b57e770d47841995eebe4488bd"
153
+ integrity sha512-4pv1f2bMDj0Eeg/MhGqxrtveeQ5/G/UVe9iO6uTZzjnRluSA4PVWf8CW99LUPwGB3eNIA7zUFoP77YuI7hOc0A==
154
+ dependencies:
155
+ chokidar "^3.5.2"
156
+ debug "^3.2.7"
157
+ ignore-by-default "^1.0.1"
158
+ minimatch "^3.0.4"
159
+ pstree.remy "^1.1.8"
160
+ semver "^5.7.1"
161
+ simple-update-notifier "^1.0.7"
162
+ supports-color "^5.5.0"
163
+ touch "^3.1.0"
164
+ undefsafe "^2.0.5"
165
+
166
+ nopt@~1.0.10:
167
+ version "1.0.10"
168
+ resolved "https://registry.yarnpkg.com/nopt/-/nopt-1.0.10.tgz#6ddd21bd2a31417b92727dd585f8a6f37608ebee"
169
+ integrity sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg==
170
+ dependencies:
171
+ abbrev "1"
172
+
173
+ normalize-path@^3.0.0, normalize-path@~3.0.0:
174
+ version "3.0.0"
175
+ resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65"
176
+ integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==
177
+
178
+ picomatch@^2.0.4, picomatch@^2.2.1:
179
+ version "2.3.1"
180
+ resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42"
181
+ integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==
182
+
183
+ pstree.remy@^1.1.8:
184
+ version "1.1.8"
185
+ resolved "https://registry.yarnpkg.com/pstree.remy/-/pstree.remy-1.1.8.tgz#c242224f4a67c21f686839bbdb4ac282b8373d3a"
186
+ integrity sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==
187
+
188
+ readdirp@~3.6.0:
189
+ version "3.6.0"
190
+ resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7"
191
+ integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==
192
+ dependencies:
193
+ picomatch "^2.2.1"
194
+
195
+ sass@^1.53.0:
196
+ version "1.54.5"
197
+ resolved "https://registry.yarnpkg.com/sass/-/sass-1.54.5.tgz#93708f5560784f6ff2eab8542ade021a4a947b3a"
198
+ integrity sha512-p7DTOzxkUPa/63FU0R3KApkRHwcVZYC0PLnLm5iyZACyp15qSi32x7zVUhRdABAATmkALqgGrjCJAcWvobmhHw==
199
+ dependencies:
200
+ chokidar ">=3.0.0 <4.0.0"
201
+ immutable "^4.0.0"
202
+ source-map-js ">=0.6.2 <2.0.0"
203
+
204
+ semver@^5.7.1:
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
+
209
+ semver@~7.0.0:
210
+ version "7.0.0"
211
+ resolved "https://registry.yarnpkg.com/semver/-/semver-7.0.0.tgz#5f3ca35761e47e05b206c6daff2cf814f0316b8e"
212
+ integrity sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==
213
+
214
+ simple-update-notifier@^1.0.7:
215
+ version "1.0.7"
216
+ resolved "https://registry.yarnpkg.com/simple-update-notifier/-/simple-update-notifier-1.0.7.tgz#7edf75c5bdd04f88828d632f762b2bc32996a9cc"
217
+ integrity sha512-BBKgR84BJQJm6WjWFMHgLVuo61FBDSj1z/xSFUIozqO6wO7ii0JxCqlIud7Enr/+LhlbNI0whErq96P2qHNWew==
218
+ dependencies:
219
+ semver "~7.0.0"
220
+
221
+ "source-map-js@>=0.6.2 <2.0.0":
222
+ version "1.0.2"
223
+ resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c"
224
+ integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==
225
+
226
+ supports-color@^5.5.0:
227
+ version "5.5.0"
228
+ resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f"
229
+ integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==
230
+ dependencies:
231
+ has-flag "^3.0.0"
232
+
233
+ to-regex-range@^5.0.1:
234
+ version "5.0.1"
235
+ resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4"
236
+ integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==
237
+ dependencies:
238
+ is-number "^7.0.0"
239
+
240
+ touch@^3.1.0:
241
+ version "3.1.0"
242
+ resolved "https://registry.yarnpkg.com/touch/-/touch-3.1.0.tgz#fe365f5f75ec9ed4e56825e0bb76d24ab74af83b"
243
+ integrity sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==
244
+ dependencies:
245
+ nopt "~1.0.10"
246
+
10
247
  typeahead-aria@^1.0.4:
11
248
  version "1.0.4"
12
249
  resolved "https://registry.yarnpkg.com/typeahead-aria/-/typeahead-aria-1.0.4.tgz#d2829cc01c0226a367627f3098a468c4e0343f00"
13
- integrity sha1-0oKcwBwCJqNnYn8wmKRoxOA0PwA=
250
+ integrity sha512-6g0XtcM1AiPMlyXOuAb90Lg0WGi9PdbH68La7kUJmZwxUdpE80IC6tewBg0a/ug1Betoz1xCfEqTgkhuN6wo4w==
14
251
  dependencies:
15
252
  jquery ">=1.11"
253
+
254
+ undefsafe@^2.0.5:
255
+ version "2.0.5"
256
+ resolved "https://registry.yarnpkg.com/undefsafe/-/undefsafe-2.0.5.tgz#38733b9327bdcd226db889fb723a6efd162e6e2c"
257
+ integrity sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==
package/wizard/index.js CHANGED
@@ -8,8 +8,6 @@ const FormController = require('../controller');
8
8
  const mix = require('mixwith').mix;
9
9
 
10
10
  const IncludedBehaviours = require('./behaviours');
11
- const Prometheus = require('prom-client');
12
- const monitor = require('../middleware/monitor');
13
11
 
14
12
  let count = 0;
15
13
 
@@ -35,10 +33,6 @@ const Wizard = (steps, fields, setts) => {
35
33
  controller: FormController
36
34
  }, setts || {});
37
35
 
38
- const metricsInterval = Prometheus.collectDefaultMetrics({
39
- labels: { FORM: process.title.toUpperCase()}
40
- });
41
-
42
36
  // prevent potentially conflicting session namespaces
43
37
  if (!settings.name) {
44
38
  settings.name = count;
@@ -52,12 +46,6 @@ const Wizard = (steps, fields, setts) => {
52
46
 
53
47
  app.use(require('./middleware/session'));
54
48
 
55
- app.get('/metrics', async (req, res) => {
56
- res.set('Content-Type', Prometheus.register.contentType);
57
- const out = await Prometheus.register.metrics();
58
- res.send(out);
59
- });
60
-
61
49
  let first;
62
50
 
63
51
  if (!steps['/']) {
@@ -115,7 +103,6 @@ const Wizard = (steps, fields, setts) => {
115
103
 
116
104
  app.route(route + settings.params)
117
105
  .all((req, res, next) => {
118
- monitor(req, res, res.statusCode);
119
106
  if (settings.translate) {
120
107
  req.translate = settings.translate;
121
108
  }
@@ -28,6 +28,41 @@ module.exports = (route, controller, steps, begin) => {
28
28
  return _.uniq(allSteps);
29
29
  };
30
30
 
31
+ // Gets all the possible routes
32
+ const walkAllPossibleSteps = (stepName, allStepsInService, allVisitedSteps) => {
33
+ const stepIncludingFieldsAndForks = allStepsInService[stepName];
34
+ if (!stepIncludingFieldsAndForks) { return; }
35
+
36
+ const forkTargets = _.map(stepIncludingFieldsAndForks.forks, 'target') || [];
37
+ const nextStep = stepIncludingFieldsAndForks.next || '';
38
+
39
+ // If there is no next step or fork, then we have reached the end of the journey
40
+ if (!forkTargets.length && !nextStep) {
41
+ allVisitedSteps.push(stepName);
42
+ // eslint-disable-next-line consistent-return
43
+ return _.uniq(allVisitedSteps);
44
+ }
45
+
46
+ const nextStepsAndForks = _.uniq(forkTargets.concat(nextStep));
47
+
48
+ // We need to transverse through all 'Next' and 'Forks' for this route
49
+ nextStepsAndForks.map(each => {
50
+ if (!allVisitedSteps.includes(each)) {
51
+ allVisitedSteps.push(each);
52
+ walkAllPossibleSteps(each, allStepsInService, allVisitedSteps);
53
+ }
54
+ });
55
+ };
56
+
57
+ // Create a list of all visited steps
58
+ const createAllVisitedSteps = (stepName, allStepsInService) => {
59
+ const allVisitedSteps = [stepName];
60
+ if (allStepsInService[stepName]) {
61
+ walkAllPossibleSteps(stepName, allStepsInService, allVisitedSteps);
62
+ }
63
+ return _.uniq(allVisitedSteps);
64
+ };
65
+
31
66
  const invalidateStep = (stepName, scopedSteps, sessionModel) => {
32
67
  debug('Invalidating', stepName);
33
68
  const step = scopedSteps[stepName] || {};
@@ -55,7 +90,7 @@ module.exports = (route, controller, steps, begin) => {
55
90
  debug('next', nextStep);
56
91
  debug('potential paths', potentialPaths);
57
92
  // if we're following a loop then allow the loop to be invalidated
58
- const whitelist = isLoop(nextStep, req.path) ? [route] : getAllPossibleSteps(nextStep, steps);
93
+ const whitelist = isLoop(nextStep, req.path) ? [route] : createAllVisitedSteps(nextStep, steps);
59
94
  // aggregate all potential journeys from the invalidating step
60
95
  const invalidateSteps = potentialPaths.reduce((arr, step) => arr.concat(getAllPossibleSteps(step, steps)), []);
61
96