-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build: release v5.8.0 #1737
Merged
Merged
build: release v5.8.0 #1737
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
build: merge release 5.7.0 into develop
* refactor(encrypt-submission): changed handler to be an atomic export together wtih validator * refactor(admin-form/submissions): add api endpoint for submissions/metadata and deprecate old endpt * test(admin-forms/submission): fixes unit and integration tests for submissions/metadata * refactor(submissions/client/factory): changed fe callsites to new be api * refactor(encrypt-submission): inlined validator; reverted pageNum default value
* feat(admin-forms): implement retrieval of form settings [form] - augment `FormSchema.getFullFormById()`, which will partially populate an IPopulatedForm with specified keys, if given - feed the `fields` argument supplied in the abovementioned fn as the projection arg of `Schema.findById()` - implement `FormSchema.pick()`, allowing one to pick only the fields we want out of a given IFormSchema [auth-service] - implement `getFormFieldsAfterPermissionChecks()`, exploiting type-generic parameters to allow callers to specify the shape of the return value - take care to only return fields specified by the caller [admin-form] - declare and implement `handleGetSettings()` in controller and route, taking inspiration from `handleUpdateSettings()` - import `FORM_SETTING_FIELDS` from form.server.model to specify the form setting fields we need TODO: Unit-testing * refactor(admin-form): separate auth and form retrieval concerns - replace `getFormFieldsAfterPermissionChecks()` with the simpler `checkFormForPermissions()`, obliging callers to get their own form - apply DRY and replace part of `getFormAfterPermissionChecks()` with a call to `checkFormForPermissions()` - rework `handleGetSettings()` in `admin-form.controller` so that it handles form retrieval and returning a concise response - avoid being clever; instead of specifying only the fields we need in the form and potentially saving I/O, just get the entire form and use the existing `getSettings()` to return to the caller. The resulting simplicity will probably outweigh any savings in mongodb I/O we get. - we may get a spike in I/O if calls for n parts of a given form ends up fetching the entire form n times from db to app. In that light... - leave `FormService.retrieveFormFields()` where it is, in case we are proven wrong and we have to be conservative about I/O TODO: Unit tests * test: cover for handleGetSettings, retrieveFormFieldsById Rename `retrieveFormFields()` to `retrieveFormFieldsById()` to be consistent with existing methods on FormService * fix(get-settings): remove spurious typecast * refactor(form): rename retrieveFormFieldsById to retrieveFormKeysById * docs(auth): correct jsdoc for checkFormForPermissions * refactor(form-settings): chain http verbs to route
* refactor(public-forms): moved subroutes out of main publicforms router realised that public form is getting bloated adn we should not keep every route in the same file but rather, shard by responsiblity. hence, this (mini) pr is for doign that before starting on auth router to prevent excess bloat from accumulating * refactor(public-form/tests): shards tests out also * style(api): changed folder name to forms instead of public
Bumps [fp-ts](https://github.com/gcanti/fp-ts) from 2.10.3 to 2.10.4. - [Release notes](https://github.com/gcanti/fp-ts/releases) - [Changelog](https://github.com/gcanti/fp-ts/blob/master/CHANGELOG.md) - [Commits](gcanti/fp-ts@2.10.3...2.10.4) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@sentry/browser](https://github.com/getsentry/sentry-javascript) from 6.2.5 to 6.3.0. - [Release notes](https://github.com/getsentry/sentry-javascript/releases) - [Changelog](https://github.com/getsentry/sentry-javascript/blob/master/CHANGELOG.md) - [Commits](getsentry/sentry-javascript@6.2.5...6.3.0) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [validator](https://github.com/validatorjs/validator.js) from 13.5.2 to 13.6.0. - [Release notes](https://github.com/validatorjs/validator.js/releases) - [Changelog](https://github.com/validatorjs/validator.js/blob/13.6.0/CHANGELOG.md) - [Commits](validatorjs/validator.js@13.5.2...13.6.0) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@babel/runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-runtime) from 7.13.10 to 7.13.16. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.13.16/packages/babel-runtime) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.888.0 to 2.889.0. - [Release notes](https://github.com/aws/aws-sdk-js/releases) - [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md) - [Commits](aws/aws-sdk-js@v2.888.0...v2.889.0) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.13.15 to 7.13.16. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.13.16/packages/babel-core) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@sentry/integrations](https://github.com/getsentry/sentry-javascript) from 6.2.5 to 6.3.0. - [Release notes](https://github.com/getsentry/sentry-javascript/releases) - [Changelog](https://github.com/getsentry/sentry-javascript/blob/master/CHANGELOG.md) - [Commits](getsentry/sentry-javascript@6.2.5...6.3.0) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
#1640) * feat: add FormField type that is a union for every possible field * feat: return http 422 status code on EditFieldError instead of 400 * feat(AdminFormService): add updateFormField to update single field * feat(AdminFormCtl): add handleUpdateFormField fn * feat(AdminFormRoutes): add PUT endpoint for updating single form field * feat(AdminFormClientCtl): add specific update field handling in update * feat: update types of mongo subdocs to allow for DocumentArray allows for special array methods such as `id()`, `pull()`, etc * test(AdminForm): update test for invalid field update to return 422 * feat(formUtils): add getFormFieldById helper method uses DocumentArray#id method if available, else uses Array#find * test(formUtils): add unit tests for getFormFieldById * ref: rename admin-forms.build.routes to admin-forms.form.routes for consistency with #1635 * feat: add Form instance method updateFormFieldById seems like a better place to for the manipulation of the form instead of in the service directly * ref(AdminFormSvc): use Form model method in update field service fn * feat(AdminFormRoutes): strengthen Joi validation for update field ensures body._id given is the same as the params.fieldId so ids of fields cannot be changed so easily * feat: add FormFieldDto type for use in update form field handler * fix(formUtils): fix evaluation of whether array is mongoose doc array * test(FormModel): add unit tests for updateFormFieldById instance fn * test(AdminFormSvc): add unit tests for updateFormField fn * test(AdminFormCtl): add unit tests for handleUpdateFormField * ref: group joi validation middleware with controller fn in export * feat: only merge updated field if index of updated field exists * feat(client): call update field endpoint on updating myinfo fields too * test(AdminFormCtl): correct name of _handleUpdateFormField in desc * ref(mongooseUtils): move isMongooseDocumentArray to own util file * ref(formUtils): remove profane usage of else after return * ref: convert constants/update-form-types.js to TypeScript * feat: show error Toast when returned field don't map to current fields
* feat(AdminFormSvc): add dummy createFormField function * feat(AdminFormCtl): add handleCreateFormField controller and router fn * feat(FormModel): add insertFormField model instance method * feat(AdminFormSvc): add and use createFormField service fn * feat(AdminFormCtl): Joi prevent globalId from being provided * feat(client): impl createSingleFormField service fn for field creation * feat(AdminFormCtl): loosen Joi validation required keys most of the loosened keys have sane defaults already * fix(AdminFormCtl): remove incorrect fieldId type declaration * test(AdminFormCtl): add unit tests for _handleCreateFormField fn * test(AdminFormSvc): add unit tests for createFormField fn * test(FormModel): add unit tests for insertFormField instance method
…/v3 (#1643) * refactor(admin-form-api): duplicate adminform form endpoints for /api/v3i - duplicate and update adminform form related endpoints - duplicate integration tests for new endpoint - update v3 router to use new endpoints - update frontend api calls to use new endpoints * refactor(admin-form-api): remove unneeded joi-date extension * refactor(preview-api): duplicate adminform preview endpoints for /api/v3 - duplicate and update adminform preview related endpoints - duplicate integration tests for new endpoint - update v3 router to use new endpoints - update frontend api calls to use new endpoints * ref(preview-api): remove duplicate user auth middleware from routes * ref(preview-api): consolidate middleware into controller - shift validators into admin-form controller - update handler methods to include middleware as request handler array - update controller integration tests - update old routes to use new handler - update new routes to use new handler
* refactor: v3 delete logic api * test: integration tests * chore: use general form model * refactor: use mongoose $pull operator instead of manual filtering * chore: return transformMongoError * refactor: use ObjectId() * chore: add unit tests * refactor: default message for LogicNotFoundError * refactor: shift logic to separate router * chore: add test case for logicId cannot be found * chore: reset mock forms in beforeEach * refactor: FormModel * refactor: shift tests to admin-forms.logic.routes.spec * refactor: simplify return of deleteFormLogic * chore: frontend changes for delete logic api * chore: simplify * refactor: use model static method * chore: use $q to splice only upon success * refactor: pass in formId string instead of form object * test: add unit tests for static method * chore: return form instead of true * nit: typo Co-authored-by: Antariksh Mahajan <antarikshmahajan@gmail.com> * chore: add details to error msg * chore: add test for multiple logic case * build: merge conflict * chore: not send message on logic delete * chore: add return true for axios * chore: splice upon promise success * chore: cast form._id to string * chore: update tests Co-authored-by: Antariksh Mahajan <antarikshmahajan@gmail.com>
Bumps [@babel/runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-runtime) from 7.13.16 to 7.13.17. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.13.17/packages/babel-runtime) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* feat: remove useless fields and make others required * feat: remove logic to store useless fields * feat: allow data and headers to be empty strings * test: update tests
* fix(email): remove verified tag for blank fields * docs: verified prefix should not be added if field is blank
…/v3 (#1644) * refactor(admin-form-api): duplicate adminform form endpoints for /api/v3i - duplicate and update adminform form related endpoints - duplicate integration tests for new endpoint - update v3 router to use new endpoints - update frontend api calls to use new endpoints * refactor(admin-form-api): remove unneeded joi-date extension * refactor(preview-api): duplicate adminform preview endpoints for /api/v3 - duplicate and update adminform preview related endpoints - duplicate integration tests for new endpoint - update v3 router to use new endpoints - update frontend api calls to use new endpoints * refactor(preview-api): duplicate adminform presign endpoints for /api/v3 - duplicate and update adminform presigned image/logo endpoints - duplicate integration tests for new endpoint - update v3 router to use new endpoints - update frontend api calls to use new endpoints * ref(presign-api): remove duplicate user auth middleware from route * ref(presign-api): consolidate validators into controller - shift validators into admin-form controller - update handler methods to include validators as request handler array - update controller integration tests - update old routes to use new handler - update new routes to use new handleri
…dEmailDomains (#1697) * fix: sync client hasAllowedEmailDomains and allowedEmailDomains states * fix: watch field.isVerifiable to show relevant tooltip * feat: add logger to track deprecated updateForm endpoint calls * fix: sync inconsistent email field states in the backend * fix: sync email field states in getUpdatedFormFields fn instead states may desync in the create or update actions * test(adminFormUtils): add extra tests for syncing of email fields
Now that mongoose properly defines discriminator(), drop our custom definition of DocumentArray in favour of the official one - pick up the latest version of mongoose - go back to casting the return value of `FormSchema.path()` as a DocumentArray, as opposed to our custom definition of it - remove custom definitions of mongoose types, no longer used
chore: merge v5.7.1 into develop
Bumps [core-js](https://github.com/zloirock/core-js/tree/HEAD/packages/core-js) from 3.10.2 to 3.11.0. - [Release notes](https://github.com/zloirock/core-js/releases) - [Changelog](https://github.com/zloirock/core-js/blob/master/CHANGELOG.md) - [Commits](https://github.com/zloirock/core-js/commits/v3.11.0/packages/core-js) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.889.0 to 2.890.0. - [Release notes](https://github.com/aws/aws-sdk-js/releases) - [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md) - [Commits](aws/aws-sdk-js@v2.889.0...v2.890.0) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [twilio](https://github.com/twilio/twilio-node) from 3.60.0 to 3.61.0. - [Release notes](https://github.com/twilio/twilio-node/releases) - [Changelog](https://github.com/twilio/twilio-node/blob/main/CHANGES.md) - [Commits](twilio/twilio-node@3.60.0...3.61.0) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.890.0 to 2.892.0. - [Release notes](https://github.com/aws/aws-sdk-js/releases) - [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md) - [Commits](aws/aws-sdk-js@v2.890.0...v2.892.0) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [stylelint](https://github.com/stylelint/stylelint) from 13.12.0 to 13.13.0. - [Release notes](https://github.com/stylelint/stylelint/releases) - [Changelog](https://github.com/stylelint/stylelint/blob/master/CHANGELOG.md) - [Commits](stylelint/stylelint@13.12.0...13.13.0) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [eslint](https://github.com/eslint/eslint) from 7.24.0 to 7.25.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md) - [Commits](eslint/eslint@v7.24.0...v7.25.0) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@sentry/integrations](https://github.com/getsentry/sentry-javascript) from 6.3.0 to 6.3.1. - [Release notes](https://github.com/getsentry/sentry-javascript/releases) - [Changelog](https://github.com/getsentry/sentry-javascript/blob/master/CHANGELOG.md) - [Commits](getsentry/sentry-javascript@6.3.0...6.3.1) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
TestsStreamline webhook response data
|
TestsLogic API refactor
|
TestsPreview endpoint API refactor
|
TestsCreate field API refactor
|
TestsUpdate field API refactor
|
TestsSubmissions metadata API refactor
|
TestsIntranet IE11 runthrough
|
…DATION_OPTIONS object (#1724)
* fix: show correct error message Error messages were showing up incorrectly due to incorrect accessing of keys in the error object. The fix was to access the correct keys. * fix: change push to assignment This triggers the AngularJS digest cycle correctly, which updates the count of MyInfo fields correctly.
mantariksh
force-pushed
the
release-v5.8.0
branch
from
April 27, 2021 03:25
f4fc0d2
to
6742046
Compare
* feat: add prefill toggle to short text field * feat: display fieldID on edit field modal * feat: field id copy functionality * feat: show Field ID only when prefill enabled * feat: prefill warning banner on submit form page * feat: msg to inform user that field id is generated after field saved * style: define prefill highlight in css and use ng-class * feat: show prefill warning only if field isVisible and monitor using scope.$watch * chore: use data-clipboard-target instead of text * style: add cursor for prefill icon * style: field id input * style: cursor for pull-right
* test(auth/controller): adds unit tests for getRedirectLink * test(public-forms/auth): adds integration tests * test(auth/controller): fixed type errors * test(authservice/test): adds auth service test * refactor(tests): fixed renaming of files and ported over redirect tests to public form controller * test(public-form/controller/tests): added additional tests for /redirect endpoint, shifted const out * docs(publicformauthservice/test): adds arrange act assert blcoks * chore(auth/controller/spec): removed outdated forms from shifting redirect to publci-forms * test(public-form): updated tests * chore(public-form/controller/test): updated types in tests * chore(public-form/controller/tests): updated typings * test(public-forms/auth/routes): added stronger validation to integration test for external libraries * docs(public-forms/auth/routes/spec): fixed test description having wrong http method * style(public-forms/auth/routes): merged assertions into single block
* fix: convert form field responses into class counterparts this fixes a bug where the Field class methods were being invoked on some fields and failing due to the field being a pure object without injected class methods * fix: remove myinfo field info before saving myinfo field * fix: inject myinfo field info in case retrieved field is myinfo field
mantariksh
force-pushed
the
release-v5.8.0
branch
from
April 27, 2021 05:51
6742046
to
a7a42eb
Compare
TestsPrefill feature
|
TestsForm/field interceptor migration
|
mantariksh
force-pushed
the
release-v5.8.0
branch
from
April 27, 2021 08:57
a7a42eb
to
917a327
Compare
Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.892.0 to 2.893.0. - [Release notes](https://github.com/aws/aws-sdk-js/releases) - [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md) - [Commits](aws/aws-sdk-js@v2.892.0...v2.893.0) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
karrui
previously approved these changes
Apr 28, 2021
mantariksh
force-pushed
the
release-v5.8.0
branch
from
April 28, 2021 07:04
917a327
to
368f774
Compare
karrui
approved these changes
Apr 28, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New
#1727
#1664
#1702
Fixes
#1722
#1701
Improved
#1684
#1672
#1703
#1726
#1703
#1704
#1697
#1644
#1696
#1586
#1643
#1671
#1640
#1669
#1633
#1651
#1739
#1728
#1738
#1724
#1750
#1748
#1742
#1741
Dependency upgrades
#1735
#1734
#1723
#1719
#1716
#1720
#1718
#1717
#1715
#1714
#1711
#1710
#1709
#1700
#1690
#1692
#1691
#1689
#1688
#1687
#1686
#1745