Merge pull request #17930 from mozilla/build-all-auth-scripts

fix(tsc): compile all ts in auth server's script dir
This commit is contained in:
Barry Chen 2024-10-30 09:53:15 -05:00 коммит произвёл GitHub
Родитель 6ffea7518b 0f524c0588
Коммит 7c4d789df5
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
2 изменённых файлов: 6 добавлений и 4 удалений

Просмотреть файл

@ -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);

Просмотреть файл

@ -12,7 +12,7 @@
},
"include": [
"bin/*",
"scripts/*.ts",
"scripts/**/*.ts",
"scripts/delete-account.js",
"lib/senders/emails/templates/*/includes.ts"
]