fix(tsc): compile all ts in auth server's script dir

This commit is contained in:
Barry Chen 2024-10-29 20:34:25 -05:00
Родитель 7fbec8995a
Коммит 0f524c0588
Не найден ключ, соответствующий данной подписи
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 { AppleIAP } from '../../lib/payments/iap/apple-app-store/apple-iap';
import { AppStoreSubscriptions } from '../../lib/payments/iap/apple-app-store/subscriptions'; import { AppStoreSubscriptions } from '../../lib/payments/iap/apple-app-store/subscriptions';
const setDateToUTC = (someDate) => { const setDateToUTC = (someDate: number) => {
const utcDate = new Date(someDate); const utcDate = new Date(someDate);
utcDate.setUTCHours(0, 0, 0, 0); utcDate.setUTCHours(0, 0, 0, 0);
return utcDate; return utcDate;
@ -187,14 +187,16 @@ const init = async () => {
const hasActiveSessionToken = async (accountRecord: Account) => { const hasActiveSessionToken = async (accountRecord: Account) => {
const sessionTokens = await fxaDb.sessions(accountRecord.uid); const sessionTokens = await fxaDb.sessions(accountRecord.uid);
return sessionTokens.some( return sessionTokens.some(
(token: SessionToken) => token.lastAccessTime >= activeByDateTimestamp (token: any) => token.lastAccessTime >= activeByDateTimestamp
); );
}; };
const hasActiveRefreshToken = async (accountRecord: Account) => { const hasActiveRefreshToken = async (accountRecord: Account) => {
const refreshTokens = await oauthDb.getRefreshTokensByUid( const refreshTokens = await oauthDb.getRefreshTokensByUid(
accountRecord.uid accountRecord.uid
); );
return refreshTokens.some((t) => t.lastUsedAt >= activeByDateTimestamp); return refreshTokens.some(
(t: any) => t.lastUsedAt >= activeByDateTimestamp
);
}; };
const hasAccessToken = async (accountRecord: Account) => { const hasAccessToken = async (accountRecord: Account) => {
const accessTokens = await oauthDb.getAccessTokensByUid(accountRecord.uid); const accessTokens = await oauthDb.getAccessTokensByUid(accountRecord.uid);

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

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