Skip to content

Commit

Permalink
chore: merge develop to form-v2/develop (#2533)
Browse files Browse the repository at this point in the history
* feat(config): support env var config via dotenv

Allow Form to be configured using a .env file, read by dotenv and
populated into `process.env`.

- `npm install dotenv`
- pick up the `.env` config using dotenv just before we invoke
  the application
- remove `.env` entry from `.dockerignore`

* build(ci): create .env files in EB with Param Store

- use an .ebextensions config to create an .env from Parameter Store
  - determine the environment name by looking at container config files
    directly [1]
- mount the .env into /opt/formsg/.env

References:
[1]: https://aws.amazon.com/premiumsupport/knowledge-center/view-environment-properties-elastic-beanstalk/

* refactor(env): drive SSM name prefix by env var

* docs(deploy): add information concerning SSM params

* refactor: revert "refactor(email-submission): encapsulate parsedResponses (#2206)" (#2248)

This reverts commit 6512a84c6456665e6f12a8fad5a7e8ccd9860d28.

* chore: bump version to v5.17.0

* chore(deps-dev): bump optimize-css-assets-webpack-plugin (#2251)

Bumps [optimize-css-assets-webpack-plugin](https://github.com/NMFR/optimize-css-assets-webpack-plugin) from 5.0.3 to 5.0.8.
- [Release notes](https://github.com/NMFR/optimize-css-assets-webpack-plugin/releases)
- [Commits](https://github.com/NMFR/optimize-css-assets-webpack-plugin/compare/v5.0.3...v5.0.8)

---
updated-dependencies:
- dependency-name: optimize-css-assets-webpack-plugin
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix(deps): bump aws-sdk from 2.932.0 to 2.933.0 (#2252)

Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.932.0 to 2.933.0.
- [Release notes](https://github.com/aws/aws-sdk-js/releases)
- [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-js/compare/v2.932.0...v2.933.0)

---
updated-dependencies:
- dependency-name: aws-sdk
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump prettier from 2.3.1 to 2.3.2 (#2260)

Bumps [prettier](https://github.com/prettier/prettier) from 2.3.1 to 2.3.2.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.3.1...2.3.2)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix(deps): bump aws-sdk from 2.933.0 to 2.935.0 (#2259)

Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.933.0 to 2.935.0.
- [Release notes](https://github.com/aws/aws-sdk-js/releases)
- [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-js/compare/v2.933.0...v2.935.0)

---
updated-dependencies:
- dependency-name: aws-sdk
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix: upgrade mongoose from 5.12.12 to 5.12.13 (#2257)

Snyk has created this PR to upgrade mongoose from 5.12.12 to 5.12.13.

See this package in npm:
https://www.npmjs.com/package/mongoose

See this project in Snyk:
https://app.snyk.io/org/yiyin/project/c84a5cfa-bfa2-44b6-8cc6-5d1271040a58?utm_source=github&utm_medium=upgrade-pr

* feat: Admin form UI changes to "Edit Welcome" fields (#2258)

* feat: in "Edit Welcome", move "Color Theme" to btwn "Logo" and "Time taken for..." and add rows="12" to "Instructions..." textarea

* chore: run formatter

* fix(deps): bump @sentry/integrations from 6.7.2 to 6.8.0 (#2268)

Bumps [@sentry/integrations](https://github.com/getsentry/sentry-javascript) from 6.7.2 to 6.8.0.
- [Release notes](https://github.com/getsentry/sentry-javascript/releases)
- [Changelog](https://github.com/getsentry/sentry-javascript/blob/master/CHANGELOG.md)
- [Commits](https://github.com/getsentry/sentry-javascript/compare/6.7.2...6.8.0)

---
updated-dependencies:
- dependency-name: "@sentry/integrations"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump @typescript-eslint/parser from 4.28.0 to 4.28.1 (#2270)

Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 4.28.0 to 4.28.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.28.1/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix(deps): bump @sentry/browser from 6.7.2 to 6.8.0 (#2269)

Bumps [@sentry/browser](https://github.com/getsentry/sentry-javascript) from 6.7.2 to 6.8.0.
- [Release notes](https://github.com/getsentry/sentry-javascript/releases)
- [Changelog](https://github.com/getsentry/sentry-javascript/blob/master/CHANGELOG.md)
- [Commits](https://github.com/getsentry/sentry-javascript/compare/6.7.2...6.8.0)

---
updated-dependencies:
- dependency-name: "@sentry/browser"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix: correctly retrieve targetFormId for redirect state (#2261)

this fixes the bug where the targetFormId was incorrectly retrieving the first 24 characters of the URL, which will fail as the API URLs have changed to be more semantic.

instead, take in the targetFormId directly as we already know the formId.

* chore(deps-dev): bump @typescript-eslint/eslint-plugin (#2271)

Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 4.28.0 to 4.28.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.28.1/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* refactor: ensure consistent filesize const (#2079)

* refactor: move MB to shared/constants and use MB throughout app

* ref: lint attachmentValidator and use relative import

Co-authored-by: Kar Rui Lau <[email protected]>

* chore(deps-dev): bump core-js from 3.15.1 to 3.15.2 (#2272)

Bumps [core-js](https://github.com/zloirock/core-js/tree/HEAD/packages/core-js) from 3.15.1 to 3.15.2.
- [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.15.2/packages/core-js)

---
updated-dependencies:
- dependency-name: core-js
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix(deps): bump aws-sdk from 2.935.0 to 2.936.0 (#2273)

Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.935.0 to 2.936.0.
- [Release notes](https://github.com/aws/aws-sdk-js/releases)
- [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-js/compare/v2.935.0...v2.936.0)

---
updated-dependencies:
- dependency-name: aws-sdk
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump coveralls from 3.1.0 to 3.1.1 (#2274)

Bumps [coveralls](https://github.com/nickmerwin/node-coveralls) from 3.1.0 to 3.1.1.
- [Release notes](https://github.com/nickmerwin/node-coveralls/releases)
- [Commits](https://github.com/nickmerwin/node-coveralls/compare/v3.1.0...3.1.1)

---
updated-dependencies:
- dependency-name: coveralls
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump ts-node-dev from 1.1.6 to 1.1.7 (#2275)

Bumps [ts-node-dev](https://github.com/whitecolor/ts-node-dev) from 1.1.6 to 1.1.7.
- [Release notes](https://github.com/whitecolor/ts-node-dev/releases)
- [Changelog](https://github.com/wclr/ts-node-dev/blob/master/CHANGELOG.md)
- [Commits](https://github.com/whitecolor/ts-node-dev/compare/v1.1.6...v1.1.7)

---
updated-dependencies:
- dependency-name: ts-node-dev
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix: allow creation of storage form when emails are invalid (#2263)

* refactor(emails-input): use ng-messages

* fix: fail validation only if responseMode is email

* fix: allow empty array and string for emails key in storage mode

* feat: rename "Reference Number" to "Response ID" (#2277)

* feat: update response email subject to use #

* feat: update response email body to use Response ID

* feat: update storage mode Data tab to use Response ID

* feat: update storage mode CSV to use Response ID

* feat: update email confirmation PDF to use Response ID

* build: empty commit to trigger build

* chore: bump version to v5.18.0

* fix(deps): bump twilio from 3.64.0 to 3.65.0 (#2284)

Bumps [twilio](https://github.com/twilio/twilio-node) from 3.64.0 to 3.65.0.
- [Release notes](https://github.com/twilio/twilio-node/releases)
- [Changelog](https://github.com/twilio/twilio-node/blob/main/CHANGES.md)
- [Commits](https://github.com/twilio/twilio-node/compare/3.64.0...3.65.0)

---
updated-dependencies:
- dependency-name: twilio
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump @types/mongodb from 3.6.18 to 3.6.19 (#2286)

Bumps [@types/mongodb](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/mongodb) from 3.6.18 to 3.6.19.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/mongodb)

---
updated-dependencies:
- dependency-name: "@types/mongodb"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix(deps): bump aws-sdk from 2.936.0 to 2.937.0 (#2287)

Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.936.0 to 2.937.0.
- [Release notes](https://github.com/aws/aws-sdk-js/releases)
- [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-js/compare/v2.936.0...v2.937.0)

---
updated-dependencies:
- dependency-name: aws-sdk
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump ts-node-dev from 1.1.7 to 1.1.8 (#2285)

Bumps [ts-node-dev](https://github.com/whitecolor/ts-node-dev) from 1.1.7 to 1.1.8.
- [Release notes](https://github.com/whitecolor/ts-node-dev/releases)
- [Changelog](https://github.com/wclr/ts-node-dev/blob/master/CHANGELOG.md)
- [Commits](https://github.com/whitecolor/ts-node-dev/compare/v1.1.7...v1.1.8)

---
updated-dependencies:
- dependency-name: ts-node-dev
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix(deps): bump express-rate-limit from 5.2.6 to 5.3.0 (#2288)

Bumps [express-rate-limit](https://github.com/nfriedly/express-rate-limit) from 5.2.6 to 5.3.0.
- [Release notes](https://github.com/nfriedly/express-rate-limit/releases)
- [Commits](https://github.com/nfriedly/express-rate-limit/compare/v5.2.6...v5.3.0)

---
updated-dependencies:
- dependency-name: express-rate-limit
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* refactor: revert the revert of encapsulate parsedResponses (#2278)

This reverts commit 5237a0b007635e495ab7eef29dfd1747dd22b41a.

* fix(deps): bump libphonenumber-js from 1.9.20 to 1.9.21 (#2291)

Bumps [libphonenumber-js](https://gitlab.com/catamphetamine/libphonenumber-js) from 1.9.20 to 1.9.21.
- [Release notes](https://gitlab.com/catamphetamine/libphonenumber-js/tags)
- [Changelog](https://gitlab.com/catamphetamine/libphonenumber-js/blob/master/CHANGELOG.md)
- [Commits](https://gitlab.com/catamphetamine/libphonenumber-js/compare/v1.9.20...v1.9.21)

---
updated-dependencies:
- dependency-name: libphonenumber-js
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix(deps): bump aws-sdk from 2.937.0 to 2.939.0 (#2293)

Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.937.0 to 2.939.0.
- [Release notes](https://github.com/aws/aws-sdk-js/releases)
- [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-js/compare/v2.937.0...v2.939.0)

---
updated-dependencies:
- dependency-name: aws-sdk
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump @types/uuid from 8.3.0 to 8.3.1 (#2294)

Bumps [@types/uuid](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/uuid) from 8.3.0 to 8.3.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/uuid)

---
updated-dependencies:
- dependency-name: "@types/uuid"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump eslint from 7.29.0 to 7.30.0 (#2295)

Bumps [eslint](https://github.com/eslint/eslint) from 7.29.0 to 7.30.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v7.29.0...v7.30.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix(deps): bump zod from 3.2.0 to 3.3.3 (#2296)

Bumps [zod](https://github.com/colinhacks/zod) from 3.2.0 to 3.3.3.
- [Release notes](https://github.com/colinhacks/zod/releases)
- [Changelog](https://github.com/colinhacks/zod/blob/master/CHANGELOG.md)
- [Commits](https://github.com/colinhacks/zod/commits)

---
updated-dependencies:
- dependency-name: zod
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix(deps): bump neverthrow from 4.2.1 to 4.2.2 (#2297)

Bumps [neverthrow](https://github.com/supermacro/neverthrow) from 4.2.1 to 4.2.2.
- [Release notes](https://github.com/supermacro/neverthrow/releases)
- [Commits](https://github.com/supermacro/neverthrow/compare/v4.2.1...v4.2.2)

---
updated-dependencies:
- dependency-name: neverthrow
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump @types/validator from 13.1.4 to 13.6.2 (#2298)

Bumps [@types/validator](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/validator) from 13.1.4 to 13.6.2.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/validator)

---
updated-dependencies:
- dependency-name: "@types/validator"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix(deps): bump zod from 3.3.3 to 3.3.4 (#2299)

Bumps [zod](https://github.com/colinhacks/zod) from 3.3.3 to 3.3.4.
- [Release notes](https://github.com/colinhacks/zod/releases)
- [Changelog](https://github.com/colinhacks/zod/blob/master/CHANGELOG.md)
- [Commits](https://github.com/colinhacks/zod/commits)

---
updated-dependencies:
- dependency-name: zod
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* feat: Set SP/CP JWT cookie to HttpOnly (#2193)

* feat: add route and controller to clear cookie

* feat: frontend to call logout endpoint to delete cookie

* feat: backend to return spcpSssion msToExpiry in network response

* feat: frontend uses spcpSession data from response instead of decoding jwt

* feat: set spcp cookies to http only

* chore: update tests

* chore: add tests

* feat: retain httpOnly as false for now for backward compatibility

* chore: fix merge conflict

* chore: rename to logoutOfSpcpSession

* chore: rename route to /auth/:authType/logout

* chore: rely on joi for authType validation

* chore: clean up types, check cookie expiry directly against exp instead of msToExpiry

* chore: use $q to wrap logout request

* chore: update tests

* refactor: combine conditionals

* feat: set http only to true

* chore: clean up types

* chore: add defensive check for cookie exp before returning to client

* chore: rename to handleSpcpLogout

* chore: return spcpSession obj instead of destructuring

* chore: add spcpSession properties for route test

* chore: new type for jwt from cookie

* refactor: combine response call

* chore: tighten test for spcpsession, rename to CookieTimestamp

* feat(auth): enable sgID

Fully flesh out sgID integrations with FormSG

[config]
- Add needed configuration to configure sgID authentication, driving
  most of these using env vars

[modules]
- add an sgid module, taking inspiration from spcp
- add sgid-related entries alongside spcp equivalents in public-form
  and email-submission controllers
- do likewise for frontend components

[deps]
- add @opengovsg/sgid-client

fixup! feat(auth): enable sgID

* test(sgid): provide test coverage

* feat(sgid): guard with beta flag, reword text

- add sgid beta flag
- add authType as argument to isDisableAuthType so that we can
  disable sgID if user does not have the appropriate beta flag
- reword text for form submitters and admins so that they understand
  that sgID is in effect an extension of Singpass

* fix(sgid): rework codebase in-line with review

* feat: Remove self from collaborator list (#2212)

* feat: Remove self from collaborator list

* Fix typo in removeSelfFromCollaborators function

* address mantariksh@'s comments

* fix: allow duplicating email field with PDF to storage mode (#2303)

* fix: allow duplicating email field with PDF to storage mode

Bug was due to regression caused in #1971 where the set hook was converted to a validator hook. Upon further examination, the set hook was needed to set includeFormSummary to false on encrypt-mode forms.

The pre-validate hook will always pass if storage mode forms's email.includeFormSummary is always set to true, and is thus redundant and kept deleted.

* test(emailField): add unit tests for includeFormSummary

* refactor(sgid): use httpOnly cookies, inject sgid config directly

* fix(deps): unpin typescript (#2305)

* chore(deps-dev): bump @typescript-eslint/eslint-plugin (#2307)

Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 4.28.1 to 4.28.2.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.28.2/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump @typescript-eslint/parser from 4.28.1 to 4.28.2 (#2306)

Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 4.28.1 to 4.28.2.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.28.2/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump @types/convict from 6.0.2 to 6.1.0 (#2308)

Bumps [@types/convict](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/convict) from 6.0.2 to 6.1.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/convict)

---
updated-dependencies:
- dependency-name: "@types/convict"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore: bump version to 5.19.0

* chore(deps-dev): bump husky from 6.0.0 to 7.0.0 (#2289)

Bumps [husky](https://github.com/typicode/husky) from 6.0.0 to 7.0.0.
- [Release notes](https://github.com/typicode/husky/releases)
- [Commits](https://github.com/typicode/husky/compare/v6.0.0...v7.0.0)

---
updated-dependencies:
- dependency-name: husky
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix(types): recognise User.betaFlags in zod (#2314)

* fix(settings): reorder and reword auth options (#2315)

* chore(deps-dev): bump husky from 7.0.0 to 7.0.1 (#2318)

Bumps [husky](https://github.com/typicode/husky) from 7.0.0 to 7.0.1.
- [Release notes](https://github.com/typicode/husky/releases)
- [Commits](https://github.com/typicode/husky/compare/v7.0.0...v7.0.1)

---
updated-dependencies:
- dependency-name: husky
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix(deps): bump zod from 3.3.4 to 3.4.2 (#2319)

Bumps [zod](https://github.com/colinhacks/zod) from 3.3.4 to 3.4.2.
- [Release notes](https://github.com/colinhacks/zod/releases)
- [Changelog](https://github.com/colinhacks/zod/blob/master/CHANGELOG.md)
- [Commits](https://github.com/colinhacks/zod/commits/v3.4.2)

---
updated-dependencies:
- dependency-name: zod
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix(admin-form.service): fixed logical error in duplicate form field (#2301)

* fix(admin-form.service): fixed logical error in duplicate form field

* docs(admin-form.service): updated comments for duplicateFormField

* chore(deps-dev): bump @types/bluebird from 3.5.35 to 3.5.36 (#2331)

Bumps [@types/bluebird](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/bluebird) from 3.5.35 to 3.5.36.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/bluebird)

---
updated-dependencies:
- dependency-name: "@types/bluebird"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump @types/node from 14.17.4 to 14.17.5 (#2332)

Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.17.4 to 14.17.5.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump @types/compression from 1.7.0 to 1.7.1 (#2334)

Bumps [@types/compression](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/compression) from 1.7.0 to 1.7.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/compression)

---
updated-dependencies:
- dependency-name: "@types/compression"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump @types/validator from 13.6.2 to 13.6.3 (#2336)

Bumps [@types/validator](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/validator) from 13.6.2 to 13.6.3.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/validator)

---
updated-dependencies:
- dependency-name: "@types/validator"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump @types/mongodb from 3.6.19 to 3.6.20 (#2335)

Bumps [@types/mongodb](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/mongodb) from 3.6.19 to 3.6.20.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/mongodb)

---
updated-dependencies:
- dependency-name: "@types/mongodb"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix(deps): bump aws-sdk from 2.939.0 to 2.940.0 (#2338)

Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.939.0 to 2.940.0.
- [Release notes](https://github.com/aws/aws-sdk-js/releases)
- [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-js/compare/v2.939.0...v2.940.0)

---
updated-dependencies:
- dependency-name: aws-sdk
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix(deps): bump zod from 3.4.2 to 3.5.1 (#2339)

Bumps [zod](https://github.com/colinhacks/zod) from 3.4.2 to 3.5.1.
- [Release notes](https://github.com/colinhacks/zod/releases)
- [Changelog](https://github.com/colinhacks/zod/blob/master/CHANGELOG.md)
- [Commits](https://github.com/colinhacks/zod/commits)

---
updated-dependencies:
- dependency-name: zod
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* feat: client to delete spcp cookie (#2328)

* feat: client to delete cookie

* chore: add env var for old domain name

* doc: add comment

* chore: add oldSpcpCookieDomain to environment

* fix: undefined cookieName

* chore: bump version to 5.19.1

* chore(deps-dev): bump @types/express from 4.17.12 to 4.17.13 (#2340)

Bumps [@types/express](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/express) from 4.17.12 to 4.17.13.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/express)

---
updated-dependencies:
- dependency-name: "@types/express"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump @types/convict from 6.1.0 to 6.1.1 (#2337)

Bumps [@types/convict](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/convict) from 6.1.0 to 6.1.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/convict)

---
updated-dependencies:
- dependency-name: "@types/convict"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix: visiting archived form URL to show correct error message (#2320)

* fix: visiting archived form URL to show correct error message

* fix: tests

* fix: update stale test

* fix: read email validation error message from Joi response (#2321)

* fix: read email validation error message for joi response

* fix: update the e2e test with hardcoded email

* tests: await the e2e assertion

* chore(deps-dev): bump @types/nodemailer from 6.4.2 to 6.4.3 (#2343)

Bumps [@types/nodemailer](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/nodemailer) from 6.4.2 to 6.4.3.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/nodemailer)

---
updated-dependencies:
- dependency-name: "@types/nodemailer"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump @types/express-rate-limit from 5.1.2 to 5.1.3 (#2333)

Bumps [@types/express-rate-limit](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/express-rate-limit) from 5.1.2 to 5.1.3.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/express-rate-limit)

---
updated-dependencies:
- dependency-name: "@types/express-rate-limit"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix(deps): bump opossum from 6.1.0 to 6.2.0 (#2347)

Bumps [opossum](https://github.com/nodeshift/opossum) from 6.1.0 to 6.2.0.
- [Release notes](https://github.com/nodeshift/opossum/releases)
- [Changelog](https://github.com/nodeshift/opossum/blob/main/CHANGELOG.md)
- [Commits](https://github.com/nodeshift/opossum/compare/v6.1.0...v6.2.0)

---
updated-dependencies:
- dependency-name: opossum
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump @types/busboy from 0.2.3 to 0.2.4 (#2348)

Bumps [@types/busboy](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/busboy) from 0.2.3 to 0.2.4.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/busboy)

---
updated-dependencies:
- dependency-name: "@types/busboy"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump @types/jest from 26.0.23 to 26.0.24 (#2345)

Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 26.0.23 to 26.0.24.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

---
updated-dependencies:
- dependency-name: "@types/jest"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix(deps): bump aws-sdk from 2.940.0 to 2.941.0 (#2352)

Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.940.0 to 2.941.0.
- [Release notes](https://github.com/aws/aws-sdk-js/releases)
- [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-js/compare/v2.940.0...v2.941.0)

---
updated-dependencies:
- dependency-name: aws-sdk
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump testcafe from 1.14.2 to 1.15.0 (#2356)

Bumps [testcafe](https://github.com/DevExpress/testcafe) from 1.14.2 to 1.15.0.
- [Release notes](https://github.com/DevExpress/testcafe/releases)
- [Changelog](https://github.com/DevExpress/testcafe/blob/master/CHANGELOG.md)
- [Commits](https://github.com/DevExpress/testcafe/compare/v1.14.2...v1.15.0)

---
updated-dependencies:
- dependency-name: testcafe
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump type-fest from 1.2.1 to 1.2.2 (#2357)

Bumps [type-fest](https://github.com/sindresorhus/type-fest) from 1.2.1 to 1.2.2.
- [Release notes](https://github.com/sindresorhus/type-fest/releases)
- [Commits](https://github.com/sindresorhus/type-fest/compare/v1.2.1...v1.2.2)

---
updated-dependencies:
- dependency-name: type-fest
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump @types/express-request-id from 1.4.1 to 1.4.2 (#2358)

Bumps [@types/express-request-id](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/express-request-id) from 1.4.1 to 1.4.2.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/express-request-id)

---
updated-dependencies:
- dependency-name: "@types/express-request-id"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump @types/ejs from 3.0.6 to 3.0.7 (#2344)

Bumps [@types/ejs](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/ejs) from 3.0.6 to 3.0.7.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/ejs)

---
updated-dependencies:
- dependency-name: "@types/ejs"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump @types/mongodb-uri from 0.9.0 to 0.9.1 (#2364)

Bumps [@types/mongodb-uri](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/mongodb-uri) from 0.9.0 to 0.9.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/mongodb-uri)

---
updated-dependencies:
- dependency-name: "@types/mongodb-uri"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix(deps): bump aws-sdk from 2.941.0 to 2.943.0 (#2366)

Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.941.0 to 2.943.0.
- [Release notes](https://github.com/aws/aws-sdk-js/releases)
- [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-js/compare/v2.941.0...v2.943.0)

---
updated-dependencies:
- dependency-name: aws-sdk
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump @types/opossum from 4.1.1 to 4.1.2 (#2363)

Bumps [@types/opossum](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/opossum) from 4.1.1 to 4.1.2.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/opossum)

---
updated-dependencies:
- dependency-name: "@types/opossum"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump ts-node from 10.0.0 to 10.1.0 (#2368)

Bumps [ts-node](https://github.com/TypeStrong/ts-node) from 10.0.0 to 10.1.0.
- [Release notes](https://github.com/TypeStrong/ts-node/releases)
- [Commits](https://github.com/TypeStrong/ts-node/compare/v10.0.0...v10.1.0)

---
updated-dependencies:
- dependency-name: ts-node
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump @types/nodemailer from 6.4.3 to 6.4.4 (#2367)

Bumps [@types/nodemailer](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/nodemailer) from 6.4.3 to 6.4.4.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/nodemailer)

---
updated-dependencies:
- dependency-name: "@types/nodemailer"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix(SGID): add sgid to User schema beta flags (#2371)

* fix(deps): bump celebrate from 14.0.0 to 15.0.0 (#2365)

* fix(deps): bump celebrate from 14.0.0 to 15.0.0

Bumps [celebrate](https://github.com/arb/celebrate) from 14.0.0 to 15.0.0.
- [Release notes](https://github.com/arb/celebrate/releases)
- [Commits](https://github.com/arb/celebrate/compare/v14.0.0...v15.0.0)

---
updated-dependencies:
- dependency-name: celebrate
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

* fix(test): update tests to account for new celebrate error default msg

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Kar Rui Lau <[email protected]>

* fix(BetaService): make SGID form-level beta feature (#2369)

* fix(BetaService): make SGID form-level beta feature

* chore: remove outdated comment

* fix: check for user access to SGID

* fix: return authType when retrieving single example

Users without SGID beta flag were not being prevented from creating SGID
forms because the single example endpoint was not retrieving the authType,
resulting in the frontend being unable to detect when the form is an SGID
form.

* fix: return authType when retrieving list of examples

* test: update examples tests

* fix: allow myinfo authtype for logout (#2362)

* chore: bump version to 5.19.2

* build: move end-to-end tests to GitHub Actions (#2353)

* build: move end-to-end tests to GitHub Actions

* build: remove babel-loader from webpack dev

When building the frontend using webpack, GA shows a series of
`UnhandledPromiseRejectionWarning` errors related to socket hangups,
and the frontend ultimately fails to build. This happens frequently
in the dev environment, but has never occurred for the production
webpack build.

The only difference between the dev webpack config and the "common"
config shared with prod is that babel-loader is used in dev. So I
attempted to remove babel-loader from dev, since it is not necessary
for the dev environment anyway. This seemed to stop the errors.

* test(e2e): increase waiting time for download file

Tests were still flaky due to downloaded files (e.g. storage mode CSV)
taking too long to save to disk, resulting in Testcafe timing out and
failing the test. The solution is to increase the waiting time between
downloading the file and checking for its contents.

* build: reduce e2e test concurrency

Tests were still flaky, likely due to Headless Chrome running too slowly.
I finally gave in and reduced the concurrency from 3 to 2 to reduce memory
consumption and hopefully make the tests more reliable.

* chore(deps-dev): bump @typescript-eslint/parser from 4.28.2 to 4.28.3 (#2374)

Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 4.28.2 to 4.28.3.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.28.3/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix(deps): bump @sentry/integrations from 6.8.0 to 6.9.0 (#2375)

Bumps [@sentry/integrations](https://github.com/getsentry/sentry-javascript) from 6.8.0 to 6.9.0.
- [Release notes](https://github.com/getsentry/sentry-javascript/releases)
- [Changelog](https://github.com/getsentry/sentry-javascript/blob/master/CHANGELOG.md)
- [Commits](https://github.com/getsentry/sentry-javascript/compare/6.8.0...6.9.0)

---
updated-dependencies:
- dependency-name: "@sentry/integrations"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix(deps): bump libphonenumber-js from 1.9.21 to 1.9.22 (#2377)

Bumps [libphonenumber-js](https://gitlab.com/catamphetamine/libphonenumber-js) from 1.9.21 to 1.9.22.
- [Release notes](https://gitlab.com/catamphetamine/libphonenumber-js/tags)
- [Changelog](https://gitlab.com/catamphetamine/libphonenumber-js/blob/master/CHANGELOG.md)
- [Commits](https://gitlab.com/catamphetamine/libphonenumber-js/compare/v1.9.21...v1.9.22)

---
updated-dependencies:
- dependency-name: libphonenumber-js
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix(deps): bump @sentry/browser from 6.8.0 to 6.9.0 (#2376)

Bumps [@sentry/browser](https://github.com/getsentry/sentry-javascript) from 6.8.0 to 6.9.0.
- [Release notes](https://github.com/getsentry/sentry-javascript/releases)
- [Changelog](https://github.com/getsentry/sentry-javascript/blob/master/CHANGELOG.md)
- [Commits](https://github.com/getsentry/sentry-javascript/compare/6.8.0...6.9.0)

---
updated-dependencies:
- dependency-name: "@sentry/browser"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump @typescript-eslint/eslint-plugin (#2378)

Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 4.28.2 to 4.28.3.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.28.3/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* feat(deps): upgrade to latest TypeScript (#2383)

* fix(deps): bump aws-sdk from 2.943.0 to 2.944.0 (#2386)

Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.943.0 to 2.944.0.
- [Release notes](https://github.com/aws/aws-sdk-js/releases)
- [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-js/compare/v2.943.0...v2.944.0)

---
updated-dependencies:
- dependency-name: aws-sdk
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump lint-staged from 11.0.0 to 11.0.1 (#2387)

Bumps [lint-staged](https://github.com/okonet/lint-staged) from 11.0.0 to 11.0.1.
- [Release notes](https://github.com/okonet/lint-staged/releases)
- [Commits](https://github.com/okonet/lint-staged/compare/v11.0.0...v11.0.1)

---
updated-dependencies:
- dependency-name: lint-staged
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore: bump version to 5.20.0

* feat: set up standalone `/shared` root folder for clean sharing of types and utils (#2322)

* build: set up separate shared package with its own node_modules

this allows for true independence and allows typescript build orchestration

* build: set up tooling to handle new shared root folder

* ref: collapse types into single file

* feat: correct types used in document types

* feat: use shared types in client

* chore: update mongoose to v5.13.2

allows some new inference of types for instance/static methods

* feat(shared): add more Dto and Base types for Agency

* feat(agency): use new shared types as base for backend types

* build: revert alias tooling

This partially reverts commit 089eee52e6ac6653deb63da5beaee9b6e4573028.

Not going to bother for now, backend build somehow keeps failing with aliases

* fix: correct built server file path

changed due to inclusion of a new shared folder in the compilation step

* feat: remove unused types/api files

agency and user.ts have been superseded by their new shared/types files

* feat: update _id type for UserBase

Co-authored-by: Antariksh Mahajan <[email protected]>

Co-authored-by: Antariksh Mahajan <[email protected]>

* feat(form-logic): introduce form logic model validation (#2302)

* chore(audit-fixes): fix 162 vulnerability

* fix(deps): bump nodemailer from 6.6.2 to 6.6.3 (#2398)

Bumps [nodemailer](https://github.com/nodemailer/nodemailer) from 6.6.2 to 6.6.3.
- [Release notes](https://github.com/nodemailer/nodemailer/releases)
- [Changelog](https://github.com/nodemailer/nodemailer/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nodemailer/nodemailer/commits/v6.6.3)

---
updated-dependencies:
- dependency-name: nodemailer
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix(deps): bump twilio from 3.65.0 to 3.66.0 (#2402)

Bumps [twilio](https://github.com/twilio/twilio-node) from 3.65.0 to 3.66.0.
- [Release notes](https://github.com/twilio/twilio-node/releases)
- [Changelog](https://github.com/twilio/twilio-node/blob/main/CHANGES.md)
- [Commits](https://github.com/twilio/twilio-node/compare/3.65.0...3.66.0)

---
updated-dependencies:
- dependency-name: twilio
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix(deps): bump convict from 6.1.0 to 6.2.0 (#2403)

Bumps [convict](https://github.com/mozilla/node-convict) from 6.1.0 to 6.2.0.
- [Release notes](https://github.com/mozilla/node-convict/releases)
- [Changelog](https://github.com/mozilla/node-convict/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mozilla/node-convict/compare/v6.1.0...v6.2.0)

---
updated-dependencies:
- dependency-name: convict
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix(deps): bump aws-sdk from 2.945.0 to 2.946.0 (#2404)

Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.945.0 to 2.946.0.
- [Release notes](https://github.com/aws/aws-sdk-js/releases)
- [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-js/compare/v2.945.0...v2.946.0)

---
updated-dependencies:
- dependency-name: aws-sdk
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* perf(png-size): optimize image sizes

* fix(deps): bump aws-sdk from 2.946.0 to 2.948.0 (#2406)

Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.946.0 to 2.948.0.
- [Release notes](https://github.com/aws/aws-sdk-js/releases)
- [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-js/compare/v2.946.0...v2.948.0)

---
updated-dependencies:
- dependency-name: aws-sdk
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump eslint from 7.30.0 to 7.31.0 (#2407)

Bumps [eslint](https://github.com/eslint/eslint) from 7.30.0 to 7.31.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v7.30.0...v7.31.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump @typescript-eslint/parser from 4.28.3 to 4.28.4 (#2409)

Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 4.28.3 to 4.28.4.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.28.4/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump @typescript-eslint/eslint-plugin (#2411)

Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 4.28.3 to 4.28.4.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.28.4/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix(deps): bump aws-sdk from 2.948.0 to 2.949.0 (#2413)

Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.948.0 to 2.949.0.
- [Release notes](https://github.com/aws/aws-sdk-js/releases)
- [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-js/compare/v2.948.0...v2.949.0)

---
updated-dependencies:
- dependency-name: aws-sdk
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix(deps): bump convict-format-with-validator from 6.0.1 to 6.2.0 (#2414)

Bumps [convict-format-with-validator](https://github.com/mozilla/node-convict) from 6.0.1 to 6.2.0.
- [Release notes](https://github.com/mozilla/node-convict/releases)
- [Changelog](https://github.com/mozilla/node-convict/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mozilla/node-convict/compare/v6.0.1...v6.2.0)

---
updated-dependencies:
- dependency-name: convict-format-with-validator
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump @babel/core from 7.14.6 to 7.14.8 (#2416)

Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.14.6 to 7.14.8.
- [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.14.8/packages/babel-core)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump @babel/preset-env from 7.14.7 to 7.14.8 (#2417)

Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.14.7 to 7.14.8.
- [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.14.8/packages/babel-preset-env)

---
updated-dependencies:
- dependency-name: "@babel/preset-env"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix(deps): bump aws-sdk from 2.949.0 to 2.950.0 (#2418)

Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.949.0 to 2.950.0.
- [Release notes](https://github.com/aws/aws-sdk-js/releases)
- [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-js/compare/v2.949.0...v2.950.0)

---
updated-dependencies:
- dependency-name: aws-sdk
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump supertest from 6.1.3 to 6.1.4 (#2419)

Bumps [supertest](https://github.com/visionmedia/supertest) from 6.1.3 to 6.1.4.
- [Release notes](https://github.com/visionmedia/supertest/releases)
- [Commits](https://github.com/visionmedia/supertest/compare/v6.1.3...v6.1.4)

---
updated-dependencies:
- dependency-name: supertest
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix(deps): bump @babel/runtime from 7.14.6 to 7.14.8 (#2421)

Bumps [@babel/runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-runtime) from 7.14.6 to 7.14.8.
- [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.14.8/packages/babel-runtime)

---
updated-dependencies:
- dependency-name: "@babel/runtime"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump eslint-plugin-jest from 24.3.6 to 24.3.7 (#2422)

Bumps [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) from 24.3.6 to 24.3.7.
- [Release notes](https://github.com/jest-community/eslint-plugin-jest/releases)
- [Changelog](https://github.com/jest-community/eslint-plugin-jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/jest-community/eslint-plugin-jest/compare/v24.3.6...v24.3.7)

---
updated-dependencies:
- dependency-name: eslint-plugin-jest
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix(deps): bump @sentry/browser from 6.9.0 to 6.10.0 (#2423)

Bumps [@sentry/browser](https://github.com/getsentry/sentry-javascript) from 6.9.0 to 6.10.0.
- [Release notes](https://github.com/getsentry/sentry-javascript/releases)
- [Changelog](https://github.com/getsentry/sentry-javascript/blob/master/CHANGELOG.md)
- [Commits](https://github.com/getsentry/sentry-javascript/compare/6.9.0...6.10.0)

---
updated-dependencies:
- dependency-name: "@sentry/browser"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump eslint-plugin-jest from 24.3.7 to 24.4.0 (#2424)

Bumps [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) from 24.3.7 to 24.4.0.
- [Release notes](https://github.com/jest-community/eslint-plugin-jest/releases)
- [Changelog](https://github.com/jest-community/eslint-plugin-jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/jest-community/eslint-plugin-jest/compare/v24.3.7...v24.4.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-jest
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix(deps): bump @sentry/integrations from 6.9.0 to 6.10.0 (#2425)

Bumps [@sentry/integrations](https://github.com/getsentry/sentry-javascript) from 6.9.0 to 6.10.0.
- [Release notes](…
  • Loading branch information
14 people authored Aug 10, 2021
1 parent 28530bf commit 8cb1fd9
Show file tree
Hide file tree
Showing 378 changed files with 9,401 additions and 5,503 deletions.
1 change: 0 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
**/.elasticbeanstalk
**/node_modules
**/public/lib
**/.env
.eslintrc.json
.prettierrc.json
.travis.yml
42 changes: 42 additions & 0 deletions .ebextensions/env-file-creation.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Creates an .env file from AWS SSM Parameter Store

commands:
01-create-env:
command: "/tmp/create-env.sh"

files:
"/tmp/create-env.sh":
mode: "000755"
content : |
#!/bin/bash
# Reach into the undocumented container config
AWS_REGION='`{"Ref": "AWS::Region"}`'
ENV_NAME=$(/opt/elasticbeanstalk/bin/get-config environment -k SSM_PREFIX)
TARGET_DIR=/etc/formsg

echo "Checking if ${TARGET_DIR} exists..."
if [ ! -d ${TARGET_DIR} ]; then
echo "Creating directory ${TARGET_DIR} ..."
mkdir -p ${TARGET_DIR}
if [ $? -ne 0 ]; then
echo 'ERROR: Directory creation failed!'
exit 1
fi
else
echo "Directory ${TARGET_DIR} already exists!"
fi
echo "Creating config for ${ENV_NAME} in ${AWS_REGION}"
aws ssm get-parameter --name "${ENV_NAME}-general" --with-decryption --region $AWS_REGION | jq -r '.Parameter.Value' > $TARGET_DIR/.env
aws ssm get-parameter --name "${ENV_NAME}-captcha" --with-decryption --region $AWS_REGION | jq -r '.Parameter.Value' >> $TARGET_DIR/.env
aws ssm get-parameter --name "${ENV_NAME}-ga" --with-decryption --region $AWS_REGION | jq -r '.Parameter.Value' >> $TARGET_DIR/.env
aws ssm get-parameter --name "${ENV_NAME}-intranet" --with-decryption --region $AWS_REGION | jq -r '.Parameter.Value' >> $TARGET_DIR/.env
aws ssm get-parameter --name "${ENV_NAME}-sentry" --with-decryption --region $AWS_REGION | jq -r '.Parameter.Value' >> $TARGET_DIR/.env
aws ssm get-parameter --name "${ENV_NAME}-sms" --with-decryption --region $AWS_REGION | jq -r '.Parameter.Value' >> $TARGET_DIR/.env
aws ssm get-parameter --name "${ENV_NAME}-ndi" --with-decryption --region $AWS_REGION | jq -r '.Parameter.Value' >> $TARGET_DIR/.env
aws ssm get-parameter --name "${ENV_NAME}-sgid" --with-decryption --region $AWS_REGION | jq -r '.Parameter.Value' >> $TARGET_DIR/.env
aws ssm get-parameter --name "${ENV_NAME}-verified-fields" --with-decryption --region $AWS_REGION | jq -r '.Parameter.Value' >> $TARGET_DIR/.env
aws ssm get-parameter --name "${ENV_NAME}-webhook-verified-content" --with-decryption --region $AWS_REGION | jq -r '.Parameter.Value' >> $TARGET_DIR/.env

packages:
yum:
jq: []
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"es6": true,
"node": true
},
"ignorePatterns": ["./frontend"],
"ignorePatterns": ["./shared", "./frontend"],
"extends": ["eslint:recommended", "plugin:prettier/recommended"],
"globals": {
"Atomics": "readonly",
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,25 @@ jobs:
${{ runner.OS }}-
- run: npm ci

test-e2e:
needs: install
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '14.x'
- name: Load Node.js modules
uses: actions/cache@v2
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }}
- run: npm ci
- run: npm run test-e2e

test-frontend:
needs: install
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions .template-env
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ FORMSG_SDK_MODE=

# IS_SP_MAINTENANCE=
# IS_CP_MAINTENANCE=
# MYINFO_BANNER_CONTENT=

## Per-minute, per-IP request limits applied to specific endpoints
# SUBMISSIONS_RATE_LIMIT=
Expand Down
290 changes: 267 additions & 23 deletions CHANGELOG.md

Large diffs are not rendered by default.

32 changes: 0 additions & 32 deletions CREDITS.md
Original file line number Diff line number Diff line change
Expand Up @@ -1293,38 +1293,6 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


-------------------------------------------------------------------------------

## Project
express-device

### Source
https://github.com/rguerreiro/express-device

### License
(The MIT License)

Copyright (c) 2012-2015 Rodrigo Guerreiro

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

-------------------------------------------------------------------------------

## Project
Expand Down
6 changes: 5 additions & 1 deletion Dockerrun.aws.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
{
"HostDirectory": "/certs",
"ContainerDirectory": "/certs"
},
{
"HostDirectory": "/etc/formsg/.env",
"ContainerDirectory": "/opt/formsg/.env"
}
]
}
}
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,6 @@ FormSG requires some environment variables in order to function.
More information about the required environment variables can be seen in
[DEPLOYMENT_SETUP.md](/docs/DEPLOYMENT_SETUP.md).

The docker-compose file declares some blank environment variables that are secret and cannot be committed into
the repository. See below instructions to get them injected into the container.

We provide a [`.template-env`](./.template-env) file with the secrets blanked out. You can copy and
paste the variables described into a self-created `.env` file, replacing the
required values with your own.
Expand Down
7 changes: 7 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,18 @@ services:
- CORPPASS_IDP_ID=https://saml.corppass.gov.sg/FIM/sps/CorpIDPFed/saml20
- IS_SP_MAINTENANCE
- IS_CP_MAINTENANCE
- MYINFO_BANNER_CONTENT
- MYINFO_CLIENT_CONFIG=dev
- MYINFO_FORMSG_KEY_PATH=./node_modules/@opengovsg/mockpass/static/certs/key.pem
- MYINFO_CERT_PATH=./node_modules/@opengovsg/mockpass/static/certs/spcp.crt
- MYINFO_CLIENT_ID=mockClientId
- MYINFO_CLIENT_SECRET=mockClientSecret
- SGID_ENDPOINT=http://localhost:5156/sgid/v1/oauth
- SGID_CLIENT_ID=sgidclientid
- SGID_CLIENT_SECRET=sgidclientsecret
- SGID_REDIRECT_URI=http://localhost:5000/sgid/login
- SGID_PRIVATE_KEY=./node_modules/@opengovsg/mockpass/static/certs/key.pem
- SGID_PUBLIC_KEY=./node_modules/@opengovsg/mockpass/static/certs/server.crt
- SES_PASS
- SES_USER
- OTP_LIFE_SPAN
Expand Down
16 changes: 16 additions & 0 deletions docs/DEPLOYMENT_SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Infrastructure
- AWS Elastic Beanstalk / EC2 for hosting and deployment
- AWS Elastic File System for mounting files (i.e. SingPass/MyInfo private keys into the `/certs` directory)
- AWS S3 for image and logo hosting, attachments for Storage Mode forms
- AWS Service Manager - Parameter Store, for holding environment variable configuration

DevOps

Expand Down Expand Up @@ -104,8 +105,22 @@ The following env variables are set in Travis:

## Environment Variables

These are configured by creating groups of environment variables formatted like `.env` files in the Parameter
Store of AWS Service Manager. These groups have names formatted as `<environment>-<category>`.

The environment for each group is user-defined, and should be specified in the Elastic Beanstalk configuration
as the environment variable `SSM_PREFIX`.

The list of categories can be inferred by looking at the file `.ebextensions/env-file-creation.config`.

### Core Features

#### AWS Service Manager

| Variable | Description |
| :----------- | ------------------------------------------------------------------------------------------------------------ |
| `SSM_PREFIX` | String prefix (typically the environment name) for AWS SSM parameter names to create a .env file for FormSG. |

#### App Config

| Variable | Description |
Expand Down Expand Up @@ -175,6 +190,7 @@ SITE_BANNER_CONTENT=hello:This is an invalid banner type, and the full text will
| `ADMIN_BANNER_CONTENT` | If set, displays a banner message on private admin routes such as the form list page as well as form builder pages. |
| `IS_LOGIN_BANNER` | If set, displays a banner message on the login page. |
| `IS_GENERAL_MAINTENANCE` | If set, displays a banner message on all forms. Overrides `IS_SP_MAINTENANCE` and `IS_CP_MAINTENANCE`. |
| `MYINFO_BANNER_CONTENT` | all public **MyInfo-enabled** forms |
| `IS_SP_MAINTENANCE` | all public **SingPass-enabled** forms |
| `IS_CP_MAINTENANCE` | all public **CorpPass-enabled** forms |

Expand Down
Loading

0 comments on commit 8cb1fd9

Please sign in to comment.