From 0f524c0588858fe0155d4d99d388df5489ed75fe Mon Sep 17 00:00:00 2001 From: Barry Chen Date: Tue, 29 Oct 2024 20:34:25 -0500 Subject: [PATCH] fix(tsc): compile all ts in auth server's script dir --- .../delete-inactive-accounts/get-inactive-account-uids.ts | 8 +++++--- packages/fxa-auth-server/tsconfig.json | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/fxa-auth-server/scripts/delete-inactive-accounts/get-inactive-account-uids.ts b/packages/fxa-auth-server/scripts/delete-inactive-accounts/get-inactive-account-uids.ts index cff3cc5e07..6d0f810d5c 100755 --- a/packages/fxa-auth-server/scripts/delete-inactive-accounts/get-inactive-account-uids.ts +++ b/packages/fxa-auth-server/scripts/delete-inactive-accounts/get-inactive-account-uids.ts @@ -43,7 +43,7 @@ import { PlaySubscriptions } from '../../lib/payments/iap/google-play/subscripti import { AppleIAP } from '../../lib/payments/iap/apple-app-store/apple-iap'; import { AppStoreSubscriptions } from '../../lib/payments/iap/apple-app-store/subscriptions'; -const setDateToUTC = (someDate) => { +const setDateToUTC = (someDate: number) => { const utcDate = new Date(someDate); utcDate.setUTCHours(0, 0, 0, 0); return utcDate; @@ -187,14 +187,16 @@ const init = async () => { const hasActiveSessionToken = async (accountRecord: Account) => { const sessionTokens = await fxaDb.sessions(accountRecord.uid); return sessionTokens.some( - (token: SessionToken) => token.lastAccessTime >= activeByDateTimestamp + (token: any) => token.lastAccessTime >= activeByDateTimestamp ); }; const hasActiveRefreshToken = async (accountRecord: Account) => { const refreshTokens = await oauthDb.getRefreshTokensByUid( accountRecord.uid ); - return refreshTokens.some((t) => t.lastUsedAt >= activeByDateTimestamp); + return refreshTokens.some( + (t: any) => t.lastUsedAt >= activeByDateTimestamp + ); }; const hasAccessToken = async (accountRecord: Account) => { const accessTokens = await oauthDb.getAccessTokensByUid(accountRecord.uid); diff --git a/packages/fxa-auth-server/tsconfig.json b/packages/fxa-auth-server/tsconfig.json index 7eed3e8323..f117b5bb66 100644 --- a/packages/fxa-auth-server/tsconfig.json +++ b/packages/fxa-auth-server/tsconfig.json @@ -12,7 +12,7 @@ }, "include": [ "bin/*", - "scripts/*.ts", + "scripts/**/*.ts", "scripts/delete-account.js", "lib/senders/emails/templates/*/includes.ts" ]