Commit 9798587
Backport: runner-v2 (events and templates) (#745)
* Add version to release workflow
* Chore: Backport forms runner V2 (#728)
* PLATFORM: Add support for page events, custom views and injectable controllers (#13)
* Add support for page onLoad event and providing a custom view
* Inject controllers to plugin registration
* Temporarily supress custom controller TS error
* Pass controller through to FormModel (#16)
* PLATFORM: Feature/page events payload (#22)
* Add support for TerminalPageController
* Update start page logic when using page conditions engine
* Resolve page condition in controller constructor
* Add page condition routing logic
* Bump @defra/forms-model dep to 3.0.395
* Make engine optional on FormModel class
* Add TerminalPageController test
* Add QuetionPageController V2 tests
* Refactor getFormContext to reduce cognitive complexity
* Change logic for when the form Continue button is displayed for V2
* Support for injectable forms services
* Use injected forms services in page controllers
* Add defaultServices file
* Simplify type where value is not used
* fix: prevent 500s from malformed requests in crumb generation (#676)
* fix: prevent 500s from malformed requests in crumb generation
* test: added test for crumb state checks
* refactor: split the check into helper function with tests
* refactor: made helper function clearer
* Structured emails for machine ingestion (#679)
* extract notification service to a abstract service
* machine output
* Move v1 formatter into formatters folder
* Move output formatters into separate folder
* add form def to JSON output
* switch outputFormatter based on condition
* Refactor tests to support new formatters and injectable service
* fix import path
* Add tests for new macine output
* simplify functions in machine formatter
* Allow unused vars if they begin with underscore
* Resolve jest-extended tsc errors
* #504353 Update expiry in the notify email since it's been increased (#685)
* Update expiry in the notify email since it's been increased
* Update test
* Support machine emails via form definition flag (#684)
* use output format from form def and encode Notify JSON as base64
* Categorise outputs into main and repeaters
* Add files to machine v1 output
* Use 3.0.398 of model
* use forms-designer path from config
* Fix typo
* Replace POST payload with structured data
* Update page event payload to use the machine output format
* Remove test page event from example grant
* Temporarily suppress TS error
---------
Co-authored-by: Alex Luckett <alexgluckett@gmail.com>
Co-authored-by: Alex Luckett <alexluckett@users.noreply.github.com>
Co-authored-by: Mohammed Khalid <emailmokhld@gmail.com>
Co-authored-by: Jignesh Nayi <47786869+nayij@users.noreply.github.com>
* PLATFORM: feature/templates (#33)
* Remove toLowerCase from component schema message titles as they could contain interpolated variables
* Add convenience maps onto FormContext
* Add liquid templates
* Add convenience maps onto FormContext type
* Add liquid helpers to Nunjucks environment
* Use liquid helpers in Nunjucks templates
* Add types
* Fix tests
* Add templating documentation
* Add Liquid helper tests
* Add Liquid helper test definition file
* Add TS comment exceptions
* Remove page and field liquid filters
* Add test showing liquid evaluation can use values from `context.data`
* Update template README
* Evaluate templates in check answers summary rows
* Update nunjucks liquid filter
* Add template journey test
* Include summary rows title checks in template journey tests
* Update Templates README
* Add missing types
* Enable tracing (#36)
* Remove ts incremental build cache file and add to gitignore (#37)
* PLATFORM: Add href, page, field and answer filters to nunjucks (#46)
* added href and answer as nunjucks filters
Signed-off-by: David Barker <david.barker@equalexperts.com>
* added filters
Signed-off-by: David Barker <david.barker@equalexperts.com>
* modified index to include filters
Signed-off-by: David Barker <david.barker@equalexperts.com>
* Update nunjucks filters
* Update documentation
---------
Signed-off-by: David Barker <david.barker@equalexperts.com>
Co-authored-by: davidjamesstone <davidjamesstone@gmail.com>
* test: tests for answer filter
* test: tests enviroment.js checkErrorTemplates
* test: field.js test suite
* test: href filter
* refactor(test)
* test: PageController coverage
* test: test cases for when pageDef.view is present
* test: test suite for page filter
* test: test suite for logger-options
* PLATFORM: Change tracing so it doesn't overwrite existing headers (#54)
* Change tracing so it doesn't overwrite existing headers
* Add tests to ensure additional headers are preserved
* Merge headers inside applyTraceHeaders utility function
* Replace merge with assign
* Remove unused JSDoc declaration
---------
Co-authored-by: Andrew Folga <andrew.folga@equalexperts.com>
* test: evaluate and href filters
* test: add coverage for falsy tracing header config
* refactor: improve testability of applyTraceHeaders
* test: add coverage for HTML component string content check
* test: add coverage for Nunjucks evaluate function and component label handling
* refactor(sonar)
* fix: Add type assertion for custom page controllers
---------
Signed-off-by: David Barker <david.barker@equalexperts.com>
Co-authored-by: David Stone <davidjamesstone@gmail.com>
Co-authored-by: Alex Luckett <alexgluckett@gmail.com>
Co-authored-by: Alex Luckett <alexluckett@users.noreply.github.com>
Co-authored-by: Jignesh Nayi <47786869+nayij@users.noreply.github.com>
Co-authored-by: Andrew-Folga-EE <173707519+Andrew-Folga@users.noreply.github.com>
Co-authored-by: David Barker <david.barker@equalexperts.com>
Co-authored-by: Andrew Folga <andrew.folga@equalexperts.com>
---------
Signed-off-by: David Barker <david.barker@equalexperts.com>
Co-authored-by: Mohammed Khalid <emailmokhld@gmail.com>
Co-authored-by: David Stone <davidjamesstone@gmail.com>
Co-authored-by: Jignesh Nayi <47786869+nayij@users.noreply.github.com>
Co-authored-by: Andrew-Folga-EE <173707519+Andrew-Folga@users.noreply.github.com>
Co-authored-by: David Barker <david.barker@equalexperts.com>
Co-authored-by: Andrew Folga <andrew.folga@equalexperts.com>1 parent 65b9de2 commit 9798587
File tree
74 files changed
+2429
-105
lines changed- .github/workflows
- src
- config
- server
- common/helpers/logging
- plugins
- engine
- components
- models
- pageControllers
- views
- partials
- nunjucks
- filters
- services
- utils
- views
- typings/hapi-tracing
- test/form
- definitions
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
74 files changed
+2429
-105
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
18 | 22 | | |
19 | 23 | | |
20 | 24 | | |
| |||
41 | 45 | | |
42 | 46 | | |
43 | 47 | | |
| 48 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
| 49 | + | |
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| |||
74 | 75 | | |
75 | 76 | | |
76 | 77 | | |
| 78 | + | |
77 | 79 | | |
78 | 80 | | |
79 | 81 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
155 | 163 | | |
156 | 164 | | |
157 | 165 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| |||
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
36 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
37 | 46 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
124 | 125 | | |
125 | 126 | | |
126 | 127 | | |
| 128 | + | |
127 | 129 | | |
128 | 130 | | |
129 | 131 | | |
| |||
0 commit comments