Skip to content

Commit

Permalink
chore(deps-dev): bump prettier from 2.2.1 to 2.3.1 (#2075)
Browse files Browse the repository at this point in the history
* chore(deps-dev): bump prettier from 2.2.1 to 2.3.1

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

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

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

* ref: run npm lint

* ref: run npm run lint-html

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Kar Rui Lau <[email protected]>
  • Loading branch information
dependabot[bot] and karrui authored Jun 7, 2021
1 parent f8f235a commit 93b46a6
Show file tree
Hide file tree
Showing 112 changed files with 1,325 additions and 1,382 deletions.
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@
"mongodb-memory-server-core": "^6.9.6",
"ngrok": "^4.0.1",
"optimize-css-assets-webpack-plugin": "^5.0.1",
"prettier": "^2.2.1",
"prettier": "^2.3.1",
"proxyquire": "^2.1.3",
"regenerator": "^0.14.4",
"rimraf": "^3.0.2",
Expand Down
22 changes: 11 additions & 11 deletions src/app/config/feature-manager/aggregate-stats.config.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import { FeatureNames, RegisterableFeature } from './types'

const aggregateCollectionFeature: RegisterableFeature<FeatureNames.AggregateStats> = {
name: FeatureNames.AggregateStats,
schema: {
aggregateCollection: {
doc:
'Has to be defined (i.e. =true) if FormStats collection is to be used',
format: '*',
default: null,
env: 'AGGREGATE_COLLECTION',
const aggregateCollectionFeature: RegisterableFeature<FeatureNames.AggregateStats> =
{
name: FeatureNames.AggregateStats,
schema: {
aggregateCollection: {
doc: 'Has to be defined (i.e. =true) if FormStats collection is to be used',
format: '*',
default: null,
env: 'AGGREGATE_COLLECTION',
},
},
},
}
}

export default aggregateCollectionFeature
21 changes: 11 additions & 10 deletions src/app/config/feature-manager/google-analytics.config.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
import { FeatureNames, RegisterableFeature } from './types'

const googleAnalyticsFeature: RegisterableFeature<FeatureNames.GoogleAnalytics> = {
name: FeatureNames.GoogleAnalytics,
schema: {
GATrackingID: {
doc: 'Google Analytics tracking ID',
format: String,
default: null,
env: 'GA_TRACKING_ID',
const googleAnalyticsFeature: RegisterableFeature<FeatureNames.GoogleAnalytics> =
{
name: FeatureNames.GoogleAnalytics,
schema: {
GATrackingID: {
doc: 'Google Analytics tracking ID',
format: String,
default: null,
env: 'GA_TRACKING_ID',
},
},
},
}
}

export default googleAnalyticsFeature
3 changes: 1 addition & 2 deletions src/app/config/feature-manager/intranet.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ export const intranetFeature: RegisterableFeature<FeatureNames.Intranet> = {
name: FeatureNames.Intranet,
schema: {
intranetIpListPath: {
doc:
'Path to file containing list of intranet IP addresses, separated by newlines',
doc: 'Path to file containing list of intranet IP addresses, separated by newlines',
format: String,
default: null,
env: 'INTRANET_IP_LIST_PATH',
Expand Down
48 changes: 16 additions & 32 deletions src/app/config/feature-manager/spcp-myinfo.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ const spcpMyInfoFeature: RegisterableFeature<FeatureNames.SpcpMyInfo> = {
name: FeatureNames.SpcpMyInfo,
schema: {
isSPMaintenance: {
doc:
'If set, displays a banner message on SingPass forms. Overrides IS_CP_MAINTENANCE',
doc: 'If set, displays a banner message on SingPass forms. Overrides IS_CP_MAINTENANCE',
format: '*',
default: null,
env: 'IS_SP_MAINTENANCE',
Expand Down Expand Up @@ -46,29 +45,25 @@ const spcpMyInfoFeature: RegisterableFeature<FeatureNames.SpcpMyInfo> = {
env: 'CP_COOKIE_MAX_AGE',
},
spIdpId: {
doc:
'Partner ID of National Digital Identity Office for SingPass authentication',
doc: 'Partner ID of National Digital Identity Office for SingPass authentication',
format: 'url',
default: null,
env: 'SINGPASS_IDP_ID',
},
cpIdpId: {
doc:
'Partner ID of National Digital Identity Office for CorpPass authentication',
doc: 'Partner ID of National Digital Identity Office for CorpPass authentication',
format: 'url',
default: null,
env: 'CORPPASS_IDP_ID',
},
spPartnerEntityId: {
doc:
'Partner ID registered with National Digital Identity Office for SingPass authentication',
doc: 'Partner ID registered with National Digital Identity Office for SingPass authentication',
format: 'url',
default: null,
env: 'SINGPASS_PARTNER_ENTITY_ID',
},
cpPartnerEntityId: {
doc:
'Partner ID registered with National Digital Identity Office for CorpPass authentication',
doc: 'Partner ID registered with National Digital Identity Office for CorpPass authentication',
format: 'url',
default: null,
env: 'CORPPASS_PARTNER_ENTITY_ID',
Expand Down Expand Up @@ -98,78 +93,67 @@ const spcpMyInfoFeature: RegisterableFeature<FeatureNames.SpcpMyInfo> = {
env: 'CORPPASS_IDP_ENDPOINT',
},
spEsrvcId: {
doc:
'e-service ID registered with National Digital Identity office for SingPass authentication',
doc: 'e-service ID registered with National Digital Identity office for SingPass authentication',
format: String,
default: null,
env: 'SINGPASS_ESRVC_ID',
},
cpEsrvcId: {
doc:
'e-service ID registered with National Digital Identity office for CorpPass authentication',
doc: 'e-service ID registered with National Digital Identity office for CorpPass authentication',
format: String,
default: null,
env: 'CORPPASS_ESRVC_ID',
},
spFormSgKeyPath: {
doc:
'Path to X.509 key used for SingPass related communication with National Digital Identity office',
doc: 'Path to X.509 key used for SingPass related communication with National Digital Identity office',
format: String,
default: null,
env: 'SP_FORMSG_KEY_PATH',
},
cpFormSgKeyPath: {
doc:
'Path to X.509 key used for CorpPass related communication with National Digital Identity office',
doc: 'Path to X.509 key used for CorpPass related communication with National Digital Identity office',
format: String,
default: null,
env: 'CP_FORMSG_KEY_PATH',
},
spFormSgCertPath: {
doc:
'Path to X.509 cert used for SingPass related communication with National Digital Identity office',
doc: 'Path to X.509 cert used for SingPass related communication with National Digital Identity office',
format: String,
default: null,
env: 'SP_FORMSG_CERT_PATH',
},
cpFormSgCertPath: {
doc:
'Path to X.509 cert used for CorpPass related communication with National Digital Identity office',
doc: 'Path to X.509 cert used for CorpPass related communication with National Digital Identity office',
format: String,
default: null,
env: 'CP_FORMSG_CERT_PATH',
},
spIdpCertPath: {
doc:
'Path to National Digital Identity offices X.509 cert used for SingPass related communication',
doc: 'Path to National Digital Identity offices X.509 cert used for SingPass related communication',
format: String,
default: null,
env: 'SP_IDP_CERT_PATH',
},
cpIdpCertPath: {
doc:
'Path to National Digital Identity offices X.509 cert used for CorpPass related communication',
doc: 'Path to National Digital Identity offices X.509 cert used for CorpPass related communication',
format: String,
default: null,
env: 'CP_IDP_CERT_PATH',
},
myInfoClientMode: {
doc:
'Configures MyInfoGovClient. Set this to either `stg` or `prod` to fetch MyInfo data from the corresponding endpoints.',
doc: 'Configures MyInfoGovClient. Set this to either `stg` or `prod` to fetch MyInfo data from the corresponding endpoints.',
format: Object.values(MyInfoMode),
default: MyInfoMode.Production,
env: 'MYINFO_CLIENT_CONFIG',
},
myInfoKeyPath: {
doc:
'Filepath to MyInfo private key, which is used to decrypt data and sign requests when communicating with MyInfo.',
doc: 'Filepath to MyInfo private key, which is used to decrypt data and sign requests when communicating with MyInfo.',
format: String,
default: null,
env: 'MYINFO_FORMSG_KEY_PATH',
},
myInfoCertPath: {
doc:
"Path to MyInfo's public certificate, which is used to verify their signature.",
doc: "Path to MyInfo's public certificate, which is used to verify their signature.",
format: String,
default: null,
env: 'MYINFO_CERT_PATH',
Expand Down
21 changes: 11 additions & 10 deletions src/app/config/feature-manager/verified-fields.config.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
import { FeatureNames, RegisterableFeature } from './types'

const verifiedFieldsFeature: RegisterableFeature<FeatureNames.VerifiedFields> = {
name: FeatureNames.VerifiedFields,
schema: {
verificationSecretKey: {
doc: 'The secret key for signing verified responses (email, mobile)',
format: String,
default: null,
env: 'VERIFICATION_SECRET_KEY',
const verifiedFieldsFeature: RegisterableFeature<FeatureNames.VerifiedFields> =
{
name: FeatureNames.VerifiedFields,
schema: {
verificationSecretKey: {
doc: 'The secret key for signing verified responses (email, mobile)',
format: String,
default: null,
env: 'VERIFICATION_SECRET_KEY',
},
},
},
}
}

export default verifiedFieldsFeature
22 changes: 11 additions & 11 deletions src/app/config/feature-manager/webhook-verified-content.config.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import { FeatureNames, RegisterableFeature } from './types'

const webhookVerifiedContentFeature: RegisterableFeature<FeatureNames.WebhookVerifiedContent> = {
name: FeatureNames.WebhookVerifiedContent,
schema: {
signingSecretKey: {
doc:
'The secret key for signing verified content passed into the database and for signing webhooks',
format: String,
default: null,
env: 'SIGNING_SECRET_KEY',
const webhookVerifiedContentFeature: RegisterableFeature<FeatureNames.WebhookVerifiedContent> =
{
name: FeatureNames.WebhookVerifiedContent,
schema: {
signingSecretKey: {
doc: 'The secret key for signing verified content passed into the database and for signing webhooks',
format: String,
default: null,
env: 'SIGNING_SECRET_KEY',
},
},
},
}
}

export default webhookVerifiedContentFeature
2 changes: 1 addition & 1 deletion src/app/config/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export const customFormat = format.printf((info) => {
// e.g. logger.info('param1', 'param2')
// The second parameter onwards will be passed into the `splat` key and
// require formatting (because that is just how the library is written).
const splatSymbol = (Symbol.for('splat') as unknown) as string
const splatSymbol = Symbol.for('splat') as unknown as string
const splatArgs = info[splatSymbol] || []
const rest = splatArgs.map((data: any) => formatWithInspect(data)).join(' ')
const msg = formatWithInspect(info.message)
Expand Down
27 changes: 9 additions & 18 deletions src/app/config/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,7 @@ export const optionalVarsSchema: Schema<IOptionalVarsSchema> = {
env: 'IS_LOGIN_BANNER',
},
siteBannerContent: {
doc:
'The banner message to show on all pages. Allows for HTML. Will supersede all other banner content if it exists.',
doc: 'The banner message to show on all pages. Allows for HTML. Will supersede all other banner content if it exists.',
format: String,
default: '',
env: 'SITE_BANNER_CONTENT',
Expand All @@ -170,8 +169,7 @@ export const optionalVarsSchema: Schema<IOptionalVarsSchema> = {
},
},
formsgSdkMode: {
doc:
'Inform SDK which public keys are to be used to sign, encrypt, or decrypt data that is passed to it',
doc: 'Inform SDK which public keys are to be used to sign, encrypt, or decrypt data that is passed to it',
format: ['staging', 'production', 'development', 'test'],
default: 'production' as PackageMode,
env: 'FORMSG_SDK_MODE',
Expand All @@ -190,8 +188,7 @@ export const optionalVarsSchema: Schema<IOptionalVarsSchema> = {
env: 'MAIL_LOGGER',
},
debug: {
doc:
'If set to true, then logs SMTP traffic, otherwise logs only transaction events.',
doc: 'If set to true, then logs SMTP traffic, otherwise logs only transaction events.',
format: 'Boolean',
default: false,
env: 'MAIL_DEBUG',
Expand All @@ -209,8 +206,7 @@ export const optionalVarsSchema: Schema<IOptionalVarsSchema> = {
env: 'CHROMIUM_BIN',
},
maxMessages: {
doc:
'Nodemailer config to help to keep the connection up-to-date for long-running messaging',
doc: 'Nodemailer config to help to keep the connection up-to-date for long-running messaging',
format: 'int',
default: 100,
env: 'SES_MAX_MESSAGES',
Expand All @@ -236,8 +232,7 @@ export const optionalVarsSchema: Schema<IOptionalVarsSchema> = {
env: 'AWS_REGION',
},
customCloudWatchGroup: {
doc:
'Name of CloudWatch log group to store short-term logs. Log streams are separated by date.',
doc: 'Name of CloudWatch log group to store short-term logs. Log streams are separated by date.',
format: String,
default: '',
env: 'CUSTOM_CLOUDWATCH_LOG_GROUP',
Expand All @@ -251,8 +246,7 @@ export const optionalVarsSchema: Schema<IOptionalVarsSchema> = {
env: 'PORT',
},
otpLifeSpan: {
doc:
'OTP Life Span for Login. (Should be in miliseconds, e.g. 1000 * 60 * 15 = 15 mins)',
doc: 'OTP Life Span for Login. (Should be in miliseconds, e.g. 1000 * 60 * 15 = 15 mins)',
format: 'int',
default: 900000,
env: 'OTP_LIFE_SPAN',
Expand All @@ -272,15 +266,13 @@ export const optionalVarsSchema: Schema<IOptionalVarsSchema> = {
},
rateLimit: {
submissions: {
doc:
'Per-minute, per-IP, per-instance request limit for submissions endpoints',
doc: 'Per-minute, per-IP, per-instance request limit for submissions endpoints',
format: 'int',
default: 80,
env: 'SUBMISSIONS_RATE_LIMIT',
},
sendAuthOtp: {
doc:
'Per-minute, per-IP request limit for OTPs to log in to the admin console',
doc: 'Per-minute, per-IP request limit for OTPs to log in to the admin console',
format: 'int',
default: 60,
env: 'SEND_AUTH_OTP_RATE_LIMIT',
Expand Down Expand Up @@ -361,8 +353,7 @@ export const loadS3BucketUrlSchema = ({
env: 'AWS_ENDPOINT',
},
attachmentBucketUrl: {
doc:
'Url of attachment S3 bucket derived from S3 endpoint and bucket name',
doc: 'Url of attachment S3 bucket derived from S3 endpoint and bucket name',
format: (val) =>
validateS3BucketUrl(val, { isDev, hasTrailingSlash: true, region }),
default: null,
Expand Down
10 changes: 4 additions & 6 deletions src/app/models/__tests__/admin_verification.server.model.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,8 @@ describe('AdminVerification Model', () => {
await expect(AdminVerification.countDocuments()).resolves.toEqual(1)

// Act
const actualPromise = AdminVerification.incrementAttemptsByAdminId(
adminId,
)
const actualPromise =
AdminVerification.incrementAttemptsByAdminId(adminId)

// Assert
// Exactly the same as initial params, but with numOtpAttempts
Expand All @@ -256,9 +255,8 @@ describe('AdminVerification Model', () => {
const freshAdminId = new ObjectID()

// Act
const actualPromise = AdminVerification.incrementAttemptsByAdminId(
freshAdminId,
)
const actualPromise =
AdminVerification.incrementAttemptsByAdminId(freshAdminId)

// Assert
await expect(actualPromise).resolves.toBeNull()
Expand Down
Loading

0 comments on commit 93b46a6

Please sign in to comment.